1 2009-04-11 Zoltan Varga <vargaz@gmail.com>
3 * mini.c (mini_method_compile): Disable sharing of stack slots/registers
4 and extend live ranges to cover the whole method when using xdb.
6 * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
7 do it in the trampolines.
9 * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
12 * mini-trampolines.c (mono_delegate_trampoline): Ditto.
14 * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
15 call code in full-aot mode since IMT is disabled there.
16 (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
17 new JIT no longer has that restriction.
19 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
21 * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
22 a more compact format.
23 (mono_aot_wrapper_name): New function to return a unique name for a
24 wrapper method, also used by the AOT runtime.
26 * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
29 * aot-compiler.c (add_generic_class): Add the helper methods from T[]
30 when a ICollection<T> etc is encountered.
31 (add_generic_instances): Process method arguments/locals too.
32 (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
35 * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
37 2009-04-10 Zoltan Varga <vargaz@gmail.com>
39 * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
41 * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
43 * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
44 representing the result of the decomposition. Nullify instructions
45 instead of setting them to OP_NOP since nops can't have registers
48 2009-04-09 Zoltan Varga <vargaz@gmail.com>
50 * aot-compiler.c (mono_compile_assembly): Split this huge function into
51 smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
52 info. Strip 'mapping symbols' on ARM.
54 * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
56 * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
57 this with the native genmdesc.
59 2009-04-08 Bill Holmes <billholmes54@gmail.com>
61 * aot-runtime.c: Fixing the MSVC build.
63 Code is contributed under MIT/X11 license.
65 2009-04-08 Zoltan Varga <vargaz@gmail.com>
67 * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since
68 JITted code depends on it.
70 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
72 * aot-compiler.c: Use new MonoGenericParam accessors.
74 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
76 Reduce memory usage and improve correctness wrt MonoGenericParam
77 * aot-runtime.c (decode_klass_ref): Simplify generic parameter
78 handing. Avoid allocating MonoGenericParams, but use the ones in
81 2009-04-07 Miguel de Icaza <miguel@novell.com>
83 * tasklets.c: Return exceptions in the out argument.
85 2009-04-08 Zoltan Varga <vargaz@gmail.com>
87 * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
88 opcode. Use pointer types in more places instead of casting them to
91 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
93 (mono_llvm_optimize_method): New helper function to optimize a method.
95 * method-to-ir.c (mono_emit_widen_call_res): Extract the call result
96 widening code so it could be called from more places.
97 (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
98 code paths in the call opcodes.
100 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
102 * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
104 2009-04-06 Zoltan Varga <vargaz@gmail.com>
106 * dwarfwriter.c: Use _ to separate class name
107 components as gdb can't handle '.'. Represent reference variables
110 * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
112 * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
114 * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
116 * gc-test.cs: New file with GC stack marking tests.
118 * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
119 negative numbers for vfp.
121 * basic-float.cs: Add a test.
123 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
125 * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
127 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
129 * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
130 part of tasklet/continuation support.
132 2009-04-05 Zoltan Varga <vargaz@gmail.com>
134 * mini-llvm.c (mono_llvm_emit_method): Move the handling of
135 amd64 opcodes inside an ifdef.
137 * dwarfwriter.c: Emit inheritance information for classes, emit fields
140 * dwarfwriter.c (emit_type): Emit the class info for classes.
142 2009-04-04 Zoltan Varga <vargaz@gmail.com>
144 * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
146 * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
148 * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
150 * ssa.c (mono_ssa_compute): Fix some memory leaks.
152 2009-04-03 Zoltan Varga <vargaz@gmail.com>
154 * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
156 * mini-llvm.c: Update comments.
158 * mini.h (COMPILE_LLVM): New macro.
160 * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
162 * ssa.c (mono_ssa_compute): Ditto.
164 * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
165 the unwind ops from a DWARF FDE.
167 * mini-llvm.c: Implement generation of unwind info for LLVM compiled
168 methods by extracting the dwarf unwind ops from the unwind info generated
171 * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
174 * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
177 2009-04-02 Zoltan Varga <vargaz@gmail.com>
179 * Makefile.am (llvm_sources): Enable this.
181 * mini.c (mini_method_compile): Add support for compiling with LLVM,
182 failing back to the JIT if something cannot be handled.
184 * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
187 * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
190 * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when
193 * mini-ops.h: Add a few opcodes needed by LLVM.
195 * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
198 * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
201 * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
203 * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
205 2009-04-01 Mark Probst <mark.probst@gmail.com>
207 * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
208 ridiculously large methods.
210 2009-03-31 Martin Baulig <martin@ximian.com>
212 * debug-debugger.c (debugger_remove_breakpoint): Call
213 mono_debugger_remove_class_init_callback ().
215 2009-03-31 Zoltan Varga <vargaz@gmail.com>
217 * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
218 right before emitting code, not at the start.
220 * mini.c (mono_postprocess_patches): Extract this into a separate function
221 from mono_codegen ().
223 * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
224 byref types correctly.
226 2009-03-30 Zoltan Varga <vargaz@gmail.com>
228 * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
231 2009-03-29 Zoltan Varga <vargaz@gmail.com>
233 * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before
234 indirect calls, this avoids problems where get_vcall_slot () would get
235 confused by the native code for the instruction preceeding the call.
236 (mono_arch_get_vcall_slot): Simplify this.
237 (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
239 * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
240 register allocator now seems to depend on them instead of the data in
243 * mini.c (mini_method_compile): Throw the correct type of exception if
244 mono_method_get_header () fails because of a loading error.
246 2009-03-28 Zoltan Varga <vargaz@gmail.com>
248 * mini.c (mini_method_compile): Clear the loader error if the method
249 header cannot be decoded.
251 * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual
252 interface methods on proxies correctly.
254 * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
255 this argument for vtype methods. Add precise liveness info for arguments.
257 * mini-codegen.c (mono_print_ins_index): Print the vreg of the
258 LIVERANGE_START/END opcodes.
260 * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
261 for arguments and values in registers.
263 2009-03-27 Zoltan Varga <vargaz@gmail.com>
265 * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
266 return a valuetype. Fixes #487518.
268 * iltests.il: Add a test.
270 * aot-compiler.c: Use mono_thread_create () to create helper threads.
272 * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
273 closed over a null reference correctly.
275 2009-03-26 Zoltan Varga <vargaz@gmail.com>
277 * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
279 2009-03-25 Mark Probst <mark.probst@gmail.com>
281 * mini-codegen.c (mono_local_regalloc): Don't let sregs get
282 allocated to the same registers as fixed sregs.
284 2009-03-24 Mark Probst <mark.probst@gmail.com>
286 * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
289 * method-to-ir.c: Handle more cases for
290 Interlocked.CompareExchange.
292 * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
293 mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
294 ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
296 2009-03-23 Zoltan Varga <vargaz@gmail.com>
298 * aot-runtime.c (decode_method_ref): Fix a warning.
300 * unwind.c (mono_unwind_frame): Ditto.
302 2009-03-22 Zoltan Varga <vargaz@gmail.com>
304 * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
305 (mono_compile_assembly): Enable the binary writer for full-aot as well.
307 * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
308 fix the handling of large values in the ALU_PC_G0_NC relocation.
310 2009-03-22 Zoltan Varga <vargaz@gmail.com>
312 * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
314 2009-03-22 Mark Probst <mark.probst@gmail.com>
316 * method-to-ir.c (mono_spill_global_vars): Support for ternary
319 2009-03-22 Mark Probst <mark.probst@gmail.com>
321 * method-to-ir.c: MINI_OP3 needs a comma.
323 * method-to-ir.c, mini.h, mini.c: Remove
324 mono_init_op_sreg_counts ().
326 2009-03-22 Zoltan Varga <vargaz@gmail.com>
328 * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
331 * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
334 * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
336 * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
339 2009-03-21 Mark Probst <mark.probst@gmail.com>
341 * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
342 liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
343 mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
346 2009-03-20 Zoltan Varga <vargaz@gmail.com>
348 * driver.c: Change location of gc_wrapper.h.
350 * method-to-ir.c (mono_find_block_region): Handle try clauses nested
351 inside finally clauses correctly. Fixes #485721.
353 * mini.c (mono_find_spvar_for_region): This needs to handle try regions
354 after the change above.
356 * exceptions.cs: Add a test.
358 2009-03-19 Zoltan Varga <vargaz@gmail.com>
360 * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
362 * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
363 into cfg->used_int_regs, it is not needed with the dwarf unwinder.
364 (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
366 * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
367 the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
369 2009-03-19 Sebastien Pouliot <sebastien@ximian.com>
371 * method-to-ir.c: Allow CoreCLR to throw FieldAccessException.
372 Simplify logic for ensure_method_is_allowed_to_call_method.
373 Handle wrappers on callers.
375 2009-03-19 Zoltan Varga <vargaz@gmail.com>
377 * Makefile.am (fullaotcheck): Don't run the generics tests, some of
380 * basic-simd.cs: Fix the names of some test methods.
382 2009-03-18 Geoff Norton <gnorton@novell.com>
384 * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
386 2009-03-18 Zoltan Varga <vargaz@gmail.com>
388 * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
390 2009-03-17 Jb Evain <jbevain@novell.com>
392 * driver.c: remove now uneeded call to mono_gc_base_init before
395 2009-03-17 Jb Evain <jbevain@novell.com>
397 * dwarfwriter.c (token_handler): handle more cases.
399 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
401 * method-to-ir.c: Remove more dead code (that was required only
402 because of method_is_safe). Fix compiler warnings.
404 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
406 * method-to-ir.c: Remove unneeded/useless method_is_safe
407 http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
409 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
411 * mini.c (mini_method_compile): Print the method been compiled with
412 verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
413 for people not familiar with the runtime.
415 2009-03-17 Zoltan Varga <vargaz@gmail.com>
417 * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
418 a managed object which is later put into a GList. Return its class instead.
420 * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
421 stack slots when using sgen.
423 2009-03-16 Zoltan Varga <vargaz@gmail.com>
425 * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
427 2009-03-14 Zoltan Varga <vargaz@gmail.com>
429 * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
430 > so it works on the first vreg as well.
432 2009-03-13 Zoltan Varga <vargaz@gmail.com>
434 * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
437 * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
439 * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
442 2009-03-12 Zoltan Varga <vargaz@gmail.com>
444 * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
445 native->IL offset mapping.
447 2009-03-11 Zoltan Varga <vargaz@gmail.com>
449 * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
451 * basic.cs: Add a test.
453 2009-03-11 Mark Probst <mark.probst@gmail.com>
455 * mini-x86.c (mono_arch_output_basic_block): Use different
456 registers in case the ones we want to overwrite are used by the
457 other operand. Fixes regression in #480807.
459 2009-03-10 Zoltan Varga <vargaz@gmail.com>
461 * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
463 * dwarfwriter.c (emit_line_number_info): The line number info for
464 IL code was off by one. Fix that.
466 * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
469 2009-03-09 Mark Probst <mark.probst@gmail.com>
471 Contributed under the terms of the MIT/X11 license by Steven
472 Munroe <munroesj@us.ibm.com>.
474 * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
477 2009-03-08 Zoltan Varga <vargaz@gmail.com>
479 * dwarfwriter.c (token_handler): Decode method references in non-wrappers
482 2009-03-06 Zoltan Varga <vargaz@gmail.com>
484 * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
485 the delegate ctor handling code. Fixes #482638.
487 * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
490 * iltests.il.in: Add a test.
492 * mini-darwin.c (mono_chain_signal): Remove this, it is already in
495 2009-03-05 Mark Probst <mark.probst@gmail.com>
497 * mini-trampolines.c (mono_create_jump_trampoline): If the method
498 is shared generic code, return the trampoline, even if the method
499 has already been compiled. Fixes #479763.
501 * mini.c, mini.h: New function
502 mono_jit_find_compiled_method_with_jit_info() which is the same as
503 mono_jit_find_compiled_method() but also returns the jit info.
505 2009-03-05 Mark Probst <mark.probst@gmail.com>
507 * method-to-ir.c (mono_method_to_ir): Only force the vtable var
508 for methods which actually have one. For all other methods, make
509 sure the this argument var is live the whole method.
511 * mini.c (mini_method_compile): Every shared method has a
512 this/vtable/mrgctx info. Fixes #480807.
514 2009-03-05 Mark Probst <mark.probst@gmail.com>
516 * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
517 generic/imt thunks where some entries branch through the vtable,
518 while other entries branch directly.
520 2009-03-05 Zoltan Varga <vargaz@gmail.com>
522 * mini-darwin.c (mono_chain_signal): Define this to fix the build.
524 * mini-windows.c: Ditto.
526 * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
529 2009-03-04 Zoltan Varga <vargaz@gmail.com>
531 * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
534 2009-03-04 Mark Probst <mark.probst@gmail.com>
536 * method-to-ir.c: Don't inline methods that use JMP. Fixes
539 2009-03-04 Mark Probst <mark.probst@gmail.com>
541 * exceptions-x86.c: Include debug-mini.h - fixes build.
543 2009-03-04 Martin Baulig <martin@ximian.com>
545 * debug-mini.c: Clean up the exception API and add documentation.
546 (mono_debugger_handle_exception): New public method; this is
547 called when throwing an exception or encountering an unhandled one.
548 (mono_debugger_call_exception_handler): Formerly known as
549 mono_debugger_handle_exception(); this is used to tell the
550 debugger that we're about to invoke an exception handler.
552 2009-03-04 Martin Baulig <martin@ximian.com>
554 * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
555 ../metadata/mono-debug-debugger.c; save and reset exception state.
557 2009-03-02 Martin Baulig <martin@ximian.com>
559 * debug-mini.c: Moved the debugger exception handling here from
560 ../metadata/mono-debug-debugger.c.
563 (MonoDebuggerExceptionAction): New exception typedef.
566 (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
569 (mono_amd64_throw_exception): Use the new debugger exception
573 (mono_handle_exception_internal): Don't call
574 mono_debugger_unhandled_exception() here.
576 2009-03-03 Zoltan Varga <vargaz@gmail.com>
578 * mini.c aot-compiler.c: Update after the changes to
579 mono_marshal_get_runtime_invoke ().
581 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot):
582 Virtual generic methods might not have method->slot set, work around
585 * generics.cs: Add a test.
587 2009-03-02 Geoff Norton <gnorton@novell.com>
590 * driver.c: Allow signal chaining of SIGFPE as well.
592 2009-03-02 Zoltan Varga <vargaz@gmail.com>
594 * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
595 this since it now receives the method not its generic context in the
598 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
599 generic/imt thunks where some entries branch through the vtable, while
600 other entries branch directly.
602 * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
604 * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call
605 support for interface methods as well.
607 * mini-trampolines.c: Add support for virtual generic methods in interfaces
608 using the normal IMT thunks.
610 generics.cs: Add new tests.
612 * method-to-ir.c (mono_method_to_ir): Pass the method instead of
613 the generic inst to the generic imt thunks. This fixes AOT support,
614 improves consistency with the normal IMT thunks, and makes it easier to
615 add support for interface generic virtual methods later.
617 * mini-trampolines.c (mono_magic_trampoline): Ditto.
619 2009-02-28 Zoltan Varga <vargaz@gmail.com>
621 * driver.c (mono_set_signal_chaining): New public API function to enable
622 signal chaining on POSIX platforms.
624 * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland
625 (si@lindenlab.com) to implement signal chaining. The original patch was
626 contributed under the MIT X/11 license:
627 https://bugzilla.novell.com/show_bug.cgi?id=318894
629 2009-02-27 Zoltan Varga <vargaz@gmail.com>
631 * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
632 too until it can be made to run on amd64.
634 2009-02-26 Zoltan Varga <vargaz@gmail.com>
636 * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
637 to get_generic_context_from_code () + get_call_info () if possible.
639 2009-02-25 Zoltan Varga <vargaz@gmail.com>
641 * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
642 suspend-on-sigsegv functionality.
644 * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
645 to suspend when a native SIGSEGV is received. This is useful for debugging
646 crashes which don't happen under gdb, since a live process contains more
647 information than a core file.
649 * mini-exceptions.c (mono_print_thread_dump): Use
650 MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
652 * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
654 * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
656 * basic-float.cs: Disable the tests which currently fail on amd64.
658 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null
659 value to mono_arch_patch_callsite () to fix crashes.
661 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
663 2009-02-23 Zoltan Varga <vargaz@gmail.com>
665 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
666 nop code by patching the call address to point to the nullified class init
667 trampoline, as the former does not seem to be safe on SMP machines.
669 2009-02-23 Mark Probst <mark.probst@gmail.com>
671 * mini-ops.h: Fix the argument types for a few x86 opcodes where
674 2009-02-23 Zoltan Varga <vargaz@gmail.com>
676 * basic-float.cs basic-calls.cs: Fix warnings.
678 2009-02-22 Mark Probst <mark.probst@gmail.com>
680 * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
681 correct frame pointer in the LMF. Should fix #478394.
683 2009-02-22 Zoltan Varga <vargaz@gmail.com>
685 * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
687 * image-writer.c: Make the binary writer less verbose.
689 2009-02-21 Zoltan Varga <vargaz@gmail.com>
691 * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
692 are called from runtime invoke wrappers.
694 2009-02-20 Zoltan Varga <vargaz@gmail.com>
696 * cpu-ppc.md (store_memindex): Increase the size of this.
698 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
700 Extracted from a patch by Kornél Pál <kornelpal@gmail.com>.
702 * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
704 * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
707 Last fix for of #467201.
710 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
712 Extracted from a patch by Kornél Pál <kornelpal@gmail.com>.
714 * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
715 and long_conv_to_r8_2:
717 Fixed part of #467201.
719 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
721 Extracted from a patch by Kornél Pál <kornelpal@gmail.com>.
723 * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
724 conversion to 32 bits.
726 * cpu-x86.md: Increase the size of int_conv_to_r4.
728 * basic-float.cs: Add a test for this.
730 Fixed part of #467201.
732 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
734 Extracted from a patch by Kornél Pál <kornelpal@gmail.com>.
736 * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
737 conversion to 64 bits.
739 * basic-float.cs: Add a test for this.
741 Fixed part of #467201.
743 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
745 Extracted from a patch by Kornél Pál <kornelpal@gmail.com>.
747 * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
748 This behavior is compatible with MS.
750 * iltest.il.in: Add a test for this.
752 Fixed part of #467201.
754 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
756 Extracted from a patch by Kornél Pál <kornelpal@gmail.com>.
758 * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
759 change the precision of the value.
761 * cpu-x86.md: Define len for float_conv_to_r4.
763 * basic-float.cs: Add a test for this.
765 Fixed part of #467201.
767 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
769 * mini.c: Adjust locking order to the new semantics where the loader lock
772 2009-02-18 Rodrigo Kumpera <rkumpera@novell.com>
781 * mini-trampolines.c:
794 * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
796 2009-02-18 Zoltan Varga <vargaz@gmail.com>
798 * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
801 2009-02-17 Zoltan Varga <vargaz@gmail.com>
803 * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
804 for cctors if needed.
806 2009-02-17 Mark Probst <mark.probst@gmail.com>
808 * mini-ppc.c: Fix build on Darwin.
810 2009-02-17 Zoltan Varga <vargaz@gmail.com>
812 * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
813 version instead of 3 as valgrind doesn't like version 3.
815 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
817 * aot-compiler.c (mono_aot_method_hash): New function to return a hash
818 usable for hashing methods.
819 (emit_extra_methods): Use the new hash to avoid putting every method in the
822 * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
824 * aot-runtime.c (can_method_ref_match_method): New function to quickly check
825 whenever a method ref could match a method.
827 * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
830 * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded
833 * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
835 * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
838 * method-to-ir.c (mono_method_check_inlining): Avoid calling
839 mono_method_get_header () on inflated methods as an optimization.
841 2009-02-16 Zoltan Varga <vargaz@gmail.com>
843 * ssa.c (fold_ins): Fix another crash if the instruction following the
844 switch was optimized away.
846 2009-02-16 Mark Probst <mark.probst@gmail.com>
848 Contributed under the terms of the MIT/X11 license by Steven
849 Munroe <munroesj@us.ibm.com>.
851 * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
853 2009-02-16 Zoltan Varga <vargaz@gmail.com>
855 * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
856 around the mono_domain_alloc calls, it is now done by the functions
859 * aot-compiler.c (compile_method): Only add wrappers referenced by
860 the method if compiling with full AOT.
861 (mono_compile_assembly): Error out if --aot=full is specified on
862 a platform where it is not supported.
864 * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
867 * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
870 * aot-runtime.c (load_named_code): Handle
871 mono_arm_throw_exception_by_token.
873 * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
875 * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
878 * Makefile.am (fullaotcheck): Exit if a test fails.
880 * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
882 (mono_compile_assembly): Handle the assembler failing.
884 * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
885 accepting subsections of .bss.
887 * ssa.c (visit_inst): Fix a crash if the instruction following a switch
890 * aot-compiler.c: Remove some unused includes.
892 * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
893 now in MonoImageWriter.
895 * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
896 code sequence which matches a non-virtual call. Fixes #472654.
898 2009-02-15 Zoltan Varga <vargaz@gmail.com>
900 * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
903 * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
904 use the image/dwarf writers directly.
906 * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
909 * aot-compiler.c (MonoAotCompile): Remove fields which are now in
912 * image-writer.h: Fix some typos.
914 * dwarfwriter.h dwarfwriter.c: New files.
916 * aot-compiler.c: Extract the DWARF info writing functionality into a
919 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
920 argument to return unwind info.
922 * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
924 * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
926 * aot-runtime.c (decode_method_ref): Add a case for
927 MONO_AOT_METHODREF_WRAPPER_NAME.
929 * mini.h: Add constants for the magic numbers used in encode_method_ref ()
932 * aot-compiler.c (encode_method_ref): Use the new constants.
934 * aot-runtime.c (decode_method_ref): Ditto.
936 * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
937 be compiled, not the icall itself.
939 2009-02-14 Zoltan Varga <vargaz@gmail.com>
941 * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
942 using decode_method_ref ().
944 * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
945 convert it to an in32. Fixes #475859.
947 * arrays.cs: Add a test.
949 2009-02-12 Zoltan Varga <vargaz@gmail.com>
951 * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in
954 * basic-long.cs: Add a test.
956 2009-02-12 Mark Probst <mark.probst@gmail.com>
958 * mini-x86.c, mini-x86.h: Very simple frame pointer removal. We
959 remove the frame pointer in leaf methods which don't receive any
960 arguments, don't throw exceptions and don't do dynamic stack
963 2009-02-12 Zoltan Varga <vargaz@gmail.com>
965 * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
966 the fail_tramp changes. Hopefully fixes #475132.
968 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
970 * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
971 instead of mono_metadata_signature_dup_full.
973 2009-02-12 Zoltan Varga <vargaz@gmail.com>
975 * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
976 for processing jump tables. Fixes #473787.
978 2009-02-11 Mark Probst <mark.probst@gmail.com>
980 * mini-generic-sharing.c: mini_method_get_context() just calls
981 mono_method_get_context_general() now.
983 * mini.c, mini.h: Moved get_object_generic_inst(),
984 construct_object_context_for_method() and
985 mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
987 2009-02-11 Zoltan Varga <vargaz@gmail.com>
989 * branch-opts.c (mono_if_conversion): Handle the case where the merged
990 basic block fell through to its successor bblock without a branch. Fixes
993 * iltests.il.in: Add a test.
995 * aot-compiler.c (encode_method_ref): Encode methods of array types.
996 (can_encode_patch): We can now handle arrays of generic parameters and
999 * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
1001 * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
1002 the AOT file to avoid some #ifdefs in aot-runtime.c
1004 * mini.h: Bump AOT file format version.
1006 2009-02-10 Zoltan Varga <vargaz@gmail.com>
1008 * Makefile.am (fullaotcheck): Make this run the tests.
1010 * aot-compiler.c: Make the printing of skipped methods runtime configurable.
1012 2009-02-10 Mark Probst <mark.probst@gmail.com>
1014 * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
1015 individually. Fixes #473482.
1017 2009-02-10 Zoltan Varga <vargaz@gmail.com>
1019 * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
1021 2009-02-09 Jeffrey Stedfast <fejj@novell.com>
1023 * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
1024 (mono_compile_assembly): Hush compile warnings about
1025 uninitialized [tmp_]outfile_name variables in the !use_bin_writer
1028 2009-02-10 Zoltan Varga <vargaz@gmail.com>
1030 * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
1032 * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
1034 * aot-compiler.c: Fix arm support.
1036 * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
1037 img_writer_emit_unset_mode () function.
1039 * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
1040 (mono_unwind_get_dwarf_pc_reg): Ditto.
1042 * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
1043 Move almost all platform specific code to a set of arch_ functions,
1044 and document them to ease porting.
1046 * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
1048 * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
1050 * aot-compiler.c: Extract the image writing functionality into a separate
1051 module to reduce the size of this file.
1053 2009-02-09 Geoff Norton <gnorton@novell.com>
1055 * mini-s390.c: Fix the signature of emit_sig_cookie.
1057 2009-02-09 Zoltan Varga <vargaz@gmail.com>
1059 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
1061 * aot-runtime.c (is_shared_got_patch): Ditto.
1063 * aot-runtime.c (load_named_code): Cope with the fact that
1064 decode_got_entry () won't decode the patch fully if its corresponding got
1065 entry is already filled.
1067 * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full):
1069 (mono_arch_create_monitor_exit_trampoline_full): Ditto.
1071 * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
1072 as the moving pointer instead of 'buf' for consistency with the rest of the
1074 (mono_arch_create_monitor_exit_trampoline): Ditto.
1076 * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
1077 generic_class_init trampolines.
1078 (add_generic_class): Extract some code from add_generic_instances () into a
1079 separate function so it can be called from other places too.
1080 (compile_method): Call add_generic_class () for the classes of inflated methods
1081 referenced by the method.
1082 (can_encode_patch): Allow references to generic parameters.
1084 * aot-runtime.c: Add support the patches required by the new trampolines.
1086 * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
1089 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
1092 * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
1093 this from get_throw_pending_exception, make the signature full aot compatible.
1095 * Makefile.am (fullaotcheck): New target to run full-aot tests.
1097 * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
1099 * exceptions.cs: Add a test.
1101 2009-02-07 Zoltan Varga <vargaz@gmail.com>
1103 * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
1104 use the DWARF_DATA_ALIGN constant instead.
1106 * exception-<ARCH>.c: Update after the above change.
1108 * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
1111 * mini-arm.c: Enable the dwarf unwinder.
1113 * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
1114 instead of mono_class_setup_vtable ().
1116 2009-02-07 Zoltan Varga <vargaz@gmail.com>
1118 * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
1121 * mini-x86.h: Enable the dwarf unwinder.
1123 2009-02-06 Raja R Harinath <harinath@hurrynot.org>
1125 Fix mcs/tests/test-7.cs
1126 * mini-amd64.c (mono_arch_allocate_vars): Revert change from
1129 2009-02-06 Zoltan Varga <vargaz@gmail.com>
1131 * mini.c (print_jit_stats): Remove some unused statistics.
1133 2009-02-05 Zoltan Varga <vargaz@gmail.com>
1135 * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
1137 2009-02-05 Mark Probst <mark.probst@gmail.com>
1139 * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
1140 the method we get from mono_object_get_virtual_method() because
1141 that function does it properly, now.
1143 2009-02-05 Zoltan Varga <vargaz@gmail.com>
1145 * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
1146 opcodes. Fixes #472775.
1148 2009-02-05 Mark Probst <mark.probst@gmail.com>
1150 * mini-exceptions.c (ves_icall_get_frame_info): Account for the
1151 fact that mono_find_jit_info() sometimes returns the context
1152 corresponding to the jit info in new_ctx. Fixes #472600.
1154 2009-02-05 Zoltan Varga <vargaz@gmail.com>
1156 * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
1157 mini-s390.c: Use mono_class_enum_basetype () instead of accessing
1158 klass->enum_basetype directly.
1160 * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
1163 * unwind.c: Avoid 0 sized arrays.
1165 2009-02-04 Zoltan Varga <vargaz@gmail.com>
1167 * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
1168 size on systems with 64k pages. Fixes #471389.
1170 2009-02-04 Mark Probst <mark.probst@gmail.com>
1172 Contributed under the terms of the MIT/X11 license by Steven
1173 Munroe <munroesj@us.ibm.com>.
1175 * mini-ppc.c (mono_arch_output_basic_block): Generate better code
1176 for LOADI4_MEMBASE. Use addi instead of addic if it's not
1179 2009-02-04 Mark Probst <mark.probst@gmail.com>
1181 Contributed under the terms of the MIT/X11 license by Steven
1182 Munroe <munroesj@us.ibm.com>.
1184 * exceptions-ppc.c (mono_arch_get_restore_context): Code size
1187 * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
1188 The trampoline can be longer on PPC64.
1190 2009-02-04 Mark Probst <mark.probst@gmail.com>
1192 Contributed under the terms of the MIT/X11 license by Steven
1193 Munroe <munroesj@us.ibm.com>.
1195 * mini-ppc.c: Compiler warning fixes and trivial code
1198 2009-02-04 Zoltan Varga <vargaz@gmail.com>
1200 * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
1201 ins->dreg which could be a hardware register, not a vreg.
1203 * aot-compiler.c (emit_method_dwarf_info): Ditto.
1205 * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
1206 (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
1208 * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
1210 * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
1211 ->dreg, that is not the vreg we are looking for.
1213 * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
1215 * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
1218 * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
1221 2009-02-03 Zoltan Varga <vargaz@gmail.com>
1223 * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
1225 * aot-compiler.c (emit_line_number_info): Fix line number emission when
1228 * aot-compiler.c: Add xdebug support on x86.
1230 * unwind.c: Add x86 support.
1232 * aot-compiler.c (emit_exception_debug_info): Control the emission of
1233 unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
1235 * mini.c (mini_method_compile): Ditto.
1237 * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
1240 * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
1241 which mimic .push_section/.pop_section in GAS.
1243 * aot-compiler.c: Emit precise live range information for variables.
1245 * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
1247 * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
1248 the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
1251 * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
1252 the live ranges of variables.
1254 * mini.h (struct MonoMethodVar): Add two fields containing the live range
1255 of the variable in terms of native offsets.
1257 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
1259 * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
1261 2009-02-02 Mark Probst <mark.probst@gmail.com>
1263 Contributed under the terms of the MIT/X11 license by Steven
1264 Munroe <munroesj@us.ibm.com>.
1266 * exceptions-ppc.c (restore_regs_from_context): Correct operand
1267 order (offset then base reg) for ppc_load_multiple_regs.
1268 (emit_save_saved_regs) Correct operand order for
1269 ppc_store_multiple_regs.
1270 (mono_arch_get_call_filter): Correct operand order for
1271 ppc_load_multiple_regs.
1273 * mini-ppc.c (emit_memcpy): Fix operand order for
1274 ppc_load_reg_update and ppc_store_reg_update.
1275 (mono_arch_output_basic_block): Correct operand order for ppc_lha.
1276 (mono_arch_emit_epilog): Correct operand order for
1277 ppc_load_multiple_regs.
1279 * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
1280 order for ppc_store_multiple_regs and ppc_load_multiple_regs.
1282 2009-02-02 Mark Probst <mark.probst@gmail.com>
1284 * cpu-ppc64.md: Fixed storer4_memindex length.
1286 2009-02-02 Zoltan Varga <vargaz@gmail.com>
1288 * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
1291 * aot-compiler.c (emit_line_number_info): Optimize this.
1293 2009-02-01 Zoltan Varga <vargaz@gmail.com>
1295 * aot-compiler.c: Disassemble tokens in the IL disassembly.
1297 * aot-compiler.c: Add debug info for methods without debug info by
1298 emitting an IL file and having the line number info referencing that file.
1300 * aot-compiler.c: Optimize the size of the generated line number info.
1302 * aot-compiler.c: Emit line number info in xdebug mode.
1304 * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
1307 2009-01-31 Zoltan Varga <vargaz@gmail.com>
1309 * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
1311 * driver.c (mono_main): Enable debugging support automatically if XDEBUG
1314 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
1316 * basic-calls.cs: Test for the weird crash found on arm.
1318 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
1320 * cpu-arm.md: Increase the size of storer8_membase_reg and
1321 loadr8_membase_reg to 24 bytes to accomodate the extra add.
1323 * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
1324 OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
1325 reg to LR otherwise we'll be loading/storing from just the offset.
1327 2009-01-30 Miguel de Icaza <miguel@novell.com>
1329 Question: if we are storing gint32's inside the "*native_offset",
1330 should we change the signature to "gint32 *native_offset" to
1331 ensure that we do not have type definition problems?
1333 * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
1334 an int * as this is what the other function expects, causes
1335 problems with Freescale's compiler that defined int32_t to be a
1336 long and makes int incompatible
1338 2009-01-30 Miguel de Icaza <miguel@novell.com>
1340 * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
1341 filename conflict with bjam.
1343 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
1345 * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
1346 as it might use decomposed ops.
1348 2009-01-30 Zoltan Varga <vargaz@gmail.com>
1350 * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
1352 * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
1355 * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
1357 * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
1360 * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
1361 way registers are stored in MonoContext on arm.
1363 * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
1364 instead of locking so mono_get_cached_unwind_info () becomes signal safe.
1366 * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
1368 * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
1370 * mini.c (mini_init): Register mono_isfinite.
1372 * jit-icalls.c (mono_isfinite): New jit icall.
1374 * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
1376 * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
1377 set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
1380 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
1382 * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
1383 separate frame and stack pointers, so we must use FP to find the register
1385 The FP reg is retrieved from the MonoContext::regs array.
1387 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
1389 * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
1392 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
1394 * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
1395 return R4 and R8 when not running under softfloat.
1397 Fixes basic-calls.exe
1399 2009-01-30 Zoltan Varga <vargaz@gmail.com>
1401 * mini-arm.c: Implement some overflow opcodes.
1403 2009-01-29 Miguel de Icaza <miguel@novell.com>
1405 * ssa.c: handle another alloca.h
1407 * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
1408 PLATFORM_WIN32 for detecting if we have sigaction. Instead use
1409 MONO_ARCH_USE_SIGACTION.
1411 * aot-runtime.c, mini-exceptions.c: Replace platform define with
1414 * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
1416 * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
1417 PPC targets as sigaction does not exist on all platforms, define
1418 this on a per-platform basis.
1420 Instead of erroring out if the platform is not defined, include
1421 mini-ppc-os.h, and expect that the OS specific setting provides
1422 the required information.
1424 2009-01-30 Zoltan Varga <vargaz@gmail.com>
1426 * aot-compiler.c: Fix --enable-minimal=aot.
1428 2009-01-30 Zoltan Varga <vargaz@gmail.com>
1430 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
1433 2009-01-29 Zoltan Varga <vargaz@gmail.com>
1435 * exceptions-arm.c: Fix warnings.
1437 * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
1440 * mini-x86.c: Fix --enable-minimal=jit build.
1442 * mini.c: Really fix --enable-minimal=jit build.
1444 * mini.c (construct_object_context_for_method): Move this outside
1445 the DISABLE_JIT block to fix the --enable-minimal=jit build.
1447 "Backported" of r124984 from 2.0 branch.
1449 * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
1451 "Backport" of r124977 + r124978 from 2.0 branch.
1453 * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
1454 to avoid calling mono_exception_from_token () from the throw trampoline.
1455 (mono_arch_get_throw_exception_generic): call throw_exception_by_token
1456 for throwing corlib exceptions, this fixes full-aot support for corlib
1459 * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
1461 2009-01-29 Miguel de Icaza <miguel@novell.com>
1463 * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
1464 part of the changes to split the code in mini into operating
1465 system specific files.
1467 This patch was done by copying mini.c to the respective files to
1468 preserve SVN history.
1470 2009-01-29 Zoltan Varga <vargaz@gmail.com>
1472 * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
1474 2009-01-28 Zoltan Varga <vargaz@gmail.com>
1476 * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
1477 remoting-invoke-with-check wrappers of shared methods.
1479 * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
1481 2009-01-27 Mark Probst <mark.probst@gmail.com>
1483 * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
1484 optimization if the top of stack is the last instruction in the
1485 bblock. Otherwise it might have been used after its definition.
1488 2009-01-27 Zoltan Varga <vargaz@gmail.com>
1490 * mini-trampolines.c (mono_magic_trampoline): Print out the caller
1491 method as well when get_vcall_slot () fails to match a code sequence.
1493 * mini-arm.c: Fix the android build, which doesn't have
1496 2009-01-26 Zoltan Varga <vargaz@gmail.com>
1498 * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
1501 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
1503 * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
1505 2009-01-26 Zoltan Varga <vargaz@gmail.com>
1507 * mini.c (mini_method_compile): Save the unwind info generated by the JIT
1508 and put its id into jinfo->used_regs. This is only used on amd64,
1509 which is currently the only platform generating unwind info.
1511 * exceptions-amd64.c: Instead of unwinding based on a register mask, use
1512 the dwarf unwinder. This is required to correctly handle async exceptions
1513 like thread abort and stack overflows, which can happen while a method
1514 is in the middle of its prolog or epilog.
1516 * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
1517 the unwind info belonging to an AOTed method.
1519 * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
1520 into cfg->unwind_ops.
1522 * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
1524 * mini.c (mini_init): Call mono_unwind_init ().
1525 (mini_cleanup): Call mono_unwind_cleanup ().
1527 * unwind.c: Add functions for managing a set of unwind info entries, allowing
1528 unwind info to be shared between methods.
1530 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
1533 * exceptions-amd64.c (mono_arch_exceptions_init): Call
1534 get_throw_pending_exception () to avoid initialization races.
1536 * mini-exceptions.c (mono_exceptions_init): Call an arch specific
1537 mono_arch_exceptions_init () function.
1539 * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
1541 2009-01-25 Zoltan Varga <vargaz@gmail.com>
1543 * mini.c (mono_get_domain_intrinsic): New helper function.
1544 (mono_get_thread_intrinsic): Ditto.
1546 * mini-arm.c mini-ia64.c: Use the new helper functions.
1548 * method-to-ir.c (mono_method_to_ir): Fix the comment for
1549 the last constrained_call change, since it is needed in the non-AOT
1552 * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
1554 * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of
1555 mono_get_lmf_addr () on arm eabi linux.
1557 2009-01-24 Zoltan Varga <vargaz@gmail.com>
1559 * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
1560 code sequence which matches a non-virtual call.
1562 2009-01-23 Mark Probst <mark.probst@gmail.com>
1564 * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
1567 2009-01-23 Zoltan Varga <vargaz@gmail.com>
1569 * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
1570 runtime-invoke wrappers, since they are also shared based on signature.
1572 2009-01-22 Mark Probst <mark.probst@gmail.com>
1574 * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
1575 info from the (correct) context.
1577 2009-01-22 Zoltan Varga <vargaz@gmail.com>
1579 * unwind.c (mono_unwind_frame): Remove a stray g_free ().
1581 * unwind.c (mono_unwind_frame): New function to unwind through a frame
1582 using dwarf unwinding info. Not yet used.
1584 * mini.c (mini_init): When using xdebug, disable freeing of domains.
1586 2009-01-21 Mark Probst <mark.probst@gmail.com>
1588 * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
1591 * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
1592 special case and handle mono_arch_delegate_invoke_impl() returning
1593 function descriptors.
1595 * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
1596 trampolines return function descriptors, too.
1598 2009-01-21 Zoltan Varga <vargaz@gmail.com>
1600 * method-to-ir.c (handle_alloc): Avoid generic instances in the
1601 out_of_line optimization.
1603 2009-01-21 Martin Baulig <martin@ximian.com>
1606 (MonoCompile): Added `disable_deadce_vars' to disable removing
1610 (mini_method_compile): Set `cfg->disable_deadce_vars' when running
1611 inside the debugger.
1613 * liveness.c (mono_analyze_liveness): Don't remove any unused
1614 variables if `cfg->disable_deadce_vars' is set.
1616 2009-01-21 Mark Probst <mark.probst@gmail.com>
1618 * method-to-ir.c: Only apply exception constructor optimization if
1619 the the method actually belongs to an exception class. Fixes
1622 2009-01-21 Zoltan Varga <vargaz@gmail.com>
1624 * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
1625 change inside a #ifdef __mono_ppc64__.
1627 * aot-compiler.c (compile_method): Remove the previous limitation.
1629 * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
1630 on type variables in AOTed code.
1632 * aot-compiler.c (compile_method): Skip generic methods having type
1633 constraints on their generic parameters.
1635 * aot-compiler.c (compile_method): Check for methods which cannot be
1636 encoded inside RGCTX_FETCH patches as well.
1638 * mini-exceptions.c (mono_print_thread_dump): Fix the windows
1641 2009-01-20 Mark Probst <mark.probst@gmail.com>
1643 * method-to-ir.c: Force the vtable variable in shared generic code
1644 for the case that they might show up on a stack trace where they
1647 * mini-exceptions.c: Save and use generic sharing info as well as
1648 IP in stack traces to resolve shared generic instantiations.
1650 2009-01-20 Zoltan Varga <vargaz@gmail.com>
1652 * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
1653 added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
1655 2009-01-20 Mark Probst <mark.probst@gmail.com>
1657 * method-to-ir.c: Do generic sharing for array constructors.
1659 2009-01-20 Rodrigo Kumpera <rkumpera@novell.com>
1661 * mini-exceptions.c (mono_print_thread_dump): Add information
1662 about the thread state using wapi_current_thread_desc.
1664 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
1666 * basic-simd.cs: Tests for the new constructors.
1668 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
1670 * mini-ops.h: Added OP_EXPAND_*
1674 * mini-x86.c (mono_arch_output_basic_block): Same.
1676 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
1678 2009-01-19 Zoltan Varga <vargaz@gmail.com>
1680 * iltests.il.in: Add a test for #467385.
1682 2009-01-18 Rodrigo Kumpera <rkumpera@novell.com>
1684 * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
1685 thread been cleaned up is not the same currently in execution.
1687 Fixes appdomain-unload crashes on windows, osx and linux variants
1688 without the __thread keyword.
1690 2009-01-18 Zoltan Varga <vargaz@gmail.com>
1692 * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
1693 (koush@koushikdutta.com). Implement this for android.
1695 * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
1696 begins with a digit.
1698 * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
1699 mono_marshal_get_write_barrier ().
1701 2009-01-17 Rodrigo Kumpera <rkumpera@novell.com>
1703 * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
1704 of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
1705 that pass them on a register pair.
1707 This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
1708 test was crashing due to that.
1710 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
1712 * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
1713 trampoline code. Include ucontext.h only if available.
1715 2009-01-15 Mark Probst <mark.probst@gmail.com>
1717 * mini.c: mono_domain_lookup_shared_generic() takes an open method
1718 and doesn't check whether it's sharable, like it was before
1719 removing the shared generics hash. This brings IronPython
1720 performance back to what it was before that change.
1722 2009-01-14 Mark Probst <mark.probst@gmail.com>
1724 * method-to-ir.c: Handle delegate invocation optimization earlier,
1725 otherwise it would be handled (much more slowly) by the
1726 final/sealed optimization.
1728 2009-01-13 Zoltan Varga <vargaz@gmail.com>
1730 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
1731 domain is not set. Fixes #465864.
1733 2009-01-12 Mark Probst <mark.probst@gmail.com>
1735 * method-to-ir.c: Don't stop sharing of generic methods with catch
1736 clauses - we already handle those.
1738 2009-01-12 Mark Probst <mark.probst@gmail.com>
1740 * mini.c, mini.h: lookup_generic_method() is now
1741 mono_domain_lookup_shared_generic() and uses the jit_code_hash,
1742 making the shared_generics_hash obsolete.
1744 2009-01-12 Mark Probst <mark.probst@gmail.com>
1746 * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
1747 use the red zone. Make room on the stack first and then use it,
1748 not the other way around.
1750 2009-01-12 Zoltan Varga <vargaz@gmail.com>
1752 * mini.c (mini_init): Call mono_xdebug_init ().
1754 * aot-compiler.c (mono_xdebug_init): Make this non-static.
1756 2009-01-11 Zoltan Varga <vargaz@gmail.com>
1758 * TestDriver.cs: Add an --iter argument to run tests multiple times.
1760 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
1763 * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
1764 debug+unwind info for trampolines.
1766 * mini.c (mono_create_unwind_op): New helper function.
1768 * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
1770 2009-01-10 Zoltan Varga <vargaz@gmail.com>
1772 * aot-compiler.c: Fix the build.
1774 2009-01-09 Zoltan Varga <vargaz@gmail.com>
1776 * Makefile.am: Update dtrace-prelink.sh location.
1778 2009-01-08 Zoltan Varga <vargaz@gmail.com>
1780 * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr
1781 optimization. Fixes #464520.
1783 2009-01-07 Bill Holmes <billholmes54@gmail.com>
1785 * mini-amd64.c : Adding code to save/restore non-volatile registers
1788 * exceptions-amd64.c : Adding code to save/restore non-volatile
1789 registers on Winx64.
1791 Contributed under MIT/X11 license.
1793 2009-01-07 Zoltan Varga <vargaz@gmail.com>
1795 * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
1796 __GNUC_MINOR__ which can break when the major version changes.
1798 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1800 * basic-simd.cs: Add tests for usage of the sizeof opcode.
1802 2009-01-07 Geoff Norton <gnorton@novell.com>
1804 * helpers.c: Allow mono -v -v -v to work on darwin.
1806 2009-01-05 Bill Holmes <billholmes54@gmail.com>
1808 * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
1811 Contributed under MIT/X11 license.
1813 2009-01-05 Zoltan Varga <vargaz@gmail.com>
1815 * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
1816 instead of directly accessing type->data.klass. Fixes #462016.
1817 (mono_allocate_stack_slots_full): Ditto.
1819 * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio
1820 <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
1822 * aot-compiler.c (emit_plt): Fix ARM build.
1824 2009-01-04 Zoltan Varga <vargaz@gmail.com>
1826 * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
1828 * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
1831 * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
1832 instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
1835 * iltests.il.in: Add a regression test.
1837 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
1839 * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
1841 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
1843 * basic-simd.cs: Add a regression test for #462457.
1845 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
1847 * mini-ops.h: Add a definition of XPHI.
1849 * mini.h (MONO_IS_PHI): Make is aware of simd instrincs.
1851 * ssa.c (op_phi_to_move): Handle XPHI.
1853 * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
1857 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
1859 * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
1861 2008-12-31 Geoff Norton <gnorton@novell.com>
1863 * mini-ppc.c: The prolog size allocated can be too small for darwin
1864 ppc32 under certain circumstances. Also fix a small logic bug.
1866 2008-12-29 Zoltan Varga <vargaz@gmail.com>
1868 * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
1869 while loading AOT methods.
1871 * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
1872 since only the former is nulled out after a successful cast. This prevents
1873 crashes with rethrown exceptions when using --debug=casts.
1875 2008-12-24 Mark Probst <mark.probst@gmail.com>
1877 * mini.h: New macro for checking whether a method is final,
1878 i.e. whether the method or its class is marked final.
1880 * method-to-ir.c: Use the new macro for all final-checks
1881 consistently. Fixes the crash in the System.ServiceModel tests.
1883 2008-12-23 Mark Probst <mark.probst@gmail.com>
1885 * mini-exceptions.c (get_exception_catch_class): Corrected another
1886 overly strict assertion.
1888 2008-12-23 Mark Probst <mark.probst@gmail.com>
1890 * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
1891 Clobbering it is not allowed because the caller might use it as
1892 the vtable register in the interface call.
1894 2008-12-19 Mark Probst <mark.probst@gmail.com>
1896 * mini-exceptions.c (get_exception_catch_class): Corrected an
1897 overly strict assertion.
1899 2008-12-18 Mark Mason <mmason@upwardaccess.com>
1901 * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
1903 * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
1905 * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
1907 * cpu-mips.md: correct lengths for certain long_ opcodes.
1909 * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
1911 * 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().
1913 2008-12-17 Mark Mason <mmason@upwardaccess.com>
1915 * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
1917 2008-12-17 Mark Mason <mmason@upwardaccess.com>
1919 * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
1921 2008-12-16 Rodrigo Kumpera <rkumpera@novell.com>
1923 * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
1926 2008-12-16 Mark Mason <mmason@upwardaccess.com>
1928 * 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
1930 * 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)
1932 2008-12-15 Mark Mason <mmason@upwardaccess.com>
1934 * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
1936 2008-12-14 Zoltan Varga <vargaz@gmail.com>
1938 * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
1939 gshared code. Fixes #458947.
1941 * generics.cs: Add a test.
1943 2008-12-12 Mark Mason <mmason@upwardaccess.com>
1945 * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1947 * mini-mips.c: first pass n32 code generation.
1949 * mini-mips.h: datatypes and defines for n32 support.
1951 * exceptions-mips.c: first pass n32 code generation.
1953 * tramp-mips.c: first pass n32 code generation.
1955 * cpu-mips.md: add long_ opcodes.
1957 2008-12-12 Mark Mason <mmason@upwardaccess.com>
1959 * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1961 * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1963 * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1965 * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1967 * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1969 * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1971 * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1973 * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1975 * helpers.c: for mips/n32, don't pass -mips32 to objdump
1977 2008-12-12 Zoltan Varga <vargaz@gmail.com>
1979 * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
1981 2008-12-12 Andrés G. Aragoneses <aaragoneses@novell.com>
1983 * driver.c: Sync --help-trace with man page (EXPR,EXPR).
1985 2008-12-12 Mark Probst <mark.probst@gmail.com>
1987 * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
1988 descriptors for helper functions directly in front of the code.
1990 2008-12-11 Mark Probst <mark.probst@gmail.com>
1992 * method-to-ir.c: Removed an unnecessary assertion.
1994 2008-12-10 Zoltan Varga <vargaz@gmail.com>
1996 * method-to-ir.c: Merge SGEN changes from the old JIT.
1998 2008-12-10 Zoltan Varga <vargaz@gmail.com>
2000 * driver.c (compile_all_methods_thread_main): Handle failure of
2003 2008-12-10 Mark Probst <mark.probst@gmail.com>
2005 * mini-ppc.c: Merged with mini-ppc64.c.
2007 * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
2009 * Makefile.am: Use the same sources for PPC and PPC64.
2011 * mini-ppc64.c: Removed.
2013 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
2015 * branch-opts.c (remove_block_if_useless): Extract fall through detection
2016 code to mono_bb_is_fall_through.
2018 * branch-opts.c (mono_remove_critical_edges): Same.
2020 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
2022 * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
2023 expect that an OP_BR_REG will be there.
2025 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
2027 * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
2028 for the many branch ops. The original check miss OP_BR_REG.
2032 2008-12-09 Mark Mason <mmason@upwardaccess.com>
2034 * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
2036 2008-12-09 Zoltan Varga <vargaz@gmail.com>
2038 * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
2039 while holding the aot lock.
2041 2008-12-09 Mark Mason <mmason@upwardaccess.com>
2043 * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
2045 2008-12-09 Bill Holmes <billholmes54@gmail.com>
2047 * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws
2048 to release all runtime callable wrappers held by the runtime.
2050 Contributed under MIT/X11 license.
2052 2008-12-09 Bill Holmes <billholmes54@gmail.com>
2054 * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
2057 Contributed under MIT/X11 license.
2059 2008-12-09 Zoltan Varga <vargaz@gmail.com>
2061 * aot-runtime.c (decode_exception_debug_info): Acquire the domain
2062 lock when calling mono_domain_alloc (). Hopefully fixes #415608.
2064 2008-12-09 Mark Mason <mmason@upwardaccess.com>
2066 * cpu-mips.md: fix ckfinite length
2068 * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
2069 (mono_arch_lowering_pass): cleanup, rearrange for clarity
2070 (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
2072 2008-12-08 Mark Mason <mmason@upwardaccess.com>
2074 * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
2076 2008-12-08 Geoff Norton <gnorton@novell.com>
2078 * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
2079 size by 8 bytes as well.
2081 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2083 * basic-simd.cs: Fix method names for Vector16b.
2085 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2087 * basic-simd.cs: Fix method names for Vector16sb.
2089 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2091 * basic-simd.cs: Fix method names for Vector8us.
2093 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2095 * basic-simd.cs: Fix method names for Vector8s.
2097 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2099 * basic-simd.cs: Fix method names for Vector4ui.
2101 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2103 * basic-simd.cs: Fix method names for Vector2l.
2105 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2107 * basic-simd.cs: Fix method names for Vector2d.
2109 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2111 * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
2112 that are extension methods.
2114 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2116 * basic-simd.cs: Fix method names for Vector4f.
2118 2008-12-08 Zoltan Varga <vargaz@gmail.com>
2120 * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
2121 as such. Fixes #456669.
2123 2008-12-07 Mark Mason <mmason@upwardaccess.com>
2125 * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
2127 2008-12-07 Mark Mason <mmason@upwardaccess.com>
2129 * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
2130 (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
2131 (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
2132 (mips_adjust_stackframe): handle FP spills
2134 * mini-ops.h: add mips_mtc1_s2
2136 * cpu-mips.md: add mips_mtc1_s2
2138 2008-12-07 Zoltan Varga <vargaz@gmail.com>
2140 * unwind.c: New file, move the unwind info encoding functions here from
2141 aot-compiler.c, so they could be used at runtime too.
2143 2008-12-05 Mark Mason <mmason@upwardaccess.com>
2145 * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
2146 (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
2148 2008-12-05 Mark Mason <mmason@upwardaccess.com>
2150 * mini-mips.c: cleanup warnings
2151 (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
2152 (mips_adjust_stackframe): handle case of taking the address of stack locals
2154 2008-12-05 Zoltan Varga <vargaz@gmail.com>
2156 * aot-compiler.c: Implement a few functions missing from the asm writer.
2157 (emit_method_code): Only write symbols for methods when using the bin
2158 writer, since the assembler can't deal with the characters in our method
2161 * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
2163 * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
2166 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
2167 a bit to also restore %rax.
2169 2008-12-05 Mark Probst <mark.probst@gmail.com>
2171 * mini-ppc.c: Some simple merges from mini-ppc64.c.
2173 2008-12-05 Zoltan Varga <vargaz@gmail.com>
2175 * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
2178 2008-12-05 Mark Probst <mark.probst@gmail.com>
2180 * exceptions-ppc.c: Merged with exceptions-ppc64.c.
2182 * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
2183 MONO_ARCH_FRAME_ALIGNMENT. Struct for PPC64 function descriptors.
2185 * exceptions-ppc64.c: Removed.
2187 * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
2189 2008-12-05 Mark Probst <mark.probst@gmail.com>
2191 * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
2194 * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
2196 * tramp-ppc64.c: Removed.
2198 2008-12-05 Zoltan Varga <vargaz@gmail.com>
2200 * aot-compiler.c (add_generic_instances): Skip non-generic classes in
2203 2008-12-05 Mark Probst <mark.probst@gmail.com>
2205 * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
2207 * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
2208 mini-ppc.h instead of mini-ppc64.h.
2210 * mini-ppc64.h: Removed.
2212 2008-12-04 Mark Mason <mmason@upwardaccess.com>
2214 * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
2216 * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
2218 2008-12-05 Mark Probst <mark.probst@gmail.com>
2220 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
2221 Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
2224 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
2226 * basic-simd.cs: Tests for operator == and != on Vector8us and Vector16b.
2228 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
2230 * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
2232 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
2234 * basic-simd.cs: Tests for operator == and != on Vector4f.
2236 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
2238 * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
2240 * simd-intrinsics.c: Kill useless enum.
2242 2008-12-04 Mark Mason <mmason@upwardaccess.com>
2244 * cpu-mips.md: add long_conv_to_ovf_i4_2
2245 * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
2247 2008-12-04 Mark Mason <mmason@upwardaccess.com>
2249 * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
2251 * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
2253 2008-12-04 Mark Mason <mmason@upwardaccess.com>
2255 * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
2257 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
2259 * basic-simd.cs: Add tests for new methods.
2261 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
2263 * simd-intrinsics.c: Add support for operator == and !=
2266 * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
2268 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
2270 * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
2272 2008-12-04 Zoltan Varga <vargaz@gmail.com>
2274 * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
2276 * mini.c (mono_resolve_patch_target): Allow pinvoke methods in
2277 MONO_PATCH_INFO_ICALL_ADDR.
2279 * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
2281 * aot-compiler.c: Resurrect full-aot support.
2283 2008-12-04 Mark Mason <mmason@upwardaccess.com>
2285 * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
2287 2008-12-04 Mark Mason <mmason@upwardaccess.com>
2289 * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
2291 2008-12-03 Rodrigo Kumpera <rkumpera@novell.com>
2293 * basic-simd.cs: Fix tests to work under ppc.
2294 Remove tests for methods that will be removed.
2296 2008-12-03 Mark Probst <mark.probst@gmail.com>
2298 * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
2299 generic type (via a typedef or typeref) correctly.
2301 2008-12-03 Zoltan Varga <vargaz@gmail.com>
2303 * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
2304 diagnose an assertion failure.
2306 2008-12-02 Mark Probst <mark.probst@gmail.com>
2308 * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
2309 Fix trampoline size.
2311 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
2312 conversion opcodes are implemented natively instead via emulation.
2314 2008-12-01 Mark Mason <mmason@upwardaccess.com>
2316 * cpu-mips.md: remove mips_xori
2318 * mini-ops.h: remove mips_xori
2320 * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
2322 * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
2324 * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
2326 2008-12-01 Mark Mason <mmason@upwardaccess.com>
2328 * cpu-mips.md: fix instruction lengths.
2330 * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
2332 * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
2334 * mini-ops.h: fix slti / sltiu op profiles.
2336 2008-12-02 Martin Baulig <martin@ximian.com>
2338 * method-to-ir.c (mono_method_to_ir): Disable debugging
2339 information for the init locals block to make the debugger stop
2340 after all locals have been initalized.
2342 2008-12-02 Martin Baulig <martin@ximian.com>
2344 * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
2345 running inside the debugger.
2347 2008-12-01 Zoltan Varga <vargaz@gmail.com>
2349 * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
2352 * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the
2353 alu->alu imm optimization which only shows if deadce is disabled.
2355 * aot-compiler.c: Rename the function names for the binary and asm writers
2356 so they can coexist in the same process. Rework the xdebug code to use the
2357 asm writer. This avoids the need to call into the runtime to dump the
2358 debugging info. Add more debugging info for types.
2360 * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
2362 * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
2363 cpu description tables, they can't occur in cpu-<ARCH>.md.
2365 * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
2366 the stack in CEE_LDFLDA. Fixes #450542.
2368 * generics.cs: Add a new test.
2370 2008-12-01 Mark Mason <mmason@upwardaccess.com>
2372 * mini-ops.h: updated MIPS opcodes
2373 * mini-mips.c: decompose long opts
2374 * mini-mips.h: decompose long opts
2376 2008-11-29 Mark Mason <mmason@upwardaccess.com>
2378 * cpu-mips.md: fix length on int_rem_un
2379 * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
2381 2008-11-29 Zoltan Varga <vargaz@gmail.com>
2383 * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
2385 * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
2387 2008-11-29 Martin Baulig <martin@ximian.com>
2389 * mini-exceptions.c (mono_handle_native_sigsegv): Check
2390 mono_debug_using_mono_debugger() in addition to the
2391 `no_gdb_backtrace' flag in the `MonoDebugOptions'.
2393 2008-11-28 Mark Mason <mmason@upwardaccess.com>
2395 * mini-ops.h: updated more MIPS opcodes
2396 * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
2397 * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
2399 2008-11-28 Mark Probst <mark.probst@gmail.com>
2401 * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
2403 2008-11-28 Mark Mason <mmason@upwardaccess.com>
2405 * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
2406 * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
2407 * mini-ops.h: correct selected mips opcode entries
2409 2008-11-28 Mark Probst <mark.probst@gmail.com>
2411 * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
2414 2008-11-28 Mark Probst <mark.probst@gmail.com>
2416 * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
2418 2008-11-28 Mark Mason <mmason@upwardaccess.com>
2420 * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
2421 * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
2422 * mini-mips.h: disable IMT
2423 * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
2425 2008-11-28 Mark Probst <mark.probst@gmail.com>
2427 * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
2429 2008-11-28 Mark Probst <mark.probst@gmail.com>
2431 * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
2433 2008-11-28 Zoltan Varga <vargaz@gmail.com>
2435 * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
2438 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
2440 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
2441 for Set/GetVector aligned versions.
2443 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
2445 * basic-simd.cs: Add tests for Get/SetVector.
2447 2008-11-27 Mark Probst <mark.probst@gmail.com>
2449 * mini.c: Removed g_slist_append_mempool(). Now in
2452 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
2454 * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
2455 size properly and make the bounds check optional.
2457 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
2458 for SetVector and IsAligned.
2460 2008-11-27 Zoltan Varga <vargaz@gmail.com>
2462 * mini.c: Remove unused mono_normalize_opcodes () function.
2464 2008-11-26 Mark Probst <mark.probst@gmail.com>
2466 * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
2467 using the new atomic add ops now.
2469 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
2472 2008-11-26 Mark Probst <mark.probst@gmail.com>
2474 * mini-ppc64.c: Several fixes.
2476 2008-11-25 Mark Mason <mmason@upwardaccess.com>
2478 * cpu-mips.md: added jump_table
2479 * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.
2481 2008-11-25 Mark Mason <mmason@upwardaccess.com>
2483 * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
2485 2008-11-25 Mark Mason <mmason@upwardaccess.com>
2487 * mini-ops.h: corrected a handful of MIPS opcodes.
2489 2008-11-25 Mark Mason <mmason@upwardaccess.com>
2491 * aot-compiler.c: MIPS to use ELF writer
2493 2008-11-25 Mark Mason <mmason@upwardaccess.com>
2495 * mini-codegen.c: remove MIPS specific assert.
2497 2008-11-25 Mark Probst <mark.probst@gmail.com>
2499 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
2500 fixes. PPC64 now passes most of the runtime regressions.
2502 2008-11-24 Zoltan Varga <vargaz@gmail.com>
2504 * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
2505 volatile intervals a bit.
2507 2008-11-24 Mark Probst <mark.probst@gmail.com>
2509 * basic-long.cs: New test case.
2511 2008-11-23 Zoltan Varga <vargaz@gmail.com>
2513 * mini.c (mini_method_compile): Disable globalra for large methods for
2516 * regalloc2.c (order_moves): Add fp support.
2518 * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
2519 source bblock ends with an OP_BR_REG.
2521 * ratests.cs: Add a new test.
2523 2008-11-23 Mark Probst <mark.probst@gmail.com>
2525 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
2526 sharing. PPC64 now passes generics.exe.
2528 2008-11-23 Mark Probst <mark.probst@gmail.com>
2530 * mini-ppc64.c: Several fixes. PPC64 now runs iltests.exe.
2532 2008-11-23 Zoltan Varga <vargaz@gmail.com>
2534 * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
2535 memory when mono_jit_info_table_find () can't find the method in the
2538 * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
2541 * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
2544 2008-11-23 Mark Probst <mark.probst@gmail.com>
2546 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
2547 Several fixes. PPC64 now runs exceptions.exe and
2548 devirtualization.exe.
2550 2008-11-22 Mark Probst <mark.probst@gmail.com>
2552 * mini-ppc64.c, tramp-ppc64.c: Small fixes. PPC64 now runs
2553 arrays.exe and basic-math.exe.
2555 2008-11-22 Mark Probst <mark.probst@gmail.com>
2557 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
2558 cpu-ppc64.md: Several fixes. PPC64 now runs objects.exe.
2560 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
2562 * simd-intrinsics.c: Add support ArrayExtension intrinsics.
2564 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
2566 * method-to-ir.c: Move bounds checking macros to ir-emit.h
2568 * ir-emit.h: Move macros from method-to-ir.c to here.
2570 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
2572 * mini-ops.h: Correct the long simd ops to use LREG.
2574 2008-11-21 Zoltan Varga <vargaz@gmail.com>
2576 * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
2578 * mini-ops.h: Correct the dreg type of a few long opcodes.
2580 * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
2583 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
2585 * mini-ppc.c: remove negative stack references in epilog
2586 for platforms that don't support the red zone.
2588 2008-11-21 Mark Probst <mark.probst@gmail.com>
2590 * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
2591 point regs. Now PPC64 passes basic-calls.exe.
2593 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
2595 * basic-simd.cs: Add tests for accessors of Vector2l.
2597 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
2599 * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
2601 * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
2603 * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
2605 2008-11-21 Mark Probst <mark.probst@gmail.com>
2607 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes. Now
2608 PPC64 passes basic-long.exe.
2610 2008-11-20 Mark Probst <mark.probst@gmail.com>
2612 * decompose.c: Decompose carry and overflow add on PPC64 like on
2613 other 64 bit archs. Don't decompose sub at all on PPC64.
2615 * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
2616 Several fixes and new opcodes. Now PPC64 runs (but doesn't pass)
2619 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
2621 * basic-simd.cs: Add tests for accessors of Vector2d.
2623 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
2625 * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
2629 * mini-x86.c (mono_arch_output_basic_block): Same.
2631 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
2633 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
2635 * basic-simd.cs: Add tests for accessors of Vector4f.
2637 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
2639 * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
2643 * mini-x86.c (mono_arch_output_basic_block): Same.
2645 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
2647 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
2649 * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
2651 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
2653 * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
2657 * mini-x86.c (mono_arch_output_basic_block): Same.
2659 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
2661 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
2663 * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
2665 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
2667 * simd-intrinsics.c: Enable setters for Vector16sb.
2669 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
2671 * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
2675 * mini-x86.c (mono_arch_output_basic_block): Same.
2677 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
2679 2008-11-19 Rodrigo Kumpera <rkumpera@novell.com>
2681 * simd-intrinsics.c: Implement setter for Vector8us.
2683 2008-11-19 Zoltan Varga <vargaz@gmail.com>
2685 * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
2688 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
2690 * mini-ppc.c: remove references to the red zone in the prolog
2691 (for systems that don't support it).
2693 2008-11-19 Mark Probst <mark.probst@gmail.com>
2695 * cpu-ppc64.md: Fixed a few instruction lengths.
2697 * mini-ppc64.c: Don't emit SETLRET. PPC64 passes basic-float.exe,
2700 2008-11-19 Mark Probst <mark.probst@gmail.com>
2702 * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes. PPC64 passes
2705 2008-11-19 Zoltan Varga <vargaz@gmail.com>
2707 * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
2709 2008-11-18 Rodrigo Kumpera <rkumpera@novell.com>
2711 * mini-ops.h: Added OP_INSERT_I2.
2715 * mini-x86.c (mono_arch_output_basic_block): Same.
2717 * simd-intrinsics.c: Implement setter for Vector8s.
2719 * simd-methods.h: Add the names of get setters of Vector8s.
2721 2008-11-18 Zoltan Varga <vargaz@gmail.com>
2723 * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
2725 * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
2728 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
2730 2008-11-18 Mark Probst <mark.probst@gmail.com>
2732 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
2733 for PPC64. An empty program runs now.
2735 2008-11-18 Zoltan Varga <vargaz@gmail.com>
2737 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
2739 * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
2740 a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
2741 info for JITted code is emitted into a shared library, loadable into gdb.
2743 2008-11-18 Mark Probst <mark.probst@gmail.com>
2745 * Makefile.am: Changes to build PPC64.
2747 * mini-arch.h: Include mini-ppc64.h on PPC64.
2749 2008-11-18 Mark Probst <mark.probst@gmail.com>
2751 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
2752 in PPC code up to r119147.
2754 2008-11-18 Mark Probst <mark.probst@gmail.com>
2756 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
2757 cpu-ppc64.md: Changes for PPC64.
2759 Based on code submitted by andreas.faerber@web.de at
2760 https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
2763 2008-11-18 Mark Probst <mark.probst@gmail.com>
2765 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
2766 cpu-ppc64.md: Copied from the corresponding PPC files from
2769 2008-11-18 Scott Peterson <lunchtimemama@novell.com>
2771 * mini-ops.h: Added OP_ROUND.
2773 * cpu-x86.md: Added round.
2775 * mini-x86.c: Added support for intrinsicing Math.Round (double).
2777 * basic-math.cs: Added test_0_round to test rounding.
2779 Contributed under MIT/X11 license.
2781 2008-11-17 Bill Holmes <billholmes54@gmail.com>
2783 * aot-compiler.c : Fix the Winx64 build.
2785 Contributed under MIT/X11 license.
2787 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
2789 * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
2790 in OP_EXTRACT_R8 to avoid possible stack corruption.
2792 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
2794 * mini-ops.h: Added OP_EXTRACT_R8/I8.
2796 * cpu-x86.md: Added extract_r8.
2798 * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
2800 * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
2801 a couple of OP_EXTRACT_I4.
2803 * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
2805 * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
2807 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
2809 * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
2812 2008-11-17 Zoltan Varga <vargaz@gmail.com>
2814 * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
2815 trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
2817 * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
2818 are not needed any more.
2820 * mini.h: Remove the unused INS_LIST macros.
2822 * mini.c (mini_method_compile): Remove a disable globalra case which is no
2825 * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
2828 * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
2829 mono_alloc_ireg () instead.
2831 * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
2834 * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
2837 * aot-runtime.c (load_aot_module): Disable AOT when running under
2840 * mini-amd64.h: Change the monitor fastpath defines to check for
2841 !PLATFORM_WIN32 so they work on *bsd too.
2843 * mini.h mini.c mini-hhpa.c: Remove more unused code.
2845 * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
2847 * mini.h (MonoCompile): Remove new_ir flag.
2849 * regalloc.h regalloc.c: Remove unused code.
2851 * cpu-*.md: Remove more unused opcodes.
2853 * simple-cee-ops.h simple-mini-ops.h: Removed.
2855 * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
2857 2008-11-17 Zoltan Varga <vargaz@gmail.com>
2859 * aliasing.h: Removed.
2861 * *.c: Remove references to aliasing.h and inssel.h.
2863 * mini.c: Remove additional unused functions.
2865 * mini-ops.h cpu-*.md: Remove unused opcodes.
2867 2008-11-16 Zoltan Varga <vargaz@gmail.com>
2869 Remove the old JIT code.
2871 * inssel*.brg: Removed.
2873 * ssa.c abcremoval.c aliasing.c: Removed.
2875 * ssa2.c: Renamed to ssa.c.
2877 * abcremoval2.c: Renamed to abcremoval.c.
2879 * *.c: Removed all !cfg->new_ir code.
2881 * mini-<ARCH>.c: Removed mono_arch_call_opcode (),
2882 mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
2884 * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
2886 2008-11-16 Zoltan Varga <vargaz@gmail.com>
2888 * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
2889 to simplify the code and cut back on the number of global symbols in the AOT
2892 * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
2894 2008-11-15 Zoltan Varga <vargaz@gmail.com>
2896 * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
2897 with the got/got_info tables.
2899 * mini.h: Bump AOT file format version.
2901 * unwind.h: New file, contains definitions for stack unwinding.
2903 * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
2906 * aot-compiler.c: Generalize the emitting of unwind information to use the
2907 information in cfg->unwind_ops.
2909 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
2911 * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
2912 AOT method frames. Enable writing symbols for methods by default.
2914 2008-11-14 Rodrigo Kumpera <rkumpera@novell.com>
2916 * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
2917 and make it work with vectors of element sizes 1, 2 and 4.
2919 * simd-intrinsics.c: Enable getter for all vectors with element size
2922 * simd-methods.h: Add the names of other getters.
2924 * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
2930 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
2932 * mini-ppc.h: portability fix.
2934 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
2936 * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
2937 buggy and will overwrite it.
2939 2008-11-14 Zoltan Varga <vargaz@gmail.com>
2941 * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
2942 Use it to emit local symbols for all methods so AOTed methods show up with
2943 their full name in gdb/valgrind output.
2945 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
2947 * mini-ppc.c: portability fixes.
2949 2008-11-14 Zoltan Varga <vargaz@gmail.com>
2951 * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
2952 entries out of the if (!generic_shared...) code so it is always done.
2953 (mono_class_init_trampoline): Do the patching when running under valgrind
2954 too, newer versions of valgrind have no problems with it.
2956 2008-11-13 Zoltan Varga <vargaz@gmail.com>
2958 * aot-compiler.c (emit_writeout): Rework this to make it easier to add
2961 2008-11-13 Mark Probst <mark.probst@gmail.com>
2963 * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
2966 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
2968 * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui.
2970 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
2972 * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
2978 * simd-intrinsics.c: Same.
2980 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
2982 * simd-intrinsics.c: Enable constructor intrinsics for all types.
2984 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
2986 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
2987 to work with more Vector types.
2989 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
2991 * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
2992 store the elemens directly instead of using and intermediate.
2994 2008-11-13 Zoltan Varga <vargaz@gmail.com>
2996 * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
2998 * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
2999 to preserve %eax for aot plt trampolines.
3001 * aot-compiler.c (compile_method): Don't skip synchronized methods.
3002 (encode_method_ref): Flag synchronized methods so they won't go through
3005 * aot-compiler.c: Additional work to support AOTing synchronized methods/
3008 * cpu-ia64.md (jmp): Increase max length.
3010 2008-11-12 Zoltan Varga <vargaz@gmail.com>
3012 * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
3013 open generic classes.
3015 * aot-compiler.c: Enable the ELF writer on ELF platforms.
3017 * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
3018 box+brtrue optimization since it causes test failures on x86.
3020 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
3022 * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
3028 * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
3029 for simd ctor values.
3031 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
3032 instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
3034 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
3036 * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
3039 * simd-instrincs.c: Same.
3041 * basic-simd.cs: Same.
3043 2008-11-12 Zoltan Varga <vargaz@gmail.com>
3045 * ratests.cs: Add more tests.
3047 * regalloc2.c (add_spill_code): Handle more corner cases.
3049 2008-11-11 Zoltan Varga <vargaz@gmail.com>
3051 * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
3052 (update_liveness): Avoid holes in the liveness ranges of hregs if they are
3053 both the source an destination of an instruction.
3055 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
3057 * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
3058 wapihandles.c: more portability changes.
3060 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
3062 * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
3063 * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
3064 safe to execute in a signal handler and the kernel provides better
3065 the info in /proc/self/smaps. Avoid the assert on sigaction during
3068 2008-11-11 Zoltan Varga <vargaz@gmail.com>
3070 * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
3071 do the bblock linking hack if it is actually needed.
3073 * Makefile.am (patch-libtool): New helper target to patch libtool to speed
3076 * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
3077 crash problem is fixed.
3079 * branch-opts.c (mono_remove_critical_edges): Link up newly added
3082 * mini.c (mini_method_compile): Compute unreachable bblocks properly even
3084 (mini_method_compile): Set the starting value of next_vreg to
3085 MAX_IREGS + MAX_FREGS when using globalra.
3087 * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
3088 filter clauses with BB_EXCEPTION_HANDLER.
3090 * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
3092 2008-11-10 Mark Probst <mark.probst@gmail.com>
3094 * mini-x86.c (mono_arch_get_argument_info): Don't align argument
3095 space for stdcall. Fixes regressions on Win32.
3097 2008-11-10 Zoltan Varga <vargaz@gmail.com>
3099 * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
3101 (linear_scan): Remove an assert which doesn't seem to be needed.
3103 * local-propagation.c (mono_local_deadce): Avoid a call to
3104 MONO_DELETE_INS which would screw up the instruction linking.
3106 * mini.c (mono_decompose_op_imm): Make this work with globalra.
3108 * regalloc2.c: Upgrade to work the current JIT code.
3110 2008-11-09 Zoltan Varga <vargaz@gmail.com>
3112 * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
3115 * aot-runtime.c: Remove some dead code.
3117 * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
3119 (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
3121 * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
3122 trampolines using sscanf since atoi doesn't work on large unsigned values.
3124 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full):
3125 Initialize code_size.
3127 2008-11-08 Mark Probst <mark.probst@gmail.com>
3129 * method-to-ir.c (mini_emit_inst_for_method): Make
3130 Interlocked.CompareExchange work for Int arguments on 32 bit
3133 2008-11-07 Mark Probst <mark.probst@gmail.com>
3135 * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
3137 2008-11-06 Bill Holmes <billholmes54@gmail.com>
3139 * main.c Fix MSVC build.
3141 Contributed under MIT/X11 license.
3143 2008-11-06 Mark Probst <mark.probst@gmail.com>
3145 * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
3146 alignment larger than 8 bytes are aligned correctly, too.
3148 * mini.c: Honor the min_align field of MonoClass when laying out
3151 2008-11-06 Zoltan Varga <vargaz@gmail.com>
3153 * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
3155 * aot-compiler.c (emit_plt): Fix a warning.
3157 * aot-compiler.c: Implement ARM support in the binary writer.
3159 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
3161 * basic-simd.cs: Add test for getter with byref arg.
3162 Fix the naming of a few tests.
3163 Add missing checks to a test.
3165 2008-11-05 Zoltan Varga <vargaz@gmail.com>
3167 * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
3169 * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
3170 most of the full-aot support for monitor enter/exit trampolines.
3172 * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
3173 enter/exit trampoline creation functions.
3175 * Makefile.am: Fix the generation of buildver.h so it is not invoked during
3178 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
3180 * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
3181 incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
3182 implement the needed functionality without adding crap to the runtime.
3184 2008-11-05 Zoltan Varga <vargaz@gmail.com>
3186 * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
3189 * mini.c (mono_build_date): New global version holding the build date in
3192 * Makefile.am (buildver.c): Generate a file containing the build date.
3194 * main.c: Set the build date from the generated file.
3196 * mini.c (mono_get_runtime_build_info): New helper function returning build
3197 information in a string format.
3199 * driver.c (mono_main): Print the build date in --version.
3201 * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
3202 file when the bind-to-runtime-version option is used.
3204 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
3206 * simd-intrinsics.c: Fix bug when using getters and byref args.
3208 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
3210 * simd-methods.h: Rename prefetch methods.
3212 * simd-intrinsics.c: Same.
3214 2008-11-05 Mark Probst <mark.probst@gmail.com>
3216 * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
3219 2008-11-04 Zoltan Varga <vargaz@gmail.com>
3221 * aot-compiler.c: Use the bundled elf header files instead of depending on
3224 * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
3227 * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
3230 2008-11-04 Rodrigo Kumpera <rkumpera@novell.com>
3232 * cpu-x86.md: Add store nta ops.
3238 * mini.h: Add an enum for simd prefetch modes.
3240 * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
3241 of store. Use the changed code to support store nta.
3243 * simd-intrinsics.c: Add prefetch ops for all vector types.
3245 2008-11-04 Zoltan Varga <vargaz@gmail.com>
3247 * aot-compiler.c: Add an option for JIT compiling the methods by multiple
3250 * aot-compiler.c: Use statically allocated buffers for constructing symbol
3253 * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
3256 2008-11-04 Mark Probst <mark.probst@gmail.com>
3258 * mini-x86.c: Fixed commit.
3260 2008-11-04 Zoltan Varga <vargaz@gmail.com>
3262 * aot-compiler.c (emit_plt): Align the plt section only on x86.
3264 2008-11-04 Mark Probst <mark.probst@gmail.com>
3266 * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
3267 and MONITOR_EXIT, for the ASM fastpaths.
3269 * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
3272 * mini.c, patch-info.h: Signature and patch infos for
3273 Monitor.Enter/Exit trampolines.
3275 * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
3277 * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
3278 Monitor.Enter/Exit ASM fastpath for Linux.
3280 2008-11-04 Zoltan Varga <vargaz@gmail.com>
3282 * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
3284 * objects.cs: Add a new test.
3286 * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
3288 * aot-runtime.c (load_method): Run class initialization in the PLT case even
3289 if MONO_LOG_LEVEL is set.
3291 * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
3293 * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
3295 * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
3297 * aot-compiler.c: Change the relocation code to use virtual addresses instead
3298 of file offsets. Align the sections belonging to the data segment to
3301 2008-11-03 Zoltan Varga <vargaz@gmail.com>
3303 * aot-compiler.c: Simplify the elf writer by depending on the definitions in
3304 elf.h. Port it to amd64.
3306 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
3308 * driver.c: Enable SIMD by default.
3310 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
3312 * cpu-x86.md: Add prefetch op.
3318 * mini.h: Add an enum for simd prefetch modes.
3320 * simd-methods.h: Add prefetch function names.
3322 * simd-intrinsics.c: Add prefetch ops for all vector types.
3324 2008-11-03 Zoltan Varga <vargaz@gmail.com>
3326 * aot-compiler.c (emit_bytes): Speed this up a little.
3328 2008-11-02 Zoltan Varga <vargaz@gmail.com>
3330 * aot-compiler.c: Add JIT time etc. statistics.
3332 * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
3334 * mini.h (MonoCompile): Add 'got_offset' field.
3336 * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
3337 method_got_offsets array.
3339 * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
3342 * aot-compiler.c (compile_method): Add generic method instances referenced
3343 by the method to the list of methods to be compiled, this is required so if
3344 A<T> references B<T>, and another assembly references A<int>, then it will
3345 also get a copy of B<int>.
3347 * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
3348 when checking for monitor enter/exit.
3350 2008-10-30 Mark Probst <mark.probst@gmail.com>
3352 * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
3353 for Monitor.Enter and Monitor.Exit if enabled.
3355 * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
3358 2008-10-30 Zoltan Varga <vargaz@gmail.com>
3360 * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
3361 of an OP_MOVE. Fixes #440046.
3363 * basic-long.cs: Add a new test.
3365 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
3367 * mini.h: Add synchronization note for the managed counter-part.
3369 * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
3370 returns the simd caps of the current cpu.
3372 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
3374 * basic-simd.cs: Remove Console.WriteLine.
3376 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
3378 * basic-simd.cs: New tests for Vector2ul.
3380 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
3382 * simd-intrinsics.c: Add new vector type Vector2ul.
3384 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
3386 * basic-simd.cs: New tests for Vector2l.
3388 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
3390 * cpu-x86.md: Add long version of most packed int ops.
3396 * simd-intrinsics.c: Add new vector type Vector2l.
3398 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
3400 * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
3402 * simd-methods.h: Remove SN_op_BitwiseXor.
3404 2008-10-28 Zoltan Varga <vargaz@gmail.com>
3406 * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
3409 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
3411 * basic-simd.cs: Test for Vector2d.
3413 * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
3416 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
3418 * cpu-x86.md: Add double version of all packed float ops.
3424 * simd-intrinsics.c: Add new vector type Vector2d.
3426 * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
3428 * simd-methods.h: Add Duplicate.
3430 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
3432 * basic-simd.cs: Test for packing with signed saturation.
3434 2008-10-28 Zoltan Varga <vargaz@gmail.com>
3436 * aot-compiler.c (add_generic_instances): Add all methods of generic instances
3437 found in the TYPESPEC table.
3439 2008-10-26 Zoltan Varga <vargaz@gmail.com>
3441 * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
3444 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3446 * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
3447 instead of the RVA, since the RVA can be changed by tools like the cil
3450 * method-to-ir.c (mono_method_to_ir2): Ditto.
3452 * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
3453 (deserialize_variable): Ditto.
3455 2008-10-25 Martin Baulig <martin@ximian.com>
3457 * debug-mini.c (write_variable): Use
3458 `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
3460 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
3462 * cpu-x86.md: Add unsigned variants of packd and packw.
3466 * mini-x86.h: Emit the right instruction for packd and packw.
3467 Add unsigned variants of packd and packw.
3469 * simd-intrinsics.c: Packd and packw were used in place of their
3470 unsigned variants. Change that.
3471 Add intrinsics for (Signed)PackWithSignedSaturation.
3473 * simd-methods.h: Add (Signed)PackWithSignedSaturation.
3475 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
3477 * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
3479 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
3481 * mini-ops.h: Remove dword packed add/sub with saturation ops.
3483 * cpu-x86.md: Remove dword packed add/sub with saturation ops.
3485 * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
3488 * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
3490 2008-10-24 Mark Probst <mark.probst@gmail.com>
3492 * method-to-ir.c, mini.c: Special casing for the synchronized
3493 wrapper for the ldtoken+GetTypeFromHandle case.
3495 2008-10-24 Zoltan Varga <vargaz@gmail.com>
3497 * mini.c (mono_replace_ins): Move this to branch-opts.c.
3499 * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
3500 created/split bblocks.
3502 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
3504 * mini-ops.h: Add packed signed mul high.
3508 * mini-x86.c (mono_arch_output_basic_block): Same.
3510 * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
3512 * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
3514 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
3516 * basic-simd.cs: Tests for Vector16sb.
3518 2008-10-24 Zoltan Varga <vargaz@gmail.com>
3520 * inssel.brg (stmt): Fix OP_HARD_NOP rule.
3522 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
3524 * mini-ops.h: Add packed signed min, max and compare greater.
3528 * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
3531 * simd-methods.h: Add CompareGreaterThan.
3533 * simd-methods.h: Remove CompareEquals.
3535 * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
3537 * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
3539 * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
3542 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
3544 * basic-simd.cs: Fix tests due to change in the API.
3546 2008-10-21 Zoltan Varga <vargaz@gmail.com>
3548 * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
3550 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
3552 * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
3554 * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
3555 inst_offset as this has invalid values for LDADDR.
3557 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
3559 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
3561 * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
3563 2008-10-21 Zoltan Varga <vargaz@gmail.com>
3565 * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
3566 for accessing field->data.
3568 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
3570 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
3572 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
3574 * simd-methods.h: Add SignedPackWithUnsignedSaturation.
3576 * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
3578 2008-10-21 Zoltan Varga <vargaz@gmail.com>
3580 * dominators.c (mono_compute_natural_loops): Allocate GList enties
3581 from the cfg mempool.
3583 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
3585 * basic-simd.cs: Tests for new methods in Vector8us.
3587 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
3589 * mini-ops.h: Add multiply and store high.
3593 * mini-x86.c (mono_arch_output_basic_block): Same.
3595 * simd-methods.h: Same.
3597 * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
3600 2008-10-19 Zoltan Varga <vargaz@gmail.com>
3602 * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
3603 mono_class_setup_vtable ().
3605 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
3606 mono_class_get_vtable_entry () for accessing klass->vtable.
3608 * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
3610 * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
3613 * method-to-ir.c (mono_save_token_info): Don't save references made from
3616 * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
3617 of generic instances.
3619 * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
3621 2008-10-19 Mark Probst <mark.probst@gmail.com>
3623 * cpu-ppc.md, mini-ppc.c: The length of the code generated for
3624 OP_JMP depends on the method signature. Calculate it properly.
3626 2008-10-19 Zoltan Varga <vargaz@gmail.com>
3628 * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
3631 * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
3633 (emit_extra_methods): Add another table mapping method indexes to
3634 offsets in the extra_method_info table.
3636 * mini.h: Bump AOT file format version.
3638 * aot-runtime.c: Merge most of the code from mono_aot_get_method
3639 and mono_aot_get_method_from_token () into one function.
3641 2008-10-19 Mark Probst <mark.probst@gmail.com>
3643 * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
3646 2008-10-18 Zoltan Varga <vargaz@gmail.com>
3648 * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
3651 * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
3654 * mini.c (mono_patch_info_equal): Compare the generic context as well.
3656 * mini.h: Bump aot file format version.
3658 * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
3659 AOT file can contain native code for methods which are not in the METHOD
3660 table. Generate code for non-sharable generic instances of generic methods
3661 found in the METHODSPEC table.
3663 * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
3664 encoding generic type handles.
3666 * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
3667 (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
3669 * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
3670 macros + MONO_ADD_INS.
3672 * mini.c (mono_jump_info_token_new2): New function which takes a generic
3675 * mini.h (MonoJumpInfoToken): Include fields for a generic context.
3677 * mini.h: Bump aot file format version.
3679 * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
3681 2008-10-17 Mark Probst <mark.probst@gmail.com>
3683 * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
3684 platforms, with definable stack alignment value. Set to 16 now
3687 * mini.c, mini.h, driver.c: Command line option for disabling
3690 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
3692 * basic-simd.cs: Tests for new methods in Vector4ui.
3694 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
3696 * mini-ops.h: Add packed int shuffle.
3700 * mini-x86.c (mono_arch_output_basic_block): Same.
3702 * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
3703 extract mask, max, min, shuffle.
3705 * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
3707 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
3709 * basic-simd.cs: Tests for new methods in Vector8us.
3711 2008-10-17 Mark Probst <mark.probst@gmail.com>
3713 * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
3714 RuntimeTypeHandle, not a TypedReference.
3716 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
3718 * simd-intrinsics.c: remove relocations.
3720 2008-10-17 Zoltan Varga <vargaz@gmail.com>
3722 * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM
3723 optimizations from the x86 backend.
3725 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
3727 * simd-methods.h, simd-intrinsics.c: debloat method names and
3728 prepare for no relocations.
3730 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
3732 * mini-ops.h: Add packed min/equal and sum of absolute differences.
3736 * mini-x86.c (mono_arch_output_basic_block): Same.
3738 * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
3739 extract mask, max, min and sum of absolute differences.
3741 * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
3744 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
3746 * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
3747 Renamed one test for consistency.
3749 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
3751 * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
3752 fix to the code that deal with other blocks.
3754 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
3756 * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
3758 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
3760 * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
3761 that deals with vreg interference. Explicitly check for OP_LDADDR to be
3762 able to process the source reg.
3764 2008-10-16 Martin Baulig <martin@ximian.com>
3766 * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
3768 * inssel.brg: Add `OP_HARD_NOP'.
3770 * mini.h (MonoCompile): Added `keep_cil_nops' flag.
3772 * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
3773 `OP_HARD_NOP' instruction when running inside the debugger.
3775 * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
3776 `OP_HARD_NOP' instruction when running inside the debugger.
3778 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
3780 * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
3781 now works. The issue with the regalloc tripping up no longer
3784 * simd-intrinsics.c (load_simd_vreg): Same.
3786 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
3788 * basic-simd.cs: Tests for new Vector8ui methods.
3790 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
3792 * simd-intrinsics.c (get_simd_vreg): Simplify code and test
3793 only for type. This fixes crashes where MonoInst::klass is checked
3794 for ops of type != VTYPE or OBJ.
3796 * simd-intrinsics.c (load_simd_vreg): Same.
3798 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
3800 * mini-ops.h: Add ops for packed shuffle/max/avg and
3805 * mini-x86.c (mono_arch_output_basic_block): Same.
3807 * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
3810 * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
3811 to emit extract mask op.
3813 * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
3814 to emit word shuffles.
3816 2008-10-15 Mark Probst <mark.probst@gmail.com>
3818 * mini.c (mono_allocate_stack_slots_full): Align stack frame to
3819 the largest alignment needed by a variable, but at least
3822 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
3824 * basic-simd.cs: Tests for the fixes in the last commit.
3826 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
3828 * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
3829 no longer handles STACK_PTR input.
3831 * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
3833 * simd-intrinsics.c (load_simd_vreg): New function that works like
3834 get_simd_vreg but handles STACK_PTR input.
3836 * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
3837 as the input can be an arbitrary pointer.
3839 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
3840 LDADDR local optimization directly otherwise use a store op.
3842 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
3844 * basic-simd.cs: Tests for dup low and dup high.
3846 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
3848 * mini-ops.h: Add dup low and dup high ops.
3852 * mini-x86.c (mono_arch_output_basic_block): Same.
3854 * simd-intrinsics.c (vector4f_intrinsics): Same.
3856 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
3858 * basic-simd.cs: Tests for recently added functionality.
3860 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
3862 * mini-ops.h: Add remaining sse1 fp ops.
3864 * cpu-x86.md: Add remaining sse1 fp ops.
3866 * mini-x86.c (mono_arch_output_basic_block): Same.
3868 * mini.h: Add enum for simd FP compare conditions.
3870 * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
3872 * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
3873 so the backed can generate the appropriate op.
3875 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
3876 This patch squeese one more byte from the SimdIntrinsc struct.
3878 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
3879 a a shift amount intead of simply or'ing it.
3881 * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
3883 * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
3884 byte so we can have an aditional flags field without increasing struct size.
3886 * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
3887 against the simd_supported_versions bitmask.
3889 * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
3891 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
3893 * mini.c: remove rawbuffer code (the only use here is unsafe because
3894 it takes locks during signal handling and the kernel now provides much
3895 better info in proc/pid/smaps these days).
3897 2008-10-13 Zoltan Varga <vargaz@gmail.com>
3899 * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
3900 OP_X86_PUSH_OBJ. Fixes #434620.
3902 * objects.cs: Add a test.
3904 2008-10-12 Rodrigo Kumpera <rkumpera@novell.com>
3906 * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
3907 that the packuswb/packusdw don't work with unsigned numbers for what
3908 would be negative numbers in signed format.
3910 * cpu-x86.md: Add doubleword forms of many ops and packing ones.
3911 Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
3913 * mini-ops.h: Add doubleword forms of many ops and packing ones.
3915 * mini-x86.c: Emit doubleword forms of many ops and packing ones.
3917 * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
3919 * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
3921 * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
3924 * simd-intrinsics.c (simd_version_name): New function, returns the name of the
3925 version as the enum in mini.h.
3927 * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
3928 for sse3 ops, check the simd_version field if present. This way the code
3929 works with all versions of sse.
3931 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
3933 * simd-intrinsics.c: Fixed intrinsic name typo.
3935 * mini.h: Added missing simd exported function.
3937 * basic-simd.cs: Added tests for Vector4ui.
3938 Fixed broken test for Vector16b.
3940 2008-10-10 Zoltan Varga <vargaz@gmail.com>
3942 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
3943 the max length to 64.
3945 2008-10-10 Mark Probst <mark.probst@gmail.com>
3947 * method-to-ir.c: Only do the fast virtual generic method call for
3948 non-wrapper methods.
3950 * mini.h, mini-trampolines.c: The new generic virtual remoting
3951 trampoline handles virtual method calls via the vtable (as done by
3952 the fast virtual generic method calls) to remoting proxies.
3954 * mini.c (mono_jit_create_remoting_trampoline): For generic
3955 methods reate a generic virtual remoting trampoline.
3957 * mini-amd64.h: Enable fast virtual generic method calls again.
3959 2008-10-10 Mark Probst <mark.probst@gmail.com>
3961 * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
3962 restore registers when doing tail calls.
3964 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
3966 * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
3969 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
3971 * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
3973 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
3975 * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
3977 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
3979 * basic-simd.cs: Retrofit for API changes.
3981 2008-10-10 Mark Probst <mark.probst@gmail.com>
3983 * mini-ppc.c: Handle integer stack arguments for tail calls.
3985 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
3987 * optflags-def.h: Removed sse3 optimization.
3991 * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
3994 * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
3996 * mini.h: Added enumeration with simd versions.
3998 * simd-intrinsics.c (emit_intrinsics): Use the new static var
4001 * simd-intrinsics.c: Added mono_simd_intrinsics_init.
4003 * mini.c (mini_init): Call mono_simd_intrinsics_init.
4005 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
4007 * basic-simd.cs: Added tests for Vector8u and Vector16u.
4009 * basic-simd.cs: Fixed test naming.
4011 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
4013 * mini-ops.h: Added ops for packed and saturated math, shifts
4014 and packing/unpacking.
4016 * cpu-x86.md: Added descriptors for the above ops.
4018 * mini-x86.c: Added code to emmit the above ops.
4020 * simd-intrinsics.c: Added support for Vector16u and Vector8u.
4022 2008-10-08 Zoltan Varga <vargaz@gmail.com>
4024 * aot-compiler.c (compile_method): Enable AOT for generic code.
4026 * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
4028 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
4030 * mini.c: add a workaround for a common screwup that ends up blamed
4031 to mono (other processes blocking signal delivery).
4033 2008-10-07 Zoltan Varga <vargaz@gmail.com>
4035 * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
4036 in the LDFLD/STFLD opcodes. Fixes #432673.
4038 * iltests.il.in: Add a new test.
4040 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
4042 * mini-arm.c: attach the thread in unmanaged->managed transitions
4043 using delegates (bug #433148).
4045 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
4047 * basic-simd.cs: Use new ShuffleSel constants.
4049 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
4051 * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
4053 * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
4054 only disable simd intrinsics if no sse2 is detected.
4056 * optflags-def.h: Added sse3.
4058 * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
4061 2008-10-07 Zoltan Varga <vargaz@gmail.com>
4063 * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
4064 when adding delegate-invoke wrappers.
4066 2008-10-07 Zoltan Varga <vargaz@gmail.com>
4068 * Makefile.am: Reenable the simd tests.
4070 2008-10-07 Bill Holmes <billholmes54@gmail.com>
4072 * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
4073 add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
4074 other vreg is allocated to that hreg.
4076 Contributed under MIT/X11 license.
4078 2008-10-07 Zoltan Varga <vargaz@gmail.com>
4080 * Makefile.am: Disable the simd tests for now as Mono.Simd is not
4083 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
4085 * basic-simd.cs: New test suite for SIMD intrinsics.
4087 * Makefile.am: Added new tests.
4089 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
4091 * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
4095 * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
4097 * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
4098 using SSE2 aware opcodes.
4100 * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
4101 is enabled, this code path is only reachable if conversion ops are emmited after
4104 * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
4106 This optimization saves 6 bytes per conversion against the old version.
4108 2008-10-06 Zoltan Varga <vargaz@gmail.com>
4110 * aot-compiler.c (compile_method): Don't skip methods referencing
4111 generic methods without a corresponding entry in token_info_hash, since
4112 encode_method_ref () can handle all generic methods now.
4114 * method-to-ir.c (mono_save_token_info): Don't save the token info if a
4115 generic context is set.
4117 * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
4118 generic sharing of LDTOKEN.
4120 2008-10-06 Mark Probst <mark.probst@gmail.com>
4122 * mini-amd64.h: Temporarily disabled fast virtual generic method
4123 calls because it breaks the System.Runtime.Remoting tests.
4125 2008-10-06 Zoltan Varga <vargaz@gmail.com>
4127 * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
4129 * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
4130 so inlining actually works.
4131 (check_inline_caller_method_name_limit): Ditto.
4133 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
4135 * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
4136 64 bit safety (from Olaf Hering and Andreas Färber).
4138 2008-10-06 Zoltan Varga <vargaz@gmail.com>
4140 * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
4141 mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
4142 unused virtual call support code.
4144 * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
4146 * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
4147 which can't use aot trampolines.
4148 (decode_patch): Don't create aot trampolines for methods which can't use
4151 * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
4152 use aot trampolines.
4154 * mini.h: Bump AOT image format version.
4156 2008-10-05 Zoltan Varga <vargaz@gmail.com>
4158 * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
4159 to save_token_info () since cmethod is inflated for constrained calls.
4161 * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
4163 2008-10-04 Andreas Färber <andreas.faerber@web.de>
4165 * Makefile.am: Add build rules for ppc64.
4166 This avoids the build failing at pedump with unresolved symbols
4167 due to lack of arch_sources. Instead it will now fail earlier
4168 due to lack of cpu-ppc64.md.
4170 Contributed under MIT/X11 license.
4172 2008-10-04 Mark Probst <mark.probst@gmail.com>
4174 * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
4177 * iltests.il.in: Add test case for tail call with many arguments.
4179 2008-10-03 Zoltan Varga <vargaz@gmail.com>
4181 * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
4182 to the fast virtual generic method code until the aot case is fixed.
4184 2008-10-03 Mark Probst <mark.probst@gmail.com>
4186 * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
4188 2008-10-03 Mark Probst <mark.probst@gmail.com>
4190 * mini-amd64.c, mini-amd64.h: Implement generic virtual method
4193 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
4195 * simd-intrinsics.c: Forgot to add this one.
4197 * mini-codegen.c: Fix macro in case SIMD is not supported.
4199 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
4201 This patch land initial JIT support for simd intrinsics.
4203 * mini-x86.h: Added new define to make --enable_minimal work on x86.
4205 * Makefile.am: Added simd-intrinsics.c
4207 * simd-intrinsics.c: New file with simd instrinsic related
4210 * cfold.c (mono_constant_fold_ins2): Fold XZERO.
4212 * cpu-x86.md: Add simd related instructions.
4214 * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
4216 * driver.c: Added two new --regression variants.
4218 * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
4220 * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
4222 * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
4223 extract some complicated logic to helper functions.
4225 * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
4227 * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
4229 * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
4230 the specialized simplification pass.
4232 * method-to-ir.c (mono_spill_global_vars): Use new macro.
4234 * mini-codegen.c: Added SIMD constants to all regbanks arrays.
4236 * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
4239 * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
4240 if MONO_ARCH_NEED_SIMD_BANK is defined.
4242 * mini-ops.h: Added the new simd ops.
4244 * mini-x86.c: Added mono_arch_xregname.
4246 * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
4248 * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
4250 * mini-x86.h: Define simd related MONO_ARCH macros.
4252 * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
4254 * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
4256 * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
4257 MONO_CLASS_IS_SIMD to deal with simd related IR.
4259 * mini.h (MonoInst): Added spill_var to the backend union.
4261 * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
4263 * mini.h: Added forward declarations of the new simd fuctions.
4265 * optflags-def.h: Added new optimization names SIMD.
4267 * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
4269 * regalloc.h: Added support for working with 3 register banks.
4271 * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
4273 * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
4275 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
4277 * mini-exceptions.c: remove 64 bit related ifdef clutter.
4279 2008-10-03 Zoltan Varga <vargaz@gmail.com>
4281 * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
4282 instead of one on 64 bit systems.
4284 * method-to-ir.c: Remove unused includes.
4286 2008-10-02 Zoltan Varga <vargaz@gmail.com>
4288 * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
4289 cfg->used_int_regs, since the two are different on arm.
4291 2008-10-02 Mark Probst <mark.probst@gmail.com>
4293 * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
4294 mono_method_get_vtable_index() to get the vtable index.
4296 2008-10-02 Mark Probst <mark.probst@gmail.com>
4298 * method-to-ir.c (mono_method_to_ir2): Don't create native
4299 wrappers for array methods, because they're never called (and if
4300 they were called they wouldn't work).
4302 2008-10-02 Mark Probst <mark.probst@gmail.com>
4304 * method-to-ir.c (mono_method_to_ir2): Array methods are
4305 special-cased and must not be invoked indirectly via the (M)RGCTX
4306 when generic sharing is turned on. Fixes #431413.
4308 2008-10-01 Mark Probst <mark.probst@gmail.com>
4310 * method-to-ir.c: When generic sharing is active, call
4311 non-interface virtual generic methods via the standard trampoline.
4313 * mini-trampolines.c: Handle virtual generic shared methods.
4315 * mini.h, mini-x86.c, mini-x86.h: New argument for
4316 mono_arch_build_imt_thunk() which is non-NULL for virtual generic
4317 method thunks and which is the trampoline to call if the lookup
4318 fails. Enable the virtual generic method thunk for x86.
4320 * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
4321 mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
4322 argument but assert that it's NULL, because these archs don't yet
4323 implement the virtual generic method thunk. Changes in the IMT
4324 thunk data structures.
4326 2008-10-01 Zoltan Varga <vargaz@gmail.com>
4328 * aot-compiler.c (emit_globals): Avoid invalid characters in
4329 the static linking symbol.
4331 * objects.cs: Add a test for the range check optimization. Fix warnings.
4333 * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
4334 optimization from the current JIT.
4336 * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
4337 later in decompose_array_access_opts () to allow more optimizations.
4339 * method-to-ir.c (mono_handle_soft_float): Rename this to
4340 mono_decompose_soft_float () for consistency.
4342 * mini-ops.h: Fix arguments of OP_STRLEN.
4344 * method-to-ir.c (save_cast_details): Extract the cast details saving code
4345 into a separate function.
4346 (reset_cast_details): Ditto.
4347 (handle_unbox): Save cast details. Fixes #431254.
4349 * method-to-ir.c: Remove some obsolete FIXMEs.
4351 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
4353 * ir-emit.h (alloc_dreg): Write a warning before crashing.
4355 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
4357 * mini-codegen.c: More work on macros to make them
4358 ready for multiple regbanks.
4360 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
4362 * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
4364 * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
4366 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
4368 * mini-codegen.c (mono_spillvar_offset): Proper support for
4371 2008-09-30 Zoltan Varga <vargaz@gmail.com>
4373 * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
4374 the stack overflow changes.
4376 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
4378 * mini-codegen.c: Make all bank macros depend on reg_bank.
4380 * mini-codegen.c (mono_local_regalloc): Make free mask
4381 initialization regbank aware.
4383 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
4385 * mini-codegen.c (mono_local_regalloc): Extract callee
4386 mask selection to a function and make it regbank aware.
4388 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
4390 * mini-codegen.c (mono_local_regalloc): Changed the cloberring
4391 code to deal with many regbanks.
4393 2008-09-30 Zoltan Varga <vargaz@gmail.com>
4395 * mini-codegen.c: More fp->regbank changes.
4397 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
4399 * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
4400 of a hardcoded constant.
4402 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
4404 * method-to-ir.c (type_from_stack_type): Fix typo.
4406 2008-09-29 Zoltan Varga <vargaz@gmail.com>
4408 * mini-ia64.c (emit_move_return_value): Convert float return values to
4411 * objects.cs: Add a new test.
4413 * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
4414 VARARG methods to fix an assert later.
4416 * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
4417 end so it at least compiles.
4419 2008-09-28 Zoltan Varga <vargaz@gmail.com>
4421 * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
4423 2008-09-28 Rodrigo Kumpera <rkumpera@novell.com>
4425 * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
4426 optimization to a new function (emit_optimized_ldloca_ir) and enable
4427 it for both ldloca and ldloca_s.
4429 2008-09-28 Zoltan Varga <vargaz@gmail.com>
4431 * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
4432 gshared CASTCLASS code.
4434 * driver.c (mono_main): Add a workaround for shutdown crashes seen on
4435 amd64, where the libc stack unwinder encounters stack frames referring to
4436 native code in unmapped memory.
4438 * method-to-ir.c (mini_emit_check_array_type): Add support for generic
4441 * generics.cs: Add new test.
4443 2008-09-27 Zoltan Varga <vargaz@gmail.com>
4445 * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
4446 add a check that one of the ARM_FPU_ constants is defined.
4448 * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
4450 * mini-exceptions.c: Fix build on non-altstack platforms.
4452 * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
4455 * ir-emit.h: Add a comment to NEW_PCONST.
4457 * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
4459 * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
4461 * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
4462 after the changes to MonoJitDomainInfo.
4464 2008-09-27 Mark Probst <mark.probst@gmail.com>
4466 * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
4468 2008-09-27 Mark Probst <mark.probst@gmail.com>
4470 * mini-ppc.c: Compiler warning fixes.
4472 2008-09-27 Mark Probst <mark.probst@gmail.com>
4474 * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
4477 2008-09-27 Mark Probst <mark.probst@gmail.com>
4479 * exceptions-ppc.c, mini-ppc.h: Compile
4480 mono_arch_handle_altstack_exception() on Darwin, too.
4482 2008-09-27 Mark Probst <mark.probst@gmail.com>
4484 * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
4485 work on archs which don't have generic sharing implemented, only
4486 without the vtable_arg.
4488 2008-09-26 Mark Probst <mark.probst@gmail.com>
4490 * mini.c: Added comment explaining why delegate ctor icall
4491 wrappers are compiled.
4493 2008-09-26 Mark Probst <mark.probst@gmail.com>
4495 * mini.c: Don't produce trampolines to delegate ctor icall
4496 wrappers but compile them upfront.
4498 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
4500 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
4501 runtime-set function when going back to managed code. Currently this
4502 is used to set back the protection on the soft ovf pages and/or to
4503 throw the stack overflow exception that happened in unmanaged code.
4505 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
4507 * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
4508 runtime-set function when going back to managed code. Currently this
4509 is used to set back the protection on the soft ovf pages and/or to
4510 throw the stack overflow exception that happened in unmanaged code.
4512 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
4514 * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
4515 the support code for restoring stack protection after stack overflows
4516 that happen in unmanaged code. Don't set the exec permission on the
4519 2008-09-26 Zoltan Varga <vargaz@gmail.com>
4521 * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
4522 delegate->method_ptr is set. Fixes #428054.
4524 2008-09-25 Zoltan Varga <vargaz@gmail.com>
4526 * tests.cs: Rename to ratests.cs.
4528 * method-to-ir.c: Merge the emit_get_rgctx () calls into the
4529 emit_get_rgctx_... functions.
4531 2008-09-25 Mark Probst <mark.probst@gmail.com>
4533 * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
4535 2008-09-25 Mark Probst <mark.probst@gmail.com>
4537 * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
4538 before asserting that method is sharable.
4540 2008-09-25 Mark Probst <mark.probst@gmail.com>
4542 * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
4543 whether method needs a static RGCTX wrapper used instead of
4546 * generic-sharing.c, mini.h: A few functions moved to
4547 metadata/generic-sharing.c.
4549 2008-09-25 Mark Probst <mark.probst@gmail.com>
4551 * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
4552 Generic code sharing for value types, which essentially means
4553 treating value type methods like static methods. The RGCTX is
4554 passed in the same way.
4556 2008-09-25 Zoltan Varga <vargaz@gmail.com>
4558 * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
4559 opcode when creating multi-dimensional arrays of open types.
4561 * generic-sharing.c (mono_method_check_context_used): Handle arrays of
4564 * generics.cs: Add a test.
4566 * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
4568 2008-09-24 Zoltan Varga <vargaz@gmail.com>
4570 * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
4572 * mini.c (mini_method_compile): Set it when running under the debugger.
4574 * method-to-ir.c (mono_handle_global_vregs): Disable global->local
4575 vreg optimization if the flag is set.
4577 * driver.c (mono_main): Add --attach= option to pass options to
4580 * mini.c (sigquit_signal_handler): Start the attach agent.
4582 * ssapre.c: Disable this to save space since it is not yet ported to
4585 * regalloc2.c: Disable this to save space.
4587 * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
4589 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
4591 * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
4592 the -v option useful again.
4594 2008-09-24 Zoltan Varga <vargaz@gmail.com>
4596 * mini-amd64.c (mono_arch_output_basic_block): Add support for
4599 * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
4600 arrays of arrays. Fixes #428406.
4602 * method-to-ir.c (mini_emit_castclass): Ditto.
4604 * objects.cs: Add new test.
4606 2008-09-23 Rodrigo Kumpera <rkumpera@novell.com>
4608 * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
4609 was wrong at it choked against target_type_is_incompatible for byref types.
4611 2008-09-23 Zoltan Varga <vargaz@gmail.com>
4613 * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most
4616 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
4618 * mini-exceptions.c: update a few more exceptions-related counters.
4620 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
4622 * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
4623 new functions to allocate from persistent mempools.
4625 2008-09-23 Zoltan Varga <vargaz@gmail.com>
4627 * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow
4628 multiple register banks in the future.
4630 * mini-codegen.c (mono_local_regalloc): Fix a warning.
4632 2008-09-22 Rodrigo Kumpera <rkumpera@novell.com>
4634 * mini.c (type_to_eval_stack_type): Remove duplicated function.
4636 * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
4638 * mini.h: Export type_to_eval_stack_type.
4640 This function was nearly duplicated in method-to-ir.c and mini.c. The difference
4641 is only ins->klass of byref types.
4643 2008-09-22 Zoltan Varga <vargaz@gmail.com>
4645 * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
4646 (mini_emit_memcpy2): Ditto.
4648 * mini-amd64.c: Fix a warning.
4650 2008-09-21 Mark Probst <mark.probst@gmail.com>
4652 * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
4655 2008-09-19 Rodrigo Kumpera <rkumpera@novell.com>
4657 * method-to-ir.c: Extract stloc micro-optimization to a
4658 function and apply it to all cases.
4660 2008-09-19 Mark Probst <mark.probst@gmail.com>
4662 * method-to-ir.c: Don't fail generic code sharing in cases we
4665 2008-09-18 Mark Probst <mark.probst@gmail.com>
4667 * mini-ppc.c: Handle structs in tailcalls on Darwin.
4669 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
4671 * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
4674 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
4676 * trace.c: make tracing more useful and correct, with per-thread
4679 2008-09-15 Mark Probst <mark.probst@gmail.com>
4681 * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
4682 doing a method call and the argument is an R4.
4684 2008-09-14 Zoltan Varga <vargaz@gmail.com>
4686 * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
4689 2008-09-13 Mark Probst <mark.probst@gmail.com>
4691 * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
4693 2008-09-12 Zoltan Varga <vargaz@gmail.com>
4695 * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
4696 (MONO_JUMP_TABLE_FROM_INS): Ditto.
4698 2008-09-11 Zoltan Varga <vargaz@gmail.com>
4700 * driver.c: Add a --agent argument (not supported yet) to load managed
4701 agent assemblies before loading the main assembly, similarly to how the
4702 Java VM handles agents.
4704 2008-09-11 Mark Probst <mark.probst@gmail.com>
4706 * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
4707 function to do stack layout of local variables.
4709 2008-09-11 Mark Probst <mark.probst@gmail.com>
4711 * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
4714 2008-09-11 Zoltan Varga <vargaz@gmail.com>
4716 * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
4717 abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
4718 JIT if DISABLE_JIT is defined.
4720 * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
4723 2008-09-10 Mark Probst <mark.probst@gmail.com>
4725 * iltests.il.in: Disable the fconv test on PPC (the result is
4726 undefined according to ECMA).
4728 2008-09-10 Mark Probst <mark.probst@gmail.com>
4730 * iltests.il.in: Enable tail call tests for PPC.
4732 * mini.h: Add variable for storing incoming valuetype argument
4733 addresses for tail calls.
4735 * mini-ppc.c: Implement valuetype arguments and return values for
4738 2008-09-09 Mark Probst <mark.probst@gmail.com>
4740 * mini-ppc.c: Partially implement tail calls (struct arguments and
4741 return values not supported).
4743 * method-to-ir.c: Enable tail calls on PPC.
4745 2008-09-08 Zoltan Varga <vargaz@gmail.com>
4747 * aot-compiler.c (emit_wrapper_info): Omit the klass name from
4748 runtime-invoke wrappers to work around the problem of them getting
4749 assigned to a random class.
4751 * aot-runtime.c (mono_aot_get_method): Ditto.
4753 2008-09-07 Zoltan Varga <vargaz@gmail.com>
4755 * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
4756 the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
4758 2008-09-07 Mark Probst <mark.probst@gmail.com>
4760 * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
4761 until they're implemented properly.
4763 * exceptions-ppc.c: Use arch-independent exception-handling code
4764 instead of custom one.
4766 * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
4769 * tramp-ppc.c, mini-ppc.c: Fixed warnings.
4771 * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
4772 applies when __powerpc__ is defined.
4774 2008-09-06 Zoltan Varga <vargaz@gmail.com>
4776 * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
4777 methods to their code to avoid computing the full name of wrappers and
4778 doing a lookup in a string hash table.
4780 2008-09-05 Zoltan Varga <vargaz@gmail.com>
4782 * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
4783 we identify bblocks before method_to_ir () is ran.
4785 * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
4786 Also avoid optimizing branches pointing to themselves.
4788 * mini.c (mini_method_compile): Ditto. Fixes #422947.
4790 2008-09-05 Rodrigo Kumpera <rkumpera@novell.com>
4792 * driver.c (mono_main): Enable the new verifier under core-clr and cas.
4794 2008-09-05 Zoltan Varga <vargaz@gmail.com>
4796 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
4797 (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
4798 (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
4801 * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all
4802 jumped to the same entry in plt_jump_table.
4804 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
4806 * method-to-ir.c (initialize_array_data): Handle field with RVA from
4809 2008-08-31 Zoltan Varga <vargaz@gmail.com>
4811 * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
4812 other assignment can be if converted. Saves 1.5% on corlib size and fixes
4815 2008-08-29 Geoff Norton <gnorton@novell.com>
4817 * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
4818 segment, and doesn't properly handle .space as .text. Fixes
4821 2008-08-29 Geoff Norton <gnorton@novell.com>
4823 * mini.c: Disable the mach exception handler when running on
4826 2008-08-29 Geoff Norton <gnorton@novell.com>
4828 * aot-compiler.c: Patch from Renaldas Zioma to properly register
4829 globals on Darwin/ARM
4831 2008-08-28 Zoltan Varga <vargaz@gmail.com>
4833 * mini.c: Avoid not initializing the runtime when doing AOT compilation,
4834 since too many things depend on it. Instead, call
4835 mono_runtime_set_no_exec ().
4837 * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
4840 * aot-compiler.c: Add an 'asm-only' AOT option.
4842 * mini.c: Avoid initializing the runtime when doing AOT compilation.
4844 * aot-compiler.c (compile_method): Disable gshared support for now as it
4847 2008-08-27 Bill Holmes <billholmes54@gmail.com>
4849 * mini-amd64.h : Fix a compiler warning.
4851 * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
4852 Changed to use a callback function to retrieve the unwind info.
4853 This avoids problems observed when code blocks were removed by
4854 unloading an app domain.
4856 * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole
4857 and branch excludes for Winx64. The fix in exceptions-amd64.c allows them
4860 Contributed under MIT/X11 license.
4862 2008-08-27 Bill Holmes <billholmes54@gmail.com>
4864 * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
4865 case to keep the stack aligned to 8.
4867 Contributed under MIT/X11 license.
4869 2008-08-26 Zoltan Varga <vargaz@gmail.com>
4871 * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
4872 avoid repeated linear searches.
4874 2008-08-25 Zoltan Varga <vargaz@gmail.com>
4876 * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
4877 methods it can't handle.
4879 * aot-compiler.c (add_method): Avoid adding a method twice.
4880 (add_wrappers): Add runtime invoke wrappers for all methods.
4882 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
4883 function to create an aot-compatible version of this trampoline.
4885 * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
4887 2008-08-24 Zoltan Varga <vargaz@gmail.com>
4889 * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
4891 * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
4892 with a generic sharing failure.
4894 * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
4896 * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
4897 CEE_RETHROW. Fixes #419634.
4899 * mini.c (mono_method_to_ir): Ditto.
4901 * exceptions.cs: Add a new test.
4903 * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
4904 to mono_type_stack_size_internal () since some callers might not pass in
4907 * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
4908 instrument_prolog. Fixes #419878.
4910 * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
4911 doubles in soft float mode volatile.
4913 2008-08-23 Zoltan Varga <vargaz@gmail.com>
4915 * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
4917 * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
4918 to handle soft float correctly.
4920 * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
4923 * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
4925 * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
4926 to sp, since the generics catch code requires it.
4928 * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
4931 * method-to-ir.c (emit_imt_argument): Pass imt_arg to
4932 mono_arch_emit_imt_argument ().
4934 * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
4936 * mini-arm.c tramp-arm.c: Generic sharing updates.
4938 2008-08-22 Zoltan Varga <vargaz@gmail.com>
4940 * mini-arm.c: Fix the arm build.
4942 * generic-sharing.c (mini_type_get_underlying_type): New helper function
4943 handling enums, generic instances and generic sharing.
4944 (mini_type_stack_size_full): Ditto.
4946 * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
4948 * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
4950 * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
4952 * tramp-arm.c: Implement the rgctx fetch and the generic class init
4955 * mini-arm.c: Various small generic sharing changes.
4957 * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
4959 (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
4962 * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
4963 helper function to return a generic class init trampoline.
4965 * method-to-ir.c mini.c: Use it.
4967 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
4968 arch-specfic function to return a generic class init trampoline.
4970 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
4971 the GENERIC_CLASS_INIT custom code.
4973 * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
4974 a fatal error, not a sharing failure.
4976 * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
4979 * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
4980 trampoline argument from MONO_ARCH_VTABLE_REG.
4982 * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
4983 order of the arguments to the C trampoline: pass 'slot' as the trampoline
4984 argument, and pass the vtable in VTABLE_REG.
4986 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
4987 order of the arguments to the C trampoline: pass 'slot' as the trampoline
4988 argument, and pass the vtable in VTABLE_REG.
4989 (mono_arch_create_trampoline_code_full): Remove some special casing for
4990 the rgctx fetch trampoline.
4992 * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
4995 * iltests.il: Add a test for it.
4997 2008-08-21 Zoltan Varga <vargaz@gmail.com>
4999 * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
5001 * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
5004 * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
5005 use mono_jit_info_table_find () to avoid recursion.
5006 (mono_delegate_trampoline): Add a sync wrapper here.
5008 * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
5011 * mini.c (mono_method_to_ir): Ditto.
5013 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
5014 add_sync_wrapper argument. Don't add a sync wrapper here.
5015 (mono_create_jump_trampoline): Don't add a sync wrapper here.
5017 * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
5019 2008-08-20 Bill Holmes <billholmes54@gmail.com>
5021 * exceptions-amd64.c (seh_handler): For Winx64 adding missing copy
5022 of nonvolatile registers back from MonoContext to CONTEXT.
5024 Contributed under MIT/X11 license.
5026 2008-08-20 Bill Holmes <billholmes54@gmail.com>
5028 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): When shifting the
5029 arguments on Winx64 there are only 4 argument registers. For this
5030 logic to work the last argument must be pulled from the stack.
5032 Contributed under MIT/X11 license.
5034 2008-08-20 Zoltan Varga <vargaz@gmail.com>
5036 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
5038 * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
5039 MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
5040 encode/decode_method_ref ().
5042 * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
5044 * aot-runtime.c (decode_patch): Ditto.
5046 * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
5047 MONO_PATCH_INFO_METHOD.
5049 * aot-runtime.c (decode_exception_debug_info): Decode the contents of
5052 * aot-compiler.c (emit_exception_debug_info): Emit the contents of
5055 * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
5057 * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
5058 one from the caller.
5060 * aot-runtime.c (decode_generic_inst): New function to decode and
5061 return a interned generic inst.
5062 (decode_klass_ref): Use it.
5063 (decode_method_ref): Ditto.
5065 * aot-compiler.c (emit_exception_debug_info): Save
5066 jinfo->has_generic_jit_info too.
5068 2008-08-19 Zoltan Varga <vargaz@gmail.com>
5070 * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
5072 * iltests.il.in: Add a test for fconv_to_i.
5074 * liveness.c: Disable the liveness2 pass for now to save space.
5076 * regalloc2.c: Include mempool-internals.h to fix warnings.
5078 * aot-compiler.c (encode_method_ref): Encode the context of generic
5081 * aot-runtime.c (decode_method_ref): Inflate generic methods using
5082 the context saved in the aot file.
5084 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
5086 * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
5088 * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
5089 volatile so they won't be optimized away.
5091 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
5097 * dominators.c: Remove duplicated functions that now are in
5098 mempool-internals.h.
5100 2008-08-19 Zoltan Varga <vargaz@gmail.com>
5102 * aot-compiler.c: Fix warnings.
5104 * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
5106 * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
5108 * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
5111 * mini.c (mono_resolve_patch_target): Ditto.
5113 * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
5114 (encode_klass_ref): Add support for encoding VARs/MVARs.
5116 * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
5118 * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
5119 the handling of the got entries into a separate 'decode_got_entry' function.
5120 Add support for RGCTX_FETCH.
5122 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
5123 clobbered by the trampoline code.
5125 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
5126 not clobbered by the indirect calling code.
5128 2008-08-18 Zoltan Varga <vargaz@gmail.com>
5130 * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
5133 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
5135 * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
5136 signature using the compilation mempool otherwise we would leak it.
5138 2008-08-18 Zoltan Varga <vargaz@gmail.com>
5140 * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
5141 mono_emit_abs_call ().
5143 * patch-info.h: Add GENERIC_CLASS_INIT.
5145 * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
5147 * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
5148 as their target as a near call.
5150 * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
5152 (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
5154 * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
5155 call to a runtime function described by a patch.
5157 * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
5158 mono_emit_abs_call, this has the advantage that the ABS handling code in
5159 mono_codegen () can handle them both, and can handle other stuff in the
5160 future without additional code.
5162 * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
5164 (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
5167 * mini.h: Add missing bblock related prototypes.
5169 * mini.h (MonoCompile): Remove unused reverse_inst_list and
5170 reverse_inst_list_len fields.
5172 * mini.c: Refactor this file a bit by moving branch optimizations to
5175 * method-to-ir.c: Merge generic sharing changes missed earlier.
5177 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
5179 * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
5180 shared patches. Process METHODCONST as a shared patch.
5182 * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
5183 as it crashes on the 2.0 mscorlib.
5185 * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
5188 * aot-compiler.c: Use is_plt_patch () in a few additional places.
5189 (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
5192 * aot-compiler.c: Reorganize the got handling code to be a bit more
5195 2008-08-17 Zoltan Varga <vargaz@gmail.com>
5197 * aot-compiler.c: Make the patch_to_plt_offset hash table use
5198 mono_patch_info_equals/hash, and use it to massively simplify
5201 * mini.c (mono_patch_info_hash): Simplify this and add support for
5204 * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
5206 * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
5207 handling code, since an offset is not enough to identify a trampoline.
5209 * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
5211 2008-08-17 Mark Probst <mark.probst@gmail.com>
5213 * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
5215 * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
5217 * mini-ops.h: Argument and result types for OVF_CARRY ops.
5219 * decompose.c: PPC decompositions for various ops.
5221 * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
5223 2008-08-17 Zoltan Varga <vargaz@gmail.com>
5225 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
5226 call the generic trampoline code using a call, instead of a jump, to
5227 remove some special casing from the generic trampoline code.
5229 * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
5230 (mono_codegen): Ditto.
5232 * aot-compiler.c aot-runtime.c: Ditto.
5234 * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
5236 * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
5237 helper function to find the offset corresponding to a lazy fetch trampoline.
5239 * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
5240 when doing generic sharing.
5242 * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
5245 * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
5246 mini-trampolines.c to be with the other trampoline creation functions.
5248 * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
5249 as it is equal to method->signature in most cases, add a
5250 mono_emit_method_call_full variant which takes a signature and an imt
5253 2008-08-16 Zoltan Varga <vargaz@gmail.com>
5255 * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
5256 to this function, since it could be computed easily from the method
5258 (mono_helper_compile_generic_method_wo_context): Removed, not needed any
5261 * method-to-ir.c mini.c: Remove references to
5262 compile_generic_method_wo_context.
5264 * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
5265 generic method calls.
5267 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
5268 dimensional non-szarrays.
5270 * mini.c (mini_init): Register mono_array_new_1.
5272 * jit-icalls.c (mono_array_new_1): New jit icall.
5274 * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
5275 pointing to the method.
5277 * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
5278 method addresses belonging to METHOD_JUMP patches in the
5279 jump_target_got_slot_hash.
5280 (mono_aot_load_method): Ditto.
5282 * aot-compiler.c (compile_method): Allow AOT compilation of methods with
5283 METHOD_JUMP patches.
5285 * mini.c (mini_create_jit_domain_info): New helper function which
5286 initializes/frees domain->runtime_info.
5287 (mini_free_jit_domain_info): Ditto.
5288 (mini_init): Install the domain hook functions with the runtime.
5290 * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
5291 information maintained by the JIT.
5293 * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
5294 insertion into jump_table_hash into mono_codegen (), also implement proper
5297 * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
5298 tail calls, it is already done by the aot code.
5300 * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
5303 * iltests.il.in: Make the jmp test a bit more complex.
5305 * aot-compiler.c (encode_method_ref): Handle references to normal methods of
5306 generic instances which doesn't have a token.
5308 * aot-runtime.c (decode_method_ref): Ditto.
5310 * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
5311 can handle this case now.
5312 (handle_box): Ditto.
5314 2008-08-15 Geoff Norton <gnorton@novell.com>
5316 * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
5319 2008-08-15 Zoltan Varga <vargaz@gmail.com>
5321 * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
5322 calling generic methods.
5324 * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
5326 * aot-runtime.c (decode_patch_info): Ditto.
5328 * mini.c (mono_resolve_patch_target): Ditto.
5330 * patch-info.h: Add METHOD_RGCTX.
5332 * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
5334 2008-08-14 Zoltan Varga <vargaz@gmail.com>
5336 * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
5337 arguments in registers.
5339 * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
5340 OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
5342 * mini.c (mini_method_compile): Abort aot compilation for generic
5343 methods if generic sharing is disabled.
5345 * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
5348 * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls
5349 requiring an mrgctx.
5351 * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
5352 store instructions when converting a vcall to a normal call.
5354 * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
5355 mono_arch_find_jit_info.
5357 2008-08-13 Zoltan Varga <vargaz@gmail.com>
5359 * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
5360 avoid calling mono_method_full_name () for every method even if the
5362 (check_inline_caller_method_name_limit): Ditto.
5364 2008-08-12 Zoltan Varga <vargaz@gmail.com>
5366 * driver.c (main_thread_handler): Allow AOT compilation of multiple
5367 assemblies in one run.
5369 * aot-compiler.c (mono_compile_assembly): Only print out a count of
5370 skipped methods if it is not 0.
5372 * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
5374 2008-08-12 Bill Holmes <billholmes54@gmail.com>
5376 * mini.c (mono_codegen): Changing a preprocessor check from WIN64 to
5377 MONO_ARCH_HAVE_UNWIND_TABLE.
5379 Contributed under MIT/X11 license.
5381 2008-08-12 Bill Holmes <billholmes54@gmail.com>
5383 * mini-amd64.c (mono_arch_cpu_optimizazions): Remove peephole and branch
5384 from default optimizaton list on Winx64.
5386 * mini-amd64.c (emit_tls_get): Added Winx64 specific implementation for GetTLS.
5388 * mini-amd64.c (mono_arch_emit_prolog): Adding an offset on Winx64 to get
5389 the LMF from the MonoJitTlsData structure.
5391 * mini-amd64.c (mono_arch_setup_jit_tls_data): Added Winx64 implementation.
5393 Contributed under MIT/X11 license.
5395 2008-08-12 Zoltan Varga <vargaz@gmail.com>
5397 * mini.c (sigsegv_signal_handler): Fix the build.
5399 * mini-amd64.c (emit_call_body): Use image->aot_module instead of
5400 assembly->aot_module.
5402 * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
5403 hash table. This simplifies and speeds up a lot of code, and fixes support
5406 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
5409 * mini-exceptions.c: Ditto.
5411 * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
5412 'native_offset' argument, since these are computed in the
5413 mono_find_jit_info () function.
5415 * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
5416 is used by exceptions-ppc.c.
5418 * exceptions-ppc.c: Call mono_find_jit_info () instead of
5419 mono_arch_find_jit_info ().
5421 * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
5422 mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
5423 generic code in mini-exceptions.c.
5425 2008-08-11 Zoltan Varga <vargaz@gmail.com>
5427 * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
5429 * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
5431 * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
5432 the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
5433 called while holding the loader lock. Fixes #415608.
5434 (mono_aot_get_method_from_token_inner): Ditto.
5436 2008-08-09 Zoltan Varga <vargaz@gmail.com>
5438 * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
5439 to reduce differences between this and the generic implementation in
5441 (ves_icall_get_frame_info): Ditto.
5443 * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
5445 * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
5448 * exceptions-ppc.c (arch_get_call_filter): Rename this to
5449 mono_arch_get_call_filter () and make it non-static, for consistency with the
5450 other architectures.
5452 2008-08-09 Rodrigo Kumpera <rkumpera@novell.com>
5455 * local-propagation.c:
5456 * mini-x86.c: Correct the name of arch defines.
5458 2008-08-09 Zoltan Varga <vargaz@gmail.com>
5460 * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
5461 NO_EMULATE_LONG_SHIFT_OPS define.
5463 2008-08-08 Zoltan Varga <vargaz@gmail.com>
5465 * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
5466 now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
5468 * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
5469 MACH fixes. Merged from the 2.0 branch.
5471 * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
5473 * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
5474 (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
5476 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
5478 * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
5479 mono_marshal_get_native_wrapper () signature changes.
5481 2008-08-07 Rodrigo Kumpera <rkumpera@novell.com>
5483 * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
5484 conversion bug under arm.
5486 2008-08-06 Rodrigo Kumpera <rkumpera@novell.com>
5488 * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
5490 * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
5491 with overflow checking.
5493 2008-08-05 Marek Habersack <mhabersack@novell.com>
5495 * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
5496 to the genmdesc.pl file
5498 2008-08-05 Zoltan Varga <vargaz@gmail.com>
5500 * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
5501 arg_array in the soft-float versions of the LOAD/STORE macros.
5503 * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
5506 * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
5508 2008-08-02 Zoltan Varga <vargaz@gmail.com>
5510 * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
5511 a float HFA. Fixes #413621.
5513 2008-08-02 Gert Driesen <drieseng@users.sourceforge.net>
5515 * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
5516 frame_size to args_size. Fixes build.
5518 2008-08-02 Zoltan Varga <vargaz@gmail.com>
5520 * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
5521 and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
5523 * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
5524 the stack are not unaligned. Fixes #413247.
5526 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
5528 * mini.c: update jitted methods performance counters.
5530 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
5532 * mini-exceptions.c: increase the exceptions thrown performance
5533 counter in mono_handle_exception ().
5535 2008-07-29 Zoltan Varga <vargaz@gmail.com>
5537 * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
5538 can work with netmodules.
5540 2008-07-28 Geoff Norton <gnorton@novell.com>
5542 * mini-x86.h: Correct the frame alignment on OSX. Fixes the jit
5545 2008-07-28 Zoltan Varga <vargaz@gmail.com>
5547 * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
5550 2008-07-28 Bill Holmes <billholmes54@gmail.com>
5552 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
5553 The float param registers and other param registers must be the
5554 same index on Windows x64.
5556 * mini-amd64.c (mono_arch_allocate_vars) : Implementing the
5557 ArgValuetypeAddrInIReg argument case. Setting the argument
5558 op to OP_VTARG_ADDR (OP_REGOFFSET)).
5560 * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix. Use the size
5561 variable computed above as the copy length for arguments of storage
5562 type ArgValuetypeAddrInIReg.
5564 * mini-amd64.c (mono_arch_emit_call) : Implementing the
5565 ArgValuetypeAddrInIReg argument case. This case will rely on
5566 mono_arch_emit_outarg_vt to emit the correct code later in the process.
5568 * mini-amd64.c (mono_arch_emit_call) : On Winx64 there always needs to be
5569 a 32 byte stack allocation for all calls. We will omit the adjustment for
5570 jump and tail call instructoins as they do not follow the typical call behavior.
5572 * mini-amd64.c (mono_arch_emit_outarg_vt) : Implementing the case for
5573 ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
5574 local variable and pass the local variable by reference to the called method.
5576 * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
5577 Implementing the ArgValuetypeAddrInIReg argument case. When the address
5578 of a struct is passed in a register it must be saved with the other
5579 volatile argument on the stack.
5581 * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix. When omitting the
5582 frame pointer the stack adjustment value must be saved to the unwind
5585 Contributed under MIT/X11 license.
5587 2008-07-28 Zoltan Varga <vargaz@gmail.com>
5589 * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
5590 which got lost in the merge.
5592 2008-07-27 Zoltan Varga <vargaz@gmail.com>
5594 * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
5597 * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
5599 * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
5600 icalls, since they won't be patched.
5602 * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
5603 different code sequence when running under valgrind to prevent some valgrind
5606 * iltests.il.in: Add new regression test.
5608 * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
5611 * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
5612 accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
5614 * iltests.il.in: Add new test.
5616 * aot-compiler.c: Fix some warnings.
5618 * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
5621 2008-07-27 Zoltan Varga <vargaz@gmail.com>
5623 * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
5624 (mini_usage_jitdeveloper): Add a missing --wapi option.
5626 2008-07-25 Zoltan Varga <vargaz@gmail.com>
5628 * mini-codegen.c: Simplify the is_fp macros.
5629 (free_up_ireg): Remove, use free_up_reg instead.
5630 (free_up_reg): Fix the fp case.
5632 2008-07-26 Zoltan Varga <vargaz@gmail.com>
5634 * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
5637 * exceptions-x86.c: Merge some changes which seemed to have got lost
5638 in the linear-ir merge.
5640 * liveness.c: Disable the liveness2 pass on 32 bit platforms.
5642 * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
5643 long vreg volatile even if the variable was already created.
5645 * liveness.c (update_liveness2): Avoid eliminating dead definitions of
5648 2008-07-26 Zoltan Varga <vargaz@gmail.com>
5650 * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
5652 * mini.c (mono_jit_compile_method_inner): Add support for
5653 MONO_EXCEPTION_BAD_IMAGE.
5655 * method-to-ir.c (mono_method_to_ir2): Avoid a crash if
5656 mini_method_get_context () returns NULL. Fixes #356531.
5658 * mini.c (mono_method_to_ir): Ditto.
5660 * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
5661 accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
5663 2008-07-25 Zoltan Varga <vargaz@gmail.com>
5665 * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
5666 in the LDFTN implementation.
5668 2008-07-25 Mark Probst <mark.probst@gmail.com>
5670 * mini-trampolines.c (mono_magic_trampoline): When sharing generic
5671 code, patch calls to icalls, too, even if they're not in the
5672 shared generic code hash. Fixes #411962.
5674 2008-07-25 Zoltan Varga <vargaz@gmail.com>
5676 * cpu-x86.md: Increase the length of the fcall opcodes.
5678 * mini-x86.c (emit_move_return_value): Avoid some precision issues for
5679 calls returning floats.
5681 * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
5684 * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
5687 * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
5688 into the domain->method_code_hash.
5690 * aot-compiler.c: Fix win32 build.
5692 * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
5694 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
5695 gshared NEWARR implementation.
5697 * cpu-sparc.md: Remove duplicate localloc_imm opcode.
5699 * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
5700 can be used outside of method_to_ir.
5702 * mini.h (MonoCompile): Add arg_types field.
5704 * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
5706 * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
5707 the values of the local arg_array and param_types array.
5709 2008-07-24 Zoltan Varga <vargaz@gmail.com>
5711 * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
5712 got accesses might only get generated later when NEWOBJ is decomposed.
5714 * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
5715 looking up the native code of the target method when a delegate is called
5718 * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
5721 * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
5723 * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
5724 AOT work on platforms without a working dlsym implementation.
5726 * mini.h: Bump AOT image format version.
5728 2008-07-24 Mark Probst <mark.probst@gmail.com>
5730 * mini-exceptions.c: Free a MonoType with
5731 mono_metadata_free_type() instead of g_free().
5733 * aot-runtime.c: Free a MonoType.
5735 2008-07-24 Zoltan Varga <vargaz@gmail.com>
5737 * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
5740 * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
5743 2008-07-23 Massimiliano Mantione <massi@ximian.com>
5744 * mini.c (sigprof_signal_handler): call the new "runtime initialized"
5747 2008-07-23 Zoltan Varga <vargaz@gmail.com>
5749 * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
5750 NEWOBJ calls on valuetypes.
5752 * iltests.il.in: Add new test.
5754 * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
5756 2008-07-22 Zoltan Varga <vargaz@gmail.com>
5758 * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
5759 is no longer needed.
5761 * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
5762 non register sized integer arguments.
5763 (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
5764 (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to
5767 * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
5770 * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
5771 two a binop with different sized arguments is emitted.
5773 * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
5774 instruction in the ins==NULL case.
5776 2008-07-23 Zoltan Varga <vargaz@gmail.com>
5778 * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
5780 * mini-x86.c: Fix osx build.
5782 * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
5785 * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
5786 instruction for non int sized variables.
5788 * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
5791 2008-07-23 Robert Jordan <robertj@gmx.net>
5793 * method-to-ir.c: Fix MSVC build.
5795 2008-07-22 Zoltan Varga <vargaz@gmail.com>
5797 * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
5798 a non int sized type, widen it to an int since newer versions of gcc seem to
5799 generate code which needs this.
5801 * ssa2.c abcremoval2.c: Fix warnings.
5803 * *: Merge the Linear IR branch.
5805 The original branch is at trunk/branches/vargaz/mini-linear-il, and
5806 the ChangeLog file there describes all the changes done over the years.
5807 Further documentation can be found at www.mono-project.com/Linear_IL.
5809 2008-07-21 Bill Holmes <billholmes54@gmail.com>
5811 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
5812 The float param registers and other param registers must be the
5813 same index on Windows x64.
5815 Contributed under MIT/X11 license.
5817 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
5819 * mini.c: Make the previous fix GC safe.
5821 2008-07-21 Raja R Harinath <harinath@hurrynot.org>
5823 * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
5825 2008-07-21 Bill Holmes <billholmes54@gmail.com>
5827 * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
5828 on Winx64. This type will not be passed on the stack (ArgOnStack), but
5829 ArgValuetypeAddrInIReg instead.
5831 Contributed under MIT/X11 license.
5833 2008-07-21 Zoltan Varga <vargaz@gmail.com>
5835 * mini-codegen.c (get_register_spilling): Fix a warning.
5837 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
5839 * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
5840 for types which the initialization fails. Raises the provided exception
5841 at the right stop after cleanup.
5843 2008-07-16 Zoltan Varga <vargaz@gmail.com>
5845 * aot-compiler.c: Free most of the memory allocated during compilation.
5847 * mini.c (mini_parse_debug_options): Fix a leak.
5849 * mini.c (mini_method_compile): Don't add the method to the jit info tables
5850 during aot compilation.
5852 2008-07-14 Zoltan Varga <vargaz@gmail.com>
5854 * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as
5855 it has too much register pressure.
5857 2008-07-13 Zoltan Varga <vargaz@gmail.com>
5859 * inssel.brg (CEE_CASTCLASS): Remove some dead code.
5861 2008-07-12 Zoltan Varga <vargaz@gmail.com>
5863 * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
5866 * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
5867 on amd64 similar to the way it is done on arm.
5869 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
5871 * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for
5872 consistency, normalize error messages, avoid loading aot-only modules in
5875 * driver.c (mono_main): Rename --aot-only command line option to --full-aot
5878 * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
5880 2008-07-11 Martin Baulig <martin@ximian.com>
5883 (MonoDebuggerInfo): Add `interruption_request'.
5885 2008-07-12 Zoltan Varga <vargaz@gmail.com>
5887 * aot-compiler.c (emit_plt): Remove some dead code.
5889 * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
5891 * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
5892 return the plt info offset belonging to a given plt entry.
5894 * mini-trampolines.c (mono_aot_plt_trampoline): Use
5895 mono_aot_get_plt_info_offset.
5897 * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
5898 similar to the amd64 code by makeing jumps through a separate jump table
5899 instead of embedding the jump addresses into the code.
5901 2008-07-11 Zoltan Varga <vargaz@gmail.com>
5903 * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
5906 2008-07-10 Martin Baulig <martin@ximian.com>
5908 * mini.c (mini_method_compile): Disable generics sharing when
5909 running in the debugger.
5911 2008-07-10 Zoltan Varga <vargaz@gmail.com>
5913 * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
5915 * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
5916 the local register allocator from running out of registers on x86 when
5919 2008-07-10 Bill Holmes <billholmes54@gmail.com>
5921 * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when
5922 expressing IntMin for the VS Compiler. See Compiler Warning (level 2)
5925 Contributed under MIT/X11 license.
5927 2008-07-10 Zoltan Varga <vargaz@gmail.com>
5929 * aot-compiler.c: Get rid of whitespace in the generated assembly file to
5930 speed up the assembler.
5932 2008-07-09 Zoltan Varga <vargaz@gmail.com>
5934 * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
5937 * mini.c: Move the soft float handling macros a bit earlier, add
5938 NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
5941 * mini.h: Add prototype for mono_arch_fixup_jinfo.
5943 * mini.c (mini_init): In aot-only mode, set the root domain code manager to
5944 read-only to help catch code allocation requests.
5946 * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
5947 and turn it off when using --aot-only or when compiling with --aot=full.
5949 * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
5950 jump table for switches from the normal domain mempool, not the code
5953 * mini-trampolines.c (get_unbox_trampoline): New function to return an
5954 unbox trampoline which handles aot-only mode too.
5956 * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
5957 an AOTed unbox trampoline.
5959 * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
5961 2008-07-09 Bill Holmes <billholmes54@gmail.com>
5963 * wapihandles.c: Fixing MSVC builds. Include statement changed from <> to
5966 Contributed under MIT/X11 license.
5968 2008-07-09 Bill Holmes <billholmes54@gmail.com>
5970 * mini.c (mono_codegen): Allocate space at the end of the code block and store
5971 the unwind information for the method at the end of the allocated block.
5973 * mini-amd64.h: Added declarations for the unwind routines and adding field to
5974 MonoCompileArch to hold the unwind info for SEH on Winx64
5976 * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
5977 frame pointer info for the method being compiled.
5979 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
5980 the call to mono_exception_from_token.
5982 * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations. This code is responsible
5983 storing the method prolog information in a format that the Winx64 SEH can understand. This
5984 information is stored a the end of the method block because it is all 32-bit offset based.
5986 Contributed under MIT/X11 license.
5988 2008-07-09 Zoltan Varga <vargaz@gmail.com>
5990 * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
5992 * wapihandles.c: Fix warnings.
5994 * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
5997 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling
5998 mono_jit_compile_method in aot-only mode since that calls the type
6001 * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
6002 get_delegate_invoke_impl in aot-only mode.
6004 * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
6006 2008-07-08 Zoltan Varga <vargaz@gmail.com>
6008 * trace.c (mono_trace_enter_method): Fix printing of Type instances.
6010 * aot-compiler.c (compile_method): Disable the check for GSHARED since it
6013 * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
6015 * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
6016 init trampoline from the AOT file as well.
6018 * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
6019 mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
6022 * mini.c (mini_init): Move the call to mono_exceptions_init () after
6025 * exceptions-amd64.c: Add _full variants for the remaining exception code
6026 creation functions as well, allow emission of relocatable code, remove
6027 caching since that is now done by the caller.
6029 * mini-exceptions.c: Add _full variants for the remaining exception code
6030 creation functions as well, add aot-only support.
6032 * aot-compiler.c (compile_method): Allow calls to methods of constructed types
6033 if we can determine a proper token for them.
6034 (add_wrappers): Add a few more wrappers.
6035 (emit_method_code): Remove some dead code.
6036 (emit_trampolines): Emit exception code too.
6038 * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
6040 * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
6041 mono_array_new_va which avoids varargs.
6043 * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
6045 * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
6046 mono_arch_create_specific_trampoline () in all places.
6048 * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
6049 a bit so it can be used for other things as well.
6051 * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
6054 * exceptions-amd64.c: Rename the caching from the exception code creation
6055 functions, it is done by the caller instead.
6057 * exceptions-amd64.c: Change the signature of the exception code creation
6058 functions to allow the creation of relocatable code later.
6060 * mini-exceptions.c: Add a set of functions to query the various
6061 runtime-generated exception functions.
6063 * mini.c mini-exceptions.c: Use the newly added functions instead of the
6064 mono_arch_.. () functions.
6066 2008-07-07 Zoltan Varga <vargaz@gmail.com>
6068 * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
6070 * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
6072 * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
6073 (mini_get_vtable_trampoline): Ditto.
6075 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
6076 code in the AOT case by returning the code size and a list of relocations to
6079 * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
6081 2008-07-07 Bill Holmes <billholmes54@gmail.com>
6083 * mini-amd64.c: On Winx64 the calling convention always requires the caller to
6086 Contributed under MIT/X11 license.
6088 2008-07-07 Zoltan Varga <vargaz@gmail.com>
6090 * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
6091 so the buffer size can be computed correctly. Fixes #404735.
6093 * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
6094 normally as cfg->debug_info is already freed.
6096 2008-07-06 Zoltan Varga <vargaz@gmail.com>
6098 * mini-amd64.c: For calls returning vtypes in registers, don't store
6099 the return address on the stack, instead allocate a separate local for
6102 2008-07-05 Mark Probst <mark.probst@gmail.com>
6104 * mini-trampolines.c, mini.h: Add an argument to
6105 mono_create_jit_trampoline_in_domain() for turning off the adding
6106 of the sync wrapper.
6108 * mini.c: Use the JIT trampoline without sync instead of
6109 ldftn_nosync in static RGCTX invoke wrappers so that the call can
6112 2008-07-04 Mark Probst <mark.probst@gmail.com>
6114 * driver.c: Turn on GSHARED optimization by default.
6116 2008-07-04 Zoltan Varga <vargaz@gmail.com>
6118 * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
6119 to MONO_TRAMPOLINE_JIT since it better reflects what it does.
6121 * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
6122 create a variant of the generic trampoline code callable from AOTed trampolines.
6124 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
6125 trampoline code callable from AOTed trampolines.
6127 * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
6129 2008-07-04 Mark Probst <mark.probst@gmail.com>
6131 * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
6132 pass-through manner.
6134 * mini.c: Generic method sharing. Pass MRGCTX to generic methods
6135 and don't fail sharing for them anymore.
6137 * mini-exceptions.c: Handle exceptions in shared generic methods.
6139 * generic-sharing.c: When checking the context of a generic
6140 method, also check its class's context. Don't treat wrappers as
6143 * mini-trampolines.c: Some code factored out to
6144 metadata/generic-sharing.c. Handle the MRGCTX case.
6146 * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
6147 we must deal with the method being of another instantiation of the
6148 class. Add static rgctx invoke wrappers to generic methods.
6150 2008-07-04 Mark Probst <mark.probst@gmail.com>
6152 * mini.c: Provide all jit infos of generic shared methods with a
6155 * mini-exceptions.c: Handle the new situation that a generic info
6156 might be available, but not info about the this/vtable/mrgctx
6159 2008-07-03 Mark Probst <mark.probst@gmail.com>
6161 * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
6164 2008-07-03 Zoltan Varga <vargaz@gmail.com>
6166 * dominators.c (check_dominance_frontier): Fix a warning.
6168 * mini.h: Add some missing prototypes.
6170 * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
6172 * driver.c (mono_jit_init_version): Correct the comments since the first
6173 argument should be the name of the root domain, not a filename.
6175 * aot-runtime.c (make_writable): Error out if this is called while running
6177 (load_aot_module): Ditto.
6179 * aot-compiler.c: Really fix the computation of method indexes.
6181 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous
6182 optimizations as this is no longer called frequently.
6184 * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
6185 method and the invoke impl code and pass it to the delegate trampoline instead of
6186 just the delegate class.
6188 2008-07-02 Zoltan Varga <vargaz@gmail.com>
6190 * aot-compiler.c: Fixup the computation of method indexes.
6191 (add_wrappers): Create the base methods of the runtime invoke wrappers using
6192 the method builder infrastructure.
6194 * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
6197 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
6198 mode, load the method right away instead of creating a trampoline.
6200 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
6202 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
6205 2008-07-01 Zoltan Varga <vargaz@gmail.com>
6207 * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
6208 (mono_aot_load_method): Use method_index instead of method->token.
6210 * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
6211 can handle icalls etc. properly.
6213 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
6215 * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
6217 * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
6218 (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
6219 JIT_ICALL_ADDR patch type.
6221 * patch-info.h: Add JIT_ICALL_ADDR patch type.
6223 * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
6225 (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
6227 * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
6229 2008-06-30 Zoltan Varga <vargaz@gmail.com>
6231 * mini.c: Use domain->jit_code_hash_lock for controlling access to
6232 domain->jit_code_hash.
6234 2008-06-29 Zoltan Varga <vargaz@gmail.com>
6236 * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
6238 2008-06-27 Zoltan Varga <vargaz@gmail.com>
6240 * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
6241 get_this_arg_from_call, let it compute it when needed.
6243 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
6244 gsctx from code only when needed.
6246 * mini-trampolines.c (get_generic_context): Rename this to
6247 mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
6248 it can be called by the arch backends.
6250 * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
6252 2008-06-26 Zoltan Varga <vargaz@gmail.com>
6254 * driver.c (mono_main): Add experimental --aot-only command line option.
6256 * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
6259 2008-06-26 Kornél Pál <kornelpal@gmail.com>
6261 * driver.c (DllMain): Remove mono_module_handle.
6263 Contributed under MIT/X11 license.
6265 2008-06-25 Zoltan Varga <vargaz@gmail.com>
6267 * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
6268 for emitting methods which are not in the source assembly. Detect and report
6269 failure of assembling+linking.
6271 * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
6273 * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
6275 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
6277 * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
6279 2008-06-24 Zoltan Varga <vargaz@gmail.com>
6281 * mini.h: Remove some obsolete prototypes.
6283 * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
6285 2008-06-24 Mark Probst <mark.probst@gmail.com>
6287 * mini.c (get_object_generic_inst): Variable-sized arrays are not
6288 supported by Visual Studio, so use alloca().
6290 2008-06-23 Zoltan Varga <vargaz@gmail.com>
6292 * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
6295 2008-06-23 Mark Probst <mark.probst@gmail.com>
6297 * mini.c: Fail sharing of a generic method if it contains an open
6298 catch clause (because we don't pass MRGCTXs yet).
6300 2008-06-23 Mark Probst <mark.probst@gmail.com>
6302 * mini.c: When compiling a method with generic sharing, insert the
6303 method instantiated with an all-Object generic context into the
6304 jit info table, instead of the context of the first instantiation
6305 of the method we happen to compile.
6307 2008-06-18 Martin Baulig <martin@ximian.com>
6309 * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
6310 `major_version' and `minor_version'.
6312 2008-06-17 Mark Probst <mark.probst@gmail.com>
6314 * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
6315 mono_method_is_generic_sharable_impl() takes an additional
6316 argument specifying whether to treat type variables as reference
6319 2008-06-17 Mark Probst <mark.probst@gmail.com>
6321 * mini.h: Removed obsolete prototypes.
6323 2008-06-17 Mark Probst <mark.probst@gmail.com>
6325 * mini.c: Don't fail generic sharing for initobj and sizeof - we
6326 already handle them.
6328 2008-06-17 Mark Probst <mark.probst@gmail.com>
6330 * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
6331 tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
6332 tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
6333 tramp-x86.c: Added a MonoGenericContext* argument to
6334 mono_arch_get_unbox_trampoline() so that it can call other
6335 functions which require it.
6337 2008-06-17 Mark Probst <mark.probst@gmail.com>
6339 * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
6340 mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
6341 mono_arch_get_this_arg_from_call() takes a
6342 MonoGenericSharingContext* as well.
6344 2008-06-17 Mark Probst <mark.probst@gmail.com>
6346 * mini.c: Factor out code for emitting unbox into emit_unbox() and
6347 implement generic sharing of unbox.
6349 2008-06-17 Mark Probst <mark.probst@gmail.com>
6351 * mini.c: Don't compute the vtable to determine whether a field is
6352 special static, because it might not work for open types.
6354 2008-06-17 Mark Probst <mark.probst@gmail.com>
6356 * mini.c: Removed the unused token_type and token_source arguments
6357 from get_runtime_generic_context_ptr().
6359 2008-06-17 Marek Habersack <mhabersack@novell.com>
6361 * mini.c (ADD_BINOP): fix the build
6363 2008-06-16 Zoltan Varga <vargaz@gmail.com>
6365 * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
6368 2008-06-16 Mark Probst <mark.probst@gmail.com>
6370 * mini.h: Removed class relations enum that's not used anymore.
6372 2008-06-16 Mark Probst <mark.probst@gmail.com>
6374 * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
6376 * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
6377 the lazy fetch trampoline access code.
6379 2008-06-15 Zoltan Varga <vargaz@gmail.com>
6381 * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
6383 2008-06-14 Zoltan Varga <vargaz@gmail.com>
6385 * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
6387 * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
6389 * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
6391 2008-06-13 Zoltan Varga <vargaz@gmail.com>
6393 * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
6396 * mini-ops.h: Add MIN/MAX_UN opcodes.
6398 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
6401 * basic-math.cs: Add more min/max tests.
6403 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
6405 2008-06-13 Mark Probst <mark.probst@gmail.com>
6407 * mini.c: Small fix in the prologue of emit_castclass.
6409 2008-06-13 Zoltan Varga <vargaz@gmail.com>
6411 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
6413 * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
6414 do not work even for unsigned types. Fixes #400014.
6416 * basic-math.cs: Add regression tests for unsigned Min/Max.
6418 2008-06-13 Mark Probst <mark.probst@gmail.com>
6420 * mini.c: Added additional context_used argument to several
6421 functions, which will be needed for sharing generic methods. Use
6422 GET_RGCTX macro wherever appropriate. Declare only one
6423 context_used in mono_method_to_ir().
6425 2008-06-13 Mark Probst <mark.probst@gmail.com>
6427 * mini.c, generic-sharing.c: Removed generic class relations.
6429 * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
6430 functions due to MRGCTX changes.
6432 2008-06-13 Mark Probst <mark.probst@gmail.com>
6434 * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
6435 graph.c, local-propagation.c, aliasing.c: New opcodes for calls
6436 with calculated IMT.
6438 * mini.c: Generic sharing of calls via generic interfaces.
6440 * jit-icalls.c, jit-icalls.h: Helper function for compiling a
6441 generic method with non-constant MonoGenericContext*. Instead,
6442 the context is taken out of the method itself.
6444 2008-06-13 Mark Probst <mark.probst@gmail.com>
6446 * mini.c: Generic sharing of ldvirtftn.
6448 2008-06-13 Mark Probst <mark.probst@gmail.com>
6450 * mini.c: Generic sharing of ldftn.
6452 2008-06-13 Mark Probst <mark.probst@gmail.com>
6454 * mini.c: Do pass VTable/RGCTX argument to static generic methods.
6456 2008-06-13 Mark Probst <mark.probst@gmail.com>
6458 * mini.c: Generic sharing of the special case of ldtoken followed
6459 by a call to GetTypeFromHandle.
6461 2008-06-13 Mark Probst <mark.probst@gmail.com>
6463 * mini.c: Generic sharing of box for nullable types.
6465 2008-06-13 Zoltan Varga <vargaz@gmail.com>
6467 * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
6468 are passed on the stack. Fixes #324807.
6470 2008-06-12 Bill Holmes <billholmes54@gmail.com>
6472 * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
6473 for the ArgValuetypeAddrInIReg case.
6475 * mini-amd64.c:mono_arch_allocate_vars: Adding a case for
6476 ArgValuetypeAddrInIReg to avoid asserts. Code needs to be added here.
6478 * mini-amd64.c: mono_arch_call_opcode: Adding Winx64 code for an ArgInfo of
6479 type ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
6480 local variable and pass the local variable by reference to the called method.
6482 * mini-amd64.c: mono_arch_emit_prolog: Adjust the stack for calls to
6483 mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
6485 Contributed under MIT/X11 license.
6487 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
6489 * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
6491 * debug-mini.c (mono_debug_print_vars): Release memory after printing
6494 2008-06-10 Martin Baulig <martin@ximian.com>
6497 (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
6499 2008-06-09 Kornél Pál <kornelpal@gmail.com>
6501 * main.c: Add and set argv [argc] to NULL to match C specification that fixes
6502 possible error when no arguments are passed.
6504 Contributed under MIT/X11 license.
6506 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
6508 * mini-exceptions.c (ves_icall_get_trace): Skip source locations
6509 where the file name is NULL.
6511 2008-06-09 Zoltan Varga <vargaz@gmail.com>
6513 * mini.c: Fix s390 build.
6515 2008-06-08 Zoltan Varga <vargaz@gmail.com>
6517 * trace.c (mono_trace_parse_options): Fix warnings.
6519 * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
6521 2008-06-07 Zoltan Varga <vargaz@gmail.com>
6523 * mini.c (remove_block_if_useless): Avoid printing the method name.
6525 * mini.c: Remove needless setting of ins->cil_code which is now done by
6528 * mini-amd64.c: Add some code to avoid saving callee saved registers in the
6531 * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
6532 translated code after it has been patched.
6534 2008-06-06 Zoltan Varga <vargaz@gmail.com>
6536 * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
6537 avoid problems during code patching on SMP systems.
6538 (emit_call): Avoid adding a patch info which is already added by
6540 (mono_arch_emit_exceptions): Ditto.
6542 2008-06-05 Zoltan Varga <vargaz@gmail.com>
6544 * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
6545 MONO_TYPE_ISSTRUCT already checks for it.
6547 2008-06-05 Bill Holmes <billholmes54@gmail.com>
6549 * mini-amd64.c:merge_argument_class_from_type: When marshaling
6550 structs with floats on Winx64 the float registers are not used.
6551 The integer registers are always used..
6552 * mini-amd64.c:add_valuetype: When marshaling structs on Winx64
6553 only one register will be used and only if the size of the struct
6554 is 1,2,4, or 8 bytes.
6556 * tramp-amd64.c : Adjusting size used for mono_global_codeman_reserve
6559 Contributed under MIT/X11 license.
6561 2008-06-05 Martin Baulig <martin@ximian.com>
6563 * debug-debugger.c (debugger_lookup_class): Also call
6564 mono_class_setup_methods() here; we're only called from RTI.
6566 2008-06-05 Andreas Färber <andreas.faerber@web.de>
6568 * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
6569 (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
6570 * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
6571 Post-process object files and add dtrace-generated object, if necessary.
6573 Contributed under MIT/X11 license.
6575 2008-06-04 Mark Probst <mark.probst@gmail.com>
6577 * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
6580 * mini.c: Generic sharing for unbox.any and castclass.
6582 2008-06-04 Mark Probst <mark.probst@gmail.com>
6584 * mini.c: Ignore tailcall prefix in shared generic code and when
6585 doing calls which require a vtable/rgctx argument.
6587 2008-06-04 Mark Probst <mark.probst@gmail.com>
6589 * mini.c: Don't free the JIT info.
6591 * driver.c: Changes in the JIT info table testing code.
6593 2008-06-03 Zoltan Varga <vargaz@gmail.com>
6595 * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread
6596 interruption. Fix some warnings.
6598 * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
6599 interruption_checkpoint.
6601 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
6603 * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
6604 from embedding applications.
6606 2008-06-02 William Holmes <billholmes54@gmail.com>
6608 * mini-amd64.c : Correcting some of the issues for Winx64 dealing with
6609 reserving 32 bytes on the stack when making calls.
6611 Contributed under MIT/X11 license.
6613 2008-06-01 Zoltan Varga <vargaz@gmail.com>
6615 * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
6616 the linear IL branch.
6618 * driver.c: Print out more information for --version on arm.
6620 2008-05-30 Zoltan Varga <vargaz@gmail.com>
6622 * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
6623 bb_exit instead, since out of line bblocks might not actually be emitted
6626 * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
6627 maximum epilog size for out of line bblocks if tracing is enabled.
6629 * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
6631 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
6633 * arrays.cs: Regression tests for allocating arrays with negative sizes.
6635 2008-05-28 Zoltan Varga <vargaz@gmail.com>
6637 * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
6638 CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE
6641 2008-05-27 Zoltan Varga <vargaz@gmail.com>
6643 * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
6644 the 'value' to store is a constant.
6646 * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
6648 * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
6649 of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
6651 2008-05-26 Zoltan Varga <vargaz@gmail.com>
6653 * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
6654 for accessing method->generic_container.
6656 2008-05-24 Zoltan Varga <vargaz@gmail.com>
6658 * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
6660 * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
6662 * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
6664 * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
6667 2008-05-23 Zoltan Varga <vargaz@gmail.com>
6669 * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
6671 * mini.c: Handle the case when mono_class_vtable () fails.
6673 2008-05-23 Massimiliano Mantione <massi@ximian.com>
6674 * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
6677 2008-05-22 Mark Probst <mark.probst@gmail.com>
6679 * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
6680 together with domain sharing.
6682 2008-05-22 Mark Probst <mark.probst@gmail.com>
6684 * mini.c: Treat callvirts to final methods like non-virtual calls
6685 when doing generic sharing, i.e. look them up in the runtime
6688 2008-05-22 Mark Probst <mark.probst@gmail.com>
6690 * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
6691 with computed types (for generic sharing).
6693 * mini.c: Generic sharing for mkrefany and refanyval.
6695 2008-05-22 Zoltan Varga <vargaz@gmail.com>
6697 * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
6700 * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
6701 the generic sharing code.
6703 * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
6706 2008-05-21 Zoltan Varga <vargaz@gmail.com>
6708 * mini.h: Remove the declaration of mono_aot_init_vtable ().
6710 2008-05-21 C.J. Adams-collier <cjac@colliertech.org>
6712 * driver.c: updated copyright date
6714 2008-05-21 Zoltan Varga <vargaz@gmail.com>
6716 * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
6719 2008-05-19 Martin Baulig <martin@ximian.com>
6721 * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
6722 pointing to the new `_mono_debug_using_mono_debugger' variable.
6725 (mono_main): Check mono_debug_using_mono_debugger() rather than
6726 the `MONO_INSIDE_MDB' environment variable to check whether we're
6727 inside the debugger.
6729 2008-05-19 Zoltan Varga <vargaz@gmail.com>
6731 * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
6734 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
6736 * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
6738 * mini.c: Added mini_assembly_can_skip_verification. This
6739 function checks if the assembly requested to skip verification.
6740 Fixes part of #387274.
6742 2008-05-07 Zoltan Varga <vargaz@gmail.com>
6744 * mini.c (mini_get_method): Disable the check for open generic classes when
6745 using generic sharing.
6747 * generics.cs: Add a test for #387034.
6749 * mini.c (mini_get_method): Check whenever the method class is an open generic
6750 type, and return NULL in that case, causing a verification error. Fixes
6753 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
6755 * driver.c (mono_main): Revert r102623. The right
6756 thing to do is to enable the verifier under verifiable
6757 unless a --security flag was passed.
6759 We need this non-trivial behavior for --verify-all otherwise
6760 mcs-compileall won't be able to use it. As it needs everything to
6761 be verified under validil.
6763 2008-05-06 Martin Baulig <martin@ximian.com>
6767 * debug-mini.c (mono_debugger_thread_created): Add proper locking.
6768 (mono_debugger_thread_cleanup): Likewise.
6769 (mono_debugger_extended_notification): Likewise.
6771 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
6773 * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
6774 against both inflated and non-inflated methods. We need to check against the
6775 generic definition for cases where the instantiated method is not visible.
6776 We need to check against the inflated types for cases where the instantiation
6777 changes any super type. This fixes #382986.
6779 Note that this doesn't need to be applied to other parts of mono_method_to_ir
6780 that check for visibiliy as generic params only appears as the type subject
6781 of tokens on call opcodes. Field manipulation and ldftn must always
6782 target an exact type.
6784 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
6786 * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
6787 if no related --security flag is passed.
6789 2008-05-05 Andreas Färber <andreas.faerber@web.de>
6791 * mini-arch.h: Prepare support for ppc64.
6793 Contributed under MIT/X11 license.
6795 2008-05-05 Andreas Färber <andreas.faerber@web.de>
6797 * aot-runtime.c: Prepare support for ppc64.
6799 Contributed under MIT/X11 license.
6801 2008-05-05 Andreas Färber <andreas.faerber@web.de>
6803 * mini-ops.h: Prepare support for ppc64.
6805 Contributed under MIT/X11 license.
6807 2008-05-04 Andreas Färber <andreas.faerber@web.de>
6809 * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
6811 Contributed under MIT/X11 license.
6813 2008-05-03 Zoltan Varga <vargaz@gmail.com>
6815 * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
6816 assemblies, since aot_name is not a full path, causing us to load MS.NET
6817 assemblies on windows.
6819 2008-04-28 Kornél Pál <kornelpal@gmail.com>
6821 * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
6822 for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
6823 * main.c: Use UTF-8 encoded command line instead of Windows default code
6824 page on Windows to support Unicode.
6825 * driver.c (DllMain): New function for mixed-mode assembly support.
6826 * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
6827 export __stdcall functions without decoration.
6829 Contributed under MIT/X11 license.
6831 2008-04-28 Mark Probst <mark.probst@gmail.com>
6833 * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
6834 saving it very early.
6836 2008-04-28 Mark Probst <mark.probst@gmail.com>
6838 * mini.h, mini.c: Lots of code for accessing the old RGCTX
6839 deleted. The only way to access the new RGCTX is via the
6842 * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
6843 vtable instead of the RGCTX to static methods.
6845 * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
6846 accessing the new RGCTX.
6848 * generic-sharing.c: There is no separation between self, type
6849 arguments and other types in the RGCTX anymore.
6851 2008-04-25 Jonathan Chambers <joncham@gmail.com>
6853 * mini-amd64.c (add_general): Remove previous stack adjustment.
6854 (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
6855 adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
6856 for 32 bytes of stack space reserved for all calls.
6858 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
6859 (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack
6862 Code contributed under MIT/X11 license.
6864 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
6866 * mini.c (mini_method_verify): Only verify non-inflated methods, check
6867 against the root definition, peeling out method and type instantiations.
6868 Cache verify success results, code that fails verification is still
6869 checked multiple times.
6871 2008-04-23 Zoltan Varga <vargaz@gmail.com>
6873 * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
6875 2008-04-23 Jonathan Chambers <joncham@gmail.com>
6877 * mini-amd64.c (add_general): Always increment stack on Win64.
6878 (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
6881 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for
6882 stack based argument handling on Win64.
6884 Code contributed under MIT/X11 license.
6886 2008-04-23 Raja R Harinath <harinath@hurrynot.org>
6888 * Makefile.am (version.h): Add support for git-svn.
6890 2008-04-22 Zoltan Varga <vargaz@gmail.com>
6892 * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
6893 so instead of calling g_spawn_command_line_sync, we do everything by hand,
6894 avoiding allocations and libc functions which might deadlock.
6896 * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
6897 'no-gdb-backtrace' option is set.
6899 * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
6901 * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
6903 2008-04-21 Martin Baulig <martin@ximian.com>
6905 * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
6906 and `get_lmf_addr'; `notification_address' is no longer a pointer.
6908 2008-04-21 Martin Baulig <martin@ximian.com>
6910 * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
6911 `thread_vtable', `event_handler_ptr' and `event_handler'.
6913 2008-04-21 Martin Baulig <martin@ximian.com>
6915 * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
6916 allows delayed initialization of the `executable_code_buffer' when
6919 2008-04-21 Martin Baulig <martin@ximian.com>
6921 * mini.h (mono_debugger_create_notification_function): Removed.
6922 * tramp-*.c (mono_debugger_create_notification_function): Removed.
6924 * mdb-debug-info64.s
6925 (MONO_DEBUGGER__notification_function): Added this in the .text section.
6927 * mdb-debug-info32.s
6928 (MONO_DEBUGGER__notification_function): Added this in the .text section.
6930 * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
6931 currently only works on x86 and x86_64, so don't create it on ppc.
6933 2008-04-21 Martin Baulig <martin@ximian.com>
6935 * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
6938 (mini_method_compile): In the fp elimination check, check
6939 `debug_options.mdb_optimizations' in addition to
6940 mono_debug_using_mono_debugger().
6942 * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
6943 disable some JIT optimizations which are only disabled when
6944 running inside the debugger.
6945 Added `--help-debug' option to describe the debugging options.
6946 (parse_debug_options): New static function to parse the `--debug'
6947 options, so we can easily add more stuff in future.
6949 2008-04-20 Zoltan Varga <vargaz@gmail.com>
6951 * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
6952 the method has no body.
6954 2008-04-19 Jonathan Chambers <joncham@gmail.com>
6956 * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
6957 assembly is not allowed in MSVC 64-bit compiler.
6958 (mono_arch_cpu_init): Don't set floating point precision on MSVC build
6959 as we get floating point exceptions everywhere.
6961 * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
6962 correctly align arguments for call to throw_exception.
6963 (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
6965 Code contributed under MIT/X11 license.
6967 2008-04-19 Zoltan Varga <vargaz@gmail.com>
6969 * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
6971 2008-04-17 Zoltan Varga <vargaz@gmail.com>
6973 * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
6975 * mini-amd64.c (NEW_INS): Set cil_code.
6977 * mini.c (mini_method_compile): Move the disabling of fp elimination to here
6978 from mini-amd64.c so all debugger related logic is in one place.
6980 * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
6981 later won't have a random ip assigned to them.
6983 2008-04-16 Zoltan Varga <vargaz@gmail.com>
6985 * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
6986 the arch specific function initializes code_size.
6987 (mono_create_delegate_trampoline): Ditto.
6989 * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
6990 tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
6993 * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if
6994 running under the debugger.
6996 * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
6999 * mini.c (mini_method_compile): Set a few flags in cfg if running under the
7000 debugger. Also move the disabling of optimizations here from driver.c.
7001 (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
7004 * mini.h (MonoCompile): Add a few new flags.
7006 2008-04-15 Zoltan Varga <vargaz@gmail.com>
7008 * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
7009 so the cil_code field of created MonoInst's is properly set.
7010 (mini_select_instructions): Ditto.
7012 * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
7013 (MONO_INST_NEW_CALL): Ditto.
7015 * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
7016 in many places so the ins->cil_code field is properly initialized.
7018 * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
7021 2008-04-14 Zoltan Varga <vargaz@gmail.com>
7023 * mini.c (mini_method_compile): Print a different message when compiling a
7026 * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
7029 2008-04-11 Zoltan Varga <vargaz@gmail.com>
7031 * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
7034 * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
7036 2008-04-11 Zoltan Varga <vargaz@gmail.com>
7038 * mini.c (handle_stack_args): Make this return void since its return value was
7039 never used. Also set cfg->unverifiable for invalid IL instead of calling
7042 2008-04-10 Mark Probst <mark.probst@gmail.com>
7044 * mini.c: Make sure "this" is live in catch clauses with type
7045 variables in shared generic code.
7047 2008-04-08 Mark Probst <mark.probst@gmail.com>
7049 * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
7050 generic_class_is_reference_type() to ensure the proper behaviour
7051 when sharing generic code and the type in question is a type
7054 2008-04-08 Zoltan Varga <vargaz@gmail.com>
7056 * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
7057 race conditions when printing thread dumps. Fixes #377738.
7059 2008-04-08 Massimiliano Mantione <massi@ximian.com>
7061 aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
7062 shows up when both MonoInst arguments can cause aliasig.
7063 There is likely no way in the current JIT to trigger this problem, but
7064 it showed up in the development of generics sharing, when in a new
7065 opcode both args of an OP_GROUP can be aliases (addresses of a local).
7066 When the generics sharing code will be committed, its tests will be
7067 valid also for this bug.
7069 2008-04-08 Zoltan Varga <vargaz@gmail.com>
7071 * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
7074 * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
7077 2008-04-07 Zoltan Varga <vargaz@gmail.com>
7079 * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
7080 use a more detailed exception message for InvalidCastException.
7082 * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
7084 * driver.c (mono_main): Add --debug=casts option to turn on better
7085 InvalidCastException message details.
7087 * mini.c (mini_get_debug_options): New helper function to return the address of
7088 the debug_options variable.
7090 * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
7091 the jit_tls TLS variable.
7093 * mini.c (mono_jit_tls): New TLS variable.
7095 * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
7098 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
7100 * mini.h: Removed verifer related stuff. This code was moved to verify.c
7102 * mini.c: Removed verifer related stuff, code moved to verify.c.
7104 * driver.c: Using code from verify.c instead of mini.c.
7106 2008-04-05 Zoltan Varga <vargaz@gmail.com>
7108 * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
7111 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
7113 * mini.c (check_for_method_verify): Enabling verification of
7114 corlib if mono_verify_all is set. Bugs in the verifier preventing that
7117 2008-04-04 Zoltan Varga <vargaz@gmail.com>
7119 * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
7120 caller saved registers as well.
7122 * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
7123 saved registers as well.
7125 2008-03-30 Zoltan Varga <vargaz@gmail.com>
7127 * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
7129 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
7132 2008-03-27 Zoltan Varga <vargaz@gmail.com>
7134 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
7136 (get_call_info): Take a gsctx argument instead of 'cfg'.
7138 2008-03-26 Zoltan Varga <vargaz@gmail.com>
7140 * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
7141 mono_verify_all is set.
7143 * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
7145 * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
7147 2008-03-25 Zoltan Varga <vargaz@gmail.com>
7149 * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
7152 * driver.c mini.c mini.h: Add a --verify-all development option to test the
7153 verifier and the code generated by the compiler.
7155 2008-03-25 Mark Probst <mark.probst@gmail.com>
7157 * mini.c: Generic sharing of the non-nullable case of the box
7160 2008-03-24 Zoltan Varga <vargaz@gmail.com>
7162 * inssel.brg: Fix the build.
7164 * iltests.il.in: Add a test for lconv.ovf.u8.un.
7166 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
7168 * mini.c (mono_method_to_ir): Implement readonly for ldelema and
7169 Array:Address. Fixes #372410.
7171 * iltests.il.in: New tests for readonly prefix.
7173 2008-03-23 Zoltan Varga <vargaz@gmail.com>
7175 * mini.h mini.c mini-trampolines.c: Move trampoline related code to
7178 * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to
7181 * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
7183 * mini.c (mono_decompose_op_imm): New helper function.
7185 * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
7186 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
7189 * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
7190 mono_arch_output_basic_block. Fix warnings.
7192 * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
7195 2008-03-22 Zoltan Varga <vargaz@gmail.com>
7197 * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
7198 since the extra frame is now detected automatically inside the loop.
7200 * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole
7201 opts which are now in mono_peephole_ins ().
7203 * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
7205 * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
7206 frames and skip duplicate managed-to-native frames. Fixes #367665.
7208 * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
7209 opts which are now in mono_peephole_ins ().
7210 (mono_arch_peephole_pass_2): Ditto.
7212 * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
7214 * mini-codegen.c (mono_peephole_ins): New helper function containing the
7215 arch independent peephole optimizations.
7217 * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
7218 opts which are now in mono_peephole_ins ().
7220 * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
7222 * mini-s390.c (mono_arch_output_basic_block): Fix build.
7224 * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
7227 * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
7228 CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
7231 2008-03-21 Zoltan Varga <vargaz@gmail.com>
7233 * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
7234 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
7237 * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
7238 mono_arch_output_basic_block. Fix warnings.
7240 2008-03-20 Zoltan Varga <vargaz@gmail.com>
7242 * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
7245 2008-03-20 Zoltan Varga <vargaz@gmail.com>
7247 * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
7250 * iltests.il: Add new tests.
7252 2008-03-20 Kornél Pál <kornelpal@gmail.com>
7254 * mini.c: Removed Windows version macros.
7256 2008-03-20 Mark Probst <mark.probst@gmail.com>
7258 * generic-sharing.c: Put reflection types in the extensible part
7259 of the runtime generic context.
7261 * mini.c: Generic sharing of the GetTypeHandle special case of the
7262 ldtoken instruction.
7264 2008-03-20 Zoltan Varga <vargaz@gmail.com>
7266 * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
7268 * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
7270 * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for
7271 consistency with the other version on the linear IR branch.
7273 * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
7275 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
7277 * iltests.il.in: Add new tests.
7279 2008-03-19 Zoltan Varga <vargaz@gmail.com>
7281 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
7283 * iltests.il.in: Add new tests.
7285 2008-03-19 Mark Probst <mark.probst@gmail.com>
7287 * mini.c: Two variables with the same name were declared in
7288 nesting contexts and one wasn't initialized. Fixed.
7290 2008-03-19 Mark Probst <mark.probst@gmail.com>
7292 * mini.c: Generic sharing of the initobj instruction.
7294 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
7296 * mini.c: make the test to optimize ldtoken from typeof() more
7299 2008-03-18 Mark Probst <mark.probst@gmail.com>
7301 * mini.c: Generic sharing of the initobj instruction for reference
7304 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
7306 * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
7307 the mono_breakpoint_clean_code() code to perform bound checks.
7309 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
7311 * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
7312 mono_arch_patch_callsite() to include the start of the managed method
7313 to be able to perform bound checks.
7315 2008-03-17 Mark Probst <mark.probst@gmail.com>
7317 * mini.c: Generic sharing for the isinst instruction.
7319 2008-03-17 Mark Probst <mark.probst@gmail.com>
7321 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
7322 inssel-long32-mips.brg: Added opcodes for doing indirect calls
7323 with the runtime generic context argument.
7325 * mini.c: Share calls to several types of unsharable methods by
7326 putting the address of the method code in the runtime generic
7327 context and doing an indirect call.
7329 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
7332 2008-03-16 Mark Probst <mark.probst@gmail.com>
7334 * generic-sharing.c: Change due to a change in the runtime genric
7337 2008-03-15 Martin Baulig <martin@ximian.com>
7340 (mono_arch_nullify_class_init_trampoline): Add call to
7341 mono_breakpoint_clean_code() to make things work when running
7342 inside the debugger.
7345 (mono_arch_nullify_class_init_trampoline): Add call to
7346 mono_breakpoint_clean_code() to make things work when running
7347 inside the debugger.
7349 2008-03-14 Zoltan Varga <vargaz@gmail.com>
7351 * inssel-long.brg (reg): Fix 64 bit build.
7353 2008-03-14 Mark Probst <mark.probst@gmail.com>
7355 * mini.c, mini.h: Share static generic code by passing it an
7356 implicit argument pointing to the runtime generic context.
7358 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
7359 inssel-long32-mips.brg: New opcodes for calling shared static,
7360 which need to be passed the runtime generic context.
7362 * mini-amd64.c, mini-x86.c: Save the runtime generic context
7363 argument on the stack in the prologue if needed. New function for
7364 finding the runtime generic context argument from the registers
7365 saved by the trampoline.
7367 * mini-amd64.h, mini-x86.h: Specify which register to use for the
7368 runtime generic context argument.
7370 * tramp-amd64.c: Also restore the register used for the runtime
7371 generic context argument.
7373 * mini-trampoline.c: Resolve shared static calls by consulting the
7374 runtime generic context via the new argument.
7376 * generic-sharing.c: Add an argument to sharability-checking
7377 functions that specifies whether type variables should be treated
7378 as sharable type arguments.
7380 * inssel-x86.brg: Removed a superfluous, buggy rule.
7382 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
7385 2008-03-14 Martin Baulig <martin@ximian.com>
7387 * debug-debugger.c (main_thread_handler): Call
7388 mono_runtime_run_main() without sending any notifications.
7390 * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
7392 2008-03-14 Zoltan Varga <vargaz@gmail.com>
7394 * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
7396 2008-03-14 Mark Probst <mark.probst@gmail.com>
7398 * tramp-x86.c: Fixed register restore offsets in the trampoline
7399 code for ECX and EDX.
7401 2008-03-12 Geoff Norton <gnorton@novell.com>
7403 * mini-arm.h: Add some #defines for locating sp, pc, r4 with
7404 different ucontext_t implementations.
7405 * exceptions-arm.c: Use the above defines to get exceptions working on
7406 iPhone (based on a patch by Luke Howard lukeh@padl.com)
7407 * mini-arm.c: Implement iPhone icache support (based on a patch by
7408 Luke Howard lukeh@padl.com)
7410 2008-03-12 Mark Probst <mark.probst@gmail.com>
7412 * mini.c: Enable generic sharing of calls to non-static
7413 non-interface non-generic non-value-type methods.
7415 * mini-trampolines.c: Resolve calls from shared generic code.
7417 2008-03-11 Zoltan Varga <vargaz@gmail.com>
7419 * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
7421 * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
7423 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
7425 * mini.c: some fixes for the AOT compiler.
7427 2008-03-07 Zoltan Varga <vargaz@gmail.com>
7429 * cpu-amd64.md: Add clob:1 to some float opcodes.
7431 2008-03-07 Rodrigo Kumpera <rkumpera@novell.com>
7433 * mini.h: Added MiniVerifierMode enumeration.
7435 * mini.c: Added mini_verifier_set_mode to control
7436 the usage of the new verifier.
7438 * mini.c (mono_method): Integrated the new verifier.
7440 * driver.c: Extended --security option with validil and
7441 verifiable options to activate the new verifier.
7443 2008-03-07 Zoltan Varga <vargaz@gmail.com>
7445 * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation
7446 optimization to ctors taking 0 or 2 arguments too.
7448 * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
7451 * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
7453 * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
7455 2008-03-06 Zoltan Varga <vargaz@gmail.com>
7457 * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
7458 non-aot case as well.
7460 * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
7462 * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
7465 * aot-compiler.c (encode_patch): Ditto.
7467 * mini.h (G_MININT32): Fix the definition of this.
7469 2008-03-05 Zoltan Varga <vargaz@gmail.com>
7471 * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
7473 * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
7475 2008-03-04 Zoltan Varga <vargaz@gmail.com>
7477 * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for
7478 methods returning vtypes in registers.
7479 (mono_arch_allocate_vars): Ditto.
7481 * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
7483 * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().
7485 * generics.cs: Add a test from the linear IR branch.
7487 * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
7489 * mini.c (inline_method): Cache failed inline attempts.
7491 2008-03-04 Mark Probst <mark.probst@gmail.com>
7493 * mini.c: For shared methods of generic classes put the location
7494 of "this" into the MonoGenericJitInfo.
7496 * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
7497 register out of a MonoContext by register number. Add the generic
7498 sharing context as an argument to mono_arch_find_this_argument().
7500 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
7501 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
7502 for new arch function.
7504 * mini-exception.c: Handle open exception clauses in shared
7507 * mini-trampolines.c: Supply additional argument to
7508 mono_arch_find_this_argument().
7510 2008-03-04 Zoltan Varga <vargaz@gmail.com>
7512 * Makefile.am (regtests): Run the bench.exe tests last.
7514 2008-03-03 Zoltan Varga <vargaz@gmail.com>
7516 * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
7519 2008-03-02 Zoltan Varga <vargaz@gmail.com>
7521 * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
7524 * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
7526 * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
7528 * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
7529 whose class has no cctor.
7531 * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
7533 2008-03-01 Zoltan Varga <vargaz@gmail.com>
7535 * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
7538 2008-02-29 Zoltan Varga <vargaz@gmail.com>
7540 * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
7541 to be in sync with the code on the linear IR branch.
7543 * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
7545 * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
7547 2008-02-27 Zoltan Varga <vargaz@gmail.com>
7549 * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
7551 * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
7553 * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
7555 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
7557 * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
7559 * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
7562 2007-11-14 Yoichi NAKAYAMA <nakayama@pixela.co.jp>
7564 * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
7565 OP_LOADR4_MEMBASE emission.
7567 * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
7568 (mono_spillvar_offset_float): Ditto.
7570 * mini-mips.c (mono_arch_emit_prolog): Ditto.
7572 * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
7575 * basic-long.cs: Add regression tests for them.
7577 * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
7579 (mono_arch_allocate_vars): Fix representation of single-precision float
7581 (mono_arch_output_basic_block): Ditto.
7583 * inssel-mips.brg: Ditto, remove duplicate items.
7585 * mini-mips.c (emit_load_volatile_arguments): New function to handle
7586 arguments of tail calls as on other platforms.
7587 (mono_arch_output_basic_block): Handle tail calls.
7589 * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
7592 * objects.cs (test_5_pass_static_struct): Add test for it.
7594 Contributed under MIT/X11 license.
7596 2008-02-26 Zoltan Varga <vargaz@gmail.com>
7598 * Makefile.am: Use gmcs for compiling the regression tests.
7600 * *.2.cs *.2.il: Rename to *.cs and *.il.
7602 2008-02-24 Zoltan Varga <vargaz@gmail.com>
7604 * regalloc.h: Make the vassign array smaller.
7606 * mini.c (mini_method_compile): Remove an unused field in cfg.
7608 * mini-codegen.c: Add a bunch of micro optimizations.
7610 2008-02-23 Zoltan Varga <vargaz@gmail.com>
7612 * regalloc.h: Remove some unused fields.
7614 2008-02-22 Zoltan Varga <vargaz@gmail.com>
7616 * mini-amd64.c (mono_arch_patch_code): Fix a warning.
7618 * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
7620 2008-02-22 Mark Probst <mark.probst@gmail.com>
7622 * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
7624 * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
7625 trampoline: Fetch an entry from the runtime generic context. If
7626 it's NULL, jump to the actual trampoline to fill the runtime
7627 generic context. Otherwise, return it.
7629 * mini.c: Call the lazy fetch trampoline to get entries out of the
7630 runtime generic context.
7632 * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
7633 tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
7634 tramp-sparc.c: Stubs for the lazy fetch trampoline.
7636 2008-02-21 Mark Probst <mark.probst@gmail.com>
7638 * mini.c: Fetch data out of the extensible part of the runtime
7639 generic context instead of calling a helper function.
7641 * generic-sharing.c: Some functions moved into
7642 metadata/generic-sharing.c. Helper function for fetching other
7643 types now checks and asserts against extensible rgctx (just for
7644 debugging purposes - the helper function isn't called anymore
7645 unless for debugging).
7647 2008-02-21 Zoltan Varga <vargaz@gmail.com>
7649 * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
7650 for tail calls up to the point that the tests in iltests.exe run. Also add a
7651 dummy CKFINITE implementation.
7652 (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
7653 needed for trampoline LMF frames.
7655 * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for
7656 trampoline LMF frames.
7658 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
7660 * mini.c (inline_method): clean any pending loader error when inlining fail.
7661 Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
7663 2008-02-21 Zoltan Varga <vargaz@gmail.com>
7665 * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
7667 * aot-runtime.c (decode_patch_info): Ditto.
7669 * mini.c (mono_resolve_patch_target): Ditto.
7671 * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
7674 * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
7676 * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
7677 if it references an icall address.
7679 2008-02-20 Zoltan Varga <vargaz@gmail.com>
7681 * cpu-s390x.md: Remove some more unused opcodes.
7683 * cpu-s390x.md: Remove some unused opcodes.
7685 * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
7686 mono_op_imm_to_op ().
7688 * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
7689 instead of a switch statement.
7691 * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
7692 the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
7694 * mini-codegen.c: Eliminate rassign macro which is no longer needed.
7696 * mini-codegen.c: Remove unused mono_regstate2_... functions.
7698 * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
7701 2008-02-19 Zoltan Varga <vargaz@gmail.com>
7703 * driver.c (mono_main): Improve error reporting when an assembly cannot be
7704 opened. Fixes #362607.
7706 * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
7708 * iltests.il.in: Add a test for static methods in interfaces.
7710 2008-02-18 Zoltan Varga <vargaz@gmail.com>
7712 * genmdesc.c (build_table): Fix a crash on older glib versions.
7714 * cpu-sparc.md: Remove some unused opcodes.
7716 * genmdesc.c: Error out if the .md contains CEE_ opcodes if
7717 MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
7719 * cpu-amd64.md: Remove some unused opcodes.
7721 * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
7722 like the other opcodes.
7724 2008-02-17 Zoltan Varga <vargaz@gmail.com>
7726 * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
7728 * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
7730 * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
7731 variables 'cfg' instead of 'm' for consistency.
7733 * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
7735 * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
7736 argument holding the vtype return address, to avoid the ambigious use of
7737 cfg->ret for this purpose.
7739 * mini.c (NEW_RETLOADA): Use vret_addr if set.
7741 * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
7743 * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
7744 new mono_print_ins () function which only takes one argument.
7746 2008-02-15 Zoltan Varga <vargaz@gmail.com>
7748 * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
7751 2008-02-14 Zoltan Varga <vargaz@gmail.com>
7753 * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
7755 * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
7757 * mini-x86.c: Sync with the version on the linear IR branch by adding new
7758 opcodes and other small changes.
7760 * mini-ops.h: Add some new opcodes from the linear IR branch.
7762 * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
7764 * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
7765 opcodes, use the REG_MEMBASE opcodes instead.
7767 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
7768 opcodes, use the REG_MEMBASE opcodes instead.
7770 * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
7773 * mini.c (mono_op_imm_to_op): New helper function.
7775 * mini-ops.h: Add some opcodes from linear IR branch.
7777 2008-02-13 Zoltan Varga <vargaz@gmail.com>
7779 * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov
7782 2008-02-12 Zoltan Varga <vargaz@gmail.com>
7784 * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to
7787 * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
7789 2008-02-09 Zoltan Varga <vargaz@gmail.com>
7791 * aot-compiler.c (emit_method_code): Add an assert.
7793 * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
7794 the IMT code so it is AOT friendly. Enable AOT for methods which call interface
7797 2008-02-08 Zoltan Varga <vargaz@gmail.com>
7799 * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for
7800 some load/store opcodes so they are consistent.
7801 (mono_arch_emit_prolog): Simplify some code.
7803 * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
7805 * objects.cs: Add tests for large argument offsets on ARM.
7807 * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large
7808 stack offsets. Fixes #359651.
7810 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
7812 * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
7814 * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
7816 * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
7818 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
7820 * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
7821 rid of CEE_CONV_R_UN.
7823 * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
7825 2008-02-07 Zoltan Varga <vargaz@gmail.com>
7827 * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
7829 * mini.c (mono_normalize_opcodes): Add some more opcodes.
7831 * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
7833 * cpu-amd64.md: Remove some unused opcodes.
7835 * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
7837 * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
7839 * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make
7840 arch specific functions for its parts. Call the peephole pass after local
7841 regalloc so the prolog can compute a more accurate max_offset.
7843 * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
7844 the corresponding OP_I/OP_L opcodes.
7846 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
7848 * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
7850 2008-02-06 Zoltan Varga <vargaz@gmail.com>
7852 * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
7853 as they are handled in mini.c.
7855 * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
7857 * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
7858 case since it is handled in mini.c.
7860 * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
7862 * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
7864 * *.c: Use the new opcodes in the IR and back end code.
7866 * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
7868 * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
7870 2008-02-06 Mark Probst <mark.probst@gmail.com>
7872 * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
7873 an assert because it has a race condition.
7875 2008-02-06 Zoltan Varga <vargaz@gmail.com>
7877 * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
7879 * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
7881 * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
7883 * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
7884 use OP_MOVE/OP_FMOVE/OP_ICONST instead.
7886 2008-02-05 Zoltan Varga <vargaz@gmail.com>
7888 * cpu-amd64.md (move): Correct the maximum size of move.
7890 2008-02-05 Mark Probst <mark.probst@gmail.com>
7892 * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
7893 the generic class init trampoline to return quickly if the class
7896 2008-02-04 Zoltan Varga <vargaz@gmail.com>
7898 * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
7899 issues where an 32 bit callsite cannot be patched by a 64 bit address.
7901 2008-02-03 Zoltan Varga <vargaz@gmail.com>
7903 * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
7906 2008-01-31 Zoltan Varga <vargaz@gmail.com>
7908 * objects.cs: Add some soft-float tests.
7910 * mini.c: Fix a couple more soft-float issues.
7912 * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
7914 * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
7917 2008-01-30 Zoltan Varga <vargaz@gmail.com>
7919 * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
7920 exception happens while compiling a virtual method.
7922 2008-01-29 Zoltan Varga <vargaz@gmail.com>
7924 * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
7926 * mini-sparc.c: Fix build.
7928 * mini-sparc.c (get_call_info): Add support for generic sharing.
7930 * mini-exceptions.c: Add a FIXME.
7932 2008-01-27 Zoltan Varga <vargaz@gmail.com>
7934 * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
7935 altstack handling code.
7937 * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
7939 * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
7941 * mini-s390.c: Add support for generic sharing.
7943 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
7945 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
7947 * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
7949 * mini-s390x.c: Add support for generic sharing.
7951 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
7953 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
7955 * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
7956 can be used since it takes a 16 bit signed immediate.
7958 * inssel-s390x.brg: Fix OP_SETRET.
7960 * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
7962 * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
7964 * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
7966 * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
7968 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
7971 * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
7974 * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
7975 of the unused mono_arch_patch_delegate_trampoline stuff.
7977 2008-01-26 Zoltan Varga <vargaz@gmail.com>
7979 * basic-long.cs: Move the fp related tests to basic-float.cs.
7981 * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
7983 * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
7985 * basic-calls.cs: Add a test for proper float argument passing.
7987 * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
7988 if the context corresponds to an exception received through a signal.
7990 * exceptions.cs: Add a test for nullref handling at the start of a try
7993 * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
7995 * jit-icalls.c (mono_break): New JIT icall.
7997 * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
7999 * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
8001 2008-01-25 Zoltan Varga <vargaz@gmail.com>
8003 * cpu-*.md: Get rid of unused opcodes.
8005 * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
8007 * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
8010 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
8013 * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
8014 the arch independent trampoline code in mini-trampolines.c.
8016 * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
8018 * mini.c (get_runtime_generic_context_ptr): Fix a warning.
8020 * mini-s390.h: Remove an unused define.
8022 * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
8023 the arch independent trampoline code in mini-trampolines.c.
8025 * mini-arm.c (mono_arch_emit_prolog): Fix build.
8027 2008-01-24 Zoltan Varga <vargaz@gmail.com>
8029 * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
8031 * mini-s390.c (mono_arch_emit_prolog): Fix build.
8033 * mini-s390x.c (mono_arch_emit_prolog): Fix build.
8035 * mini-ppc.c (mono_arch_emit_prolog): Fix build.
8037 * cpu-amd64.md: Use smaller sizes for int opcodes.
8039 * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
8041 * *.cs: Add some tests from the linear-ir branch. Move structs tests to
8044 * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
8047 * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
8048 instead of though a pointer to save an indirection when accessing elements of
8051 * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
8053 (NOT_IMPLEMENTED): New helper macro.
8054 (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
8057 * *.c: Use the new helper macro.
8059 2008-01-21 Zoltan Varga <vargaz@gmail.com>
8061 * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
8063 2008-01-20 Zoltan Varga <vargaz@gmail.com>
8065 * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
8068 2008-01-18 Zoltan Varga <vargaz@gmail.com>
8070 * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
8071 profiling is enabled.
8073 * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
8075 (mono_arch_emit_prolog): Add more first bblock optimizations.
8077 * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
8078 in order if possible.
8079 (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
8080 bblock, since the arguments are still in their original registers.
8082 * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
8084 2008-01-17 Zoltan Varga <vargaz@gmail.com>
8086 * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
8089 * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
8092 * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
8094 * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
8095 process async exceptions received while in unmanaged code.
8097 * mini.c (mini_init): Install a callback with the runtime which will be called
8098 when a thread receives an async exception while in unmanaged code.
8100 * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
8102 * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
8104 2008-01-16 Wade Berrier <wberrier@novell.com>
8111 2008-01-16 Zoltan Varga <vargaz@gmail.com>
8113 * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
8114 compilation with sun cc.
8116 * cpu-*.md: Fix the build.
8118 * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
8120 * mini-amd64.h: Add some comments to the MonoLMF structure.
8122 * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
8124 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
8125 in the LMF structure if possible. This saves two instructions in the
8126 managed->native wrappers.
8128 * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
8130 2008-01-16 Mark Probst <mark.probst@gmail.com>
8132 * generic-sharing.c: New type argument lookup code which uses the
8133 runtime generic context template.
8135 2008-01-15 Zoltan Varga <vargaz@gmail.com>
8137 * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
8139 * mini-arm.c (add_general): Fix arm eabi parameter passing.
8140 (mono_arch_output_basic_block): Fix localloc implementation.
8142 * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
8144 * mini-ia64.c (peephole_pass): Fix ia64 build.
8146 * mini-amd64.c (peephole_pass): Fix a warning.
8148 * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
8149 at a constant offset from sp/fp.
8151 * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
8152 instead of obtaining it from *lmf in the managed method case.
8154 2008-01-14 Zoltan Varga <vargaz@gmail.com>
8156 * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
8158 Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
8160 * mini.h (MonoInstList): New type.
8161 (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
8162 __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
8163 MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
8164 __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
8165 MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
8166 MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
8167 MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
8168 MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
8169 MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
8170 MONO_INST_LIST_FOR_EACH_PREV_SAFE,
8171 MONO_INST_LIST_FOR_EACH_ENTRY,
8172 MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
8173 MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
8174 mono_inst_list_first, mono_inst_list_last,
8175 mono_inst_list_next, mono_inst_list_prev): New instruction
8176 list handling interfaces.
8177 (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
8178 list head 'ins_list'.
8179 (MonoInst): Replace next pointer with list head 'node'.
8180 (MonoCallInst): Make 'out_args' a MonoInstList.
8181 (MONO_INST_NEW_CALL): Explicitly init ->out_args.
8182 (MonoCompile): Delete reverse_inst_list and
8183 reverse_inst_list_len.
8184 * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
8185 mono_arch_lowering_pass, mono_arch_local_regalloc,
8186 mono_arch_output_basic_block, mono_arch_emit_prolog):
8187 Convert to new instruction lists.
8188 (insert_after_ins): Delete.
8189 * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
8191 * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
8192 * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
8193 split_bblock, mono_add_ins_to_end, mono_emit_call_args,
8194 mono_emulate_opcode, mono_emit_load_got_addr,
8195 inline_method, mono_method_to_ir, mono_print_bb_code,
8196 print_dfn, decompose_pass, nullify_basic_block,
8197 replace_out_block_in_code, remove_block_if_useless,
8198 merge_basic_blocks, move_basic_block_to_end,
8199 try_unsigned_compare, optimize_branches, mono_print_code,
8200 mini_select_instructions, remove_critical_edges): Likewise.
8201 * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
8202 peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
8203 mono_arch_output_basic_block, mono_arch_emit_prolog):
8205 * mini-mips.c (mono_arch_call_opcode, peephole_pass,
8206 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
8207 mono_arch_output_basic_block): Likewise.
8208 (inst_list_prepend, insert_after_ins): Delete.
8209 * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
8210 MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
8212 * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
8213 peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
8214 mono_arch_emit_prolog): Likewise.
8215 * cfold.c (mono_constant_fold): Likewise.
8216 * liveness.c (visit_bb, mono_analyze_liveness,
8217 optimize_initlocals): Likewise.
8218 * ssapre.c (dump_code, process_bb, code_motion): Likewise.
8219 * graph.c (mono_draw_code_cfg): Likewise.
8220 * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
8221 mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
8222 mono_ssa_cprop): Likewise.
8223 * abcremoval (get_relations_from_previous_bb, process_block):
8225 * local-propagation (mono_cprop_invalidate_values,
8226 mono_local_cprop_bb): Likewise.
8227 * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
8228 peephole_pass, mono_arch_output_basic_block,
8229 mono_arch_emit_prolog): Likewise.
8230 * mini-arm.c (mono_arch_call_opcode, peephole_pass,
8231 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
8232 mono_arch_emit_prolog): Likewise.
8233 (insert_after_ins): Delete.
8234 * aliasing.c (print_code_with_aliasing_information,
8235 mono_build_aliasing_information, mono_aliasing_deadce):
8236 Convert to new instruction lists.
8237 * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
8238 peephole_pass, NEW_INS, mono_arch_lowering_pass,
8239 mono_arch_local_regalloc, mono_arch_output_basic_block):
8241 (insert_after_ins): Delete.
8242 * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
8243 peephole_pass, mono_arch_output_basic_block): Convert to
8244 new instruction lists.
8245 * mini-codegen (InstList, inst_list_prepend,
8246 insert_after_ins): Delete.
8247 (insert_before_ins, get_register_force_spilling,
8248 get_register_spilling, free_up_ireg, free_up_reg,
8249 create_copy_ins, create_spilled_store, alloc_int_reg,
8250 alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
8251 to new instruction lists.
8252 * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
8253 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
8254 mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
8255 (insert_after_ins): Delete.
8256 * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
8257 mono_arch_local_regalloc, mono_arch_output_basic_block,
8258 mono_arch_call_opcode): Convert to new instruction lists.
8259 (insert_after_ins): Delete.
8260 * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
8261 peephole_pass, mono_arch_output_basic_block,
8262 mono_arch_emit_prolog): Convert to new instruction lists.
8264 2008-01-11 Zoltan Varga <vargaz@gmail.com>
8266 * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
8268 * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
8271 * Makefile.am (version.h): Make this work with non-bash shells.
8273 2008-01-10 Zoltan Varga <vargaz@gmail.com>
8275 * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
8277 2008-01-08 Zoltan Varga <vargaz@gmail.com>
8279 * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
8280 the InitializeArray optimization.
8282 2008-01-06 Zoltan Varga <vargaz@gmail.com>
8284 * mini.c driver.c: Don't include os/gc_wrapper.h.
8286 2008-01-05 Zoltan Varga <vargaz@gmail.com>
8288 * mini.c (print_jit_stats): Print GC statistics if available.
8290 2008-01-04 Zoltan Varga <vargaz@gmail.com>
8292 * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
8294 2007-12-29 Zoltan Varga <vargaz@gmail.com>
8296 * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
8298 2007-12-26 Zoltan Varga <vargaz@gmail.com>
8300 * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
8302 * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
8304 * driver.c (mono_main): Ditto.
8306 2007-12-23 Zoltan Varga <vargaz@gmail.com>
8308 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
8310 * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
8311 in the vtable can't be encoded.
8312 (compile_method): Ditto.
8314 2007-12-21 Zoltan Varga <vargaz@gmail.com>
8316 * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
8319 * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
8322 * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
8323 the top LMF entry belongs to the current method.
8325 * mini.c: Update after renaming of mono_thread_get_pending_exception ().
8327 2007-12-20 Zoltan Varga <vargaz@gmail.com>
8329 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
8331 * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
8333 * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
8335 * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
8337 * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
8339 * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
8342 * basic-float.cs: Add an ulong->double cast test.
8344 2007-12-15 Zoltan Varga <vargaz@gmail.com>
8346 * mini.c (mono_method_to_ir): Fix a warning.
8348 2007-12-14 Zoltan Varga <vargaz@gmail.com>
8350 * mini-ops.h: Add OP_SWITCH.
8352 * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
8353 CEE_SWITCH in back-end code, use OP_SWITCH instead.
8355 2007-12-11 Geoff Norton <gnorton@novell.com>
8357 * mini-s390x.c: Minor change to the MAX() define to allow
8358 it to compile with other gcc versions.
8360 2007-12-11 Geoff Norton <gnorton@novell.com>
8363 * mini-s390x.c: Implement sext_i4 to fix the build on s390x
8365 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
8367 exceptions-arm.c (mono_arch_get_restore_context): Restore
8370 exceptions-arm.c (throw_exception): Save the frame pointer.
8371 This is a partial fix for #323747. Only the client side is
8374 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
8376 * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
8377 was using an unrelated variable to log the class which
8378 needed the cctor to be called. This was crashing on arm.
8380 2007-12-09 Robert Jordan <robertj@gmx.net>
8382 * mini-x86.c (mono_arch_emit_epilog):
8383 Consider all kinds of 64-bit types. Fixes #323114.
8385 2007-12-08 Zoltan Varga <vargaz@gmail.com>
8387 * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
8389 2007-12-07 Zoltan Varga <vargaz@gmail.com>
8391 * mini-amd64.c (peephole_pass): Add a missing instruction check.
8393 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
8395 * mini.c: run type ctor before allocating an object, not only
8396 when running it's constructor method (fixes at least part of bug #342507).
8398 2007-12-07 Zoltan Varga <vargaz@gmail.com>
8400 * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
8402 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
8403 * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
8406 * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
8407 mono_generic_class_init_trampoline () the same as it is done with the other
8410 * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
8411 aot-runtime.c aot-compiler.c: Implement AOT support.
8413 2007-12-07 Mark Probst <mark.probst@gmail.com>
8415 * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
8416 build for archs which don't have the vtable trampoline defined
8419 2007-12-07 Zoltan Varga <vargaz@gmail.com>
8421 * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
8423 * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
8425 * mini-trampolines.c (mono_get_trampoline_func): New helper function.
8427 * tramp-<ARCH>.c: Use the new helper function.
8429 2007-12-07 Mark Probst <mark.probst@gmail.com>
8431 * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
8432 trampoline call, which takes a vtable argument.
8434 * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
8435 OP_TRAMPCALL_VTABLEs like other calls.
8437 * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
8438 register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
8439 call. Implemented a support function which fetches the vtable
8440 from a register set.
8442 * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
8443 Implemented a generic class init trampoline, using the
8444 OP_TRAMPCALL_VTABLE opcode.
8446 * mini.c: Implemented static field access when sharing generic
8447 code. This implies initing the class using the new
8448 OP_TRAMPCALL_VTABLE call.
8450 2007-12-07 Mark Probst <mark.probst@gmail.com>
8452 * mini.c: Don't compile methods with sharing enabled if their
8453 classes are disabled for sharing.
8455 2007-12-06 Zoltan Varga <vargaz@gmail.com>
8457 * inssel.brg: Add a missing sign extension to the GETCHR and array access
8458 opcodes. Fixes #346563.
8460 * objects.cs: Add a new test.
8462 * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
8464 * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
8465 HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
8467 2007-12-06 Zoltan Varga <vargaz@gmail.com>
8469 * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
8471 2007-12-03 Zoltan Varga <vargaz@gmail.com>
8473 * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
8476 2007-12-02 Zoltan Varga <vargaz@gmail.com>
8478 * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
8480 * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
8481 optimization in the AOT case.
8483 2007-11-30 Zoltan Varga <vargaz@gmail.com>
8485 * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
8487 * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
8489 * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
8491 * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
8493 * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
8494 is created by the inlined delegate ctor.
8496 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
8498 * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
8500 2007-11-29 Zoltan Varga <vargaz@gmail.com>
8502 * cpu-x86.md: Fix the length of ckfinite.
8504 2007-11-28 Zoltan Varga <vargaz@gmail.com>
8506 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
8508 * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
8509 (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
8511 * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
8513 * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
8514 OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
8516 2007-11-28 Martin Baulig <martin@ximian.com>
8519 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
8520 after creating the trampoline.
8522 2007-11-27 Zoltan Varga <vargaz@gmail.com>
8524 * aot-runtime.c (load_aot_module): Check runtime version if needed.
8526 * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
8529 * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
8530 instead of the calling method to help AOT.
8532 * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
8534 2007-11-26 Zoltan Varga <vargaz@gmail.com>
8536 * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
8539 2007-11-23 Zoltan Varga <vargaz@gmail.com>
8541 * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
8543 * aot-compiler.c (compile_method): Correct check for generic method definitions.
8544 (encode_method_ref): No need to handle generic method definitions specially.
8546 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
8548 * aot-runtime.c (decode_klass_ref): Clean this up and rename from
8551 * aot-compiler.c (encode_klass_ref): Clean this up and rename from
8553 (compile_method): Enable generic sharing.
8555 2007-11-22 Zoltan Varga <vargaz@gmail.com>
8557 * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
8558 (mini_method_compile): Add preliminary support for AOTing shared generic code.
8560 * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
8563 * mini-trampolines.c: Fix a warning.
8565 * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
8567 (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
8568 (generic_class_is_reference_type): Remove unused function.
8570 * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
8571 in the generic vtable trampoline case.
8573 * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
8575 * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
8576 return an AOT method based on a vtable slot.
8578 * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
8580 * mini.c (mini_get_vtable_trampoline): Export this.
8582 2007-11-22 Martin Baulig <martin@ximian.com>
8585 (MonoDebuggerInfo): Move `debugger_version' up.
8587 2007-11-22 Martin Baulig <martin@ximian.com>
8590 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
8592 * mini-trampolines.c
8593 (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
8594 after compiling the method.
8596 2007-11-20 Martin Baulig <martin@ximian.com>
8599 (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
8600 (mono_debugger_remove_breakpoint): Likewise.
8601 (mono_debugger_check_breakpoints): Likewise.
8603 * debug-debugger.c: Implement the new breakpoint interface here.
8605 2007-11-18 Zoltan Varga <vargaz@gmail.com>
8607 * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
8608 CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
8610 * mini-x86.c (mono_arch_output_basic_block): Ditto.
8612 2007-11-17 Zoltan Varga <vargaz@gmail.com>
8614 * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
8616 * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
8619 * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
8622 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
8623 returning a vtype in a register.
8625 * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
8626 here from the arch specific code.
8628 * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
8631 * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
8632 (mono_arch_emit_prolog): Increment maximum prolog size.
8634 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
8635 START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
8637 * mini-x86.c (get_call_info): Receive a MonoCompile instead of a
8638 MonoGenericSharingContext.
8640 * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
8641 MonoGenericSharingContext. Allocate memory from the cfg mempool.
8643 2007-11-15 Mark Probst <mark.probst@gmail.com>
8645 * mini.c, mini.h, generic-sharing.c: Functions for producing code
8646 which extract fields out of the runtime generic context. Full
8647 sharing of the NEWARR opcode.
8649 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
8651 * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
8652 --enable-minimal=ssa.
8654 2007-11-13 Zoltan Varga <vargaz@gmail.com>
8656 * mini-trampolines.c (mono_delegate_trampoline): Update after
8657 mono_marshal_get_delegate_invoke () signature change.
8659 2007-11-13 Mark Probst <mark.probst@gmail.com>
8661 * mini.c: Removed the shared context in favor of the generic
8662 sharing context. Allocate the MonoJitInfo structure with room for
8663 the generic sharing context if it's needed.
8665 * mini.h: Remove MonoGenericSharingContext declaration. It's in
8666 domain-internals.h now.
8668 * mini-x86.c: Pass the generic sharing context to get_call_info ().
8670 * generic-sharing.c: Several changes for working without a shared
8671 context and instead operating on open types instead.
8673 2007-11-12 David S. Miller <davem@davemloft.net>
8675 * inssel-sparc.brg: Fix double instruction emit.
8677 2007-11-12 Zoltan Varga <vargaz@gmail.com>
8679 * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
8680 Get/Set/Address methods.
8682 * mini.c debug-debugger.c mini-trampolines.c: Update after
8683 mono_marshal_get_delegate_invoke signature change.
8685 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
8687 * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
8688 This can happens with dynamic methods. Fixes the other bug in #322722.
8690 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
8692 * tramp-arm.c (mono_arch_patch_callsite): Support patching
8695 * mini-arm.c (arm_patch): Implement patching of BX call
8696 sequence. Fixes one of the bugs in #322722.
8698 2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
8700 * mini-sparc.c (mono_arch_flush_icache): Make more efficient
8701 under Linux. We only need to flush every 32-byte cache line.
8703 2007-11-07 Massimiliano Mantione <massi@ximian.com>
8706 move_basic_block_to_end: Add branches when needed, eventually creating
8708 optimize_branches: added a parameter that tells if it's ok to create
8709 new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
8710 and avoid calling move_basic_block_to_end when it's not ok.
8713 2007-11-07 Mark Probst <mark.probst@gmail.com>
8715 * mini.c: Abort inlining call to InitializeArray if something
8716 looks wrong. Let the icall handle it, which now has proper safety
8719 2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
8721 * mini.c (mono_spill_call): add support for soft-float.
8723 * mini.c (mono_method_to_ir): add support for soft-float
8724 to inlined functions that return float.
8726 * mini.c (mono_method_to_ir): add support for soft-float
8727 to cee_stsfld opcode on float fields.
8729 2007-11-05 Geoff Norton <gnorton@novell.com>
8731 * mini-x86.h: Fix the structure access for X86 Leopard.
8734 2007-11-05 Martin Baulig <martin@ximian.com>
8736 * mini-trampolines.c
8737 (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
8738 after compiling the method to notify the debugger.
8740 2007-11-05 Martin Baulig <martin@ximian.com>
8742 * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
8744 2007-11-02 Zoltan Varga <vargaz@gmail.com>
8746 * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
8747 David Miller <davem@davemloft.net>. Allow larger offsets in branches.
8749 2007-11-01 Zoltan Varga <vargaz@gmail.com>
8751 * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
8752 native-to-managed wrappers.
8754 2007-11-01 Geoff Norton <gnorton@novell.com>
8756 * mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
8759 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
8761 * mini.c, mini-x86.c: when getting back from unmanaged code
8762 to managed via a marshaled delegate we also need to set the
8765 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
8767 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
8770 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
8772 * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
8773 let the debugger or other external agents to tell the JIT when
8774 a sw breakpoint has been inserted in the code that the JIT needs
8775 to be able to inspect.
8777 2007-10-31 Martin Baulig <martin@ximian.com>
8780 (MonoDebuggerInfo): Remove `runtime_class_init'.
8782 2007-10-30 Martin Baulig <martin@ximian.com>
8785 (mono_debugger_thread_created): Added `MonoThread *' argument.
8786 (mono_debugger_extended_notification): New public method.
8787 (mono_debugger_trampoline_compiled): New public method.
8790 (MonoDebuggerThreadInfo): Added `thread' and
8791 `extended_notifications' fields.
8794 (debugger_executable_code_buffer): New static variable.
8797 (MonoDebuggerInfo): Added `executable_code_buffer',
8798 `executable_code_buffer_size', `breakpoint_info_area',
8799 `breakpoint_table' and `breakpoint_table_size'.
8801 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
8803 * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
8804 that IP either is an unused value or the vtable pointer. IMT
8805 calls use vtable + offset now. Reduced by almost half the size
8808 2007-10-26 Jonathan Chambers <joncham@gmail.com>
8810 * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
8811 defines to access param registers. Replace long usage with
8812 gsize as sizeof(long) != sizeof(void*) on Win64.
8814 * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
8815 on Win64. Fix intrinsic, use _AddressOfReturnAddress
8816 instead of non-existant _GetAddressOfReturnAddress.
8818 * tramp-amd64.c: Use AMD64_ARG_REG# defines to access
8819 param registers. Save/restore %rdi and %rsi in MonoLMF.
8821 * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
8822 param registers. Modify (throw_exception) signature to take
8823 %rdi and %rsi on Win64.
8825 Code is contributed under MIT/X11 license.
8827 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
8829 * helpers.c: unlink debugging output files.
8831 2007-10-25 Zoltan Varga <vargaz@gmail.com>
8833 * mini.c: Move mono_create_ftnptr () to object.c.
8835 2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
8837 * helpers.c (mono_disassemble_code): MonoCompile parameter is now
8838 optional. This function can now be used to disassemble code generated
8839 outside the JIT such as trampolines and IMT thunks.
8841 * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
8843 * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
8844 vtable pointer from a ldr instruction.
8846 * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
8847 new IMT call sequence.
8849 * mini-arm.c (mono_arch_output_basic_block): emit the IMT
8850 call sequence for interface invocations.
8852 * mini-arm.c (mono_arch_emit_imt_argument): added, required
8853 for imt support. This function is empty since IMT on ARM requires no
8854 special handling on the IR side.
8856 * mini-arm.c (mono_arch_find_imt_method): added, required for
8859 * mini-arm.c (mono_arch_find_this_argument): added, required
8862 * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
8863 a ldr instruction to load a value stored in the code stream.
8865 * mini-arm.c (mono_arch_build_imt_thunk):added, required
8869 2007-10-23 Zoltan Varga <vargaz@gmail.com>
8871 * mini.c (mini_init): Install the jump trampoline callback.
8873 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8875 * mini-trampolines.c: handle synchronized methods with the common
8876 vtable trampoline (bug #335601).
8878 2007-10-17 Zoltan Varga <vargaz@gmail.com>
8880 * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
8882 * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
8885 * mini-ia64.h mini-ia64.c: Add support for IMT.
8887 * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
8888 prolog. Fixes #331958.
8890 2007-10-15 Zoltan Varga <vargaz@gmail.com>
8892 * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
8894 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8896 * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
8899 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
8901 * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
8904 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
8906 * mini-x86.c, mini-x86.h: x86 support for the common vtable
8909 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
8911 * mini-trampolines.c: changed the magic rampoline to understand
8912 the common vtable trampoline method: the method to invoke is
8913 determined by the vtable displacement of the call.
8915 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8917 * mini.c, mini.h: register the common vtable trampoline if the
8918 architecture supports it.
8920 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8922 * cpu-amd64.md: use the correct max length for tls_get.
8924 2007-10-14 Zoltan Varga <vargaz@gmail.com>
8926 * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
8927 CEE_STELEM_ANY. Fixes #333696.
8929 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
8931 * exceptions-x86.c: provide more graceful handling of the case where
8932 we followed a bogus function pointer from managed code (bug #332866).
8934 2007-10-11 Mark Probst <mark.probst@gmail.com>
8936 * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
8937 replaces the generic_shared flag and will carry more information
8940 * generic-sharing.c: Added mini_type_stack_size() which allows
8941 allows open types if given a generic sharing context.
8942 mini_get_basic_type_from_generic() takes a
8943 MonoGenericSharingContext* instead of a MonoCompile* now.
8945 * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
8946 mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
8947 mini-sparc.c, mini-x86.c: Trivial changes required by the two
8948 changes above. Just passing arguments through to the right
8951 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
8953 * mini-arm.c: unify the call emission to emit_code_seq().
8955 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
8957 * tramp-arm.c: reduced the trampoline size.
8959 2007-10-10 Mark Probst <mark.probst@gmail.com>
8961 * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
8962 variable handling out of arch-specific code.
8964 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
8966 * mini-arm.c: implemented fast delegate dispatch.
8968 2007-10-09 Zoltan Varga <vargaz@gmail.com>
8970 * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
8971 that fp elimination is turned off if the space required by locals is too
8974 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
8976 * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
8977 ARM to the new style trampoline.
8979 2007-10-09 Zoltan Varga <vargaz@gmail.com>
8981 * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
8983 * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
8985 2007-10-09 Martin Baulig <martin@ximian.com>
8988 (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
8989 `field_info_offset_offset'.
8991 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
8993 * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
8994 removed more internal usage of the r11 register and made it available
8995 to the register allocator.
8997 2007-10-08 Mark Probst <mark.probst@gmail.com>
8999 * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
9000 when sharing generics and treat type variables as references.
9002 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
9004 * mini-ppc.c: started removing the internal uses of register r11
9005 to eventually allow the register allocator to manage it as an
9006 additional available register.
9008 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
9010 * tramp-amd64.c: fixed memory corruption in the trampoline generation.
9012 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
9014 * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
9015 specific trampolines as they are not performance critical as a jump
9016 target (maybe align as before only for AOT code?). This saves about
9017 200 KB of native code on x86 for monodevelop startup.
9019 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
9021 * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
9022 monodevelop startup.
9024 2007-10-06 Zoltan Varga <vargaz@gmail.com>
9026 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
9028 * mini-sparc.h mini-sparc.c: Implement IMT support.
9030 * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
9031 its smaller and doesn't clobber sparc_g1.
9033 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
9035 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
9037 * mini-ppc.c: optimized the size of the IMT thunks a bit.
9039 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
9041 * mini-ppc.c: implemented fast delegate invocation.
9043 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
9045 * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
9047 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
9049 * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
9050 code to the new style trampoline in preparation for IMT support.
9052 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
9054 * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
9055 systems already. This also reduces the specific trampiline sizes and
9056 prepares for the use of r12 as the IMT identifier register.
9058 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
9060 * mini-mips.h: endianess fix (simplified from a patch by
9061 Thomas Kunze <thommy@tabao.de>, bug #323737).
9063 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
9065 * exceptions-ppc.c, mini-ppc.h: refactor to use macros
9066 to access ucontext fields and enable netbsd support
9067 (partially from Magnus Henoch <mange@freemail.hu>).
9069 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
9071 * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
9072 use the preprocessor from the CPP env var if it is set.
9074 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
9076 * mini-trampolines.c: fixed an assertion and moved it earlier in the
9077 code, before interface_offset gets used.
9079 2007-10-02 Zoltan Varga <vargaz@gmail.com>
9081 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
9082 mono_class_setup_vtable () before accessing klass->vtable.
9084 2007-10-01 Zoltan Varga <vargaz@gmail.com>
9086 * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
9089 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
9091 * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
9092 IMT slots (this saves hundreds of KB of memory in programs like
9093 IronPython and Monodevelop).
9095 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
9097 * mini.c: print the delegate counter.
9099 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
9101 * mini-x86.c: make it easier to enable the debugging code for IMT
9104 2007-09-28 Martin Baulig <martin@ximian.com>
9107 (MonoDebuggerMetadataInfo): Add `klass_image_offset',
9108 `mono_method_klass_offset' and `mono_method_token_offset'.
9110 2007-09-20 Mark Probst <mark.probst@gmail.com>
9112 * mini.c: First generics sharing implementation. Can only share
9113 in very simple cases. If sharing doesn't work it falls back to
9114 dedicated compilation.
9116 * mini.h: Flag in MonoCompile to specify whether generic
9117 compilation is shared. Flags enum for marking which generic inst
9118 of a context is used. Prototypes for helper functions.
9120 * generic-sharing.c: Helper functions for generic method sharing.
9122 * optflags-def.h: Optimization flag (gshared) for enabling generic
9123 method sharing added.
9125 * Makefile.am: generic-sharing.c added.
9127 2007-09-19 Daniel Nauck <dna@mono-project.de>
9129 * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
9131 2007-09-19 Massimiliano Mantione <massi@ximian.com>
9132 * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
9135 2007-09-19 Martin Baulig <martin@ximian.com>
9137 * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
9138 mono_debug_cleanup() is now part of mono_cleanup().
9140 2007-09-18 Zoltan Varga <vargaz@gmail.com>
9142 * driver.c (mono_main): Fix a warning.
9144 2007-09-17 Zoltan Varga <vargaz@gmail.com>
9146 * aot-compiler.c: Optimize various parts when processing large assemblies.
9149 * mini.c (mono_patch_info_hash): Improve hash function.
9151 2007-09-14 Jonathan Chambers <joncham@gmail.com>
9153 * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
9155 Code is contributed under MIT/X11 license.
9157 2007-09-14 Zoltan Varga <vargaz@gmail.com>
9159 * mini.c (mini_init): Fix a leak.
9161 * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
9163 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
9165 * mini.c: redirect string.InternalAllocStr() to the managed allocator.
9167 2007-09-14 Zoltan Varga <vargaz@gmail.com>
9169 * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
9171 2007-09-13 Zoltan Varga <vargaz@gmail.com>
9173 * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
9176 * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
9178 * mini.c (handle_alloc): Enable managed allocators in AOT code.
9180 * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
9182 * aot-runtime.c (decode_patch_info): Ditto.
9184 2007-09-12 Jonathan Chambers <joncham@gmail.com>
9186 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
9187 static case. Cache delegates in architecture specific code,
9188 based on number of parameters.
9190 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
9191 in architecture specific code, based on number of parameters.
9193 * mini-trampolines.c (mono_delegate_trampoline): Architecture specific
9194 caching happen in architecture specific code now.
9196 Code is contributed under MIT/X11 license.
9198 2007-09-12 Jonathan Chambers <joncham@gmail.com>
9200 * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
9201 mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
9202 mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
9204 Code is contributed under MIT/X11 license.
9206 2007-05-15 Massimiliano Mantione <massi@ximian.com>
9207 * mini.c: (mono_thread_abort) Fixed bug #82416.
9209 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
9211 * mini.: hook the new managed GC allocation feature into the JIT.
9213 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
9215 * mini.c: implementation for the new runtime tls opcode.
9217 2007-09-11 Martin Baulig <martin@ximian.com>
9220 (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
9221 `mono_method_inflated_offset'.
9223 2007-09-07 Zoltan Varga <vargaz@gmail.com>
9225 * driver.c mini.h mini.c: Add a new devel command line option for injecting
9226 async exceptions into a method.
9228 * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
9229 purpose of testing whenever the unwinder works at every instruction.
9231 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
9233 * mini.c: check accessibility of method used in ldftn (fixes
9236 2007-09-04 Zoltan Varga <vargaz@gmail.com>
9238 * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
9240 * inssel.brg: Fix a warning.
9242 2007-09-03 Martin Baulig <martin@ximian.com>
9244 * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
9245 now takes the `main_method' as argument.
9247 2007-09-02 Zoltan Varga <vargaz@gmail.com>
9249 * cpu-sparc.md (endfilter): Add missing src1:i argument.
9251 2007-08-30 Jonathan Chambers <joncham@gmail.com>
9253 * driver.c: include the cil-coff.h header on Windows.
9255 Code is contributed under MIT/X11 license.
9257 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
9259 * mini.c, driver.c: don't include the cil-coff.h header.
9261 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
9263 * mini.c: flag places that needs fixes fo soft-float support.
9265 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
9267 * mini.h, inssel-float.brg: fix soft-float constant loads on big
9268 endian systems (partially from Dean Jenkins, bug #81924).
9270 2007-08-28 Mark Probst <mark.probst@gmail.com>
9272 * mini.c (check_linkdemand): Remove embedded reference object in
9273 call to LinkDemandSecurityException.
9274 (mono_jit_compile_method_inner): Call LinkDemandSecurityException
9275 with an IntPtr instead of a reference object.
9277 2007-08-28 Zoltan Varga <vargaz@gmail.com>
9279 * mini.c (handle_initobj): Handle alignment properly.
9281 * inssel.brg (mini_emit_memset): Ditto.
9283 * inssel.brg (mini_emit_memcpy): Ditto.
9285 * inssel-sparc.brg: Ditto.
9287 * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
9289 2007-08-26 Zoltan Varga <vargaz@gmail.com>
9291 * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
9292 exceptions raised in unmanaged code. Fixes part of #82594.
9294 2007-08-24 Mark Probst <mark.probst@gmail.com>
9296 * mini.c (mono_method_to_ir), declsec.c
9297 (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
9299 2007-08-22 Martin Baulig <martin@ximian.com>
9302 (MonoDebuggerThreadInfo): New typedef.
9303 (mono_debugger_thread_table): New global variable.
9304 (mono_debugger_thread_created): New public function.
9305 (mono_debugger_thread_cleanup): New public function.
9309 - removed `get_current_thread' and `lookup_assembly'.
9310 - removed `data_table'.
9311 - added `thread_table'.
9314 (mono_thread_start_cb): Call mono_debugger_thread_created().
9315 (mono_thread_attach_cb): Likewise.
9316 (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
9317 (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
9320 * driver.c (mono_main): Move mono_debug_init() up, before calling
9321 mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
9323 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
9325 * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
9326 together when passing several arguments of type double (gives a small
9327 speedup and saves a few bytes of generated code).
9329 2007-08-20 Jb Evain <jbevain@novell.com>
9331 * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
9333 2007-08-20 Jb Evain <jbevain@novell.com>
9335 * mini.c (mono_method_to_ir): throw MethodAccessException
9336 and FieldAccessException instead of InvalidProgramException.
9338 2007-08-20 Mark Probst <mark.probst@gmail.com>
9340 * mini.c: CoreCLR security checks.
9342 * mini.h: Removed MonoSecurityMode (moved to
9343 metadata/security-manager.h) and mono_security_mode global var
9344 (replaced by set/get functions in security-manager.h).
9346 * driver.c: Added "core-clr-test" security mode for testing. Used
9347 set-function for setting security mode.
9349 2007-08-17 Mark Probst <mark.probst@gmail.com>
9351 * mini.c: MonoJitInfo's are freed hazardously now. Statistics for
9352 the new jit_info_table.
9354 * driver.c: Test code for the new jit_info_table (enabled by the
9355 define MONO_JIT_INFO_TABLE_TEST).
9357 2007-08-14 Zoltan Varga <vargaz@gmail.com>
9359 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
9360 detection of call <REG> instruction sequence. Fixes build on freebsd.
9362 2007-08-13 Zoltan Varga <vargaz@gmail.com>
9364 * mini-exceptions.c: Fix a warning.
9366 2007-08-11 Zoltan Varga <vargaz@gmail.com>
9368 * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
9369 stack overflow handling code on amd64 too.
9371 * mini-exceptions.c (mono_setup_altstack): Make this use
9372 mono_thread_get_stack_bounds ().
9374 * mini-x86.h: Disable sigaltstack on solaris x86.
9376 2007-08-10 Zoltan Varga <vargaz@gmail.com>
9378 * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
9380 2007-08-10 Geoff Norton <gnorton@customerdna.com>
9382 * tramp-x86.c: Remove some unneeded alignment changes on Apple. Fixes #82387.
9384 2007-08-08 Zoltan Varga <vargaz@gmail.com>
9386 * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
9388 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
9390 2007-08-03 Neale Ferguson <neale@sinenomine.net>
9392 * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
9395 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
9397 * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
9398 to be emitted (bug #82281).
9400 2007-08-01 Martin Baulig <martin@ximian.com>
9402 Merged the `debugger-dublin' branch.
9404 * debug-debugger.h (MonoDebuggerInfo):
9405 Removed the `old_*' compatibility entries.
9406 Added `debugger_version' and `data_table'.
9407 Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
9408 Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
9411 (MiniDebugMethodBreakpointInfo): Add `address_list'.
9412 (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
9413 instead of a `gconstpointer'.
9414 (mono_debugger_insert_method_breakpoint): Return a
9415 `MonoDebugMethodAddressList *'.
9417 2007-06-28 Martin Baulig <martin@ximian.com>
9419 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
9421 2007-08-01 Zoltan Varga <vargaz@gmail.com>
9423 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using
9424 __builtin_frame_address () since it is broken on older gcc versions.
9426 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
9428 * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
9429 on the stack overflow handling and made the managed stack overflows
9430 catchable in most cases using soft guard pages.
9431 * exceptions-x86.c: added code to restore the protection in the soft
9432 guard pages at the end of exception handling.
9434 2007-07-31 Zoltan Varga <vargaz@gmail.com>
9436 * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
9438 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
9440 * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
9443 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
9445 * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
9446 signal handling support until it has been ported to the new mechanism.
9447 * mini.c: fixed stack overflow detection and use the new
9448 architecture code to handle signals on the altstack.
9450 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
9452 * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
9453 stack overflows on the alt stack.
9455 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
9457 * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
9458 stack overflows on the alt stack.
9460 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
9462 * exceptions-ppc.c: cleanup preparing for altstack support.
9464 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
9466 * exceptions-arm.c: cleanup preparing for altstack support.
9468 2007-07-27 Mark Probst <mark.probst@gmail.com>
9470 * mini.c (print_jit_stats): Output hazard pointer stats.
9472 2007-07-26 Mark Probst <mark.probst@gmail.com>
9474 * driver.c, mini.c: Replaced security mode flags with a single
9477 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
9479 * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
9481 2007-07-25 Mark Probst <mark.probst@gmail.com>
9483 * mini.c, mini.h, driver.c (mono_main): Added command-line flag
9484 (which doesn't do anything yet) for activating Core CLR
9485 (Silverlight) security.
9487 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
9489 * mini-codegen.c: work around a possible gcc bug on arm.
9491 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
9493 * driver.c, mini-x86.h, mini-amd64.h: print a nice error
9494 message for platforms that don't support AOT compilation.
9496 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
9498 * mini.h, mini.c, driver.c: temporary smcs hack.
9500 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
9502 * mini-arm.h, mini-arm.c: arm EABI fixes.
9504 2007-07-22 Zoltan Varga <vargaz@gmail.com>
9506 * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
9509 * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
9510 trampolines taking a method argument.
9512 * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
9514 * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
9515 * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
9517 * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
9518 JIT compilation throws an exception. Fixes #82050.
9520 2007-07-19 Mark Probst <mark.probst@gmail.com>
9522 * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
9523 with the MONO_EXCEPTION_ defines.
9525 2007-07-17 Zoltan Varga <vargaz@gmail.com>
9527 * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
9530 * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
9531 the cause of an assertion.
9533 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
9535 * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
9538 2007-07-15 Zoltan Varga <vargaz@gmail.com>
9540 * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
9541 assert. Should fix #82103.
9543 2007-07-14 Zoltan Varga <vargaz@gmail.com>
9545 * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
9546 here too. Fixes #82095.
9548 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
9551 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
9553 * mini-amd64.h: Enable IMT for amd64.
9555 * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
9557 2007-07-12 Zoltan Varga <vargaz@gmail.com>
9559 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
9561 2007-07-12 Mark Probst <mark.probst@gmail.com>
9563 * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
9564 as soon as check_linkdemand sets an exception_type.
9566 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
9568 * mini-x86.c: fixed offsets for IMT call sequence.
9569 * mini-x86.h: enable IMT again.
9571 2007-07-11 Zoltan Varga <vargaz@gmail.com>
9573 * trace.c (mono_trace_enter_method): Decode MonoType too.
9575 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
9577 * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
9579 * mini-amd64.c: Add preliminary IMT implementation.
9581 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
9583 * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
9584 understand the new IMT-base interface invocation (thanks to
9585 Daniel Nauck for the report and the remote debugging session).
9587 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
9589 * mini-x86.c: size and speed optimizations for the IMT bsearch.
9591 2007-07-11 Zoltan Varga <vargaz@gmail.com>
9593 * Makefile.am (aotcheck): Make this actually use the AOTed code.
9595 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
9597 * mini-trampolines.c: implement AOT IMT support.
9598 * mini-x86.h: enable IMT support for wider testing.
9600 2007-07-10 Zoltan Varga <vargaz@gmail.com>
9602 * inssel.brg (emit_imt_argument): Add aot support here.
9604 * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
9606 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
9608 * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
9609 of the IMT implementation, partially from massi, with my
9610 implementation of the bsearch sequence. Disabled by default until
9611 the AOT code is implemented.
9613 2007-07-10 Zoltan Varga <vargaz@gmail.com>
9615 * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
9617 * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
9619 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
9621 * inssel.brg, mini.c, mini.h, mini-trampolines.c:
9622 arch-independent IMT JIT code from Massimiliano
9623 Mantione (massi@ximian.com) with small cleanups from me.
9625 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
9627 * Makefile.am: fix svn invocation to get the svn revision to be
9628 independent of the local language (build fix).
9630 2007-07-09 Mark Probst <mark.probst@gmail.com>
9632 * mini.c (inline_method): Reset cfg->exception_type if the
9633 inlining is aborted. Fixes: 82049.
9635 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
9637 * mini.c: remove assert from exception handling code when exception_ptr
9640 2007-07-05 Zoltan Varga <vargaz@gmail.com>
9642 * mini.c (mono_codegen): Add an assert.
9644 * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method
9645 enter and leave code.
9646 * mini-amd64.c (mono_arch_emit_prolog): Likewise.
9648 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
9650 * mini-ppc.c: fixed memory corruption for localloc(0)
9653 2007-07-05 Zoltan Varga <vargaz@gmail.com>
9655 * mini.c: Fix warnings.
9657 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
9659 * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
9660 to emit better double->int conversions.
9662 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
9664 * mini.c: the provided Min/Max optimizations are valid for unisgned
9667 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
9669 * 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
9671 2007-06-28 Miguel de Icaza <miguel@novell.com>
9673 * mini.c (mono_running_on_valgrind): Add support for reporting the
9674 method and its boundaries to valgrind.
9676 2007-06-28 Martin Baulig <martin@ximian.com>
9678 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
9680 2007-06-25 Zoltan Varga <vargaz@gmail.com>
9682 * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
9684 * generic.2.cs: Add new test case.
9686 2007-06-25 Martin Baulig <martin@ximian.com>
9688 Merged the `debugger-dublin' branch.
9691 (mono_debugger_insert_method_breakpoint): New public method.
9692 (mono_debugger_remove_method_breakpoint): Likewise.
9693 (mono_debugger_check_breakpoints): New static method.
9694 (mono_debug_close_method): Call mono_debugger_check_breakpoints().
9696 * debug-debugger.h (MonoDebuggerInfo):
9697 Renamed (to keep backward compatibility in the vtable):
9698 `insert_breakpoint' -> `old_insert_breakpoint'.
9699 `remove_breakpoint' -> `old_remove_breakpoint'.
9700 `create_string' -> `old_create_string'.
9701 `lookup_class' -> `old_lookup_class'.
9702 `lookup_type' -> removed; changed into a dummy field.
9703 `lookup_assembly' -> `old_lookup_assembly'.
9704 Added (same functionality, but different signature):
9705 `create_string', `lookup_class', `lookup_assembly'
9707 `get_method_addr_or_bpt', `remove_method_breakpoint',
9708 `runtime_class_init'.
9710 * debug-debugger.c: Merged the `debugger-dublin' branch.
9712 2007-06-23 Zoltan Varga <vargaz@gmail.com>
9714 * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
9716 (peephole_pass): Likewise.
9718 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
9720 * driver.c: hopefully make setaffinity work also for ancient
9723 2007-06-22 Atsushi Enomoto <atsushi@ximian.com>
9725 * driver.c : win32 build fix.
9727 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
9729 * driver.c: check for the MONO_NO_SMP env var and bind to a single
9730 processor if it is set.
9732 2007-06-21 Martin Baulig <martin@ximian.com>
9734 * debug-mini.h: New file.
9737 (mono_debugger_insert_breakpoint_full): Moved here from
9738 ../metadata/mono-debug-debugger.c.
9739 (mono_debugger_remove_breakpoint): Likewise.
9740 (mono_debugger_breakpoint_callback): Likewise.
9742 2007-06-15 Raja R Harinath <rharinath@novell.com>
9744 * jit-icalls.c (mono_helper_compile_generic_method): Update to
9745 changes in MonoGenericClass.
9747 2007-06-14 Zoltan Varga <vargaz@gmail.com>
9749 * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
9751 2007-06-14 Raja R Harinath <rharinath@novell.com>
9753 * jit-icalls.c (mono_helper_compile_generic_method): Update to
9754 removal of MonoGenericMethod.
9756 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
9758 * mini-exceptions.c: hooks for the exception events profiling API.
9760 2007-06-14 Randolph Chung <tausq@debian.org>
9762 * Makefile.ma: Add hppa target.
9763 * mini-arch.h: Include mini-hppa.h
9764 * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
9765 mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
9766 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
9768 2007-06-14 Randolph Chung <tausq@debian.org>
9770 * inssel.brg: Add rules for "chained" compare-branch operations so that
9771 a single compare op can affect multiple branches. Adjust cost for
9772 OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
9773 * inssel-long32.brg: Update rules to use compare-branch macros. Adjust
9774 cost for some rules so that they can more easily be overridden by
9775 per-arch rules (with fixes from lupus).
9776 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
9778 2007-06-13 Randolph Chung <tausq@debian.org>
9780 * mini-ops.h: Reorder branch ops so that they match the order of the
9781 corresponding CEE_* ops. The code expects them this way.
9782 Add new ops for HPPA target.
9783 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
9785 2007-06-13 Randolph Chung <tausq@debian.org>
9787 * mini-exceptions.c: Handle cases where the stack grows towards
9789 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
9791 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
9793 * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
9795 * driver.c: explain where a non-matching corlib is found.
9797 2007-06-13 Mark Probst <mark.probst@gmail.com>
9799 * mini.c (print_jit_stats): Output dynamic code allocation stats.
9801 2007-06-10 Sanghyeon Seo <sanxiyn@gmail.com>
9803 * mini-exceptions.c: Generate a method profile leave event during
9804 an exception to ensure that the profiler gets notified.
9806 2007-06-07 Zoltan Varga <vargaz@gmail.com>
9808 * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir
9811 * cpu-amd64.md: Add long_and/or/xor opcodes.
9813 2007-06-06 Wade Berrier <wberrier@novell.com>
9815 * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
9816 (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction
9817 length of instruction shr_imm (expected 8, got 10)
9819 2007-06-06 Zoltan Varga <vargaz@gmail.com>
9821 * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
9823 2007-06-06 Mark Probst <mark.probst@gmail.com>
9825 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
9826 MonoInternalHashTable again (fixed bug in the internal hash table
9829 2007-06-06 Mark Probst <mark.probst@gmail.com>
9831 * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
9832 Have to figure out what makes it crash the SWF regression.
9834 2007-06-05 Zoltan Varga <vargaz@gmail.com>
9836 * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
9838 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
9840 * mini.c: optimize out the type check when storing null in a
9843 2007-06-04 Mark Probst <mark.probst@gmail.com>
9845 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
9846 MonoInternalHashTable.
9848 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
9850 * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
9851 signed integer methods.
9853 2007-06-02 Zoltan Varga <vargaz@gmail.com>
9855 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case
9856 permanently since the current approach doesn't work.
9858 2007-06-02 Zoltan Varga <vargaz@gmail.com>
9860 * inssel.brg (stmt): Only call delegate->invoke_impl if
9861 MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
9863 2007-06-01 Zoltan Varga <vargaz@gmail.com>
9865 * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
9866 the sreg2==rdx case.
9868 * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
9869 account if it contains a rex prefix.
9870 (peephole_pass): Handle OP_FMOVE as well.
9872 2007-06-01 Zoltan Varga <vargaz@gmail.com>
9874 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
9875 as it causes regressions.
9877 2007-05-31 Zoltan Varga <vargaz@gmail.com>
9879 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
9880 static case as well.
9882 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
9884 * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
9885 (mono_arch_get_this_arg_from_call): Ditto.
9887 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
9889 * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
9892 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
9893 (mono_arch_get_this_arg_from_call): Ditto.
9895 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
9897 * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
9898 try to create optimized invoke code and use that for further invocations.
9899 Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
9901 * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
9903 2007-05-29 Rodrigo Kumpera <kumpera@gmail.com>
9905 * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
9906 sealed classes or methods.
9907 *devirtualization.cs: tests for the new optimization
9909 2007-05-29 Zoltan Varga <vargaz@gmail.com>
9911 * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
9912 by the update_volatile () function.
9914 2007-05-27 Zoltan Varga <vargaz@gmail.com>
9916 * driver.c (mono_main): Call g_thread_init () early since newer glib versions
9919 * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
9921 2007-05-24 Jonathan Chambers <joncham@gmail.com>
9923 * mini.c: Add configure checks for header files.
9924 * mini-x86.c: Add configure checks for header files.
9925 * trace.c: Add configure checks for header files.
9926 * aot-runtime.c: Add configure checks for header files.
9927 * aot-compiler.c: Add configure checks for header files.
9928 * driver.c: Add configure checks for header files.
9929 * mini-codegen.c: Add configure checks for header files.
9931 Code is contributed under MIT/X11 license.
9933 2007-05-22 Zoltan Varga <vargaz@gmail.com>
9935 * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
9936 icompare_imm -128 + op_iclt. Fixes #81703.
9938 2007-05-19 Zoltan Varga <vargaz@gmail.com>
9940 * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
9942 2007-05-15 Massimiliano Mantione <massi@ximian.com>
9944 * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
9945 inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
9946 so that all isinst checks now use "interface_bitmap".
9948 2007-05-15 Zoltan Varga <vargaz@gmail.com>
9950 * cpu-amd64.md (jmp): Fix a warning.
9952 * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
9954 * basic.cs: Add new regression test.
9956 * basic.cs: Remove test which is now in basic-long.cs.
9958 * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
9960 * basic-long.cs: Add new test.
9962 2007-05-13 Zoltan Varga <vargaz@gmail.com>
9964 * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
9966 2007-05-12 Zoltan Varga <vargaz@gmail.com>
9968 * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
9970 * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
9973 * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception
9974 throwing code a bit.
9976 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of
9977 the exception throwing code a bit.
9979 * mini-x86.c (get_call_info): Allocate result from a mempool.
9981 2007-05-11 Zoltan Varga <vargaz@gmail.com>
9983 * aot-compiler.c (find_typespec_for_class): Fix the assert.
9985 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
9987 * mini.h (MonoCompile): Add 'token_info_hash' field.
9989 * mini.c: Save token->method associations during compilation so the AOT
9990 compiler can use it.
9992 * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
9993 which reference generic classes and methods.
9995 2007-05-10 Zoltan Varga <vargaz@gmail.com>
9997 * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
9999 * aot-compiler.c (compile_method): Fix a typo in a comment.
10001 * aot-runtime.c (decode_cached_class_info): Skip generic types.
10003 * aot-compiler.c: Add minimal support for AOTing generic code by skipping
10004 everything generic.
10006 * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
10008 2007-05-09 Zoltan Varga <vargaz@gmail.com>
10010 * mini.h (MonoCompile): Add 'args' field.
10012 * mini.c (mono_compile_create_vars): Store variables representing the arguments
10015 * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
10017 2007-05-08 Zoltan Varga <vargaz@gmail.com>
10019 * mini.c (mono_compile_get_interface_var): Remove this unused function.
10021 * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
10023 * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
10024 opcodes for some opcodes.
10026 * mini.h *.brg *.c: Use the new opcodes.
10028 2007-05-08 Massimiliano Mantione <massi@ximian.com>
10030 * mini.h: Bumped aot revision.
10032 * inssel.brg: modified code generation of type checks for interfaces
10033 to use the new "MonoClass.interface_bitmap" instead of the old
10034 "MonoClass.interface_offsets".
10036 2007-04-30 Zoltan Varga <vargaz@gmail.com>
10038 * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
10040 2007-04-29 Zoltan Varga <vargaz@gmail.com>
10042 * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
10045 2007-04-27 Neale Ferguson <neale@sinenomine.net>
10047 * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
10049 2007-04-27 Wade Berrier <wberrier@novell.com>
10051 * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in
10052 mini.h) to fix build.
10054 2007-04-26 Zoltan Varga <vargaz@gmail.com>
10056 * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
10058 * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
10059 causes the corlib unit tests to fail.
10061 2007-04-25 Zoltan Varga <vargaz@gmail.com>
10063 * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
10065 * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
10067 * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional
10068 opcodes to the comparison relations.
10070 * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional
10071 opcodes to their types.
10073 * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
10075 * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache
10076 it in cfg->arch.cinfo.
10078 * local-propagation.c (mono_local_cprop_bb): Fix a warning.
10080 * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in
10081 cfg->cil_offset_to_bb.
10083 2007-04-24 Zoltan Varga <vargaz@gmail.com>
10085 * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
10086 created becase of initlocals.
10088 2007-04-23 Zoltan Varga <vargaz@gmail.com>
10090 * mini-alpha.c cpu-alpha.md: More alpha port work from
10091 Sergey Tikhonov <tsv@solvo.ru>.
10093 2007-04-21 Andreas Faerber <andreas.faerber@web.de>
10095 * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
10097 2007-04-19 Zoltan Varga <vargaz@gmail.com>
10099 * cpu-s390.md (break): Correct the length of break instruction.
10101 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
10103 * mini.c: fix a couple of soft-float issues and comments.
10105 2007-04-15 Miguel de Icaza <miguel@novell.com>
10107 * trace.c (is_filenamechar): - is also a filename char.
10109 2007-04-15 Neale Ferguson <neale@sinenomine.net>
10111 * mini-s390.c: Correct checking for enum type in return value processing.
10113 2007-04-14 Raja R Harinath <rharinath@novell.com>
10115 * Makefile.am (BUILT_SOURCES): Add 'version.h'.
10116 (version.h): Makefile is in the build directory.
10118 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
10120 * mini-amd64.h: fix for assertion failure on Solaris/amd64
10122 2007-04-11 Martin Baulig <martin@ximian.com>
10124 * mini.c (can_access_member): Fix handling of generic classes;
10127 2007-04-10 Zoltan Varga <vargaz@gmail.com>
10129 * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
10131 2007-04-05 Zoltan Varga <vargaz@gmail.com>
10133 * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
10135 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
10137 * mini-codegen.c: make sure the right spill amount is
10138 used for fp or integer registers (fixes the float_sub_spill() on ppc).
10140 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
10142 * mini-ppc.c: fixes for the fp_branch_nan test.
10144 2007-03-23 Zoltan Varga <vargaz@gmail.com>
10146 * basic.cs: Comment out new test which still fails on ia64.
10148 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10150 * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
10152 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
10154 * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
10156 2007-03-22 Zoltan Varga <vargaz@gmail.com>
10158 * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
10159 on 64 bit machines. Fixes part of #80738.
10161 * basic.cs: Add regression test.
10163 2007-03-17 Zoltan Varga <vargaz@gmail.com>
10165 * inssel.brg basic.cs: Revert previous change to fix build.
10167 * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
10170 * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
10172 * basic.cs: Add new regression test.
10174 2007-03-17 Zoltan Varga <vargaz@gmail.com>
10176 * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
10179 2007-03-16 Neale Ferguson <neale@sinenomine.net>
10181 * cpu-s390x.md: Correct length of break instruction.
10183 2007-03-16 Neale Ferguson <neale@sinenomine.net>
10185 * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
10186 * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
10188 2007-03-15 Jonathan Chambers <joncham@gmail.com>
10190 * *.c: Begin WIN64 port.
10191 * mini.c: Use correct register in profiler.
10192 * mini-amd64.c: No inline assembly on Win64.
10193 * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
10194 Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
10195 * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
10196 is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
10197 mono_arch_ip_from_context for Win64.
10199 Contributed under MIT/X11 license.
10201 2007-03-15 Zoltan Varga <vargaz@gmail.com>
10203 * exceptions-amd64.c (seh_handler): Ditto.
10205 * exceptions-x86.c (seh_handler): Fix a memory leak.
10207 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
10209 * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
10210 mini-s390x.c: fixed peephole optimizations to deal
10211 correctly with 1 and 2 byte reload avoidance.
10213 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
10215 * cpu-s390.md, cpu-s390x.md: update localloc length.
10217 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
10219 * cpu-g4.md: added missing descriptions.
10221 2007-03-14 Miguel de Icaza <miguel@novell.com>
10223 * Makefile.am: Add support so the tail tests are not executed on
10224 PowerPC as that is a known limitation of the PowerPC port.
10226 2007-03-13 Jonathan Chambers <joncham@gmail.com>
10228 * runmdesc.bat: Move to msvc directory.
10230 2007-03-13 Jonathan Chambers <joncham@gmail.com>
10232 * runmdesc.bat: Run executable that was produced by the current
10233 target and sent via an argument.
10235 2007-03-11 Zoltan Varga <vargaz@gmail.com>
10237 * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
10240 * generics.2.cs: Add regression test.
10242 2007-03-09 Wade berrier <wberrier@novell.com>
10244 * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
10246 2007-03-09 Zoltan Varga <vargaz@gmail.com>
10248 * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
10249 AOT code depends on this.
10251 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
10253 * mini.c: more precise tracking of types in the eval stack
10254 (part of fix for bug #81044).
10256 2007-03-07 Zoltan Varga <vargaz@gmail.com>
10258 * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
10260 * aot-compiler.c (encode_patch): Remove an obsolete comment.
10262 2007-03-06 Zoltan Varga <vargaz@gmail.com>
10264 * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
10266 * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
10268 2007-02-22 Zoltan Varga <vargaz@gmail.com>
10270 * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
10271 a pointer on 64 bit systems. Fixes #80190.
10273 * iltests.il: Add new regression test.
10275 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
10277 * mini.c: inline a constant for Environment.IsRunningOnWindows.
10279 2007-02-19 Geoff Norton <gnorton@customerdna.com>
10281 * trace.c: Remove an erroneous alignemnt check when tracing.
10282 Fixes --trace on OSX86.
10284 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
10286 * mini-$(arch).h: initialize SP in context for all the archs.
10288 2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
10290 * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
10291 regressions in the thread tests.
10293 2007-02-14 Zoltan Varga <vargaz@gmail.com>
10295 * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
10296 - fixed implementation of LOCALLOC opcode
10297 - implemented non-un compare for floats
10299 - implementation of FDIV and CKFINITE opcodes
10300 - fixes for latest mono updates
10301 - additional arch opcodes
10303 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
10305 * Makefile.am: simplify and merge rules for cross-compilation.
10307 2007-02-07 Massimiliano Mantione <massi@ximian.com>
10309 * local-propagation.c: Actually *apply* the fix for bug 80591...
10311 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
10313 * mini-exceptions.c: backuot part of the last change
10314 (fixes cas tests on amd64 related to GetExecutingAssembly ()).
10316 2007-02-06 Massimiliano Mantione <massi@ximian.com>
10317 * inssel.brg: Fix bug 59286.
10320 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
10322 * mini-exceptions.c: patch from Zoltan to correctly check for
10323 stack boundaries (using the stack register, not the frame register),
10324 fixes bugs #80724, #79717.
10326 2007-02-03 Zoltan Varga <vargaz@gmail.com>
10328 * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
10329 OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
10331 * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
10332 presence of frame pointer elimination.
10334 2007-02-01 Geoff Norton <gnorton@customerdna.com>
10336 * mini-x86.h: NetBSD UCONTEX_REG defines.
10338 2007-02-01 Zoltan Varga <vargaz@gmail.com>
10340 * inssel-amd64.brg: Fix amd64 build.
10342 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
10344 * mini.h: remove extern to workaround what looks likes gcc bug 26905
10347 2007-01-31 Zoltan Varga <vargaz@gmail.com>
10349 * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
10352 * mini-<ARCH>.c: Use mono_is_regsize_var ().
10354 2007-01-30 Mark Mason <mason@broadcom.com>
10356 * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
10357 * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
10358 * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
10359 beginning support for CEE_JMP [not quite working yet]
10360 * tramp-mips.c: LMF handling now works
10362 2007-01-30 Zoltan Varga <vargaz@gmail.com>
10364 * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
10366 * mini.h (NULLIFY_INS): New macro.
10368 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
10370 * mini.c: statistical profiler fix for windows, patch
10371 from Tor Lillqvist (tml@novell.com).
10373 2007-01-30 Massimiliano Mantione <massi@ximian.com>
10374 * local-propagation.c: Fix bug 80591.
10376 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
10378 * Makefile.am: put back the --export-dynamic option as with
10379 the previous gmodule flags (thanks to Robert Jordan).
10381 2007-01-28 Zoltan Varga <vargaz@gmail.com>
10383 * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
10385 mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
10386 simplify and speed up the local register allocator. Also rename some fields
10387 like iassign->vassign.
10389 * regalloc.c: Remove some functions which are no longer used since their
10390 inlined version is in mini-codegen.c.
10392 * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
10394 * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
10396 2007-01-27 Zoltan Varga <vargaz@gmail.com>
10398 * mini-amd64.c (peephole_pass): Remove optimizations which omit a
10399 narrowing. Fixes #80622.
10401 * iltests.il: Add new regresssion test.
10403 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
10405 * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
10406 debug-debugger.c, debug-debugger.h: warning fixes.
10407 * driver.c: updated copyright year and made it fit in one line.
10409 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
10411 * aot-runtime.c: updated to use mono-dl instead of gmodule.
10413 2007-01-25 Zoltan Varga <vargaz@gmail.com>
10415 * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
10417 * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
10419 * iltests.il: Add new test for bug #80507.
10421 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
10423 * mini-arm.h: use soft-float also on vfp for now.
10425 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
10427 * mini.c: fix some more soft-float issues.
10429 2007-01-24 Zoltan Varga <vargaz@gmail.com>
10431 * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
10433 2007-01-24 Massimiliano Mantione <massi@ximian.com>
10434 * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
10435 mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
10436 MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
10438 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
10440 * mini-arm.c: typo fix.
10442 2007-01-23 Neale Ferguson <neale@sinenomine.net>
10444 * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
10446 2007-01-21 Zoltan Varga <vargaz@gmail.com>
10448 * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
10449 Share stack slots for scalar types. Avoid expensive g_list_free () calls.
10451 * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
10453 * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto.
10455 * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
10457 * inssel.brg: Fix a warning.
10459 * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
10461 * abcremoval.c ssa.c ssapre.c: Update after this change.
10463 * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
10465 * dominators.c (df_set): Use mono_bitset_union_fast.
10467 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
10469 * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
10470 mini-codegen.c: reduce relocations and memory usage for the cpu
10473 2007-01-20 Zoltan Varga <vargaz@gmail.com>
10475 * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
10477 * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
10478 to reduce their size.
10480 2007-01-19 Mark Mason <mason@broadcom.com>
10482 * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
10483 * mini-mips.c: more configuration macros, support long conditional branches, additional
10484 asserts, fix epilog instrumentation.
10485 * mini-mips.h: use standard stack walk
10486 * cpu-mips.md: increase size of div, rem and conditional branches
10488 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
10490 * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
10493 2007-01-19 Zoltan Varga <vargaz@gmail.com>
10495 * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
10496 (compile_method): Ditto.
10498 * aot-runtime.c (decode_klass_info): Ditto.
10500 * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
10501 needed by the code generated by inssel.brg. Also fix a warning.
10503 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
10505 * mini.c: deal with enums that become genericinsts by
10506 being nested in a generic class (bug #79956).
10508 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
10510 * mini.c: match the generic definition to check for
10511 private access with generic types (bug #78431).
10513 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
10515 * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
10516 to make life easier for people cross-compiling that insist on not
10519 2007-01-17 Mark Mason <mason@broadcom.com>
10521 * inssel-long.brg: patch to deal with mips missing flags
10522 * inssel-long32-mips.brg: implement overflow checks
10523 * insset-mips.brg: implement overflow checks
10524 * mini-mips.h: implement conditional exception handling
10525 * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
10526 Remove unused code, minor cleanups.
10527 * exceptions-mips.c: minor cleanups
10528 * mini-ops.h: add mips conditional exception ops
10529 * cpu-mips.md: add mips conditional exception ops
10532 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
10534 * inssel.brg: patch from Mark Mason <mason@broadcom.com>
10535 to deal with mips missing of flags.
10537 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
10539 * exceptions-ppc.c: execute fault handlers.
10541 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
10543 * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
10545 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
10547 * mini.c: handle also floating point values in initialize_array.
10549 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
10551 * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
10552 array initialization and make it conditional on the intrins option.
10554 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
10556 * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
10557 relocations and put the patch info names close to the enum definition.
10559 2007-01-15 Mark Mason <mason@broadcom.com>
10561 * basic.cs, exceptions.cs: break up large tests to increase debugability.
10563 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
10565 * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
10567 2007-01-12 Raja R Harinath <rharinath@novell.com>
10569 * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
10571 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
10573 * Makefile.am: distribute the mips sources.
10575 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
10577 * mini-codegen.h: handle bug #80489 here, by excluding ecx
10580 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
10582 * cpu-x86.md: back out for now as this triggers other regressions.
10584 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
10586 * cpu-x86.md: force src1 and dest regpair for long shift instructions
10587 to eax:edx, so ecx can't get allocated to them (bug #80489).
10589 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
10591 * mini.c, mini-exceptions.c: enabled running fault handlers
10594 2007-01-03 Miguel de Icaza <miguel@novell.com>
10596 * driver.c: If nothing fail, do not use the string "failed",
10597 because it makes it very annoying to view test result logs on the
10600 2006-12-30 Miguel de Icaza <miguel@novell.com>
10602 * debug-debugger.c (mono_debugger_main): Rename "main" to
10603 "main_method" to prevent a warning.
10605 Remove a warning for unused field.
10607 2006-12-28 Martin Baulig <martin@ximian.com>
10610 (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
10612 2006-12-22 Martin Baulig <martin@ximian.com>
10614 * mdb-debug-info32.s, mdb-debug-info64.s: New files.
10615 Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
10616 seperate `.mdb_debug_info' section, so we can access it from the
10617 debugger even if the binary is stripped.
10619 * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
10620 from the `.mdb_debug_info' here to prevent the linker from
10621 removing that section.
10623 * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
10624 mdb-debug-info64.s.
10626 2006-12-19 Robert Jordan <robertj@gmx.net>
10628 * mini-x86: enable the code to return small structures in
10629 registers for FreeBSD as well. Fixes bug #80278.
10630 * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
10632 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
10634 * mini-x86.c: align the stack when calling the profiler
10635 function instrumenting the prolog (on OSX).
10637 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
10639 * mini.c: emit a break opcode where Debugger.Break () is called.
10641 2006-12-13 Miguel de Icaza <miguel@novell.com>
10643 * mini.c (mono_method_to_ir): Provide useful information on this
10644 assert, to prevent others from debugging like I did.
10646 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
10648 * mini.c: enable code which was incorrectly commented
10651 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
10653 * mini-x86.c: enable on OSX, too, the code to return small
10654 structures in registers.
10656 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
10658 * mini-x86.c: remove the use of the dynamic code manager here, too.
10660 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
10662 * mini.h, debug-debugger.c, tramp-*.c: fixed
10663 mono_debugger_create_notification_function() to use
10664 mono_global_codeman_reserve () instead of a dynamic code manager.
10666 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
10668 * mini.c, jit-icalls.h, jit-icalls.c: remove the
10669 ves_array_element_address() jit icall and use a generated
10670 managed method instead (which is about 4 times faster for a rank 3
10673 2006-11-29 Mark Mason <mason@broadcom.com>
10675 * basic-calls.cs: additional tests for passing
10676 structures as function arguments.
10678 2006-11-29 Mark Mason <mason@broadcom.com>
10680 * mini-mips.h: disable custom exception handling
10681 * mini-mips.c: throw/rethrow should use jalr to call
10682 exception stubs. Fixed bug with passing structures
10683 by value. More support for tracing floating point
10686 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
10688 * mini.c: fixed typo in the soft-float ldind.r4 handling
10691 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
10693 * mini.c, mini.h, driver.c: added --runtime command line
10694 option to select a different runtime than the autodetected one.
10695 * jit.h: added API for embedders to initialize with a specific
10698 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
10700 * mini.c: handle also boxing of r4 values (bug #80024).
10702 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
10704 * mini-ppc.c: force indirect calls until we reserve
10705 enough address space for all the generated code.
10707 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
10709 * exceptions-arm.c: workaround bugs in the libc definition
10710 of struct ucontext.
10712 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
10714 * inssel.brg: fixes from me and Mark Mason.
10716 2006-11-23 Dick Porter <dick@ximian.com>
10718 * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
10719 semaphore display now we've fixed the initial value
10721 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
10723 * inssel.brg: partially revert the last change to fix the build.
10725 2006-11-21 Mark Mason <mason@broadcom.com>
10727 * inssel.brg: Add and use compare-and-branch macros to support
10728 architectures that do not have condition code registers (ie. MIPS).
10729 * *-mips.{c,brg,md}: Fix copyright statements
10731 2006-11-20 Mark Mason <mason@broadcom.com>
10733 * Makefile.am: remove mini-codegen.c from list of MIPS sources
10734 * mini.c: Allow GET_CONTEXT to be specified by the arch port
10735 * mini.h: Added declaration for mono_print_ins()
10736 * mini-codegen.c: added ins_spec initializer for MIPS
10737 * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
10738 vreg to be virtual and hreg to be non-virtual.
10739 * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
10740 is not yet working/implemented correctly.
10741 * mini-codegen.c (print_ins): rename to mono_print_ins(), make
10742 non-static, fixup calls to print_ins() from other parts in the file.
10744 2006-11-20 Mark Mason <mason@broadcom.com>
10746 * basic-calls.cs: added tests for passing structures as arguments
10749 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
10751 * inssel-long32.brg: optimize signed division by power of two.
10753 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
10755 * mini-arm.c: added support for interworking with thumb code
10756 (mono must be still be built using the ARM instruction encoding).
10758 2006-11-19 Miguel de Icaza <miguel@novell.com>
10760 * mini.c (type_from_op): Separate the conditions for OP_EQ as the
10761 verifier has different rules for it. Fixes a few verifier issues
10764 * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
10765 at the end, so people know what happened.
10767 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
10769 * brach-opts.c: in optimize_exception_target() make sure we
10770 are in a catch clause (fixes bug #79871).
10772 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
10774 * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
10775 more soft-float support fixes.
10777 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
10779 * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
10780 that are passed half on the stack and half in registers.
10782 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
10784 * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
10785 more mips integration work from Mark E Mason
10786 <mark.e.mason@broadcom.com>.
10788 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
10790 * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
10791 cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
10792 tramp-mips.c: added sources for the mips port, not
10793 integrated in the build yet. Contributed by
10794 Mark E Mason <mark.e.mason@broadcom.com>.
10796 2006-11-14 Neale Ferguson <neale@sinenomine.net>
10798 * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
10800 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
10802 * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
10803 put the soft-float rules in its own file since it seems to
10804 break s390 compilation.
10806 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
10808 * mini-arm.c: fixed wrnings.
10810 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
10812 * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
10813 inssel-arm.brg: ARM support for soft-float.
10815 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
10817 * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
10818 loads and stores of 32 bit fp values.
10820 2006-11-10 Zoltan Varga <vargaz@gmail.com>
10822 * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
10824 * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
10825 works. Fixes #79852 and #79463.
10827 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
10829 * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
10830 more soft-float support WIP and fixes.
10832 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
10834 * mini-arm.c: some VFP updates.
10836 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
10838 * mini-exceptions.c: 0 is a valid local var offset in some
10839 architectures, don't assert (bug #78508).
10841 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
10843 * exceptions-arm.c: fixed off by one error in stack walk code.
10845 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
10847 * mini.h, mini.c: more precise tracking of type load exceptions.
10849 2006-11-03 Robert Jordan <robertj@gmx.net>
10851 * Makefile.am: [WIN32] Add monow.exe target.
10852 * driver.c: [WIN32] Don't detach the console when debugging.
10855 2006-10-30 Miguel de Icaza <miguel@novell.com>
10857 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
10859 2006-10-23 Zoltan Varga <vargaz@gmail.com>
10861 * aot-compiler.c (emit_method_info): Add a case missed earlier.
10863 * driver.c (mini_regression): Fix --regression with AOT.
10865 * aot-compiler.c (emit_method_info): Fix AOT on amd64.
10867 2006-10-17 Zoltan Varga <vargaz@gmail.com>
10869 * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
10871 * mini-sparc.h: Don't use sigaction on sparc/linux.
10873 * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
10875 * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
10877 * mini-exceptions.c: Add proper include files for getpid ().
10879 2006-10-16 Zoltan Varga <vargaz@gmail.com>
10881 * aot-runtime.c (mono_aot_get_method): Change this to return the native code
10882 address instead of a MonoJitInfo* to avoid decoding the exception info for the
10885 * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
10886 name cache to reduce its size.
10888 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
10890 2006-10-15 Zoltan Varga <vargaz@gmail.com>
10892 * mini-x86.c: Save/restore the current LMF structure more efficiently using
10893 the mono_lmf TLS variable.
10895 * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in
10896 trampoline lmf frames.
10898 * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
10900 2006-10-14 Zoltan Varga <vargaz@gmail.com>
10902 * mini-amd64.c: Save/restore the current LMF structure more efficiently using
10903 the mono_lmf TLS variable.
10905 * mini-exceptions.c: Access the LMF structure through accessors.
10907 * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS
10908 variable instead of in jit_tls->lmf.
10910 * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
10912 * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in
10913 trampoline lmf frames.
10915 * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
10917 2006-10-12 Zoltan Varga <vargaz@gmail.com>
10919 * mini.c trace.c mini-x86.c: Revert these too.
10921 * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
10924 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
10926 * genmdesc.c: removed now dead code.
10928 2006-10-09 Robert Jordan <robertj@gmx.net>
10930 * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
10932 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
10934 * mini.h: do not leave gaps in the opcode values.
10936 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
10938 * jit-icalls.h: flag functions as internal here, too.
10940 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
10942 * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
10943 functions with the internal attribute.
10945 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
10947 * aot-compiler.c: fclose the file descriptor in the profile read loop.
10949 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
10951 * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
10954 2006-10-05 Zoltan Varga <vargaz@gmail.com>
10956 * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
10957 tail calls as on other platforms.
10959 * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
10961 * iltests.il: Add a few tailcall tests.
10963 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
10965 * driver.c: fix loop for old compilers (bug #79521).
10967 2006-10-02 Zoltan Varga <vargaz@gmail.com>
10969 * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
10971 * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
10973 * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
10974 metadata without any code.
10976 * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
10977 more precise debugging information using gdb.
10979 2006-09-30 Zoltan Varga <vargaz@gmail.com>
10981 * inssel-ia64.brg: Make the helper methods static.
10983 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
10985 * inssel-x86.brg: make the helper methods static.
10987 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
10989 * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
10991 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
10993 * mini.c: updates for monoburg changes.
10994 * inssel.brg: make a few helper functions static as they should.
10996 2006-09-27 Zoltan Varga <vargaz@gmail.com>
10998 * Makefile.am: Move mini-codegen.c to common_sources.
11000 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
11002 * mini.h: instroduce inst_call in MonoInst for use in OUTARG
11004 * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
11005 mini-ppc.h: port to use the common local register allocator.
11007 2006-09-26 Zoltan Varga <vargaz@gmail.com>
11009 * mini.h: Remove the comment too then.
11011 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
11013 * mini.h: put back backend.data which is to be used shortly and
11014 doesn't increase the size of MonoInst. If any 64 bit arch aligned
11015 pointers on 4 byte boundaries it'd have much bigger issues running
11016 and you can ifdef it out anyway.
11018 2006-09-26 Zoltan Varga <vargaz@gmail.com>
11020 * mini.h (MonoInst): Remove backend.data field since it is unused and increases
11021 MonoInst size by 4 bytes on 64 bit machines.
11023 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
11025 * *.{c,h,brg}: long due removal of the unused field in MonoInst and
11026 replacement with more meaningful field names. Arch maintainers, please
11027 check the assigned names are good enough for your arch.
11029 2006-09-26 Zoltan Varga <vargaz@gmail.com>
11031 * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the
11032 OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
11034 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
11036 * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
11037 relocations and memory requirements, put the optimization flags
11038 definitions in their own file.
11040 2006-09-24 Zoltan Varga <vargaz@gmail.com>
11042 * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
11044 * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
11046 2006-09-22 Zoltan Varga <vargaz@gmail.com>
11048 * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
11050 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
11052 * inssel.brg: use the correct function to get the size of an item
11053 in an array, given an element class.
11054 * aot-compiler.c: do not access class->class_size directly.
11056 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
11058 * mini.h, debug-mini.c: added a debugging function to print
11059 info about local variables and arguments in a jitted method.
11061 2006-09-20 Zoltan Varga <vargaz@gmail.com>
11063 * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
11065 * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
11067 2006-09-19 Zoltan Varga <vargaz@gmail.com>
11069 * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
11070 inner and outer loops when passing vtypes.
11072 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
11074 * mini-ppc.c: take into account the cpu errata for cache flushing
11075 which caused some random errors (bug #79381).
11077 2006-09-19 Zoltan Varga <vargaz@gmail.com>
11079 * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to
11080 mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
11082 2006-09-17 Zoltan Varga <vargaz@gmail.com>
11084 * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
11087 * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
11088 freebsd ports tree.
11090 * mini-amd64.c (emit_call): Avoid near calls on freebsd.
11091 (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
11093 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
11096 2006-09-13 Zoltan Varga <vargaz@gmail.com>
11098 * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
11100 2006-09-12 Zoltan Varga <vargaz@gmail.com>
11102 * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this
11103 macro does not have to be changed during debugging.
11105 * 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>.
11107 * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
11109 * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
11111 * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if
11112 MONO_ARCH_NO_EMULATE_MUL is defined.
11114 * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
11116 * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
11118 * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
11120 * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
11122 2006-09-11 Zoltan Varga <vargaz@gmail.com>
11124 * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
11125 stuff to mini-exceptions.c where it is used.
11127 * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
11128 setup code, the real one is in mini-exceptions.c.
11130 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
11131 layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
11132 some changes from the freebsd ports tree.
11134 * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
11137 * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
11139 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
11141 * mini.c: on Linux, check for /proc to be mounted
11142 (bug# 79351, novell bug#201204).
11144 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
11146 * mini.c: handle cases where pthread_attr_getstack() behaves
11147 incorrectly (bug #78096).
11149 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
11151 * mini-arm.c: support larger stack frames (bug #79272).
11153 2006-09-08 Zoltan Varga <vargaz@gmail.com>
11155 * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
11157 * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef
11160 * aot-runtime.c (mono_aot_get_class_from_name): New function used by
11161 mono_class_from_name () to find a class from its name.
11163 * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
11165 2006-09-07 Zoltan Varga <vargaz@gmail.com>
11167 * mini-amd64.c (emit_call): Avoid strstr () call if possible.
11169 2006-09-05 Kornél Pál <kornelpal@gmail.com>
11171 * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
11173 2006-09-04 Zoltan Varga <vargaz@gmail.com>
11175 * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
11176 callinfo->trampoline.
11178 * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
11180 (mono_arch_patch_code): Add some debug code to help track down similar failures in the
11183 2006-09-03 Zoltan Varga <vargaz@gmail.com>
11185 * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
11187 2006-09-02 Zoltan Varga <vargaz@gmail.com>
11189 * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
11190 stats.method_trampolines, it is already done by the generic trampoline code.
11192 * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
11194 2006-09-01 Zoltan Varga <vargaz@gmail.com>
11196 * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
11198 * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
11200 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
11202 * mini.c (print_jit_stats): Print mscorlib mempool size too.
11204 * mini.c (print_jit_stats): Print new stats.
11206 * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
11208 2006-08-31 Zoltan Varga <vargaz@gmail.com>
11210 * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
11211 Address on two dimensional arrays. Fixes #78729.
11213 * mini.h (MonoCompile): Add a 'skip_visibility' field.
11215 * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
11218 * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
11220 * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
11223 * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
11225 (mini_get_ldelema_ins): Ditto.
11227 2006-08-30 Zoltan Varga <vargaz@gmail.com>
11229 * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
11230 (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation.
11233 2006-08-29 Neale Ferguson <neale@sinenomine.net>
11235 * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
11236 mono_arch_get_patch_offset as a dummy entry point to allow successful link.
11238 * exceptions-s390x.c: Cosmetic change.
11240 * tramp-s390.c: Fix warning.
11242 * cpu-s390.md: Correct length of mul_imm.
11244 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
11246 * aot-compiler.c: added binary writer with ELF backend
11247 implementation (only on Linux/x86 for now).
11249 2006-08-18 Zoltan Varga <vargaz@gmail.com>
11251 * Makefile.am: Don't run net 2.0 AOT tests.
11253 * aot-compiler.c (compile_method): Skip methods with tail calls as well.
11254 (mono_compile_assembly): Skip net 2.0 assemblies as well.
11256 * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
11258 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
11260 * aot-compiler.c: simplified and refactored the asm-writing code
11261 to allow different backends.
11263 2006-08-18 Zoltan Varga <vargaz@gmail.com>
11265 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
11267 * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a
11268 little. Share patches of type TYPE_FROM_HANDLE as well.
11270 * mini.c (mono_patch_info_equal): New helper function.
11271 (mono_patch_info_hash): Ditto.
11273 * aot-compiler.c (emit_method_code): Fix s390 build.
11275 * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
11276 is not handled because it is stored as a flag and not as a type ctor. Fixes
11279 2006-08-17 Zoltan Varga <vargaz@gmail.com>
11281 * aot-compiler.c: Fix computation of GOT slot statistics.
11283 * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
11284 Also remove support for not PIC AOT.
11286 * mini.h: Bump AOT file format version.
11288 * objects.cs: Add a test for #78990.
11290 * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
11291 (peter.dettman@iinet.net.au). Fixes #79087.
11293 * basic-long.cs: Add a test for the above.
11295 2006-08-16 Zoltan Varga <vargaz@gmail.com>
11297 * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
11299 * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
11302 2006-08-15 Zoltan Varga <vargaz@gmail.com>
11304 * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
11307 2006-08-10 Jonathan Chambers <joncham@gmail.com>
11309 * mini.c: Don't verify COM proxy invoke calls
11312 2006-08-10 Dick Porter <dick@ximian.com>
11314 * wapihandles.c (mini_wapi_seminfo): More info, to help track down
11315 which process is holding semaphores locked.
11317 2006-08-08 Zoltan Varga <vargaz@gmail.com>
11319 * mini-ia64.c mini-amd64.c: Fix #79027.
11321 * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
11323 * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
11325 * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
11326 implicit arguments in a vararg call. Fixes #79027.
11328 2006-08-07 Zoltan Varga <vargaz@freemail.hu>
11330 * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
11331 (mono_get_array_new_va_signature): Ditto.
11333 2006-08-05 Zoltan Varga <vargaz@gmail.com>
11335 * aot-runtime.c: Call init_plt lazily.
11337 * inssel-long.brg: Fix unsigned long->int conversion.
11339 * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
11341 * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
11342 that most data is now in the .rss/.data section.
11344 2006-08-04 Zoltan Varga <vargaz@gmail.com>
11346 * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.
11348 * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
11350 * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
11352 * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
11354 * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
11355 virtual call. Fixes #79010.
11357 * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method
11358 and use the result as the this argument in the real call.
11360 * generics.2.cs: Add a new test for #79010.
11362 2006-08-03 Zoltan Varga <vargaz@gmail.com>
11364 * mini-x86.c: Fix a warning.
11366 * aot-compiler.c: Add a bunch of statistics.
11368 * mini.c (inline_method): Disable inlining in out-of-line bblocks.
11370 2006-08-02 Zoltan Varga <vargaz@gmail.com>
11372 * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
11374 2006-08-01 Zoltan Varga <vargaz@gmail.com>
11376 * 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>.
11378 2006-07-13 Miguel de Icaza <miguel@novell.com>
11380 * mini.c (mono_method_to_ir): Obtain the original method in the
11381 CIL stream and use this to perform validation.
11385 2006-07-19 Zoltan Varga <vargaz@gmail.com>
11387 * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
11388 (mono_arch_call_opcode): Ditto.
11390 * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
11393 * mini.c (mono_patch_info_dup_mp): New helper function.
11395 * aot-compiler.c (compile_method): Fix some of the memory allocated during
11396 compilation. Fixes #78827.
11398 2006-07-18 Kornél Pál <kornelpal@gmail.com>
11400 * declsec.c: Use original security informations for
11401 MONO_WRAPPER_MANAGED_TO_MANAGED.
11403 2006-07-15 Jonathan Chambers <joncham@gmail.com>
11405 * mini.c: Allow Com Interop methods/classes and
11406 don't verify COM wrapper calls
11409 2006-07-13 Zoltan Varga <vargaz@gmail.com>
11411 * inssel-long32.brg: Fix long->i4 checked conversion.
11413 * exceptions.cs: Add a test for the above.
11415 2006-07-08 Zoltan Varga <vargaz@gmail.com>
11417 * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
11419 * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown
11422 * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
11425 2006-07-03 Zoltan Varga <vargaz@gmail.com>
11427 * mini.c: Fix solaris/x86 exception handling.
11429 * Makefile.am: Get rid of $(ICU_LIBS).
11431 2006-07-02 Zoltan Varga <vargaz@gmail.com>
11433 * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
11434 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
11435 (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
11437 * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
11439 * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
11440 this function causes a SIGSEGV.
11442 2006-06-22 Zoltan Varga <vargaz@gmail.com>
11444 * mini.c: Remove unused solaris/x86 includes.
11446 2006-06-21 Zoltan Varga <vargaz@gmail.com>
11448 * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
11450 2006-06-20 Jb Evain <jbevain@gmail.com>
11452 * cpu-g4.md: fix max length of start_handler instruction.
11454 2006-06-20 Massimiliano Mantione <massi@ximian.com>
11455 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
11457 2006-06-16 Massimiliano Mantione <massi@ximian.com>
11458 * ssa.c: Fixed bug 78653 for SSA based deadce.
11459 * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
11460 MonoInst.flags, used in SSA based deadce.
11461 * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
11462 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
11464 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
11466 * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
11467 it can end up using non executable memory on ppc64 systems
11468 running ppc32 userspace (fix from Johannes Berg).
11470 2006-06-14 Dick Porter <dick@ximian.com>
11472 * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
11475 2006-06-13 Massimiliano Mantione <massi@ximian.com>
11476 * mini.c: Made so that inline is locally disabled if it would
11477 trigger a .cctor, because too many apps depend on this behavior
11478 (which seems to be also the one of the MS CLR).
11480 2006-06-13 Zoltan Varga <vargaz@gmail.com>
11482 * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
11483 No idea why this worked before.
11485 * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
11486 which branch to outer exception clauses since they could skip the
11487 inner finally clauses. Fixes #78633.
11489 * exceptions.cs: Add a test for the above.
11491 * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
11494 * iltests.il: Add a test for the above.
11496 2006-06-12 Zoltan Varga <vargaz@gmail.com>
11498 * mini.c (remove_block_if_useless): Do not remove the bblock immediately
11499 after the end of a try bblock, to prevent asserts in mini_method_compile ().
11501 * iltests.il: Add a test for the above.
11503 2006-06-10 Zoltan Varga <vargaz@gmail.com>
11505 * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
11507 * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
11508 methods as instrinsics.
11510 2006-06-09 Wade Berrier <wberrier@novell.com>
11512 * Makefile.am: Fix sources list for svn rename so that make dist succeeds
11513 (simple-cee-ops.h ssapre-mini-ops.h)
11515 2006-06-09 Neale Ferguson <neale@sinenomine.net>
11517 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
11518 * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
11520 * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
11521 * cpu-s390x.md: Fix max. length values for a couple of instructions.
11523 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
11525 * mini-exceptions.c: Minor fix for building mono in Visual Studio.
11527 2006-06-08 Massimiliano Mantione <massi@ximian.com>
11529 * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
11530 * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
11531 * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
11532 * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
11533 * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
11534 of opcodes, so that bug 78549 should not happen again.
11535 * ssapre.c: Updated to use the renamed files.
11537 2006-06-08 Zoltan Varga <vargaz@gmail.com>
11539 * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move
11540 in OP_ATOMIC_EXCHANGE_I4.
11542 2006-06-07 Wade Berrier <wberrier@novell.com>
11544 * tramp-s390.c: Fix s390 build (add missing pointer declarations
11545 in mono_debugger_create_notification_function)
11547 2006-06-06 Zoltan Varga <vargaz@gmail.com>
11549 * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
11551 * mini.c (type_from_stack_type): Disable some changes which do not
11554 * driver.c: Reenable opts.
11556 * mini.h (MonoStackSlot): New structure to keep track of the verification state
11557 of the evaluation stack.
11559 * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
11560 evaluation stack trace at entry to the bblock.
11562 * mini.c (merge_stacks): New function to perform verification of stack merges.
11563 Turned off by default.
11565 * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
11568 2006-06-06 Massimiliano Mantione <massi@ximian.com>
11570 * local-propagation.c: Fixed bug 78549.
11572 2006-06-04 Zoltan Varga <vargaz@gmail.com>
11574 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
11576 2006-06-02 Miguel de Icaza <miguel@novell.com>
11578 * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
11579 tramp-arm.c, tramp-ia64.c
11580 (mono_debugger_create_notification_function): Update signature to
11581 new signature and use new protocol for creating the notification
11584 Should fix the build.
11586 2006-06-02 Geoff Norton <gnorton@customerdna.com>
11588 * exceptions-ppc.c (mono_jit_walk_stack)
11589 (ves_icall_get_frame_info): Fix the build
11591 2006-06-02 Zoltan Varga <vargaz@gmail.com>
11593 * mini.c (mono_set_defaults): Fix the handling of -O=-all.
11595 2006-05-31 Raja R Harinath <rharinath@novell.com>
11597 * il2tests.2.il: New file for generics CIL tests. Add test for
11599 * Makefile.am: Update.
11602 * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
11605 2006-05-30 Massimiliano Mantione <massi@ximian.com>
11607 * aliasing.c: Fixed bug 78311.
11609 2006-05-29 Martin Baulig <martin@ximian.com>
11611 * mini-exceptions.c (mono_find_jit_info): When computing the
11612 native offset, check whether we're actually inside the method's
11613 code; call mono_debug_print_stack_frame() to format the frame.
11614 (ves_icall_System_Exception_get_trace): Call
11615 mono_debug_print_stack_frame() to format the stack frame.
11616 (ves_icall_get_trace): Update to the new debugging API.
11617 (mono_jit_walk_stack_from_ctx): Likewise.
11618 (ves_icall_get_frame_info): Likewise.
11620 * mini.c (get_method_from_ip): Use the new debugging API.
11621 (mono_print_method_from_ip): Likewise.
11624 (mono_jit_walk_stack): Use the new debugging API.
11625 (ves_icall_get_frame_info): Likewise.
11627 2006-05-27 Zoltan Varga <vargaz@gmail.com>
11629 * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
11631 2006-05-25 Massimiliano Mantione <massi@ximian.com>
11633 * mini.c: Added "limitator" to inline for debugging.
11635 2006-05-24 Martin Baulig <martin@ximian.com>
11637 * debug-debugger.c (mono_debugger_init): Create a private,
11638 malloc()-based code manager for the notification function and
11639 intentionally leak it on exit. This fixes the crash-on-exit race
11643 (mono_debugger_create_notification_function): Added
11644 `MonoCodeManager *' argument.
11647 (mono_debugger_create_notification_function): Added
11648 `MonoCodeManager *' argument.
11650 2006-05-23 Massimiliano Mantione <massi@ximian.com>
11652 * aliasing.c: Fixed 64 bit issue.
11653 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
11654 default since all known bugs are fixed (one more time!).
11656 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
11658 * mini.c: write barrier support.
11660 2006-05-23 Martin Baulig <martin@ximian.com>
11662 * debug-debugger.c: Revert Paolo's change. Add comment and #error
11663 check at the top of the file.
11665 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
11667 * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
11668 reverting changes without reason and without changelog entries.
11670 2006-05-18 Zoltan Varga <vargaz@gmail.com>
11672 * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
11673 to a few opcodes. Fixes #78439.
11675 * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
11676 consistency with other archs.
11678 * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
11680 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
11682 * debug-debugger.c: fix the build.
11684 2006-05-17 Martin Baulig <martin@ximian.com>
11687 (debugger_thread_vtable): Moved here from ../metadata/threads.c.
11688 (debugger_init_threads): Formerly known as mono_debugger_init_threads().
11689 (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
11690 (debugger_attach): Call GC_mono_debugger_add_all_threads().
11692 2006-05-11 Zoltan Varga <vargaz@gmail.com>
11694 * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
11696 2006-05-10 Zoltan Varga <vargaz@gmail.com>
11698 * mini-x86.c (mono_arch_instrument_epilog): Fix handling of
11699 MONO_TYPE_GENERICINST.
11701 * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of
11702 MONO_TYPE_GENERICINST.
11704 2006-05-09 Zoltan Varga <vargaz@gmail.com>
11706 * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
11709 2006-05-08 Zoltan Varga <vargaz@gmail.com>
11711 * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
11713 (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
11715 2006-05-06 Zoltan Varga <vargaz@gmail.com>
11717 * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
11718 mono_trace_cleanup ().
11720 * iltests.il: Fix problem with the newly added test.
11722 * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
11723 due to register constraints, free up the previous hreg. Fixes #78314.
11725 * iltests.il: Add new test for #78314.
11727 * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
11728 Interlocked.Add. Fixes #78312.
11730 * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
11732 2006-05-05 Zoltan Varga <vargaz@gmail.com>
11734 * inssel.brg (mini_emit_virtual_call): Fix a warning.
11736 2006-05-05 Martin Baulig <martin@ximian.com>
11738 * debug-mini.c (mono_debug_open_block): New method.
11741 (mono_arch_output_basic_block): Call mono_debug_open_block() at
11742 the beginning of each basic block.
11745 (mono_arch_output_basic_block): Call mono_debug_open_block() at
11746 the beginning of each basic block.
11748 2006-05-04 Massimiliano Mantione <massi@ximian.com>
11750 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
11751 default until I understand why they break the build on amd64.
11753 2006-05-04 Zoltan Varga <vargaz@gmail.com>
11755 * mini.c (mini_cleanup): Call mono_cleanup ().
11757 * mini.c (UNVERIFIED): New macro to make it easier to track down verification
11760 2006-05-04 Massimiliano Mantione <massi@ximian.com>
11762 * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
11763 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
11764 default since all known bugs are fixed, and I cannot reproduce bug
11765 77944... I'm asking Matt Hargett to test again after this commit.
11767 2006-04-28 Massimiliano Mantione <massi@ximian.com>
11769 * mini-codegen.c: Fixed typo that thrashed inline.
11771 2006-04-28 Zoltan Varga <vargaz@gmail.com>
11773 * dominators.c (compute_dominators): Avoid using a worklist since
11774 it is not correct in some cases. Instead, iterate over all bblocks as
11775 in the original paper. Fixes --compile-all -O=all System.Xml.dll.
11777 2006-04-28 Miguel de Icaza <miguel@novell.com>
11779 * mini.c (mono_jit_compile_method_inner): Use
11780 mono_prepare_exception_from_error that resets the value
11783 2006-04-27 Miguel de Icaza <miguel@novell.com>
11785 * mini.c: Move the mini_loader_error_to_exception to metadata.
11787 2006-04-27 Massimiliano Mantione <massi@ximian.com>
11789 * aliasing.c: Fixed bug 78210.
11791 2006-04-27 Massimiliano Mantione <massi@ximian.com>
11793 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
11794 default until all their problems (or the ones they trigger) are fixed.
11796 2006-04-26 Zoltan Varga <vargaz@gmail.com>
11798 * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
11800 * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
11801 as loaded only after resolving patches since that could invoke the same method.
11803 * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
11805 * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
11808 * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
11811 * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
11814 * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
11815 made from AOT code through the PLT table.
11817 * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
11818 holding the plt offset when a call is made to the aot plt trampoline.
11820 2006-04-25 Zoltan Varga <vargaz@gmail.com>
11822 * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the
11825 * Makefile.am (common_sources): Fix build breakage.
11827 * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
11828 calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
11829 intra-assembly calls if possible.
11831 * tramp-*.c: Add new functions for patching/nullifying PLT entries.
11833 * mini-trampolines.c: Handle PLT entries.
11835 * mini.c: Avoid creating a GOT var for calls.
11837 * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
11838 from mscorlib code.
11840 * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
11841 from mscorlib code.
11843 * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
11846 * mini.h: Bump AOT file format version.
11848 * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
11851 2006-04-25 Martin Baulig <martin@ximian.com>
11853 * driver.c: Disable copyprop, consprop and inline when running
11854 inside the debugger.
11856 2006-04-25 Martin Baulig <martin@ximian.com>
11858 * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
11859 with `get_current_thread' and added `detach'.
11860 (MonoDebuggerMetadataInfo): Added `thread_size',
11861 `thread_tid_offset', `thread_stack_ptr_offset' and
11862 `thread_end_stack_offset'.
11864 2006-04-25 Zoltan Varga <vargaz@gmail.com>
11866 * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and
11869 * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
11870 ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
11872 * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
11874 * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
11876 * aot.c: Add support for ADJUSTED_IID.
11878 2006-04-24 Zoltan Varga <vargaz@gmail.com>
11880 * aot.c (emit_method_order): Don't align method_order_end.
11882 * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
11883 the interface ID changes.
11885 2006-04-21 Dick Porter <dick@ximian.com>
11887 * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
11888 cleaning up a thread. Fixes the new part of bug 77470.
11890 2006-04-20 Geoff Norton <gnorton@customerdna.com>
11892 * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
11893 to managed wrapper.
11895 2006-04-19 Zoltan Varga <vargaz@gmail.com>
11897 * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
11899 * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
11900 SIGSEGV. Fixes #78072.
11902 * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
11903 unregister our SIGABRT handler.
11905 2006-04-19 Massimiliano Mantione <massi@ximian.com>
11907 * mini.c: Disabled inline where it can alter the call stack in a
11908 way visible from managed code.
11909 * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
11912 2006-04-16 Zoltan Varga <vargaz@gmail.com>
11914 * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
11915 on other platforms. Fixes #78089.
11917 2006-04-13 Martin Baulig <martin@ximian.com>
11919 * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
11920 determine whether we're inside the debugger.
11923 (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
11925 2006-04-12 Zoltan Varga <vargaz@gmail.com>
11927 * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
11928 handler clauses. Fixes #78024.
11930 * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
11931 in the CALL_MEMBASE opcodes. Fixes #78088.
11932 (mono_arch_get_vcall_slot_addr): Ditto.
11934 2006-04-10 Martin Baulig <martin@ximian.com>
11936 * debug-debugger.c: The thread handling code has now been moved
11937 into ../metadata/threads.c.
11939 2006-04-10 Zoltan Varga <vargaz@gmail.com>
11941 * driver.c (mono_main): Fix --with-gc=none build.
11943 * mini-codegen.c (mono_spillvar_offset): Improve alignment.
11944 (mono_spillvar_offset_float): Ditto.
11945 (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
11946 hreg, not when its !global, since on ia64, there is a third category: stacked
11949 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
11951 * mini.c: set MonoInst->klass for load field address and a few other
11954 2006-04-10 Zoltan Varga <vargaz@gmail.com>
11956 * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
11958 2006-04-07 Zoltan Varga <vargaz@gmail.com>
11960 * dominators.c (compute_dominators): Fix yet another bug which surfaced after
11961 the branch opt changes.
11963 2006-04-06 Dick Porter <dick@ximian.com>
11965 * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
11967 * wapihandles.c (mini_wapi_seminfo):
11968 * driver.c (mono_main): Add semaphore info option
11970 2006-04-05 Zoltan Varga <vargaz@gmail.com>
11972 * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
11973 branch optimization changes. Fixes #78009.
11975 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
11977 * mini.c: ignore accessibility of methods in managed->native wrappers.
11979 2006-04-04 Zoltan Varga <vargaz@gmail.com>
11981 * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
11983 * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
11985 2006-04-03 Zoltan Varga <vargaz@gmail.com>
11987 * mini.c: Modify the branch optimizations to preserve the invariant that
11988 the entries inside the in_bb and out_bb arrays are unique.
11989 (mono_unlink_bblock): Avoid creation of new arrays.
11991 2006-04-02 Zoltan Varga <vargaz@gmail.com>
11993 * mini.c (mono_unlink_bblock): Fix regression caused by previous
11996 2006-04-01 Zoltan Varga <vargaz@gmail.com>
11998 * mini.c (optimize_branches): Remove the "optimizations" in
11999 the cbranch1/cbranch2 -> branch cases which were causing several
12000 problems in the past. Fixes #77986.
12002 2006-03-31 Chris Toshok <toshok@ximian.com>
12004 * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
12005 default optimizations :(
12007 2006-03-31 Zoltan Varga <vargaz@gmail.com>
12009 * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
12012 2006-03-31 Massimiliano Mantione <massi@ximian.com>
12014 * local-propagation.c: Added comments to structs and removed
12015 "Mono" prefixes from local tree mover types.
12017 2006-03-30 Zoltan Varga <vargaz@gmail.com>
12019 * Makefile.am (arch_sources): Define this for each architecture so
12020 libmono_la_SOURCES is defined in one place.
12022 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
12024 * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
12027 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
12029 * driver.c: print the GC name supplied by configure.
12031 2006-03-29 Massimiliano Mantione <massi@ximian.com>
12033 * local-propagation.c: Added tree mover, and moved here all the
12034 local propagation code from mini.c
12035 * mini.c: Added support for treeprop, and moved all the local
12036 propagation code to local-propagation.c
12037 * mini.h: Added support for treeprop
12038 * driver.c: Added support for treeprop, enabled consprop, copyprop,
12039 treeprop, inline and deadce by default
12040 * Makefile.am: Added local-propagation.c
12042 2006-03-25 Zoltan Varga <vargaz@gmail.com>
12044 * exceptions-sparc.c: Applied patch from David S. Miller <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
12046 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
12048 * debug-debugger.c: make it compile without the Boehm GC.
12050 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
12052 * mini.c: fixed issue with mismatch when an icall is registered
12053 with multiple names but same address.
12055 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
12057 * declsec.c, mini-exceptions.c: use write barrier to set reference
12058 fields of managed objects.
12060 2006-03-19 Zoltan Varga <vargaz@gmail.com>
12062 * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
12063 (can_access_internals): Fix a warning.
12065 * mini.c (print_method_from_ip): Rename this to
12066 mono_print_method_from_ip so it gets exported.
12068 * trace.c: Deal with strings inside StringBuilder's containing garbage
12069 and fix memory leaks. Fixes #77848.
12071 2006-03-19 Zoltan Varga <vargaz@gmail.com>
12073 * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
12076 2006-03-16 Neale Ferguson <neale@sinenomine.net>
12078 * mini-s390.c: Remove OP_X86_TEST_NULL.
12080 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
12082 * mini.c: use the correct GetHashCode() for the moving collector.
12084 2006-03-16 Massimiliano Mantione <massi@ximian.com>
12086 * liveness.c: Regalloc spill cost tuning.
12088 2006-03-15 Neale Ferguson <neale@sinenomine.net>
12090 * mini-s390x.h: Correct S390_LONG macro.
12092 * mini-s390x.c: Cleanup unused code.
12094 2006-03-15 Zoltan Varga <vargaz@gmail.com>
12096 * jit-icalls.h: New file.
12098 * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
12099 icalls and include that instead of including jit-icalls.c.
12101 * mini-ppc.c (mono_arch_output_basic_block): Remove references to
12104 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
12106 * mini.c: when checking for member accessibility, also check for
12107 friend assemblies and for explicit interface implementations.
12109 2006-03-14 Zoltan Varga <vargaz@gmail.com>
12111 * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
12113 * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
12115 * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
12116 common cases are done first.
12118 * mini-ops.h: Only define platform specific opcodes on the given platform.
12120 * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
12123 2006-03-14 Martin Baulig <martin@ximian.com>
12125 Revert Paolo's change from r57348:
12127 * mini.h: don't use gboolean for bitfields.
12128 * mini.c: verifier changes for fields and methods accessibility.
12130 2006-03-13 Neale Ferguson <neale@sinenomine.net>
12132 * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
12134 * mini-s390x.c: Fix conv_r_un.
12136 * cpu-s390, cpu-s390x.md: Fix lengths.
12138 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
12140 * mini.c: nested types have access to all the nesting
12141 levels, not just the enclosing types.
12143 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
12145 * mini.c: added a few more verification checks.
12147 2006-03-12 Zoltan Varga <vargaz@gmail.com>
12149 * liveness.c: Merge optimizations from the linear-il branch.
12151 2006-03-11 Zoltan Varga <vargaz@gmail.com>
12153 * mini-ia64.c (emit_call): Add a comment.
12155 * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
12157 * tramp-ia64.c: Fix some warnings.
12159 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
12161 * mini.h: don't use gboolean for bitfields.
12162 * mini.c: verifier changes for fields and methods accessibility.
12164 2006-03-11 Zoltan Varga <vargaz@gmail.com>
12166 * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
12167 lazy icall wrapper changes.
12169 * dominators.c: Replace all the dominator algorithms with faster
12170 ones from the linear-il branch.
12172 * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
12175 * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
12176 common cases are done first.
12178 * mini-amd64.c: Fix some warnings.
12180 * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
12183 * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
12186 * mini.h: Add a missing prototype.
12188 2006-03-10 Zoltan Varga <vargaz@gmail.com>
12190 * mini.c: Compile icall wrappers lazily.
12192 * mini-codegen.c: Use printf instead of g_print since its much faster.
12194 * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
12197 * mini.c (optimize_branches): Cache the negative result from
12198 remove_block_if_useless ().
12200 * mini.c (optimize_branches): Avoid restarting the iteration after each change.
12201 Also fix some bblock linking issues.
12203 * helpers.c (mono_disassemble_code): Reduce the size of the temporary
12206 * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
12208 * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
12209 accessed fields first, for better cache behavior.
12211 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
12213 * mini.c: speedup IList<T> array accesses.
12215 2006-03-09 Zoltan Varga <vargaz@gmail.com>
12217 * mini.c (mono_method_to_ir): Handle large methods overflowing the
12218 inline_costs counter. Fixes #77190.
12220 2006-03-06 Zoltan Varga <vargaz@gmail.com>
12222 * mini-exceptions.c: Call mono_trace_is_enabled () before printing
12223 trace messages. Fixes #77706.
12225 2006-03-04 Martin Baulig <martin@ximian.com>
12227 * tramp-amd64.c, tramp-x86.c
12228 (mono_debugger_create_notification_function): Use
12229 mono_global_codeman_reserve() to allocate a buffer at runtime and
12232 * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
12234 * debug-debugger.c (mono_debugger_init): Dynamically allocate the
12235 notification function at runtime and then call `initialize' in the
12236 `MONO_DEBUGGER__debugger_info' vtable.
12238 2006-03-04 Zoltan Varga <vargaz@gmail.com>
12240 * iltests.il: Fix a visibility problem.
12242 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
12244 * driver.c, mini.c: add hooks for the counters API.
12246 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
12248 * driver.c: show disabled options.
12250 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
12252 * linear-scan.c: always use cost-driven selection.
12254 2006-02-28 Raja R Harinath <rharinath@novell.com>
12256 * jit-icalls.c (helper_compile_generic_method): Revert change from
12259 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
12261 * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
12263 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
12265 * inssel.brg: style fixes, mostly to force the updated monoburg
12266 to run for people using svn.
12268 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
12270 * mini.c: match monoburg changes.
12272 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
12274 * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
12275 ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
12276 declaration in the header file.
12278 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
12280 * helpers.c: reduce relocations and mem usage.
12282 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
12284 * mini.h, mini-codegen.c: disable logging features if
12285 requested by configure.
12287 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
12289 * mini.c: tiny verifier changes.
12291 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
12293 * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
12294 cpu-pentium.md: stack alignment changes for osx/x86,
12295 partially from Geoff Norton <gnorton@customerdna.com>.
12297 2006-02-24 Raja R Harinath <harinath@gmail.com>
12299 * jit-icalls.c (helper_compile_generic_method): Update to changes
12300 in metadata/class.c.
12302 2006-02-24 Zoltan Varga <vargaz@gmail.com>
12304 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
12306 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
12307 interface calls with large offsets.
12309 2006-02-23 Raja R Harinath <rharinath@novell.com>
12311 * jit-icalls.c (helper_compile_generic_method): Document the
12312 special-case we depend on so that we can inflate the method twice
12313 with the same context with no bad side-effects.
12315 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
12317 * mini-x86.c, mini-amd64.c: fix for case when xen support
12320 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
12322 * mini-x86.c, mini-amd64.c: generate code to access tls items
12323 in a faster way for Xen systems.
12325 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
12327 * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
12328 updates and compilation fixes for the OSX/x86 port, mostly from
12329 Geoff Norton <gnorton@customerdna.com>.
12331 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
12333 * inssel.brg: faster interface call implementation
12334 to sync with the interface_offsets MonoVTable changes.
12336 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
12338 * mini.c: more verification checks.
12340 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
12342 * mini.c: added a few more verification checks.
12344 2006-02-17 Neale Ferguson <neale@sinenomine.net>
12346 * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
12347 facility on the processor and use it if available.
12349 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
12351 * driver.c, aot.c, mini.c: throw exception if the IL code is
12352 invalid or unverifiable.
12354 2006-02-17 Raja R Harinath <rharinath@novell.com>
12356 * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
12359 2006-02-16 Zoltan Varga <vargaz@gmail.com>
12361 * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
12363 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12365 * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
12366 mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
12367 handling of instantiated generic valuetypes.
12369 2006-02-11 Zoltan Varga <vargaz@gmail.com>
12371 * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of
12372 MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
12375 * generics.2.cs: Revert the nullable reftypes tests.
12377 2006-02-10 Zoltan Varga <vargaz@gmail.com>
12379 * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
12380 using __builtin_frame_address (1) as it doesn't work in the presence
12381 of optimizations. Hopefully fixes #77273.
12383 * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
12384 -> generics.cs change as it doesn't work with some automake versions.
12386 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
12388 * mini.c: handle systems that sue a different way to
12389 retrieve the stack address of the current thread.
12391 2006-02-09 Zoltan Varga <vargaz@gmail.com>
12393 * Makefile.am generics.2.cs: Rename this to generics.cs and handle
12394 it specially in the makefile.
12396 * generics.2.cs: Add tests for nullable reference types.
12398 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12400 * mini.c: always handle the case when mono_jit_init()
12401 is called in a thread different from the main thread,
12402 confusing libgc (bug #77309).
12404 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
12406 * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
12408 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
12410 * mini.c: change optimize_branches () to use a single loop
12411 and introduce a new optimization to simplify some range checks.
12413 2006-02-03 Martin Baulig <martin@ximian.com>
12415 * debug-debugger.c (debugger_thread_manager_thread_created): Removed
12416 and merged with debugger_thread_manager_add_thread().
12417 (mono_debugger_main): Call debugger_thread_manager_add_thread() to
12418 inform the debugger about the main thread.
12420 2006-02-03 Zoltan Varga <vargaz@gmail.com>
12422 * basic.cs: Add test for div.un/rem.un constant folding.
12424 2006-02-03 Neale Ferguson <neale@sinenomine.net>
12426 * cpu-s390x.md: correct int_xor_imm length
12428 2006-02-03 Zoltan Varga <vargaz@gmail.com>
12430 * generics.2.cs: New test for #77442.
12432 * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
12435 2006-02-02 Martin Baulig <martin@ximian.com>
12437 * tramp-x86.c, tramp-amd64.c: It's now safe to #include
12438 <mono/metadata/mono-debug-debugger.h>
12440 * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
12442 2006-02-02 Martin Baulig <martin@ximian.com>
12444 * debug-debugger.h: New header file for debug-debugger.c.
12446 * debug-debugger.c: Big API cleanup; don't run the managed Main()
12447 function is a separate thread anymore; add support for attaching.
12449 2006-02-01 Zoltan Varga <vargaz@gmail.com>
12451 * tramp-x86.c: Fix a warning.
12453 2006-01-31 Zoltan Varga <vargaz@gmail.com>
12455 * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
12456 on very large methods.
12458 * aot.c (load_patch_info): Fix a warning.
12460 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
12462 * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
12463 mini-ops.h: alu membase optimizations.
12465 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
12467 * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
12468 to speedup StringBuilder.
12470 2006-01-27 Zoltan Varga <vargaz@gmail.com>
12472 * dominators.c (mono_compute_natural_loops): Fix detection of
12473 loop body start blocks.
12475 * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
12477 2006-01-26 Zoltan Varga <vargaz@gmail.com>
12479 * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
12482 2006-01-25 Massimiliano Mantione <massi@ximian.com>
12484 * aliasing.c: Fixed aliasing issue on 64 bit archs.
12486 2006-01-25 Martin Baulig <martin@ximian.com>
12488 * debug-debugger.c: Moved the `MonoDebuggerManager' and
12489 `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
12490 started to cleanup this file a little bit.
12492 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
12494 * mini.c: optimize a codepath frequently happening in generics code.
12496 2006-01-23 Martin Baulig <martin@ximian.com>
12498 * Makefile.am: Only compile debug-debugger.c on supported platforms.
12500 * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
12501 functions directly.
12503 * driver.c: debug-debugger.c is only available if
12504 `MONO_DEBUGGER_SUPPORTED' is defined.
12506 2006-01-23 Martin Baulig <martin@ximian.com>
12508 * debug-debugger.c: Only enable this on platforms where the Mono
12509 Debugger is working (x86 and x86_64).
12511 2006-01-21 Martin Baulig <martin@ximian.com>
12513 The Mono Debugger is now using the normal `mono' instead of the
12514 `mono-debugger-mini-wrapper' when executing managed code.
12516 * debug-debugger.c: New file; previously known as
12517 debugger/wrapper/wrapper.c.
12519 * debug-mini.c (mono_init_debugger): Removed.
12521 * driver.c (mono_main): Added new `--inside-mdb' command line
12522 argument which is used when running inside the debugger.
12524 2006-01-20 Zoltan Varga <vargaz@gmail.com>
12526 * liveness.c (mono_analyze_liveness): Remove some unused data
12529 2006-01-17 Zoltan Varga <vargaz@gmail.com>
12531 * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
12533 2006-01-16 Zoltan Varga <vargaz@gmail.com>
12535 * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
12536 depends on implementation details of monobitset.
12538 * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
12541 2006-01-15 Zoltan Varga <vargaz@gmail.com>
12543 * liveness.c: Update after monobitset changes.
12545 2006-01-14 Zoltan Varga <vargaz@gmail.com>
12547 * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
12549 2006-01-11 Neale Ferguson <neale@sinenomine.net>
12551 * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
12553 * mini-s390x.c: Remove warning messages.
12555 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
12557 * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
12559 2006-01-10 Zoltan Varga <vargaz@gmail.com>
12561 * generics.2.cs: Add ldelem/stelem_any test.
12563 2006-01-10 Neale Ferguson <neale@sinenomine.net>
12565 * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
12567 2006-01-07 Zoltan Varga <vargaz@gmail.com>
12569 * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
12571 2006-01-06 Zoltan Varga <vargaz@gmail.com>
12573 * generics.2.cs: Reenable vtype tests.
12575 * inssel-x86.brg: Remove an icorrect valuetype rule.
12577 2006-01-06 Neale Ferguson <neale@sinenomine.net>
12579 * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
12580 initial support for OP_ABS.
12582 2006-01-05 Neale Ferguson <neale@sinenomine.net>
12584 * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
12586 2006-01-05 Neale Ferguson <neale@sinenomine.net>
12588 * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int
12589 conversion and implement LADD/LSUB.
12591 * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
12594 2006-01-05 Neale Ferguson <neale@sinenomine.net>
12596 * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
12598 * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
12601 2006-01-05 Neale Ferguson <neale@sinenomine.net>
12603 * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when
12604 localloc is encountered. Fixes crash in test-183.cs when using gmcs
12605 (stack walk problem).
12607 2006-01-04 Zoltan Varga <vargaz@gmail.com>
12609 * aot.c (mono_aot_load_method): Fix a warning.
12611 2006-01-03 Neale Ferguson <neale@sinenomine.net>
12613 * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
12615 2006-01-03 Zoltan Varga <vargaz@gmail.com>
12617 * iltests.il: Add test for #77148.
12619 * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
12622 2006-01-03 Neale Ferguson <neale@sinenomine.net>
12624 * mini-s390x.c, inssel-s390x.brg: Remove debug statements
12626 2006-01-03 Neale Ferguson <neale@sinenomine.net>
12628 * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
12629 cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
12631 * basic-long.cs: Add lconv-to-r4/r8 tests.
12633 2006-01-03 Zoltan Varga <vargaz@gmail.com>
12635 * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
12637 * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
12638 here as on other archs.
12640 2005-12-29 Neale Ferguson <neale@sinenomine.net>
12642 * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
12644 2005-12-29 Neale Ferguson <neale@sinenomine.net>
12646 * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
12648 * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
12650 * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
12651 instrument_prolog; Add memory_barrier instruction.
12653 2005-12-26 Zoltan Varga <vargaz@gmail.com>
12655 * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
12657 2005-12-23 Zoltan Varga <vargaz@gmail.com>
12659 * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
12661 * aliasing.c inssel.brg: Fix warnings.
12663 * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
12664 could skip initialization of some parts of memory.
12666 * mini.c mini-ia64.c: Fix warnings.
12668 * inssel-sparc.brg: Add an implementation of lneg which actually works.
12670 2005-12-22 Zoltan Varga <vargaz@gmail.com>
12672 * aliasing.c (mono_build_aliasing_information): Add a workaround for
12673 a crash seen on sparc.
12675 * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
12677 * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
12679 2005-12-21 Neale Ferguson <neale@sinenomine.net>
12681 * mini-ops.h: Add s390_backchain instruction
12683 * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
12685 * cpu-s390.md: Add s390_backchain instruction
12687 * mini-s390.c: Significant ABI changes
12689 * mini-s390.h: Cater for zero length structures
12691 2005-12-20 Neale Ferguson <neale@sinenomine.net>
12693 * mini-s390.c: ABI fixes
12695 * inssel-s390.brg: Remove debug statements
12697 * cpu-s390.md: Fix length of ATOMIC_xx operations
12699 2005-12-19 Zoltan Varga <vargaz@gmail.com>
12701 * basic-float.cs: Add float<->long conversion tests.
12703 2005-12-16 Neale Ferguson <neale@sinenomine.net>
12705 * mini-s390.c: Fix LOCALLOC processing.
12707 * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
12709 2005-12-15 Zoltan Varga <vargaz@gmail.com>
12711 * iltests.il: Add tests for some opcodes not covered by the other
12714 2005-12-15 Neale Ferguson <neale@sinenomine.net>
12716 * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct
12717 register loading for Tail processing; Correct trace output.
12719 * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
12721 * cpu-s390.md: Correct size of jmp instruction.
12723 2005-12-13 Neale Ferguson <neale@sinenomine.net>
12725 * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
12727 2005-12-13 Neale Ferguson <neale@sinenomine.net>
12729 * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
12730 Bring s390 up to current level.
12732 2005-12-12 Zltan Varga <vargaz@gmail.com>
12734 * generics.2.cs: Disable the newly added tests as they do not work yet.
12736 * generics.2.cs: Add valuetype tests.
12738 2005-12-09 Zoltan Varga <vargaz@gmail.com>
12740 * basic-long.cs: Add i4->u8 test.
12742 * objects.cs: Add tests for JIT intrinsic.
12744 * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
12745 optimizations lost by a mistake.
12747 2005-12-07 Zoltan Varga <vargaz@gmail.com>
12749 * basic-long.cs: Remove a test moved to objects.cs.
12751 * arrays.cs: Add more array tests.
12753 2005-12-06 Zoltan Varga <vargaz@gmail.com>
12755 * arrays.cs: Add new tests for multi-dimensional arrays.
12757 2005-12-06 Raja R Harinath <rharinath@novell.com>
12759 * Makefile.am (test_sources2): Add generics.2.cs.
12760 (EXTRA_DIST): Add test_sources2.
12762 2005-12-05 Ben Maurer <bmaurer@ximian.com>
12764 Support for boxing and unboxing nullable types as well as the
12765 isinst operation on nullables, per the CLI ammendment.
12767 * inssel.brg (CEE_ISINST): Special case for nullable
12769 * mini.c (handle_unbox_nullable): new method
12770 (handle_box): Special case for nullable types
12771 (mono_method_to_ir): Call handle_unbox_nullable in correct
12774 * generics.2.cs: New test suite
12776 * Makefile.am: Support for regression tests with generics.
12778 2005-12-03 Zoltan Varga <vargaz@gmail.com>
12780 * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
12781 allocated to registers. Fixes #76800.
12783 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
12785 * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
12787 2005-11-30 Zoltan Varga <vargaz@gmail.com>
12789 * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot
12792 2005-11-29 Zoltan Varga <vargaz@gmail.com>
12794 * objects.cs basic-calls.cs: Move a test depending on valuetypes to
12797 * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
12799 * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
12800 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
12802 * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
12803 single precision before storing to a single precision location.
12805 2005-11-28 Raja R Harinath <rharinath@novell.com>
12807 * Makefile.am (ILASM): Use profile-dependent location of ilasm.
12809 2005-11-27 Zoltan Varga <vargaz@gmail.com>
12811 * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
12814 * basic.cs: Remove test_0_byte_compares test which was moved to
12815 objects.cs a long time ago.
12817 2005-11-22 Massimiliano Mantione <massi@ximian.com>
12819 * aliasing.c: Fixed aliasing issue on 64 bit archs.
12821 2005-11-20 Zoltan Varga <vargaz@gmail.com>
12823 * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
12824 handlers are called.
12826 * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
12829 * mini-ia64.c: Add support for the throw->branch exception
12832 * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
12834 2005-11-18 Massimiliano Mantione <massi@ximian.com>
12836 * mini.c: Enabled "fastpath" deadce :-)
12838 2005-11-18 Massimiliano Mantione <massi@ximian.com>
12840 * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
12841 alias analysis pass to support it.
12842 * mini.h: Likewise.
12844 * liveness.c: Likewise (liveness computation can use aliasing
12845 information to be more accurate).
12846 * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
12847 moreover made so that "--compile-all" uses the given optimization
12848 flags and not the default ones.
12849 * aliasing.c: Alias analysis (new file).
12850 * aliasing.h: Likewise.
12851 * Makefile.am: added "aliasing.c" and "aliasing.h".
12853 2005-11-17 Zoltan Varga <vargaz@gmail.com>
12855 * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
12858 2005-11-13 Zoltan Varga <vargaz@gmail.com>
12860 * mini-exceptions.c (mono_handle_exception_internal): Remove the
12861 fp >= end_of_stack exit condition, as it is not needed, and it might
12862 become true for fp eliminated frames.
12864 2005-11-11 Zoltan Varga <vargaz@gmail.com>
12866 * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
12869 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
12871 * mini-arm.c: fixed alignment of doubles/longs to match
12872 the C ABI (bug #76635).
12874 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
12876 * aot.c: fix compilation with --enable-minimal=aot.
12878 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
12880 * mini-arm.c: fixed compatibility with the new
12881 floating point emulator package for compares.
12883 2005-11-03 Atsushi Enomoto <atsushi@ximian.com?
12885 * mini.c : reverted sig->pinvoke changes (r51396-51397).
12887 2005-11-01 Zoltan Varga <vargaz@freemail.hu>
12889 * mini-exceptions.c (print_stack_frame): Output to stderr.
12890 (mono_handle_native_sigsegv): Ditto.
12892 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
12894 * mini-amd64.c (mono_arch_output_basic_block): Remove unused
12895 OP_LCONV_TO_OVF_I implementation.
12897 * mini-amd64.c: Add support for the throw->branch exception
12900 * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
12901 when the catch clause catches a more general exception, i.e. Object.
12903 2005-10-30 Zoltan Varga <vargaz@gmail.com>
12905 * cpu-ia64.md: Remove unused opcodes.
12907 * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
12908 specific defines for architectures defining USE_SIGACTION.
12910 * mini-ia64.c: Fix some warnings.
12912 * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
12913 version seemed to skip a frame.
12915 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
12917 * mini.c: Clean up the usage of sig->pinvoke flag. Now
12918 only calls which are made to native code use this flag.
12920 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
12922 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
12923 varargs methods as well.
12925 * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
12926 which have save_lmf set. Reorganize methods prologs a bit.
12928 * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
12929 debugger to the proper place.
12931 2005-10-29 Martin Baulig <martin@ximian.com>
12933 * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
12934 when running inside the debugger until the debugger has support
12937 2005-10-26 Zoltan Varga <vargaz@gmail.com>
12939 * mini.h: Fix a warning.
12941 2005-10-24 Miguel de Icaza <miguel@novell.com>
12943 * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
12944 we expose publicly, this returns the string.
12946 2005-10-22 Zoltan Varga <vargaz@freemail.hu>
12948 * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
12949 with fp elimination.
12951 2005-10-21 Zoltan Varga <vargaz@gmail.com>
12953 * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
12954 native stacktrace using the glibc 'backtrace' function if available.
12956 2005-10-20 Zoltan Varga <vargaz@gmail.com>
12958 * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
12960 * mini-exceptions.c (mono_handle_native_sigsegv): New function to
12961 handle SIGSEGVs received while in native code.
12963 * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
12964 code, call mono_handle_native_sigsegv which will abort the runtime
12965 after printing some diagnostics, instead of converting it into a
12966 confusing NullReferenceException.
12968 2005-10-18 Zoltan Varga <vargaz@gmail.com>
12970 * cpu-pentium.md: Remove unused opcodes.
12972 2005-10-18 Zoltan Varga <vargaz@freemail.hu>
12974 * mini-amd64.h (MonoLMF): Add rsp field.
12976 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
12979 2005-10-17 Zoltan Varga <vargaz@gmail.com>
12981 * mini-codegen.c (get_register_spilling): Fix some warnings.
12983 2005-10-16 Zoltan Varga <vargaz@freemail.hu>
12985 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
12986 elimination during exception handling. Enable fp elimination by
12989 * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
12992 2005-10-16 Martin Baulig <martin@ximian.com>
12994 * mini-exceptions.c
12995 (mono_debugger_run_finally): New public method for the debugger.
12997 2005-10-10 Zoltan Varga <vargaz@gmail.com>
12999 * debug-mini.c (mono_debug_init_method): Fix warning.
13001 * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
13002 the 'exname' parameter const to fix some warnings.
13004 2005-10-09 Zoltan Varga <vargaz@freemail.hu>
13006 * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
13007 introduced by the previous patch.
13009 2005-10-08 Zoltan Varga <vargaz@gmail.com>
13011 * basic-float.cs: Add test for precision of float arithmetic.
13013 * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
13014 when loading/storing single values from/to memory.
13016 * mini.c (mono_jit_compile_method_with_opt): Create the function
13017 pointers in the correct domain.
13019 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
13021 * mini-exceptions.c (mono_handle_exception_internal): Fix bug
13022 introduced by previous patch.
13024 * mini-exceptions.c (mono_handle_exception_internal): Handle the case
13025 when out_filter_idx is NULL.
13027 * mini-exceptions.c: Don't run filter clauses twice during exception
13028 handling. Fixes #75755.
13030 2005-10-07 Zoltan Varga <vargaz@gmail.com>
13032 * aot.c: Add support for ldflda wrappers.
13034 * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
13037 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
13039 * mini.c, mini.h: do not consider exception handlers blocks when
13040 setting up interface variables.
13042 2005-10-04 Zoltan Varga <vargaz@freemail.hu>
13044 * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
13046 2005-10-03 Zoltan Varga <vargaz@gmail.com>
13048 * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
13049 causes a regression.
13051 * mini.c (mini_thread_cleanup): Fix reading of freed memory.
13053 2005-10-02 Zoltan Varga <vargaz@freemail.hu>
13055 * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
13056 of the OP_P definitions.
13058 * TODO: Add a proposal for dealing with the CEE/OP mess.
13060 * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm
13061 optimizations from the x86 port.
13063 * cpu-amd64.md: Ditto.
13065 * basic.cs basic-long.cs: Add tests.
13067 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
13069 * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
13070 Patrik Torstensson's implementation of my exception-handling
13071 optimization idea, when the exception object is not used
13074 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
13076 * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
13077 of the mul_imm optimizations from the old jit.
13079 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
13081 * mini.c, liveness.c: patch by Patrik Torstensson and
13082 Zoltan Varga to improve performance in methods with
13085 2005-09-30 Zoltan Varga <vargaz@gmail.com>
13087 * driver.c: Remove 'Globalization' entry from --version.
13089 2005-09-28 Zoltan Varga <vargaz@gmail.com>
13091 * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
13092 there is a profiler interested in JIT events.
13094 * aot.c: Load profile files produced by the AOT profiling module, and
13095 reorder methods based on the profiling info. Add a 'method_order' table
13096 to the AOT file to make mono_aot_find_jit_info work with the reordered
13099 * mini.h: Bump AOT file version info.
13101 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
13103 * mini-arm.h: work around what looks like a gcc bug when optimizations
13106 2005-09-28 Raja R Harinath <rharinath@novell.com>
13108 * Makefile.am (AM_CFLAGS): Don't use += to append inside
13109 conditionals. Use ...
13110 (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
13112 2005-09-27 Zoltan Varga <vargaz@freemail.hu>
13114 * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
13115 to determine the amount of memory to copy when passing valuetypes.
13117 * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
13118 4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
13120 2005-09-27 Zoltan Varga <vargaz@gmail.com>
13122 * mini.h mini.c aot.c: Add infrastructure to collect pagefault
13123 information about aot.
13125 2005-09-27 Ben Maurer <bmaurer@ximian.com>
13127 * *.c: Replace the use of {Enter,Leave}CriticalSection with
13128 macros. This will allow a deadlock debugger to easily be plugged
13131 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
13133 * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
13135 2005-09-27 Raja R Harinath <rharinath@novell.com>
13137 * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
13138 (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
13139 (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
13140 ($(arch_built)) [CROSS_COMPILING]: Error out.
13142 2005-09-26 Zoltan Varga <vargaz@gmail.com>
13144 * aot.c: Add support for the no_special_static flag for classes.
13146 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
13148 * Reapply reverted patches.
13150 * *: Revert r50174 as well.
13152 * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
13154 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
13156 * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
13158 2005-09-23 Miguel de Icaza <miguel@novell.com>
13160 * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
13161 part of the SIG_HANDLER_SIGNATURE.
13163 2005-09-23 Zoltan Varga <vargaz@gmail.com>
13165 * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
13168 * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention
13169 introduced by previous patch.
13171 2005-09-21 Zoltan Varga <vargaz@gmail.com>
13173 * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
13174 saved registers too.
13176 * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based
13177 upon the information returned by get_call_info ().
13179 * mini-x86.c (add_float): Fix stack size calculation.
13180 (mono_arch_call_opcode): Rewrite this so it works based up the
13181 information returned by get_call_info ().
13182 (mono_arch_get_this_vret_args): Ditto.
13184 2005-09-21 Zoltan Varga <vargaz@freemail.hu>
13186 * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
13187 in cinfo to determine the registers which need to be used.
13189 2005-09-20 Miguel de Icaza <miguel@novell.com>
13191 * driver.c (mono_main): Add --server and --desktop flags.
13193 2005-09-16 Zoltan Varga <vargaz@gmail.com>
13195 * mini-ia64.h: Make register masks 64 bit. Don't treat argument
13196 registers as global registers.
13198 * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no
13199 longer needed with the new register allocator.
13201 * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
13203 * cpu-ia64.md: Remove unused opcodes.
13205 * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
13207 2005-09-16 Zoltan Varga <vargaz@freemail.hu>
13209 * cpu-amd64.md: Remove unused opcodes.
13211 * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
13212 needed with the new register allocator.
13214 * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
13217 2005-09-16 Raja R Harinath <rharinath@novell.com>
13219 * Makefile.am (check-local): Don't invoke semdel-wrapper.
13221 2005-09-16 Martin Baulig <martin@ximian.com>
13223 * exceptions-amd64.c
13224 (throw_exception): Don't call mono_debugger_throw_exception() if
13225 we're a rethrow - see the FIXME in the code.
13227 2005-09-15 Geoff Norton <gnorton@customerdna.com>
13229 * mini.c (mono_init_exceptions): This only works on some architectures.
13231 2005-09-15 Zoltan Varga <vargaz@gmail.com>
13233 * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
13236 * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
13238 * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
13239 now in mini-exceptions.c.
13241 2005-09-15 Zoltan Varga <vargaz@freemail.hu>
13243 * mini-amd64.h mini-am64.c: Remove the altstack support code which is
13244 now in mini-exceptions.c.
13246 2005-09-15 Zoltan Varga <vargaz@gmail.com>
13248 * exceptions-x86.c: Applied patch from Patrik Torstensson
13249 <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
13251 * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
13252 code into mini-exceptions.c. Add some assertions to it.
13254 2005-09-12 Zoltan Varga <vargaz@gmail.com>
13256 * aot.c (emit_section_change): Applied patch from "The Software Team"
13257 (<software@solmersa.com>). Fix as errors on windows.
13259 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
13261 * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
13262 method info into the LMF.
13264 2005-09-11 Zoltan Varga <vargaz@gmail.com>
13266 * mini-ia64.c: Add proper unwind info for method epilogs.
13268 * exceptions-ia64.c: Add some code to help debugging.
13270 * mini-ia64.c mini-ia64.h: Add sigaltstack support.
13272 * mini-exceptions.c: Fix warning.
13274 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
13276 * mini.c: Really fix build.
13278 * mini-x86.c mini-amd64.c: Fix build.
13280 2005-09-11 Zoltan Varga <vargaz@gmail.com>
13282 * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
13284 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
13285 some Interlocked methods as intrinsics.
13287 * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
13288 for Thread methods as well.
13290 * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
13292 * inssel.brg: Add rule for OP_MEMORY_BARRIER.
13294 * mini-ia64.c mini-x86.c mini-amd64.c
13295 cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of
13298 * mini.c (mono_init_exceptions): Fix build breakage.
13300 2005-09-10 Zoltan Varga <vargaz@gmail.com>
13302 * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
13303 of instructions. Use the new ia64_unw_op macros for emitting unwind
13306 * mini.c (mono_init_exceptions): Initialize exception handling
13307 related trampolines at startup.
13309 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
13311 * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
13313 2005-09-09 Zoltan Varga <vargaz@gmail.com>
13315 * mini.c: Handle type loading errors gracefully during compilation and
13316 throw the appropriate exception.
13318 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
13320 * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
13321 for the mono binary.
13323 2005-09-09 Martin Baulig <martin@ximian.com>
13325 * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
13328 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
13330 * mini-arm.h: use emulation for conv.r.un for the release.
13332 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
13334 * mini-arm.c, objects.cs: more fixes and tests for them.
13336 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
13338 * mini-arm.c: align structures to at least 4 bytes to be able
13339 to keep our current optimized memcpy.
13341 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
13343 * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
13345 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13347 * mini.c: ignore SIGPIPE.
13349 2005-09-04 Zoltan Varga <vargaz@gmail.com>
13351 * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
13353 * mini-ia64.h mini-ia64.c: Add some minor optimizations.
13355 2005-09-02 Zoltan Varga <vargaz@gmail.com>
13357 * mini.h: Add prototype for mono_allocate_stack_slots_full.
13359 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
13361 * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
13362 exception handling support.
13363 * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
13364 patch by Brian Koropoff <briank@marakicorp.com>).
13366 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
13368 * mini.c: revert another 'optimization' which breaks when
13369 items on the eval stack need to be saved at a basic block end
13372 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
13374 * jit-icalls.c: for arrays, ensure we always provide
13377 2005-08-30 Zoltan Varga <vargaz@gmail.com>
13379 * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
13381 * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
13383 2005-08-29 Zoltan Varga <vargaz@gmail.com>
13385 * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
13386 arguments in their original register.
13388 2005-08-28 Zoltan Varga <vargaz@gmail.com>
13390 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
13393 * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
13394 when ssapre is enabled.
13396 * inssel-long.brg: Fix bug in previous patch.
13398 * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize
13399 multiplication by a constant.
13401 2005-08-27 Zoltan Varga <vargaz@gmail.com>
13403 * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
13406 * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
13409 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
13411 * inssel-arm.brg: apply changes tested by Brian Koropoff
13412 <briank@marakicorp.com>.
13414 2005-08-25 Zoltan Varga <vargaz@gmail.com>
13416 * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
13418 2005-08-24 Zoltan Varga <vargaz@gmail.com>
13420 * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
13421 to the same register if dreg is just a base register.
13422 (print_ins): Improve printing of membase opcodes.
13424 * inssel-x86.brg: Add optimized ldind(reg) rules.
13426 * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
13428 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
13430 * mini.c: when running under valgrind, set the stack bottom for
13431 the GC at the actual approximate stack for the app (fixes running
13432 mono with valgrind).
13434 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
13436 * mini.c: do no break at the first valuetype to init found
13437 (fixes bug #75791).
13439 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
13441 * cpu-arm.md, mini-arm.c: more fixes and LMF support.
13443 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
13445 * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
13447 2005-08-23 Zoltan Varga <vargaz@freemail.hu>
13449 * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
13451 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
13453 * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
13455 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
13458 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
13461 * mini.c (optimize_branches): Don't quit after 1000 iterations on large
13464 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
13466 * tramp-arm.c: allocate less memory for the trampoline and fix typo.
13468 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
13470 * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
13471 in the tail recursion optimization.
13473 * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as
13474 debug info into the assembly file.
13476 * iltests.il: Add test for filter regions.
13478 * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
13479 initial stack of filter regions. Fixes #75755.
13481 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
13483 * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
13484 stack requirements.
13486 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
13488 * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
13489 the check for an already compiled method on non-ia64 platforms.
13490 (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
13493 * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
13495 * inssel-x86.brg: Add some optimized call rules.
13497 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
13499 * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
13502 * mini.h mini-trampolines.c: Pass the trampoline argument to
13503 mono_arch_patch_delegate_trampoline.
13505 * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
13507 * mini-trampolines.c: Fix build.
13509 * mini-amd64.h: Add delegate trampolines.
13511 * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
13513 * inssel-amd64.brg: Add optimized call rules.
13515 * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
13517 * inssel-ia64.brg: Add optimized ldind(reg) rules.
13519 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
13521 * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
13524 * mini-ia64.c: Remove LMF fixmes.
13526 * mini-ia64.h: Remove most fields from LMF.
13528 * inssel-ia64.brg (stmt): Fix unaligned access errors.
13530 * mini-trampolines.c: Add support for IA64 function descriptors.
13532 * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
13533 for IA64 function descriptors.
13535 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
13537 * tramp-arm.c: patch the vtable for virtual calls. Added
13538 support code to register/unregister the LMF.
13539 * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
13542 2005-08-19 Dick Porter <dick@ximian.com>
13544 * mini.c: Use a gsize to store the thread ID, so it can hold a 64
13545 bit value if needed.
13547 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
13549 * mini.c (mini_get_method): Move handling of wrapper data here.
13551 * mini.c (mono_method_to_ir): Add support for dynamic methods.
13553 * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
13556 * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so
13557 bblock->code does not remain empty.
13559 2005-08-17 Zoltan Varga <vargaz@freemail.hu>
13561 * arrays.cs: Add regression test for #75832.
13563 * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
13564 rules. Fixes #75832.
13566 * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
13567 instruction scheduling.
13569 2005-08-12 Zoltan Varga <vargaz@freemail.hu>
13571 * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
13573 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
13575 * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
13577 * mini-codegen.c: Fix VC build.
13579 * cpu-pentium.md: Increase length of atomic_exhange_i4.
13581 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13583 * mini.h: fix signature for mono_register_opcode_emulation.
13585 2005-08-09 Zoltan Varga <vargaz@freemail.hu>
13587 * mini.c: Get rid of most of the helper_sig_... constants using
13588 mono_create_icall_signature ().
13590 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
13592 * jit-icalls.c (helper_ldstr): New helper function.
13594 * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
13596 * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
13597 throw, load the string using a helper call instead of creating a string object.
13599 * aot.c: Update after LDSTR changes.
13601 * mini.h: Bump AOT file version.
13603 * aot.c: Save class size info into the AOT file. Print more statistics during
13606 * mini.h: Bump AOT file version.
13608 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
13609 ordering of disasm cases. Fixes #74957.
13611 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
13613 * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
13614 jit-icalls.c, mini-codegen.c, Makefile.am: changes in
13615 the generic code needed for the ARM port.
13617 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
13619 * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
13620 inssel-arm.brg: more ARM features and fixes.
13622 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
13624 * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
13625 ARM port work in progress.
13627 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
13629 * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
13631 * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
13633 * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
13635 * inssel.brg (mini_emit_memset): Add support for unaligned access.
13637 * *-ia64.*: Ongoing IA64 work.
13639 * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
13641 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
13643 * TODO: Remove out-of-data todo stuff.
13645 * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
13648 * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
13650 * mini.h: Bump corlib version.
13652 2005-07-27 Martin Baulig <martin@ximian.com>
13655 (create_copy_ins): Added `const unsigned char *ip' argument; set
13656 `copy->cil_code' from it.
13658 2005-07-27 Martin Baulig <martin@ximian.com>
13660 * mini-exceptions.c (mono_handle_exception): Don't call
13661 mono_debugger_handle_exception() for filters.
13663 2005-07-27 Zoltan Varga <vargaz@freemail.hu>
13665 * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
13668 2005-07-26 Martin Baulig <martin@ximian.com>
13670 Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
13672 * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
13673 helper_compile_generic_method() if the method is actually virtual
13676 2005-07-26 Martin Baulig <martin@ximian.com>
13679 (trampoline_code): Renamed to `mono_trampoline_code' and made it
13680 public; this is now accessed directly by the debugger.
13681 (mono_generic_trampoline_code): Removed.
13684 (mono_debug_init_method): Also add interncalls and wrappers.
13686 2005-07-23 Zoltan Varga <vargaz@freemail.hu>
13688 * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
13690 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
13692 * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
13694 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
13696 * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
13698 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
13700 * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
13701 getting TLS offsets on AMD64 too.
13703 2005-07-20 Kornél Pál <kornelpal@hotmail.com>
13705 * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
13707 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
13709 * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
13710 inssel-arm.brg, mini-arm.h: ARM port work in progress.
13712 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
13714 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
13716 * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
13719 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call
13720 mono_sparc_is_virtual_call ().
13722 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
13724 * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
13725 trampoline parameters.
13727 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
13729 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
13730 to mono_arch_get_vcall_slot_addr.
13732 * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
13735 * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
13737 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
13739 * mini-ia64.h mini-ia64.c: Finish pinvoke support.
13741 2005-07-19 Martin Baulig <martin@ximian.com>
13743 * exceptions-amd64.c (throw_exception): Call
13744 mono_debugger_throw_exception() here like we're doing it on i386.
13746 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
13748 * mini-ia64.c: Add optimized TLS access support.
13750 2005-07-18 Zoltan Varga <vargaz@freemail.hu>
13752 * mini-exceptions.c: Ongoing IA64 work.
13754 * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
13756 * mini.c: Use the default optimization set when embedding. Fixes
13759 2005-07-11 Zoltan Varga <vargaz@freemail.hu>
13761 * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts
13762 of trampolines to a separate file.
13764 * mini-trampolines.c: New file.
13766 * mini.h tramp-x86.c: Move arch independent parts of trampolines to a
13769 * tramp-x86.c: Reorganize the trampoline code to be similar to the
13772 * mini-codegen.c: Fix cygwin build.
13774 2005-07-10 Zoltan Varga <vargaz@freemail.hu>
13776 * mini.c: Add some minor changes needed by the IA64 port.
13778 * *-ia64.*: Ongoing IA64 work.
13780 2005-07-09 Zoltan Varga <vargaz@freemail.hu>
13782 * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split
13783 trampolines into arch-independent and arch-dependent parts.
13785 * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
13787 2005-07-08 Zoltan Varga <vargaz@freemail.hu>
13789 * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
13791 * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
13792 the xp-regalloc-branch for amd64.
13794 * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
13795 xp-regalloc-branch for x86.
13797 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
13799 * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
13801 2005-07-06 Martin Baulig <martin@ximian.com>
13804 (mono_jit_compile_method_inner): Call mono_get_inflated_method().
13805 (mono_jit_runtime_invoke): Likewise.
13807 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
13809 * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
13812 * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
13813 without loading their metadata. Reorganize the file format so exception handling+
13814 debug info is kept separate from normal method info. Create MonoJitInfo
13815 structures for methods lazily.
13817 * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
13819 (x86_class_init_trampoline): Patch AOT class init trampolines too.
13821 * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
13823 * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
13826 * mini.h: Bump AOT file version.
13828 2005-07-04 Zoltan Varga <vargaz@freemail.hu>
13830 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
13832 2005-07-01 Raja R Harinath <rharinath@novell.com>
13834 * Makefile.am (check-local): Call semdel-wrapper.
13836 2005-06-29 Zoltan Varga <vargaz@freemail.hu>
13838 * mini-x86.c: Revert the last change as it seems to break the build..
13840 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
13842 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
13844 * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
13846 2005-06-27 Ben Maurer <bmaurer@ximian.com>
13848 * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
13849 outside of the macro, so strange stuff doesn't happen with gcc4
13850 (NEW_AOTCONST_TOKEN): Likewise.
13852 2005-06-28 Martin Baulig <martin@ximian.com>
13854 * mini.c (mini_class_is_system_array): New static method; use this
13855 instead of `klass->parent == mono_defaults.array_class' everywhere
13856 since this also works for the new generic array class.
13858 2005-06-26 Ben Maurer <bmaurer@ximian.com>
13860 * inssel.brg: Remove warnings.
13862 2005-06-24 Zoltan Varga <vargaz@freemail.hu>
13864 * mini-ia64.c: Ongoing IA64 work.
13866 * basic-float.cs: Add float->i1 conversion test.
13868 * iltests.il: Add conv.u4 test.
13870 2005-06-23 Zoltan Varga <vargaz@freemail.hu>
13872 * inssel-long.brg: Fix bug caused by last change.
13874 2005-06-23 Geoff Norton <gnorton@customerdna.com>
13876 * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other
13877 BSDs. Allows the x86 JIT to work on OSX86
13879 2005-06-22 Zoltan Varga <vargaz@freemail.hu>
13881 * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
13884 * mini-ia64.c: Ongoing IA64 work.
13886 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
13888 * mini-ia64.c: Ongoing IA64 work.
13890 * driver.c: Clean up jit_code_hash as well when using --regression.
13892 * inssel-long.brg: Fix long->i4/u4 conversion rules.
13894 * basic-long.cs: Add tests for long->u4 conversion.
13896 2005-06-18 Ben Maurer <bmaurer@ximian.com>
13898 * mini.c: Take mono_get_domainvar out of macros. This makes sure
13899 that we do not depend on undefined C behavior: the order stuff
13900 gets evaluated within an expression. Fixes mono when compiled on
13903 2005-06-18 Zoltan Varga <vargaz@freemail.hu>
13905 * *-ia64.*: Ongoing IA64 work.
13907 * aot.c: Lower memory usage while loading AOT methods.
13909 * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
13911 * mini.h: Bump AOT file format version.
13913 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
13915 * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
13917 2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
13919 * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
13920 not on callee assembly). Fixed some comments.
13922 2005-06-16 Zoltan Varga <vargaz@freemail.hu>
13924 * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
13925 it gets proper disassembly.
13926 (emit_method_info): Remove some dead code.
13928 * mini.c (mini_method_compile): Allways allocate the GOT var in
13929 mono_method_to_ir for emulating opcodes.
13931 2005-06-13 Zoltan Varga <vargaz@freemail.hu>
13933 * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
13934 before freeing the code memory. Fixes #74990.
13936 * objects.cs: Add regression test for #74992.
13938 * liveness.c: Extend live ranges of arguments to the beginning of the
13939 method. Fixes #74992.
13941 * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
13942 so it points into the faulting instruction.
13944 2005-06-12 Zoltan Varga <vargaz@freemail.hu>
13946 * jit-icalls.c (mono_imul_ovf): Add exception handling.
13948 * *-ia64.*: Ongoing IA64 work.
13950 * mini.c (mini_init): Fix signature of mono_delegate_ctor.
13952 2005-06-11 Zoltan Varga <vargaz@freemail.hu>
13954 * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
13956 * *-ia64.*: Ongoing IA64 work.
13958 2005-06-10 Zoltan Varga <vargaz@freemail.hu>
13960 * basic-long.cs: Add tests for add/sub.ovf.
13962 * basic.cs: Add tests for sub.ovf.
13964 * *-ia64.*: Ongoing IA64 work.
13966 2005-06-09 Zoltan Varga <vargaz@freemail.hu>
13968 * *-ia64.*: Ongoing IA64 work.
13970 * basic.cs: Add conv.ovf.i4.un test.
13972 2005-06-09 Massimiliano Mantione <massi@ximian.com>
13974 * mini.c: (remove_block_if_useless) Fixed bug 75061.
13976 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13978 * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
13980 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
13982 * *-ia64.*: Ongoing IA64 work.
13984 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13987 * mini.c: added the ability to toggle trace on/off using SIGUSR2.
13989 2005-06-04 Zoltan Varga <vargaz@freemail.hu>
13991 * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
13993 2005-06-03 Zoltan Varga <vargaz@freemail.hu>
13995 * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
13997 * mini-amd64.c (amd64_patch): Add an assert to check that the destination
13998 of a call is callable by a near call.
14000 2005-05-31 Zoltan Varga <vargaz@freemail.hu>
14002 * mini-ia64.c: Ongoing IA64 work.
14004 2005-05-29 Zoltan Varga <vargaz@freemail.hu>
14006 * genmdesc.c: Make the generated array non-static.
14008 * inssel-long.brg: Fix LSHR_IMM rule.
14010 * *-ia64.*: Ongoing IA64 work.
14012 * *-ia64.*: Ongoing IA64 work.
14014 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
14016 * *-ia64.*: Ongoing IA64 work.
14018 * *-ia64.*: Ongoing IA64 work.
14020 * mini-ia64.c: Ongoing IA64 work.
14022 * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
14024 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
14026 * objects.cs basic-calls.cs: Move some tests to objects.cs.
14028 * objects.cs basic-long.cs: Move some tests to objects.cs.
14030 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
14032 * *-ia64.*: Ongoing IA64 work.
14034 * iltests.il: Add a new test.
14036 * mini.c (mono_method_to_ir): Initialize valuetypes when created using
14037 newobj. Fixes #75042.
14039 2005-05-22 Zoltan Varga <vargaz@freemail.hu>
14041 * *-ia64.*: Ongoing IA64 work.
14043 * *-ia64.*: Ongoing IA64 work.
14045 * *-ia64.*: Ongoing IA64 work.
14047 * basic.cs objects.cs: Move tests accessing static variables as well.
14049 * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
14051 2005-05-21 Zoltan Varga <vargaz@freemail.hu>
14053 * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
14055 * driver.c: Always print failed tests.
14057 * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
14060 * *ia64*: Ongoing IA64 work.
14062 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
14064 * basic.cs: Add tests for add.ovf. Fix warnings.
14066 2005-05-18 Miguel de Icaza <miguel@novell.com>
14068 * driver.c (mono_main): Avoid crash if no argument is passed to
14069 --break; Do not use g_error, but f_printf. And fix all other
14070 ocurrences of the same crash.
14072 2005-05-17 Zoltan Varga <vargaz@freemail.hu>
14074 * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
14075 and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
14078 2005-05-14 Zoltan Varga <vargaz@freemail.hu>
14080 * *-ia64.*: Add beginnings of IA64 backend.
14082 * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.
14084 2005-05-13 Zoltan Varga <vargaz@freemail.hu>
14086 * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
14089 * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
14091 * mini-amd64.c: Fix a warning.
14093 2005-05-10 Zoltan Varga <vargaz@freemail.hu>
14095 * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
14096 in float_neg. Fixes #74897.
14098 * mini-amd64.c (emit_call): Fix another near call bug.
14100 2005-05-06 Sebastien Pouliot <sebastien@ximian.com>
14102 * declsec.c: Keep the appdomain information in the structure. Added a
14103 missing "return FALSE" for Unmanaged if FullTrust is set (or else the
14104 value gets overwritten).
14105 * declsec.h: Set the default MonoArray for the the stack to 6. Added
14106 an MonoAppDomain member to MonoSecurityFrame.
14107 * mini-exceptions.c: Do not use a glist to keep GC allocated objects
14108 used in the stack walk. Now use a MonoArray which grow (double) when
14111 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
14113 * mini.c: Re-enabled runtime cleanup, since running threads should
14114 now properly stop when exiting.
14116 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
14118 * mini-codegen.c: New file contaning the arch-independent local
14119 register allocator. Not used by any architectures yet.
14121 * mini.h linear-scan.c: Merge some changes from the
14122 mini-xp-local-regalloc branch.
14124 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
14126 * mini-amd64.c (emit_call): Fix calls to native functions when the
14127 runtime is compiled as a shared library. Fixes #74756.
14129 * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
14130 on a literal field. Fixes #74751.
14132 2005-04-25 Raja R Harinath <rharinath@novell.com>
14134 * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
14136 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
14138 * objects.cs: Add missing null casting test.
14140 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
14142 * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
14143 in wrapper methods. Also rename 'address' variable to 'offset'.
14145 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
14147 * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
14150 * Makefile.am (MCS): Use -unsafe instead of --unsafe.
14152 * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
14155 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
14157 * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
14159 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
14161 * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
14162 just the last bytes.
14164 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
14166 * aot.c (mono_compile_assembly): Fix warning.
14168 * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
14169 by the _MSC_VER stuff.
14171 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
14173 * inssel-long.brg: Fix #74588.
14175 * cpu-amd64.md: Fix #74591.
14177 * iltests.il: Add new regression tests.
14179 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
14181 * trace.c (mono_trace_enter_method): Print enums as an int, not as a
14184 2005-04-11 Zoltan Varga <vargaz@freemail.hu>
14186 * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
14188 * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches
14189 from Bill Middleton <flashdict@gmail.com>.
14191 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
14193 * arrays.cs: Add new regression test. Fix warnings.
14195 2005-04-09 Zoltan Varga <vargaz@freemail.hu>
14197 * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
14198 and leakage in CKFINITE.
14200 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
14201 this to a null op since it is called on amd64 too.
14203 * exceptions-amd64.c (get_throw_trampoline): Align stack.
14205 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
14206 body since this is not used on amd64.
14208 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
14210 * mini-amd64.c: Remove obsolete fixmes.
14212 * mini.c (print_method_from_ip): Fix debugging support.
14214 2005-2-1 Massimiliano Mantione <massi@ximian.com>
14216 * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
14217 so that expressions that don't give much gain are not reduced.
14218 * ssapre.h: Likewise.
14220 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
14222 * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
14224 * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
14226 * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
14228 2005-04-01 Zoltan Varga <vargaz@freemail.hu>
14230 * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
14232 * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
14234 2005-03-31 Zoltan Varga <vargaz@freemail.hu>
14236 * mini-x86.c: If sigaltstack support is enabled, perform win32 style
14239 * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
14241 * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
14243 * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
14245 * mini-x86.h mini-x86.c exceptions-x86.c: Add support for
14246 MONO_ARCH_USE_SIGACTION. Fixes #74252.
14248 * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
14250 * mini-x86.c: Fix up stack overflow handling.
14252 * exceptions.cs: Add new regression test.
14254 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
14256 * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
14257 mono_jit_thread_attach.
14259 * mini.c (mono_method_to_ir): Verify called method is not abstract.
14261 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
14263 * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
14264 avoid calling constructors using callvirt.
14266 * inssel.brg: Fix #74073.
14268 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
14270 * aot.c, mini.h: Added mono-compiler.h header to allow/ease
14271 compilation with non-GCC compilers.
14272 * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
14273 possible using VS.NET. Adapted from the work of J Lothian (for VC6).
14275 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
14277 * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
14278 klass->interface_offsets (will likely fix bug#74073).
14280 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
14282 * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
14284 2005-03-28 Zoltan Varga <vargaz@freemail.hu>
14286 * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
14287 to amd64_div_reg_size ().
14289 * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
14291 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
14293 * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
14295 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
14297 * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
14299 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
14301 * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
14303 * mini.c (mono_precompile_assembly): Load and precompile referenced
14304 assemblies as well. Fixes #74015.
14306 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
14308 * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
14310 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
14312 * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
14313 a lot of checks and (anyway) permissions cannot work until corlib is
14316 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
14318 * mini-ppc.c: fixed ABI issue on sysv/ppc.
14320 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
14322 * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
14323 calls (fixes bug#72824).
14325 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
14327 * mini.c: fix tail recursion elimination (see test in bug#73936).
14329 2005-03-21 Zoltan Varga <vargaz@freemail.hu>
14331 * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
14332 some fp functions in sse2 mode.
14334 2005-03-20 Zoltan Varga <vargaz@freemail.hu>
14336 * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
14338 2005-03-19 Zoltan Varga <vargaz@freemail.hu>
14340 * mini.h mini.c: Add mono_get_jit_tls_key ().
14342 * mini-x86.c: Enable fast TLS support on windows.
14344 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
14346 * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
14347 * mini.c: Check for p/invoke method when generating code. If a
14348 p/invoke method, or it's class, isn't decorated with [Suppress
14349 UnmanagedCodeSecurity] then generate code to call System.Security.
14350 UnmanagedDemand (only if the security manager is active).
14352 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
14354 * tramp-amd64.c (create_specific_trampoline): Revert parts of the
14355 last change as it seems to cause strange crashes.
14357 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
14359 * *.c: handle unsafe function pointers where needed.
14361 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
14363 * mini.c (mono_jit_free_method): Remove the fixme too.
14365 2005-03-15 Miguel de Icaza <miguel@novell.com>
14367 * mini.c: As discussed, make the code actually free the delegate
14368 thunk now, to enable the debugging of delegate problems, use
14369 MONO_DEBUG=1 when running Mono.
14371 This takes also care of parts of the leaks as seen by Joe.
14373 2005-03-15 Zoltan Varga <vargaz@freemail.hu>
14375 * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable
14376 thread_tls_offset calculation.
14378 2005-03-14 Sebastien Pouliot <sebastien@ximian.com>
14380 * declsec.c: Reworked linkdemand checks for icall. The previous code
14381 was using the declaration code (untrusted) and didn't work as expected
14382 with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
14385 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
14387 * iltests.il: Add new localloc test.
14389 * mini-amd64.c: Handle large stack allocations the same way as on
14390 windows if stack overflow handling is working.
14392 * mini-amd64.c: Allocate the signal stack using mmap.
14394 * mini.c (sigsegv_signal_handler): Fix reading of context.
14396 * mini-exceptions.c: Fix up stack overflow handling.
14398 * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
14400 * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
14402 * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
14404 * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
14406 * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
14407 tramp_init functions as they are no longer needed.
14409 2005-03-12 Zoltan Varga <vargaz@freemail.hu>
14411 * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
14413 * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
14415 * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
14417 * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
14420 * mini-ops.h: Add OP_LMUL_IMM.
14422 * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
14423 long mul/div opcodes as intrinsic.
14425 * mini-amd64.c (emit_call): Handle the case when the callee might be
14428 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
14430 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
14433 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
14435 * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
14437 2005-03-09 Ben Maurer <bmaurer@ximian.com>
14439 * mini.c (mono_codegen): Don't leak here, to help people running
14442 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
14444 * mini-amd64.c (mono_arch_output_basic_block): Fix int->float
14445 conversions in sse2 mode.
14447 * basic-float.cs: Add regression test.
14449 * mini-amd64.c: Reenable sse2.
14451 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
14453 * mini-amd64.c: Disable sse2 until some regressions are fixed.
14455 2005-03-07 Joerg Rosenkranz <joergr@voelcker.com>
14457 * driver.c: Copyright text should include 2005.
14459 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
14461 * cpu-amd64.md (load_membase): Fix more max lengths.
14463 2005-03-06 Zoltan Varga <vargaz@freemail.hu>
14465 * cpu-amd64.md (load_membase): Fix max length.
14467 * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
14469 * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
14471 * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
14472 support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
14474 * basic-float.cs: Add rounding regression test.
14476 * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
14478 2005-03-04 Neale Ferguson <NealeFerguson@earthlink.net>
14480 * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
14481 structures in registers for pinvoke wrappers.
14483 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
14485 * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
14487 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
14489 * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
14490 wrapper to mono_jit_thread_attach.
14492 * mini.c (mini_jit_thread_attach): New jit icall.
14494 * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in
14495 native->managed wrappers.
14497 * exceptions.cs: Add new regression test.
14499 * mini.c (optimize_branches): Check regions in the cbranch to throw
14500 block case as well. Fixes #73242.
14502 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
14504 * mini.c: thread safety fixes.
14506 2005-02-27 Zoltan Varga <vargaz@freemail.hu>
14508 * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
14509 patching stuff, since delegates use jump trampolines so there is
14512 * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in
14515 * tramp-amd64.c: Fix build.
14517 * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
14518 it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
14520 * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
14521 Rename this to mono_arch....
14522 (mono_amd64_get_delegate_method_ptr_addr): Ditto.
14524 * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
14526 * mini-amd64.c (emit_call): If both the caller and the callee is
14527 guaranteed to have 32 bit addresses, emit a normal call.
14529 * tramp-amd64.c: Adapt to changes in mini-amd64.c.
14531 * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines.
14532 * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
14533 method_ptr inside delegates.
14535 2005-02-26 Zoltan Varga <vargaz@freemail.hu>
14537 * mini.c (mono_jit_free_method): Free the method info even if the native code is
14538 invalidated. Fixes #73001.
14540 * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
14542 * mini-x86.c: Only use stdcall for pinvokes on windows.
14544 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
14546 * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
14547 * mini-x86.c: remove unreliable __thread var offset detection,
14548 use the correct accessors and enable by default.
14550 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
14552 * mini.c (mono_jit_free_method): Fix memory leak.
14554 2005-02-22 Zoltan Varga <vargaz@freemail.hu>
14556 * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW.
14558 2005-02-21 Zoltan Varga <vargaz@freemail.hu>
14560 * cpu-amd64.md: Fix lengths of atomic opcodes.
14562 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
14564 * driver.c: try to not imply using ICU is any good.
14566 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
14568 * mini-amd64.c (mono_arch_get_inst_for_method): Implement more
14569 functions as inline ops.
14571 * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
14572 some Interlocked functions as inline ops.
14574 * mini.c (move_basic_block_to_end): Fix bug in last patch.
14576 * mini.h (MonoBasicBlock): Reorganize fields a bit.
14578 * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
14580 * mini.c: Add support for OP_NOT_TAKEN.
14582 * mini-amd64.h mini-amd64.c: Add support for passing/returning small
14583 structures in registers for pinvoke wrappers.
14585 * mini-amd64.c: Fix warnings.
14587 2005-02-19 Zoltan Varga <vargaz@freemail.hu>
14589 * mini.h (MonoCompile): Add 'ret_var_is_local' field.
14591 * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
14593 * mini.c (NEW_RETLOADA): If the ret variable is a local, use its
14594 address instead of loading the address from it.
14596 * mini-x86.c: Add support for returning small structs in registers
14597 on Win32. Fixes part of #70864.
14599 2005-02-18 Zoltan Varga <vargaz@freemail.hu>
14601 * trace.c (get_token): Improve error checking.
14603 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
14605 * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
14607 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
14609 * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
14610 it can be reused for MonoClass.
14611 * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
14614 2005-02-15 Sebastien Pouliot <sebastien@ximian.com>
14616 * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code
14617 instead of a MonoReflectionMethod. The method information wasn't used
14618 when displaying SecurityException details (but will be now).
14620 2005-02-15 Atsushi Enomoto <atsushi@ximian.com>
14622 * Makefile.am : windows build fix.
14624 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
14626 * iltests.il: Add new regression test.
14628 * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
14631 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
14633 * mini.c: Moved linkdemand check into helper function check_linkdemand
14634 to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP,
14637 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
14639 * declsec.c: Added statistics counter for different kinds of
14641 * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
14642 (and commented) declaration.
14643 * mini.c: Added statistics counter for security Demand code
14644 generation. Added display of security statistics.
14646 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
14648 * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
14649 Fix compilation errors under gcc-2.95.
14651 2005-02-12 Ben Maurer <bmaurer@ximian.com>
14653 * mini.c, driver.c: Use the new jit trampoline hashtable
14655 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
14657 * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
14659 2005-02-11 Martin Baulig <martin@ximian.com>
14661 * debug-mini.c (mono_debug_close_method): Free the line number array.
14663 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
14665 * aot.c: Break up large methods into smaller ones. Share GOT slots for
14668 * mini.h: Bump AOT file format version.
14670 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
14672 * declsec.c: Added LinkDemand support and it's special cases for ECMA,
14674 * declsec.h: Added macros to get/set lazyly initialized security
14675 informations about assemblies. Added new enum for different type of
14676 possible LinkDemand violation. Added function to check LinkDemands.
14677 * mini.h: Added a field to MonoCompile to hold any security violation
14678 detected when JITting a method (so it can be thrown later).
14679 * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL
14680 and CEE_CALLVIRT. Added code to throw exception at the end of
14681 mini_method_compile (note: the exception is unhandled right now).
14683 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
14685 * mini.c, jit-icalls.c: use the managed implementation of
14686 memset for initobj and memset, to avoid managed <-> unmanaged
14689 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
14691 * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
14692 optimization if it would need a GOT var.
14694 * basic.cs: Add tests for constant propagation and switch statements.
14696 * ssa.c: Fix out-of-range constant propagation and switch statements.
14698 2005-02-09 <vargaz@freemail.hu>
14700 * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
14702 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
14704 * cpu-amd64.md (load_membase): Fix max length of load_membase.
14706 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
14708 * mini.c: update to new signature of mono_class_get_allocation_ftn().
14710 2005-02-06 Neale Ferguson <NealeFerguson@earthlink.net>
14712 * cpu-s390.md, mini-s390.c: Correct bug with register usage on certain
14713 arithmetic operations.
14715 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
14717 * mini-ppc.c: add a workaround for broken user code that
14718 DllImports vararg functions with non-vararg signatures.
14720 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
14722 * mini.c (mono_jit_compile_method_inner): Add detection and a
14723 meaningfull error message for assemblies written in Managed C++.
14725 * tramp-amd64.c mini-amd64.h: Add support for
14726 create_trampoline_from_token ().
14728 * aot.c mini-x86.c abcremoval.c: Applied patch from
14729 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
14731 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
14733 * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline
14734 which takes a MonoImage/token as parameter instead of a MonoMethod.
14736 * aot.c: Use the new trampoline for initializing vtables.
14738 * aot.c: Add support for ldfld/stfld_remote wrappers.
14740 * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
14741 rules for compare <MEM>, IMM.
14743 * mini.h (MONO_AOT_FILE_VERSION): Bump it.
14745 * aot.c: Handle inherited finalizers correctly.
14747 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
14749 * inssel.brg (stmt): Add a missing _setup_... ().
14751 * aot.c: Save some parts of the class state to the AOT file and use it
14752 to recompute that state when a class is initialized.
14754 * mini.c: Install AOT hooks into the runtime.
14756 * mini.h: Bump AOT file format version.
14758 * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
14761 * iltests.il: Add new test.
14763 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
14765 * mini.c: fix typo.
14767 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
14769 * mini.c: setup the statistical profiler in the thread attach
14770 callback to cope with the new single thread code.
14772 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
14774 * mini-ppc.c: ensure we have enough room for the profiler
14775 calls (fixed bug#72084).
14777 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
14779 * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding
14782 2005-2-1 Massimiliano Mantione <massi@ximian.com>
14784 * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
14786 2005-2-1 Massimiliano Mantione <massi@ximian.com>
14788 * ssapre.c: Fixed an issue with down safety (this allows IronPython
14789 to succesfully execute parrotbench).
14790 * ssapre.h: Likewise.
14792 2005-2-1 Massimiliano Mantione <massi@ximian.com>
14794 * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
14795 variable for stores to method arguments (fixes a SSAPRE issue).
14797 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
14799 * mini.c: handle value types in dup, fixes gen-112.cs.
14801 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
14803 * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
14804 sequence for calls in dynamic methods to avoid thunks.
14806 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
14808 * mini.c: correctly remove dynamic methods from the hashtable.
14810 2005-1-20 Massimiliano Mantione <massi@ximian.com>
14812 * driver.c: Disabled SSAPRE until fix the bug that appears
14813 in IronPython's parrotbench.
14815 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
14817 * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
14819 * mini.c (mono_method_to_ir): Revert the previous change.
14821 * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
14822 when AOT compiling.
14824 * tramp-x86.c (x86_magic_trampoline): Avoid calls to
14825 mono_jit_info_table_find () etc. when running under valgrind.
14827 * inssel.brg: Fix warnings.
14829 * mini-exceptions.c: Fix warnings.
14831 2005-01-31 Martin Baulig <martin@ximian.com>
14833 * driver.c (compile_all_methods_thread_main): Don't try to compile
14834 generic methods or anything which has type parameters.
14836 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
14838 * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
14840 * TestDriver.cs: Add --verbose flags.
14842 * graph.c ssa.c: Fix 64 bit warnings.
14844 * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c
14845 trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
14846 Fix 64 bit warnings.
14848 * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
14849 variable not spotted by gcc.
14851 * mini-amd64.c inssel-amd64.brg: Applied patch from
14852 Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of
14853 X86_COMPARE_MEMBASE opcodes.
14855 * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
14857 2005-01-29 Ben Maurer <bmaurer@ximian.com>
14859 * *: MonoMethod->signature might be NULL now. You *MUST* use
14860 mono_method_signature.
14862 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
14864 * driver.c (compile_all_methods_thread_main): Compile the methods
14865 without invoking cctors.
14867 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
14869 * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
14870 * basic-calls.cs: test for the above.
14872 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
14874 * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after
14875 MonoJitInfo changes.
14877 2005-01-27 Zoltan Varga <vargaz@freemail.hu>
14879 * mini-exceptions.c (mono_handle_exception): Compute the stack trace
14880 eagerly if it contains dynamic methods.
14882 * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
14884 * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
14885 trace, it is now computed by an icall from trace_ips.
14887 * mini-exceptions.c: Fix a warning.
14889 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
14891 * mini-exceptions.c: don't bother getting stack trace info if
14892 it's not going to be used.
14894 2005-01-27 Raja R Harinath <rharinath@novell.com>
14896 * Makefile.am (common_sources): Add ssapre-cee-ops.h and
14899 2005-01-26 Zoltan Varga <vargaz@freemail.hu>
14901 * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
14903 * aot.c: Avoid calling mono_method_get_header () if not needed.
14905 * mini.h: Bump AOT file format version.
14907 * mini.c (mono_emit_native_call): Allocate a GOT var here.
14909 * mini.c (mono_print_tree): Print more info for calls.
14911 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
14913 * declsec.h: Remove warning by adding missing include for marshal.h
14915 2005-01-26 Martin Baulig <martin@ximian.com>
14917 * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
14920 2005-01-25 Zoltan Varga <vargaz@freemail.hu>
14922 * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
14925 * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
14927 * aot.c (mono_compile_assembly): Fix a warning.
14929 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
14931 * declsec.c: Look for security attributes on the original MonoMethod
14932 (and not the wrapped one). This fix permissions on icalls.
14934 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
14936 * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
14938 * mini.c (mono_allocate_stack_slots): Add a fixme.
14940 * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
14942 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
14944 * inssel.brg: optimize casts of sealed types (more
14945 optimizations waiting for fixes in remoting).
14947 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
14949 * inssel.brg (stmt): Add another dummy rule.
14951 * driver.c: Fix warnings.
14953 * driver.c (mono_main): If running under valgrind, instruct glib to use
14954 the system allocation functions so valgrind can track the memory
14955 allocated by the g_... functions.
14957 * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
14959 * mini-ops.h: Add OP_DUMMY_STORE opcode.
14961 * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
14963 * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
14964 variables in try regions.
14966 * mini.c (mini_method_compile): Don't disable optimizations on large
14967 methods when AOT compiling.
14969 * mini.c (mono_allocate_stack_slots): New arch independent method to
14970 allocate stack slots. Not yet used.
14972 2005-01-22 Ben Maurer <bmaurer@ximian.com>
14974 * debug-mini.c (mono_debug_close_method): Plug some leaks.
14976 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
14978 * mini-ppc.c: make the branch info relative as the code
14979 buffer can be reallocated.
14981 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
14983 * aot.c: Allow decoding of the new MONO_PATCH_INFO_DECLSEC.
14984 * driver.c: Removed the AOT/security restriction. Now initialize the
14985 security manager (in metadata) if --security is used.
14986 * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
14987 rather than the pointer to declarative security, when AOT is used.
14989 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
14991 * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
14992 basic blocks, reduced intrinsic exception throwing code size.
14994 2005-01-22 Miguel de Icaza <miguel@ximian.com>
14996 * driver.c (mini_usage): Reorder the usage screen.
14998 2005-01-21 Zoltan Varga <vargaz@freemail.hu>
15000 * mini.c (mono_resolve_patch_target): Fix warning.
15002 2005-01-20 Zoltan Varga <vargaz@freemail.hu>
15004 * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
15007 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
15009 * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
15010 breaks the amd64 build.
15012 * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem
15013 register allocation. Fixes #71454.
15015 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
15017 * arrays.cs: Add new regression test.
15019 2005-1-20 Massimiliano Mantione <massi@ximian.com>
15021 * ssapre.c: Turned usage of snprintf to GString.
15022 * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
15023 (I left it on by mistake in my previous commit).
15025 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
15027 * mini.c, cfold.c, basic-calls.cs: preserve side effects
15028 on cond branch optimization (fixes bug# 71515).
15030 2005-1-20 Massimiliano Mantione <massi@ximian.com>
15032 * abcremoval.c: Fixed bug 71062.
15033 * abcremoval.h: Likewise.
15035 2005-1-20 Massimiliano Mantione <massi@ximian.com>
15037 * mini.c: Added a new functionality to optimize_branches, the removal
15038 of useless basic blocks, and fixed some problem in the removal of
15039 critical edges; some utility functions added for both purposes.
15040 * ssapre.c: Added complex expression support, and fixed bug 70637.
15041 * ssapre.h: Likewise.
15042 * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
15044 * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
15045 * driver.c: Re-enabled SSAPRE.
15047 2005-01-19 Martin Baulig <martin@ximian.com>
15049 * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
15050 the result of mono_get_method_constrained().
15052 2005-01-18 Neale Ferguson <NealeFerguson@earthlink.net>
15054 * exceptions-s390.c tramp-s390.c: Allocate code using the global code
15057 2005-01-18 Geoff Norton <gnorton@customerdna.com>
15059 * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
15060 be detected. Fixes #59296.
15062 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
15064 * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
15065 which can happen. Fixes #71361.
15067 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
15069 * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
15072 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
15074 * mini.c (mono_create_jump_trampoline): Revert last change as it causes
15075 appdomain-unload.exe to fail.
15077 * mini.c: Fix some memory leaks.
15079 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
15081 * inssel.brg: handle the new size of rank, idepth, max_interface_id.
15082 Fixed bug and sped up some codepaths.
15084 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
15086 * mini.c: Fix some memory leaks.
15088 * exceptions.cs basic-long.cs: Add test for checked ulong->int
15091 * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
15093 * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
15096 * iltests.il: Add regression test for #71320.
15098 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
15100 * mini.c (mono_codegen): Fix installation of profiler hooks.
15102 * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
15104 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
15106 * mini.h, mini.c, cfold.c: optimize access to enum
15107 readonly fields, too. Eval conditional branches if possible
15108 to perform unreachable code removal in more cases.
15110 2005-01-15 Zoltan Varga <vargaz@freemail.hu>
15112 * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
15114 * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
15117 * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
15118 WinXP DEP. Fixes #71244.
15120 2005-01-14 Zoltan Varga <vargaz@freemail.hu>
15122 * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
15124 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
15126 * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
15128 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
15130 * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo
15133 * mini.h: Bump AOT version.
15135 * mini.h (MonoCompile): Change exvar to a hash table.
15137 * mini.c: Allocate a separate exvar for each handler block.
15139 * mini.c: Get rid of the computation of filter_lengths, its not needed.
15141 * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
15142 ex var with the pending exception and only throw if the two are equal.
15145 * exceptions.cs: Add tests for rethrow and nested catch clauses.
15147 * mini-x86.c: Fix warnings.
15149 * Makefile.am (common_sources): Move mini-exceptions.c here as it is
15150 used by all the ports now.
15152 * aot.c: Add write-symbols and save-temps options.
15154 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
15156 * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
15158 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
15160 * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx
15163 * tramp-s390.c: Check vtable slot belongs to the domain.
15165 * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
15166 as per other platforms.
15168 * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
15170 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
15172 * driver.c: we don't run the Main() code in a subthread anymore.
15174 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
15176 * mini.c: added experimental rtc support in the statistical
15177 profiler: if the user has the permission, more accurate statistics
15178 are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
15179 The MONO_RTC value must be restricted to what the linux rtc allows:
15180 power of two from 64 to 8192 Hz.
15182 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
15184 * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
15186 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
15188 * mini-ppc.c: better icache flush for smp.
15190 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
15192 * mini-amd64.c (emit_move_return_value): Fix memory leak.
15194 * mini-x86.c (get_call_info): Add the get_call_info () code from the
15195 amd64 port, not yet used.
15197 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
15199 * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
15202 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
15204 * driver.c: Added --security option to activate the security manager.
15205 Right now this will allow code generation for declarative demands and
15206 is disabled when AOT is specified.
15207 * mini.c: Add code generation for declarative security demands.
15208 * mini.h: Add mono_use_security_manager as an extern gboolean.
15210 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
15212 * aot.c (mono_compile_assembly): Speed up compilation a bit by
15213 emitting more dense assembly code.
15215 * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
15216 exception throwing stuff.
15218 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
15220 * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
15223 * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
15224 left in by mistake.
15226 * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is
15229 * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
15231 * tramp-*.c: Only patch vtable slots if the object is in the current
15232 domain. Fixes appdomain-unload.exe.
15234 * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
15236 * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
15239 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
15241 * mini.c (reverse_branch_op): New helper function.
15243 * mini.c (optimize_branches): Run the new optimization only on
15244 platforms which support it. Also reverse all kinds of branches.
15246 * mini.h (MonoBasicBlock): Add 'out_of_line' field.
15248 * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
15251 * mini.c (optimize_branches): Reverse not-equals branches if the false
15252 bblock is a throw. This happens a lot of time with argument checking in
15255 * mini.c (mono_codegen): Add support for placing basic blocks after
15256 the function epilogue.
15258 * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
15261 2005-01-05 Miguel de Icaza <miguel@ximian.com>
15263 * mini.c (setup_stat_profiler): Only set this up if the platform
15264 supports ITIMER_PROF.
15266 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
15268 * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
15271 * inssel.brg: Fix a warning.
15273 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
15275 * mini.c: added support for statistical profiler
15276 (run with: --profile=default:stat).
15278 2005-01-04 Zoltan Varga <vargaz@freemail.hu>
15280 * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
15282 * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
15284 * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes
15285 related to global registers from the amd64 port.
15287 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
15289 * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
15291 * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
15292 with global registers.
15293 (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
15295 * aot.c (emit_method_code): Fix the 'method emitted as' messages.
15297 2004-12-31 Zoltan Varga <vargaz@freemail.hu>
15299 * debug-mini.c (encode_value): Fix off-by-one.
15301 * aot.c (encode_value): Likewise.
15303 * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
15305 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
15307 * mini.c linear-scan.c: Add a workaround for the mcs crash when using
15310 * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
15312 * aot.c (emit_method_info): Increase size of temp buffer.
15314 * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in
15317 2004-12-28 Zoltan Varga <vargaz@freemail.hu>
15319 * aot.c (emit_method_info): Fix build.
15321 * aot.c: Further rework of the AOT file format to reduce the size of
15322 the method info data.
15324 * mini.h: Bump AOT file format version.
15326 2004-12-27 Martin Baulig <martin@ximian.com>
15328 * mini.c (mini_get_method): New static method; call
15329 mono_get_method_full() and mono_get_inflated_method().
15330 (mono_method_to_ir): Use mini_get_method() instead of
15331 mono_get_method_full().
15333 2004-12-26 Patrik Torstensson <patrik.torstensson@gmail.com>
15335 * mini-x86.c (atomic ops): fixed bug interlocked bug #70784.
15337 2004-12-25 Zoltan Varga <vargaz@freemail.hu>
15339 * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
15341 * inssel-amd64.brg: Add some optimization rules.
15343 2004-12-24 Ben Maurer <bmaurer@ximian.com>
15345 * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
15346 standard not GC'd stuff is fine.
15348 2004-12-24 Zoltan Varga <vargaz@freemail.hu>
15350 * aot.c: Rework the AOT file format to get rid of most of the global
15351 symbols. This reduces the size of the mscorlib.dll.so by 1MB.
15353 * mini.h: Bump AOT file format version.
15355 2004-12-23 Zoltan Varga <vargaz@freemail.hu>
15357 * mini.h: Bump AOT file format version.
15359 * aot.c (mono_aot_is_got_entry): New function to determine if an
15360 address is inside a GOT.
15362 * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
15364 * cpu-pentium.md: Increase the maximum size of some instructions which
15365 might involve a got access.
15367 * mini.c (get_method_from_ip): Another debug helper function.
15369 * mini.c: Call mono_get_got_var () in a couple places. Handle the case
15370 when got var accesses are created during the decompose phase.
15372 * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
15374 * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
15375 argument mini_compile_method and to MonoCompile, and use this to
15376 determine whenever a given method is compiled for AOT. This allows the
15377 other methods compiled during AOT compilation to be free of AOT stuff,
15378 so the backends does not need to add special support for them by
15379 creating a fake GOT etc.
15381 * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
15384 2004-12-21 Ben Maurer <bmaurer@ximian.com>
15386 * mini.c (mono_method_to_ir): It turns out that some of the
15387 x-appdomain wrappers are lax with types, so just ignore this for
15390 * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
15391 at the vtable->klass. If it is non-shared code we can just use the
15394 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
15396 * mini-ppc.c: access MonoDomain from tls, too.
15398 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
15400 * declsec.c: Removed unused variable (and related warning ;-)
15402 2004-12-21 Ben Maurer <bmaurer@ximian.com>
15404 * iltests.il: New test for LDELEMA on an array of ref types.
15406 * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
15407 all ldelema's on reftypes.
15408 (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
15409 it was the wrong place to put it.
15411 * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
15412 register to pop to make this cleaner, at the request of Paolo.
15414 2004-12-20 Ben Maurer <bmaurer@ximian.com>
15416 * mini-ops.h (OP_GETHASHCODE): New op.
15418 * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
15420 * mini.c (mini_get_inst_for_method): Create the intrinsic hash
15423 For a microbenchmark, this reduces the cost of Hashtable.get_Item
15426 * mini-x86.c (mono_arch_output_basic_block): Rather than
15434 The first is 3 bytes while the second is 1. This saves 36 kb on
15435 mscorlib, quite a big saving. When bootstraping mcs, I was able to
15436 see a small boost because of icache locality.
15438 * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
15440 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
15442 * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
15443 started code sharing with the generic code.
15445 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
15447 * mini-ppc.c, cpu-g4.md: added code for direct access to
15450 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
15452 * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
15453 mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
15456 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
15458 * declsec.c|h: Added functions to cache the declarative stack modifiers
15459 in MonoJitInfo and to create a security frame from a MonoJitInfo
15461 * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
15462 created. Register internal calls for System.Security.SecurityFrame::
15463 _GetSecurityFrame and _GetSecurityStack.
15464 * mini.h: Added definition for new icalls (in mini-exceptions.c) and
15465 the definitions for the new stack walk/callback mechanism.
15466 * mini-exceptions.c: Added internal call GetSecurityFrame (to get the
15467 first security frame for LinkDemands and InheritanceDemands) and
15468 GetSecurityStack for Demands. Both use the new mono_walk_stack code
15470 * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
15471 walk initialization (lupus).
15473 2004-12-20 Ben Maurer <bmaurer@ximian.com>
15475 * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
15477 (handle_loaded_temps): Do not create a temporary variable for
15478 things that we know are temps. They will never be modified.
15479 (mono_spill_call): Set MONO_INST_IS_TEMP
15480 (mono_emulate_opcode): ditto
15482 (mono_method_to_ir.CEE_DUP): ditto
15484 2004-12-19 Ben Maurer <bmaurer@ximian.com>
15486 * mini.c (type_to_eval_stack_type): Make this handle the void type
15487 (mono_emit_call_args): set the call->type with type_to_eval_stack_type
15488 (emit_tree): use ip_in_bb to special case some common idioms
15489 Update all callers to pass in the IP.
15490 (mono_method_to_ir): Make CEE_CALL* do the above as well.
15492 This gives us a nice 2% speedup in mcs bootstrap.
15494 * mini-x86.c (peephole_pass): Peephole pass to make
15503 * mini.c (ip_in_bb): new method.
15504 (mono_method_to_ir): use this method rather than doing the hash
15507 * linear-scan.c (mono_linear_scan): When expiring actives, you
15508 don't need to keep around variables that expire on this
15509 instruction. This makes it so that:
15512 store (ebx add (ebx, 1))
15516 2004-12-19 Zoltan Varga <vargaz@freemail.hu>
15518 * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc
15519 combination to avoid doing two copies. Fix up problems with previous
15522 * mini.c: Fix 64 bit warnings.
15524 * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
15526 2004-12-17 Zoltan Varga <vargaz@freemail.hu>
15528 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
15529 changes from the x86 code.
15531 * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
15533 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
15535 * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
15536 throwing code to reduce its size, unify the AOT and non-aot code and
15537 get rid of relocations in the AOT case.
15539 * mini-x86.h mini.c exceptions-x86.c
15540 (mono_arch_get_throw_corlib_exception): New arch specific function to
15541 raise corlib exceptions which doesn't require relocations in the
15544 * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
15546 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
15548 * mini.c (mono_emit_method_call): Only allocate the got var when it is
15551 * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
15554 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
15556 * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
15557 with add function when used from Inc/dec atomic
15558 functions. Re-enabled optimization on x86.
15559 * mini-ops.h: renamed atomic_add functions to
15560 allow _add to match the Interlocked::Add and
15561 _add_next to match Interlocked::Inc/Dec.
15563 2004-12-15 Massimiliano Mantione <massi@ximian.com>
15565 * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
15566 linking of BBs to the end BB, and enabled SSAPRE also with
15567 consprop and copyprop (which was prevented by that bug).
15569 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
15571 * mini-x86.c: disabling the Interlocked optimizing code.
15573 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
15575 * aot.c (load_aot_module): Move reading of got_addr after the AOT
15576 file version check.
15578 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
15580 * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm
15581 interlocked optimization due lack of support on x86, rewrote
15582 exchange to take into account that base may be in eax.
15584 xsp works again; activated Interlocked optimizing code.
15586 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
15588 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
15590 2004-12-13 Zoltan Varga <vargaz@freemail.hu>
15592 * mini-ops.h: Add new opcodes.
15594 * mini.h: Add new patch types. Add got_var to MonoCompile.
15596 * mini.h mini-x86.c mini-amd64.c aot.c: Rename
15597 mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
15598 make it work with all kinds of patchable code.
15600 * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
15601 address of the GOT, and referencing entries in the GOT.
15603 * mini.c: Add code to load the GOT address if needed by an opcode.
15605 * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position
15606 independent AOT code on the x86 using an elf-style Global Offset Table.
15608 2004-12-14 Raja R Harinath <rharinath@novell.com>
15610 * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
15612 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15614 * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
15617 2004-12-13 Patrik Torstensson <patrik.torstensson@gmail.com>
15619 * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
15620 of Interlocked:Increment/Decrement/Add as inline ops.
15621 (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
15623 2004-12-12 Geoff Norton <gnorton@customerdna.com>
15625 * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
15626 * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
15628 2004-12-12 Duncan Mak <duncan@ximian.com>
15630 * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
15631 again. `patch_info->table_size' is no longer valid after Zoltan's
15634 2004-12-12 Martin Baulig <martin@ximian.com>
15636 * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
15637 if we are the "real" method, ie. not an inlined method inside it.
15639 2004-12-11 Ben Maurer <bmaurer@ximian.com>
15641 * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
15642 before we look in the special fields table. This fixes
15643 ../tests/thread-static-init.cs.
15645 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15647 * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
15648 for Array get_Rank and get_Length. Fixes bug #70465.
15650 2004-12-11 Zoltan Varga <vargaz@freemail.hu>
15652 * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
15653 separate structure to reduce the size of MonoJumpInfo.
15655 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
15657 * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
15659 2004-12-10 Patrik Torstensson <patrik.torstensson@gmail.com>
15661 * mini.c (mini_get_inst_for_method): Changed to allow ports
15662 to return a MonoInst instead of opcode
15663 (renamed mini_get_opcode_for_method to better reflect the new functionality)
15665 * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method):
15666 Allow ports to return a created MonoInst instead of op-code, will enable
15668 (renamed mini_get_opcode_for_method to better reflected the functionality)
15670 2004-12-09 Zoltan Varga <vargaz@freemail.hu>
15672 * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
15674 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
15676 * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
15679 2004-12-08 Martin Baulig <martin@ximian.com>
15681 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
15682 if we're a CEE_CONSTRAINED call. Fixes gen-118.cs.
15684 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
15686 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
15689 * exceptions.cs: Disable some tests which depend on properties of x86 fp
15692 2004-12-08 Raja R Harinath <rharinath@novell.com>
15694 * Makefile.am (CLEANFILES): Add *.exe, *.dll.
15696 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
15698 * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
15699 bug introduced by the previous patch.
15701 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
15703 * mini-ppc.c, objectc.cs: handle large structs passed by value
15704 (fixes bug #69972).
15706 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
15708 * mini-ppc.c: OP_ARGLIST implementation from
15709 Geoff Norton <gnorton@customerdna.com>.
15711 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
15713 * inssel-x86.brg, inssel-ppc.brg: fix reference to register
15714 in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
15716 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
15718 * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
15720 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15722 * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
15725 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
15727 * mini-sparc.c: Zero out localled-ed memory.
15729 * iltests.il: Add tests for zeroing out localloc-ed memory.
15731 2004-12-04 Martin Baulig <martin@ximian.com>
15733 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
15734 mono_method_get_signature_full().
15736 2004-12-03 Massimiliano Mantione <massi@ximian.com>
15738 * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
15739 and some utility functions (always for SSAPRE), integrated SSAPRE.
15740 * mini.h: Likewise.
15741 * driver.c: Added ssapre option.
15742 * ssa.c: Small fix on OP_ARG handling.
15743 * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
15744 * Makefile.am: Likewise.
15746 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
15748 * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
15749 now in the xp code.
15751 * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
15754 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15756 * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
15758 * cpu-s390.md : Increase instruction length of oparglist.
15760 * mini-s390.c : Implement vararg and TYPEDEBYREF support.
15762 2004-11-30 Martin Baulig <martin@ximian.com>
15764 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
15765 virtual generic methods. We call a special helper_compile_generic_method()
15766 icall to retrieve the method from the vtable, inflate and compile
15767 it and then do a CEE_CALLI. Thanks a lot to Paolo for this idea.
15769 * jit-icalls.c (helper_compile_generic_method): New JIT icall.
15771 2004-11-30 Zoltan Varga <vargaz@freemail.hu>
15773 * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
15775 2004-11-29 Zoltan Varga <vargaz@freemail.hu>
15777 * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
15780 2004-11-27 Ben Maurer <bmaurer@ximian.com>
15782 * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
15783 platforms with PIC aot.
15785 2004-11-28 Martin Baulig <martin@ximian.com>
15787 * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
15790 2004-11-28 Martin Baulig <martin@ximian.com>
15792 * mini-x86.c (mono_arch_call_opcode): Use the original type, not
15793 the result of mono_type_get_underlying_type() to check whether
15796 2004-11-26 Martin Baulig <martin@ximian.com>
15799 (mono_method_to_ir): Use `!method->signature->has_type_parameters'
15802 2004-11-26 Zoltan Varga <vargaz@freemail.hu>
15804 * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
15805 the same way as the other arguments so they won't get clobbered.
15807 * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual
15808 calls through R11 since it is clobbered by the trampoline code.
15810 2004-11-26 Raja R Harinath <rharinath@novell.com>
15812 * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
15813 pick up in-tree mscorlib.dll.
15815 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
15817 * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
15819 * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to
15820 runtime data/code are now stored in a table similar to the GOT in ELF.
15821 This allows the code itself to be position independent.
15823 * aot.c: Fix loading of referenced assemblies after the lazy assembly
15826 * aot.c: Attach ELF type (object/function) directives to all global
15829 * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
15831 * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
15833 * mini-amd64.h: Turn on PIC AOT code.
15835 * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
15836 returning the offset within an OP_AOTCONST instruction where the GOT
15837 offset needs to be added.
15839 * mini.h: Bump AOT file format version.
15841 2004-11-25 Martin Baulig <martin@ximian.com>
15843 * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
15844 uninflated generic methods.
15846 2004-11-25 Martin Baulig <martin@ximian.com>
15848 * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
15850 2004-11-24 Martin Baulig <martin@ximian.com>
15852 * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
15853 original klass (this only applies for generic instances).
15855 2004-11-24 Martin Baulig <martin@ximian.com>
15857 * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
15858 `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
15861 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
15863 * mini.c (mono_method_to_ir): Disable inlining for methods containing
15864 localloc. Fixes #69678.
15866 * iltests.il (test_0_localloc_inline): Add regression test for #69678.
15868 2004-11-23 Zoltan Varga <vargaz@freemail.hu>
15870 * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
15871 used SSE registers on pinvoke calls. Fixes #69774.
15873 2004-11-23 Geoff Norton <gnorton@customerdna.com>
15875 * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
15876 vt->inst_vtype->data.klass. This fixes generic structs and bug #69766
15878 2004-11-23 Raja R Harinath <rharinath@novell.com>
15880 * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
15881 Refer directly to the mcs/ tree.
15883 2004-11-19 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15885 * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
15886 Check if a trampoline for a synchronized method is required.
15888 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
15890 * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
15891 with localloc if needed. Throe arithmetric exception in
15892 div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
15893 Adapted from a patch by Geoff Norton <gnorton@customerdna.com>.
15895 2004-11-19 Geoff Norton <gnorton@customerdna.com>
15897 * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
15898 types before switching on type. Fixes #69622.
15900 2004-11-19 Raja R Harinath <rharinath@novell.com>
15902 * Makefile.am (check-local): New. Integrate into 'make check'.
15903 (MCS,RUNTIME): Define using in-tree mono and mcs.
15905 (%.exe): Use $(ILASM).
15907 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
15909 * mini-ppc.c: adjust initial prolog size (bug #69691).
15911 2004-11-18 Zoltan Varga <vargaz@freemail.hu>
15913 * cpu-pentium.md (localloc): Increase max instruction len. Fixes
15916 2004-11-17 Raja R Harinath <rharinath@novell.com>
15918 * Makefile.am (clean-local): Rename from 'clean'.
15920 2004-11-15 Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15922 * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
15923 to mono_arch_is_int_overflow.
15924 * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
15927 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
15929 * declsec.c|h: New files to support declarative security attributes.
15930 Added function to check if a method has (applicable) security.
15931 * mini.c|h: Add check for declarative security attributes in
15932 mono_method_check_inlining.
15933 * Makefile.am: Added declsec.c and declsec.h to the build.
15935 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
15937 * mini.c, mini.h: update to keep dynamic code info per-domain.
15939 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
15941 * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
15942 (mini_init): Get rid of it from here too.
15944 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
15946 * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
15947 implemented OP_RETHROW (patch by Geoff Norton
15948 <gnorton@customerdna.com>).
15950 2004-11-10 Geoff Norton <gnorton@customerdna.com>
15952 * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
15953 between appdomains. Fixes appdomain-unload on PPC.
15955 2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
15957 * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15958 mini-exceptions.c: handle the new wrapper types.
15959 * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
15960 token value as a MonoClass* when compiling a wrapper.
15961 mono_jit_create_remoting_trampoline now takes an additional
15962 MonoRemotingTarget parameter.
15964 2004-11-10 Martin Baulig <martin@localhost>
15966 * mini.c (mono_method_to_ir): Use `generic_container->context'
15967 rather than creating a new one.
15969 2004-11-09 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15971 * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
15973 * inssel-390.md, mini-s390.c: Correct register allocation for globals.
15975 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
15977 * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
15978 the experimental aot cache stuff.
15980 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
15982 * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15983 mini-exceptions.c: update to exception clause structure changes.
15985 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
15987 * exceptions-x86.c (throw_exception): Fix warnings.
15989 * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support
15992 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
15994 * exceptions-sparc.c (get_throw_exception): Really fix this.
15996 2004-11-07 Ben Maurer <bmaurer@ximian.com>
15998 * tramp-*.c: we no longer support icalls without wrappers, so
15999 a bit of code can be removed here
16001 2004-11-07 Zoltan Varga <vargaz@freemail.hu>
16003 * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
16006 * cpu-sparc.md: Add op_rethrow.
16008 * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
16010 * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
16012 * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
16013 * mini-ops.h: Add OP_RETHROW.
16015 * mini.c inssel.brg: Distinguish between THROW and RETHROW.
16017 * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
16019 2004-11-05 Geoff Norton <gnorton@customerdna.com>
16021 * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
16022 Makes the output much easier to read
16024 2004-11-05 Ben Maurer <bmaurer@ximian.com>
16026 * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
16027 prevents another huge leak when compiling with ssa. Secondly, the
16028 performance of doing this rather than freeing the lists is much
16029 better. GList does a lock every time you allocate a list link,
16030 so that it can use a memory pool. So, it is better to just use
16031 a memory pool of our own.
16033 * ssa.c, linear-scan.c: replace g_list_remove_link with
16034 g_list_delete. The remove one does not free the GList, so we were
16035 leaking memory. On -O=all --compile-all with corlib, this cut down
16036 3 MB of allocations.
16038 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
16040 * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
16042 * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
16044 * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
16045 into a new function mono_create_jit_trampoline ().
16047 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
16049 * trace.c (get_spec): Allow tracing of classes without a namespace.
16051 2004-11-02 Sebastien Pouliot <sebastien@ximian.com>
16053 * mini.c: Fix pointer overwrite in mini_method_compile.
16055 2004-11-2 Geoff Norton <gnorton@customerdna.com>
16057 * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
16058 The darwin ABI needs some special handling for 1 and 2 byte structs
16059 Lets use lbz/lhz instead of lwz everywhere.
16060 * mini-ppc.c (calculate_sizes): The Darwin ABI needs from special handling
16061 for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
16062 Use stb/sth for the former, and put the latter always on stack instead of in
16063 argument registers.
16065 2004-10-30 Zoltan Varga <vargaz@freemail.hu>
16067 * trace.c (is_filenamechar): Add '_'.
16069 2004-10-29 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16071 * mini-s390.c: Fix prolog length to allow for large trace requirements.
16073 * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
16075 2004-10-29 Zoltan Varga <vargaz@freemail.hu>
16077 * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
16078 depends on libmonogc. Fixes #68805.
16080 2004-10-26 Miguel de Icaza <miguel@ximian.com>
16082 * mini.c (mono_jit_free_method): Provide extra information for
16083 this error. Currently this leaks, but will be turned into a
16084 developer option in the future.
16086 2004-10-26 Zoltan Varga <vargaz@freemail.hu>
16088 * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
16090 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
16092 * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte
16093 boundary. Fixes reading of PATCH_INFO_R4 and R8.
16094 (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
16096 2004-10-24 Zoltan Varga <vargaz@freemail.hu>
16098 * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
16099 trampolines for AOT code.
16101 2004-10-22 <vargaz@freemail.hu>
16103 * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
16104 constructed types. Fixes #68136.
16106 2004-10-21 Martin Baulig <martin@ximian.com>
16108 * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
16109 if it returns true, unwind the stack to the call instruction.
16111 2004-10-21 <vargaz@freemail.hu>
16113 * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
16115 * mini.h: Bump AOT version number.
16117 * objects.cs: Add another test for unbox trampolines.
16119 * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for
16122 2004-10-20 <vargaz@freemail.hu>
16124 * driver.c: Add SHARED to the set of optimizations tested.
16126 * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
16128 * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
16129 used by CEE_NEWARR.
16131 * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
16133 2004-10-20 Martin Baulig <martin@ximian.com>
16135 * mini-exceptions.c (mono_handle_exception): Call
16136 mono_debugger_handle_exception() to tell the debugger about
16137 catch/finally clauses.
16139 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
16141 * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
16143 * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
16146 2004-10-15 Geoff Norton <gnorton@customerdna.com>
16148 * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
16149 methods as their native size, fixed bug #57543, #57545.
16150 * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
16151 This saves a temporary register and mullw call down into 1 (minor perf
16152 increase for cases like sum = sum * 5; This use to translate into:
16155 It now translates to
16158 2004-10-15 Zoltan Varga <vargaz@freemail.hu>
16160 * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
16163 2004-10-11 Martin Baulig <martin@ximian.com>
16165 * mini.c (mono_method_to_ir): If we're a generic method, get the
16166 MonoGenericContainer from our MonoMethodNormal and create a
16167 MonoGenericContext from it.
16169 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
16171 * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
16173 * basic-long.cs: Add test for checked i8->i2 cast.
16175 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16177 * inssel-ppc.brg: added a couple of speedup rules.
16179 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
16181 * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
16182 to speed up rebuilds.
16184 2004-10-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16186 * mini-s390.c: Minor fix to OP_OR_IMM.
16188 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
16190 * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
16191 better. Fixes appdomain-unload.exe on sparc.
16193 2004-10-02 Massimiliano Mantione <massi@ximian.com>
16195 * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
16196 simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
16199 2004-10-02 Zoltan Varga <vargaz@freemail.hu>
16201 * jit-icalls.c: Handle a nonexisting trunc function more correctly.
16203 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
16205 * mini.c: Always generate a field read/write wrapper for members
16206 of the class MarshalByRefObject since the actual instance could
16209 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
16211 * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
16213 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
16215 * driver.c mini.h trace.c: Move the setting of the main assembly into
16216 a separate function called mono_trace_set_assembly () and call it after
16217 actually loading the main assembly. Fixes #66872.
16219 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
16221 * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
16222 using the code manager.
16224 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
16226 * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
16228 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
16230 * cpu-amd64.md: Fix bug in previous patch.
16232 * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
16235 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
16237 * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
16238 mini-exceptions.c: updates for changed stack walk interface.
16240 2004-09-21 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16242 * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
16244 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
16246 * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
16248 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
16250 * driver.c (mini_regression_list): Do not call mono_assembly_close
16251 since assemblies can't be unloaded.
16253 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
16255 * cpu-amd64.md: Fix more instruction lengths.
16257 * cpu-amd64.md: Fix lengths of some instructions.
16259 2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
16261 * inssel.brg: Make the array ldelema check aot friendly.
16263 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
16265 * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
16267 * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
16269 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
16271 * mini-x86.c: Fix build.
16273 * mini-sparc.c mini-x86.c mini-amd64.c: Use the new
16274 mono_type_get_underlying_type () helper function to simplify code.
16276 2004-09-09 Martin Baulig <martin@ximian.com>
16278 * mini-amd64.c: Don't access `type->data.klass' directly, call
16279 mono_class_from_mono_type() instead since the type may be a
16282 2004-09-09 Martin Baulig <martin@ximian.com>
16284 * mini-amd64.c (get_call_info): Fix support for generic instances.
16285 (add_valuetype): Use mono_class_from_mono_type() to get the class
16286 since we can be a generic instance.
16288 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
16290 * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
16292 2004-09-07 Ben Maurer <bmaurer@users.sourceforge.net>
16294 * liveness.c: reset spill costs on each scan: bug 62107
16296 2004-09-07 Bernie Solomon <bernard@ugsolutions.com>
16298 * exceptions-sparc.c (mono_arch_find_jit_info): remove
16299 unnecessary line that doesn't compile
16301 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
16303 * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
16304 trampolines, make them call an error function so people can fix their
16307 2004-09-06 Martin Baulig <martin@ximian.com>
16309 * mini.c (mono_method_to_ir): When initializing locals, handle a
16310 generic instances like a valuetype if it's a valuetype and like a
16311 class if it's a class.
16313 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
16315 * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
16316 stack. Fixes #64674.
16318 * exceptions.cs: Add test for unwinding of call arguments.
16320 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
16322 * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
16323 OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
16324 set the carry/borrow flag). The sparc and s390 implementations
16325 can now use optimized versions (and simplify the code). ppc bugfixes.
16327 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
16329 * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
16331 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
16333 * inssel-amd64.brg: Remove leftover 32 bit rule.
16335 * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
16337 2004-09-04 Zoltan Varga <vargaz@freemail.hu>
16339 * mini-exceptions.c (mono_find_jit_info): Refactor common code from
16340 mono_arch_find_jit_info functions into a new function. Fix a memory
16343 * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
16346 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
16348 * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
16351 * exceptions.cs: Add array size tests.
16353 * mini.c: Allocate a separate icall wrapper for each arity of
16354 mono_array_new_va. Fixes #59509.
16356 * exceptions.cs: Add testcase for 64578.
16358 * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
16360 * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
16362 2004-09-02 Martin Baulig <martin@ximian.com>
16364 * mini.c (mono_method_to_ir): When initializing the locals, call
16365 handle_initobj() on the generic instance itself, not its
16368 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
16370 * mini.h (MonoJitDynamicMethodInfo): New structure, extension of
16371 MonoJitInfo for dynamic methods.
16373 * mini.c: Rename trampoline_hash_mutex to jit_mutex.
16375 * mini.c: Add support for freeing JIT data for dynamic methods.
16377 2004-09-01 Martin Baulig <martin@ximian.com>
16379 * mini-x86.c (is_regsize_var): Added support for generic
16381 (mono_arch_emit_prolog): Make this compile again, use
16382 `x86_push_imm_template (code)'.
16384 2004-08-30 Ben Maurer <bmaurer@users.sourceforge.net>
16386 * mini-x86.c: make all push_imm instructions that get
16387 patched always emit the long form
16389 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
16391 * mini.c (mono_create_jump_trampoline): Store the jump trampolines
16392 in a per-domain hash.
16394 * mini-amd64.c (merge_argument_class_from_type): Handle generic
16397 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
16399 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
16402 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
16405 * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
16406 Beginnings of SSE2 support.
16408 * exceptions.cs: Add more tests for checked int<->uint casts.
16410 2004-08-28 Martin Baulig <martin@ximian.com>
16412 * mini-x86.c (mono_arch_instrument_epilog): Added support for
16416 (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
16417 Handle generic instances recursively.
16419 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
16421 * iltests.il: test for conv.u8 on a constant
16423 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
16425 * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
16426 LCONV_x4 (shrun_32 (membase)).
16428 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
16430 * inssel-x86.brg: c&p rules for push/setret of long
16432 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
16434 * inssel-x86.brg: c&p rules for compare (base, regvar) and
16435 compare (regvar, base)
16437 * inssel-x86.brg: more burg love
16439 * inssel.brg: more cleanup
16441 * inssel-x86.brg, inssel-long32.brg: burg cleanup.
16443 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
16445 * basic-long.cs, basic-calls.cs: new tests for optimization.
16447 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
16449 * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
16452 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
16454 * mini-amd64.c (read_tls_offset_from_method): Add another case.
16456 2004-08-25 Bernie Solomon <bernard@ugsolutions.com>
16458 * inssel.brg (mini_emit_memcpy): use
16459 NO_UNALIGNED_ACCESS to disable memcpy optimization
16461 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
16463 * mini-amd64.c: Handle generic types in various places.
16465 * mini.c (mono_method_to_ir): Handle generic types in init locals.
16467 2004-08-24 Zoltan Varga <vargaz@freemail.hu>
16469 * mini.c (handle_box): Fix warning.
16471 * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
16473 * mini-amd64.h: Enable the emit_state optimization.
16475 * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
16477 * mini-amd64.c: Add some new 64 bit peephole opts.
16479 * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
16481 * cpu-amd64.md: sreg1 of div instructions must be %rax.
16483 * mini-amd64.c: Register allocator fixes.
16485 * mini.c: Add an optimization to emit_state to avoid allocation of new
16486 registers on some platforms.
16488 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
16490 * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
16492 * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
16493 allocation. Fixes #63085.
16495 * basic-long.cs: Add new regression test.
16497 * mini-amd64.c: Register allocator improvements.
16499 2004-08-21 Zoltan Varga <vargaz@freemail.hu>
16501 * mini-amd64.c (read_tls_offset_from_method): Add another code
16504 * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
16505 instruction sequence for nullifying class init trampolines.
16507 * objects.cs: Add new regalloc test.
16509 * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
16511 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
16513 * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
16515 * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
16518 * driver.c: Fix profiling after TLS changes.
16520 * driver.c (mono_main): Set mono_stats.enabled if needed.
16522 * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
16525 2004-08-20 Ben Maurer <bmaurer@users.sourceforge.net>
16527 * mini-x86.c: use a 1 op rather than a 2 op tls access
16528 instruction -> faster.
16530 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
16532 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
16535 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
16537 * exceptions-sparc.c (throw_exception): fix typo
16539 2004-08-19 Ben Maurer <bmaurer@users.sourceforge.net>
16541 * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
16542 set tree->dreg correctly with tls. Allow any
16543 register to be used.
16545 * mini-x86.c (read_tls_offset_from_method): add new code
16546 generation pattern seen with GCC.
16549 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
16551 * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
16552 exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
16553 exceptions-sparc.c: fix some performance issues in exception
16554 handling and setting of the stack trace for exceptions that were
16557 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
16559 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
16562 * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible
16565 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
16567 This patch inlines tls access, when possible.
16569 * mini.h: new arch functions for TLS intrinsics.
16570 All platforms updated with a stub.
16572 * mini.c: use the new intrinsics
16574 * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
16575 arch specific intrinsic for tls variables
16577 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
16579 * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
16582 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
16584 * mini.c: thread local allocation
16586 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
16588 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
16590 * Makefile.am: Link against the static version of libmonogc.
16592 * Makefile.am: Link the static versions of the convenience libraries
16593 into the mono executable.
16595 * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
16597 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
16599 * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
16600 on integer overflow.
16602 * mini-amd64.c: Reorganize function call code.
16604 * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
16606 2004-08-14 Ben Maurer <bmaurer@ximian.com>
16608 * inssel-x86.brg: use xor eax,eax.
16610 * basic.cs: new tests
16612 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
16614 * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
16615 in exception throwing code.
16617 2004-08-14 Ben Maurer <bmaurer@ximian.com>
16619 * inssel-x86.brg: use xor esi,esi.
16621 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
16623 * driver.c (mono_main): Call mono_trace_parse_options earlier so it
16624 can trace methods compiled during mini_init () too.
16626 * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle
16629 2004-08-14 Ben Maurer <bmaurer@ximian.com>
16631 * Makefile.am: static link on x86 (r=zoltan)
16633 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
16635 * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
16636 code since it causes some programs to fail.
16638 2004-08-12 Zoltan Varga <vargaz@freemail.hu>
16640 * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
16642 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
16644 * mini.c: ovfops_op_map - add STACK_OBJ case for
16646 * basic.cs: add test_0_pin_string as test
16649 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
16651 * Makefile.am: build C# if srcdir != builddir
16653 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
16655 * dominators.c, mini.h, mini-x86.c: fix loop alignment with
16656 fall-through blocks.
16658 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16660 * driver.c: enable loop by default again and include abcrem in -O=all.
16662 2004-08-08 Zoltan Varga <vargaz@freemail.hu>
16664 * iltests.il: Add some localloc tests.
16666 * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
16668 * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly.
16671 * inssel-amd64.brg: Add some optimizations.
16673 * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
16676 * Makefile.am: Statically link mono against libmono on AMD64.
16678 * mini-amd64.c inssel-amd64.brg: Optimizations.
16680 2004-08-07 Zoltan Varga <vargaz@freemail.hu>
16682 * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
16684 * tramp-amd64.c: Patch calling code in trampolines.
16686 2004-08-06 Zoltan Varga <vargaz@freemail.hu>
16688 * mini-amd64.c: pinvoke struct passing fixes.
16690 2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
16692 * mini-sparc.c: redo change, make mono_arch_cpu_init call
16693 mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
16695 2004-08-05 Duncan Mak <duncan@ximian.com>
16697 * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
16700 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
16702 * mini-amd64.c (emit_move_return_value): Move return value for normal
16705 2004-08-05 Martin Baulig <martin@ximian.com>
16707 * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
16708 `type->type'; just modify `type' itself when dealing with enums
16709 and generic instances.
16710 (check_call_signature): Make `simple_type' a `MonoType *'.
16712 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
16714 * mini.c: Use OP_PADD to add offsets to addresses.
16716 * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
16718 2004-08-04 Bernie Solomon <bernard@ugsolutions.com>
16720 * mini-sparc.c (mono_arch_emit_epilog): fix check
16721 for folding last op into restore instruction
16723 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
16725 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
16726 helper methods using the code manager.
16728 * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
16730 * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
16732 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16734 * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
16735 cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
16737 * mini-s390.c: fix tail processing
16739 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
16741 * mini-ppc.c: mul.ovf.un exception name fix.
16743 2004-08-03 Martin Baulig <martin@ximian.com>
16745 * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
16746 instances; before jumping to `handle_enum', also modify `ptype'.
16748 2004-08-02 Bernie Solomon <bernard@ugsolutions.com>
16750 * cpu-sparc.md: fcall maximal length too small.
16752 2004-08-02 Zoltan Varga <vargaz@freemail.hu>
16754 * mini-amd64.c mini.h: Add initial support for passing/returning
16755 structures to/from pinvoked methods.
16757 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
16759 * mini-ppc.c: reg allocator fix.
16761 2004-07-31 Zoltan Varga <vargaz@freemail.hu>
16763 * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
16765 * inssel.brg: Optimize memset on 64 bit machines.
16767 * mini-amd64.c: Fix some vararg cases.
16769 2004-07-30 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16771 * mini-s390.c: Corrected macro in emit_float_to_int
16773 * s390-abi.cs: Tests to exercise the s390 ABI
16775 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
16777 * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
16780 * basic.cs: Add a test for add.ovf.un.
16782 2004-07-30 Bernie Solomon <bernard@ugsolutions.com>
16784 * mini-sparc.c: add case for OP_IDIV_UN
16786 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
16788 * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
16790 * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
16792 2004-07-30 Ben Maurer <bmaurer@ximian.com>
16794 * basic.cs: regression tests.
16796 * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
16799 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
16801 * basic.cs: Add a new test.
16803 * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling
16804 and AOT. Various fixes and optimizations.
16806 * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
16808 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
16810 * mini-ppc.c: make sure temp regs are not used for global reg
16813 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
16815 * cpu-sparc.md: conv_i8 fix for 64bits
16817 * mini-sparc.c: add cases for OP_IXXX codes for 64bits
16819 2004-07-29 Ben Maurer <bmaurer@ximian.com>
16821 * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
16822 add opcode for cmp BYTE PTR [eax], imm.
16824 * inssel.brg: Make memcpy and memset takes bases.
16826 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
16828 * *-amd64.*: More AMD64 work.
16830 2004-07-28 Ben Maurer <bmaurer@ximian.com>
16832 * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
16833 add a compare-not-equal opcode.
16835 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
16837 * mini.c: Use mono_init_from_assembly instead of mono_init.
16839 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
16841 * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
16843 * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
16845 * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
16847 * inssel.brg: 64 bit fixes.
16849 * mini.h (MonoCallInst): Add some AMD64 specific data.
16851 * mini.h: Add some OP_P opcodes.
16853 2004-07-28 Ben Maurer <bmaurer@ximian.com>
16855 * basic.cs: tests for 61797 and 61740
16857 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
16859 * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
16860 numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
16862 2004-07-24 Zoltan Varga <vargaz@freemail.hu>
16864 * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
16866 * *-amd64*.*: Ongoing AMD64 work.
16868 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
16870 * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
16872 * *-amd64*: Ongoing AMD64 work.
16874 * mini-arch.h: Add AMD64 support.
16876 * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
16878 * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
16880 * mini-ops.h: Add new opcodes.
16882 * Makefile.am: Add AMD64 support.
16884 * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
16885 rules into the inssel-long*.brg files.
16887 * *-amd64.*: Add beginnings of AMD64 backend.
16889 2004-07-22 Ben Maurer <bmaurer@ximian.com>
16891 * mini.c (print_dfn): commenting out the code that prints
16892 the cil. With -O=deadce, this makes -v -v crash.
16894 * cpu-pentium.md: make checkthis have a length of 2
16896 2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
16898 * mini-sparc.h: fix implementations of __builtin
16899 functions for Sun compiler for V9.
16901 2004-07-16 Ben Maurer <bmaurer@ximain.com>
16903 * mini.c: use the new stelem.ref wrapper
16904 * exceptions.cs, arrays.cs: new stelem.ref tests
16906 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
16908 * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
16909 new XSP should work with these changes).
16911 2004-07-14 Ben Maurer <bmaurer@ximain.com>
16913 * inssel-{long32,x86,}.brg: trivial optimizations.
16915 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
16917 * mini.c: load value when emitting box operation in
16920 2004-07-12 Ben Maurer <bmaurer@ximian.com>
16922 * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
16923 is one byte shorter than cmp DWORD PTR [eax], 0.
16925 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
16927 * inssel-ppc.brg: arguments on the stack are always
16928 relative to the stack pointer (spotted by Neale Ferguson).
16930 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16932 * exceptions-x86.c: delay appending the method name to the trace until
16933 after mono_jit_info_table_find is called, as this gets the real
16936 2004-07-09 Ben Maurer <bmaurer@ximian.com>
16938 * aot.c: register roots
16940 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
16942 * aot.c : I could just use PLATFORM_WIN32 flag.
16944 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
16946 * aot.c : Reverting the previous fix. This time it broke linux build.
16948 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
16950 * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
16952 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
16954 * mini.c (handle_stack_args): Remove some more debugging code.
16956 * mini.c (handle_stack_args): Remove debug output left in by mistake.
16958 * driver.c mini.h aot.c: Allow additional options to be specified with
16959 --aot and pass them to mono_compile_assembly.
16961 * aot.c: Add experimental code to AOT compile all loaded assemblies
16962 on demand and save the code into a cache in the filesystem.
16964 * aot.c: Add support for more wrapper methods.
16966 * mini.c (handle_stack_args): Handle some corner cases. Fixes
16969 * cpu-*.md: Remove removed opcodes.
16971 * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
16972 CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
16973 related icalls to marshal.c.
16975 2004-07-06 Zoltan Varga <vargaz@freemail.hu>
16977 * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
16979 * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
16981 * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
16983 2004-07-06 Ben Maurer <bmaurer@ximian.com>
16984 * liveness.c: If liveness is recomputated we need to reset the information
16985 for each variable. This way, if the liveness range has been narrowed
16986 by optimizations that happened after the last computation, we can return
16989 For example, if you have
16994 // Tons of code that does not affect i
17000 i = 0 is dead code and will be removed by SSA. However, when
17001 linear scan gets to the code, i will still appear to be live
17002 throughout the entire block. This prevents good register allocation.
17004 2004-07-06 Martin Baulig <martin@ximian.com>
17006 * debug-mini.c (mono_debug_init_method): Allow
17007 MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
17008 (mono_debug_add_icall_wrapper): New method.
17010 * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
17012 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
17014 * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
17017 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
17019 * aot.c (mono_aot_load_method): Fix loading of debug info.
17021 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
17023 * aot.c: Add logging support.
17025 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
17027 * mini.h: Add prototype for mono_print_method_from_ip.
17029 * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
17031 * inssel.brg: 64 bit fixes.
17033 * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to
17036 * Makefile.am: Add SPARC64 support.
17038 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
17040 * aot.c: Fix alignment problems on 32 bit platforms.
17042 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
17044 * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
17047 * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
17050 * mini.h: Bump AOT file version. Some 64 bit fixes.
17052 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
17054 * inssel-sparc.brg: Add new rule to avoid register moves.
17056 * inssel.brg: Add ldind_to_load_membase helper function.
17058 2004-06-30 Ben Maurer <bmaurer@ximian.com>
17060 * mini.c: OffsetToStringData intrinsic.
17062 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
17064 * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
17066 * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
17069 * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
17070 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
17072 * mini.c: reinstated mono_compile_get_interface_var()
17073 on x86, too, since the change breaks the Gtk# build there as well.
17075 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17077 * driver.c: remove loop from the default optimizations: it seems to
17078 interact badly with some of the other options (see bug #60613).
17080 2004-06-25 Zoltan Varga <vargaz@freemail.hu>
17082 * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
17083 (fld@informatik.uni-bremen.de): Add Solaris x86 support.
17085 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
17087 * mini-ppc.c, cpu-g4.md: small updates to be able to compile
17088 vararg-using methods.
17090 2004-06-21 Martin Baulig <martin@ximian.com>
17092 * mini/mini-exceptions.c
17093 (mono_handle_exception): Added `gpointer original_ip' argument.
17094 After calling mono_unhandled_exception(), call
17095 mono_debugger_unhandled_exception() and if that returns true,
17096 restore the context and return.
17098 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
17100 * mini-ppc.c: prefer the use of relative branches so
17101 they won't need to be patched in aot code (patch from Patrick Beard).
17103 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
17105 * aot.c: patch from Patrick Beard to make the output assembly
17106 more correct for the MacOSX assembler. Small tweak to
17107 generate sane images on Linux/PPC, too.
17109 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17111 * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
17112 case until bug #59509 is fixed (shows up in #60332).
17114 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
17116 * mini.c: make sure the needed wrappers are compiled, too, with
17119 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
17121 * driver.c: remove NPTL reference in --version output.
17123 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17125 * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
17126 generate valid assembly for the Mach-O assembler.
17128 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
17130 * driver.c: don't include abcrem in the all optimization specifier
17131 since it slows down jit compilation too much for now.
17133 2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
17135 * mini.c: use BIGMUL only if both operands have the same signage.
17136 * iltests.il: Test for bug 60056. (errors related to signage in
17141 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
17143 * mini.c, aot.c: memory leak fixes.
17145 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
17147 * inssel-long32.brg: implemented a few missing ulong cast opcodes.
17149 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
17151 * Makefile.am: remove the -static hack completely, it links in
17152 statically glib as well.
17154 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
17156 * iltests.il, mini.c: fixed bug#59580 in branch optimization.
17157 * exceptions.cs: make it compile with new mcs/csc.
17159 2004-06-03 Massimiliano Mantione <massi@ximian.com>
17160 * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
17161 and added relevant test case.
17163 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
17165 * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
17166 regressions in gtk-sharp.
17168 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
17170 * exceptions.cs: New regression tests.
17172 * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
17174 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
17176 * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
17178 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
17180 * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
17182 * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
17184 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
17186 * mini.c (mono_jit_runtime_invoke): Init class in this
17187 method instead of trusting mono_jit_compile_method to
17188 do the work (because wrappers can be in object class)
17190 2004-05-27 Zoltan Varga <vargaz@freemail.hu>
17192 * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
17194 * basic-long.cs: New regression test.
17196 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
17198 * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
17199 and div/rem checks.
17201 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
17203 * Makefile.am: fix miguel's change to build mono statically against
17204 libmono (track build dependencies).
17206 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
17208 * cfold.c: Some glib versions do not have G_MININT32.
17210 2004-05-26 Massimiliano Mantione <massi@ximian.com>
17212 * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
17213 with precision of tan, atan, sin and cos, and implemented related
17214 regressions tests (fixes bug 54467, but one new problem appeared and
17217 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
17219 * cfold.c (FOLD_BINOPZ): Avoid division by zero.
17221 * exceptions.cs: Add test for constant folding && division by zero.
17223 * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
17224 since driver.c is in libmono too, so the optimization was useless.
17226 * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
17227 variable to driver.c so the compiler can emit more efficient code to
17230 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17232 * Makefile.am: don't distribute generated inssel.[ch] files.
17234 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
17236 * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
17237 into the default appdomain. Fixes #58707.
17239 * jit-icalls.c: Remove the broken approximation for truncl, doing
17240 no conversion is better.
17242 * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
17245 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
17247 * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
17248 of the mcrxr instruction which is not available on some processors
17249 even if it's documented to be. Implement add and sub overflow correctly
17250 (still not complete for long unsigned). Speed up icalls a bit.
17252 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
17254 * mini.c (mono_jit_compile_method_with_opt): Make sure that
17255 we run .cctor in the current domain instead of target_domain.
17257 Fixes bug #58558, .cctor not being called in -O=shared.
17259 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
17261 * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
17263 2004-05-24 Ben Maurer <bmaurer@users.sourceforge.net>
17265 * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
17266 which can be done with an imm8, do it that way.
17267 (mono_arch_output_basic_block): ditto for a jmp
17268 (mono_arch_emit_prolog): Computate maximum offset of a label.
17270 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
17272 * mini-x86.c (mono_arch_local_regalloc): the reg allocator
17273 now tries to allocate prefered physical reg's for virtual
17274 regs. This reduces the number of emited spills/loads with
17275 20-30% on our core assemblies.
17277 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
17279 * jit-icalls.c: truncl() is not needed and trunc() is
17280 the correct thing to do anyway (bug #58287).
17282 2004-05-24 Zoltan Varga <vargaz@freemail.hu>
17284 * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
17287 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
17289 * driver.c: enable loop optimizations by default.
17291 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
17293 * mini-x86.c: fix calc of max loop size when aligning loops start.
17295 2004-05-23 Zoltan Varga <vargaz@freemail.hu>
17297 * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
17300 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
17302 * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
17305 * basic-long.cs: Add tests for add/subtract of immediates with carry.
17307 * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
17309 * mini.c (inline_method): Allways inline some wrappers even if the cost
17310 is too large. Fixes #58785.
17312 * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
17314 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
17316 * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
17317 (crichton@gimp.org). Beginning of support for sparc/linux.
17319 * mini-sparc.c: Optimize retrieval of LMF address.
17321 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
17323 * exceptions-ppc.c: handle alloca in methods with clauses.
17325 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
17327 * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
17329 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
17331 * mini.c: Delegate most of the abort signal work to
17332 mono_thread_request_interruption, which also handles Stop and Suspend
17335 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
17337 * mini.c mini.h: Allow inlining of icall wrappers if the backend
17338 supports the save/restore lmf opcodes.
17340 2004-05-19 Zoltan Varga <vargaz@freemail.hu>
17342 * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
17343 by gcc-3.4 as well.
17345 * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
17347 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
17349 * mini.h mini.c (mini_method_compile): Only run abc removal pass on
17350 methods which contain array accesses.
17352 * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
17353 boundaries. Fixes #58537.
17355 * iltests.il: Add regression test for #58537.
17357 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
17359 * mini-x86.c (mono_arch_local_regalloc): Last part of
17360 fix for bug #58633 (releasing register to early).
17362 2004-05-18 Miguel de Icaza <miguel@ximian.com>
17364 * basic-long.cs: Add new regression test.
17366 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
17368 * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
17369 register too early on the chain.
17371 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
17373 * mini.c (create_helper_signature): Use a helper function to reduce
17374 the code which needs to be written. Also set the calling convention of
17375 icalls on windows. Fixes #57840.
17377 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
17379 * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
17380 exceptions-ppc.c: added helper function to get the instruction address
17381 from a signal handler context.
17383 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
17385 * helpers.c: use g_get_tmp_dir. Invokes happyness
17388 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
17390 * helpers.c: Add new env variable to pass args to objdump.
17391 Specifically for those of us who love -Mintel. r=miguel, gonzalo.
17393 2004-05-17 Radek Doulik <rodo@ximian.com>
17395 * Makefile.am (common_sources): added abcremoval.h so it get
17396 disted and daily mono packages on go-mono.com will build again
17398 2004-05-17 Massimiliano Mantione <massi@ximian.com>
17400 * abcremoval.c: Fixed coding style, added copyright header.
17402 * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
17404 * mini.h: Added prototype for abc removal main function.
17406 * build_relations_propagation_table.pl: Added copyright header.
17408 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
17410 * basic-long.cs: reg test for complex ceq_long bug.
17412 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
17414 * mini-x86.c (mono_arch_local_regalloc): Correctly free
17415 reg in long and clob case (bug #58343). Fixed/added comments.
17417 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
17419 * mini.c (mono_jit_runtime_invoke): Follow new convention
17420 of calling the invoke method with an function pointer.
17422 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
17424 * ChangeLog: Fix author of memory leak patch.
17426 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
17428 * Makefile.am: fix make dist as well...
17431 2004-05-14 Massimiliano Mantione <massi@ximian.com>
17433 * cfold.c: Made so that conversions from pointer to int4 are no-ops
17434 on archs where pointers are 4 bytes long.
17436 * Makefile.am: Added abcremoval.c source file.
17438 * abcremoval.c: Added abcremoval.c.
17440 * abcremoval.h: Added abcremoval.h.
17442 * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
17444 * inssel.brg: Enabled bounds check removal.
17446 * mini.c: Added support for abcrem optimization.
17448 * mini.h: Added abcrem optimization label.
17450 * driver.c: Added support for abcrem optimization.
17452 * propagated_relations_table.def: Added propagated_relations_table.def.
17454 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
17456 * mini.c, cfold.c: fix style.
17458 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
17460 * mini.c: handle issue with the low-level implementation of
17461 some long opcodes (bug #54209).
17463 2004-05-13 Ben Maurer <bmaurer@users.sourceforge.net>
17465 * basic.cs: test for my new cmov stuff.
17467 2004-05-13 Patrik Torstensson
17469 * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
17470 opt and added peephole documentation.
17472 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
17474 * tramp-ppc.c: rewrote the generic trampoline code.
17476 2004-05-11 Patrik Torstensson
17478 * mini-x86.c: optimize long shl/shr asm code (one less branch)
17480 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
17482 * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
17484 * mini.h mini.c dominators.c: Applied patch from Derek Woo
17485 (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
17487 * mini.c: Add new icalls for AsAny marshalling.
17489 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
17491 * tramp-ppc.c, mini-ppc.c: more cleanups.
17493 2004-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17495 * mini.c: no warnings.
17497 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17499 * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
17501 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
17503 * mini.c: In the thread abort signal handler, if the thread is in the
17504 process of being stoped, don't throw the Abort exception, just stop the
17507 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
17509 * tramp-ppc.c: removed old code.
17511 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17513 * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
17514 do some simple speed optimizations on ppc.
17516 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
17518 * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
17519 and large offsets in load/store.
17521 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
17523 * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
17524 it causes regressions.
17526 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
17528 * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
17531 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
17533 * jit-icalls.c: remove warnings.
17534 * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
17535 speedups for unsafe code.
17537 2004-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
17539 * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
17541 2004-05-06 Zoltan Varga <vargaz@freemail.hu>
17543 * basic-calls.cs: Add new regression test.
17545 * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
17548 * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
17550 * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
17553 2004-05-06 Patrik Torstensson
17555 * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
17556 long reg allocation in any reg (not only eax:edx) and implemented
17557 long shl/shr ops in asm instead of helpers.
17559 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
17561 * mini-sparc.h: Fix warnings.
17563 * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
17566 * mini-exceptions.c (mono_handle_exception): Call the filter in a
17567 separate statement for clarity.
17569 * mini-sparc.c: Update status.
17571 2004-05-04 Zoltan Varga <vargaz@freemail.hu>
17573 * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
17576 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
17578 * inssel-ppc.brg: another small pre-release workaround:
17579 we don't do overflow detection for long_sub_un.
17581 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
17583 * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
17584 (also works around a weird ppc bug: 57957).
17586 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
17588 * tramp-ppc.c: trampoline fixes.
17590 Fri Apr 30 15:54:26 EDT 2004 Paolo Molaro <lupus@ximian.com>
17592 * mini-ppc.c: fixed typos.
17594 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
17596 * mini-ppc.c, exceptions-ppc.c: more code saves registers
17597 at the top of the stack. Fixed typos. Use a frame registers
17598 for all the methods with exception clauses.
17600 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
17602 * exceptions-ppc.c: restore fp registers.
17604 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
17606 * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
17607 order from the stack top (moved the stack room to save the
17608 return value for trace after the param area). Fixed corruption
17609 in restoring registers on unwind.
17611 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
17613 * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
17615 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
17617 * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
17618 and prolog/epilog for methods that use it. Allow
17619 enough param area room for varargs methods. Fix miguel's
17620 breakage in exception handling.
17622 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
17624 * Makefile.am: run genmdesc only on current arch.
17626 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17628 * exceptions-x86.c:
17629 * mini-x86.h: fix the build on windows.
17631 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
17633 * 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.
17635 * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
17637 * mini-exceptions.c: New file.
17639 * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
17640 Move some parts of the x86 exception handling code to an
17641 arch-independent file so it can be shared with other ports.
17643 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
17645 * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
17647 2004-04-26 David Waite <mass@akuma.org>
17649 * driver.c: remove comma from end of enumeration declaration
17651 2004-04-26 Jackson Harper <jackson@ximian.com>
17653 * driver.c: parse config file before loading first assembly. This
17654 allows the user gac to be enabled/disabled.
17656 2004-04-23 Miguel de Icaza <miguel@ximian.com>
17658 * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
17659 simpler mechanism: we do not care what is encoded initially
17660 (branch absolute or relative), we care about the code and its
17661 target. I kept the old code for reference for now.
17663 The new code tries first to determine if the jump is anywhere in
17664 the -/+32 absolute meg range, if it succeeds, it encodes using the
17665 absolute branch; If not, it tried to find something in the
17666 relative range, if not, it uses the handle_thunk code.
17668 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
17670 * exceptions-ppc.c: use the correct ip register on macosx.
17672 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
17674 * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
17676 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
17678 * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
17679 Raise exception on integer divide by zero by hand since the hw
17680 doesn't support it. Handle NaNs in FP compares.
17682 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
17684 * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
17685 code reducing duplication between the platforms and enabled
17686 signal exception handling (on linux for now).
17688 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
17690 * exceptions-ppc.c: more macosx support.
17692 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17694 * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
17696 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
17698 * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
17700 2004-04-19 Ben Maurer <bmaurer@users.sourceforge.net>
17702 * iltests.il: more tests.
17704 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
17706 * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
17709 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
17711 * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
17713 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
17715 * liveness.c: Mark variables as volatile in all basic blocks reachable
17716 from exception clauses.
17718 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
17720 * exceptions.cs (test_0_rethow_stacktrace): Make this work with
17723 2004-04-18 Ben Maurer <bmaurer@users.sourceforge.net>
17725 * iltests.il, basic.cs: more tests for regalloc.
17727 2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
17729 * iltests.il: Some tests for register allocation modifications
17732 2004-04-16 Zoltan Varga <vargaz@freemail.hu>
17734 * exceptions.cs: Add regression test for bug #56782.
17736 * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
17737 original stack trace if an exception is rethrown. Fixes #56782. Oh,
17738 the beauty of fixing the same thing in 5 different files...
17740 2004-04-15 Zoltan Varga <vargaz@freemail.hu>
17742 * mini.c (mono_method_to_ir): Do not compute coverage for inlined
17745 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
17747 * mini.c: Add support for STRWLPARRAY marshalling convention.
17749 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
17751 * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
17752 to init the context to setup the regs pointer).
17754 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
17756 * exceptions-ppc.c: more exceptions work.
17758 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
17760 * mini.c: avoid reusing the same MonoInst on multiple trees: this is
17763 2004-04-13 Miguel de Icaza <miguel@ximian.com>
17765 * inssel-x86.brg (reg): Add new rules for add, sub and mul that
17766 can use the memory directly.
17768 * cpu-pentium.md: Update documentation from a post from Zoltan.
17770 add x86_add_membase, x86_sub_membase, x86_mul_membase
17772 2004-04-13 Miguel de Icaza <miguel@ximian.com>
17774 * mini-ppc.c: Remove unused definitions FLOAT_REGS and
17775 GENERAL_REGS they were also hardcoded for all PPC ports.
17777 (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
17779 Remove hard-coded limit for floating point registers, use
17780 PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
17782 Notice that in MacOS X calling conventions you can fit a lot more
17783 floating point values in registers, so I should update the PInvoke
17784 test to excercise the passing of floating point values on the
17785 stack (currently broken).
17787 2004-04-06 Miguel de Icaza <miguel@ximian.com>
17789 * tramp-ppc.c (create_trampoline_code): Added
17790 JUMP_TRAMPOLINE_SIZE.
17791 (ppc_magic_trampoline): Follow the pattern from
17792 x86_magic_trampoline: if code is set to zero, return.
17793 (create_trampoline_code): Always pass MonoMethod to the jump
17794 trampoline, before it was passing a null.
17795 (mono_arch_create_jump_trampoline): Implement the jump stub, could
17796 share the code with mono_arch_create_jit_trampoline.
17798 * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
17800 (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
17803 * cpu-g4.md: Added length for jmp instruction, the worst case
17804 scenario is 92 bytes (4 mandatory bytes, potential 19 registers
17807 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
17809 * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
17811 2004-04-07 Zoltan Varga <vargaz@freemail.hu>
17813 * mini.c: Only set bblock->real_offset when adding a new bblock, and
17814 before each IL instruction.
17816 * mini.c (CEE_BOX): Fix warnings.
17818 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17820 * mini.c: removed a few unused vars and extra whitespace.
17822 2004-04-05 Ben Maurer <bmaurer@users.sourceforge.net>
17824 * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
17826 (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
17828 (OP_GETCHR): use the above
17829 (CEE_LDELEMA): use the above.
17831 * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
17832 version of the generic impl.
17833 (MONO_EMIT_BOUNDS_CHECK_IMM): the same
17834 (CEE_LDELEMA): use the above.
17836 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
17838 * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
17841 * iltests.il: Added new regression test for #56317.
17843 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
17845 * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
17846 under NetBSD. Fixes #56450.
17848 * liveness.c (update_gen_kill_set): Fix previous patch.
17850 2004-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17852 * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
17854 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
17856 * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
17857 ldsfld and ldsflda.
17859 * inssel-sparc.brg: Add more optimizations.
17861 * mini-sparc.c: Replace multiply/divide with shifts if possible.
17863 2004-04-01 Martin Baulig <martin@ximian.com>
17865 * mini.c (handle_box): New static function; moved the
17866 implementation of CEE_BOX here.
17867 (mono_method_to_ir): Added `constrained_call' variable.
17868 (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
17869 (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
17870 mono_method_get_constrained() to get the method.
17872 2004-04-01 Martin Baulig <martin@ximian.com>
17874 * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
17875 (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
17876 (mono_method_to_ir): We don't need these macros anymore since
17877 mono_class_get_full() already takes care of it.
17879 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17881 * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
17882 use @function (as doesn't accept #function here) and check the return
17883 value of system and stop if fails.
17885 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17887 * mini.c: set the timeout to 2s when calling mono_domain_finalize.
17889 2004-03-31 Zoltan Varga <vargaz@freemail.hu>
17891 * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
17893 * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
17895 * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
17898 * basic-long.cs: Add test for negation of Int64.MinValue.
17900 2004-03-30 Zoltan Varga <vargaz@freemail.hu>
17902 * mini-sparc.c: Update status.
17904 * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
17906 * exceptions-sparc.c: Fix return value in filters.
17908 * inssel-sparc.brg: Fix register allocation in some rules.
17910 2004-03-28 Martin Baulig <martin@ximian.com>
17912 * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
17915 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
17917 * mini-x86.c (mono_arch_patch_code): Fix warnings.
17919 * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if
17920 dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
17921 remove unused conv_u4 opcode.
17923 * mini-x86.c: Remove valgrind workaround since it slows down things
17924 even when mono is not run under valgrind.
17926 2004-03-26 Zoltan Varga <vargaz@freemail.hu>
17928 * mini-sparc.c: Update status.
17930 * inssel-sparc.brg: Add some optimizations.
17932 * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
17933 future delay slot filling. Add support for varargs, tail calls and JMP.
17935 * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of
17936 CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
17938 * inssel.brg: Fix register allocation in OP_ARGLIST.
17940 * inssel.brg: Fix warnings.
17942 2004-03-25 Martin Baulig <martin@ximian.com>
17944 * mini.c (inflate_generic_field): Removed.
17945 (mini_get_method): Removed, use mono_get_method_full(),
17946 (mini_get_class): Removed, use mono_class_get_full().
17947 (mono_method_to_ir): Pass our generic context to
17948 mono_field_from_token().
17950 2004-03-25 Martin Baulig <martin@ximian.com>
17952 * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
17953 of a `MonoMethod *'.
17954 (mini_get_method): Take a `MonoGenericContext *' instead
17955 of a `MonoMethod *'.
17956 (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
17957 a new local variable called `generic_context' which holds the
17958 current `MonoGenericContext *'; use it to lookup things.
17960 2004-03-24 Martin Baulig <martin@ximian.com>
17962 * mini.c (mini_get_class): New static method; if we're inside a
17963 generic instance, inflate the class if neccessary.
17964 (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
17966 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
17968 * iltests.il: New regression test for #55976.
17970 * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
17973 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
17975 * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
17978 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
17980 * liveness.c: Consider SSA stores as well as loads when making vars
17983 * exceptions.cs: New regression tests for register allocation.
17985 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
17987 * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
17988 * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
17989 domain lock only to protect puntual access to data structures.
17990 Added access lock for sighash, jit_icall_hash_name,
17991 jit_icall_hash_addr and domain->code_mp.
17993 2004-03-20 Zoltan Varga <vargaz@freemail.hu>
17995 * driver.c: Print SIGSEGV handling method.
17997 * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
17999 * mini.c (setup_jit_tls_data): Handle case when this is called
18000 multiple times for a thread.
18002 * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx
18003 is different from fbxx_un. Fixes #54303. Also use constants instead of
18004 magic numbers in a lot of places.
18006 2004-03-19 Zoltan Varga <vargaz@freemail.hu>
18008 * exceptions.cs: Fix cctor test when --regression is used.
18010 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
18012 * mini-ppc.c, exceptions-ppc.c: basic exceptions support
18015 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
18017 * inssel-ppc.brg: fixed register assignments for some rules.
18019 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
18021 * exceptions.cs: Add test for exceptions in static constructors.
18023 * mini.c (mono_jit_compile_method_with_out): Move the calling of
18024 static constructors outside the domain lock. Fixes #55720.
18026 2004-03-17 Martin Baulig <martin@ximian.com>
18028 * mini.c (get_generic_field_inst): Removed, this'll never happen.
18029 (inflate_generic_field): Take the `MonoMethod *' instead of the
18030 `MonoClass *' and added support for generic method.
18031 (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
18032 have a `field->parent->gen_params', only inflate the field if it's
18033 an open constructed type.
18035 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
18037 * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
18038 exception object instead of the preconstructed ones.
18040 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18042 * mini.c: reverted changed to sigsegv_signal_handler commited
18043 accidentally in the previous patch.
18045 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18048 (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
18049 running --aot with an old assembly.
18051 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
18053 * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
18056 * mini-sparc.c: Add support for v9 branches with prediction.
18058 2004-03-15 Bernie Solomon <bernard@ugsolutions.com>
18060 * mini.c (mini_init): #warning is GNUC only
18062 * mini-sparc.h: implement __builtin_frame_address
18063 and __builtin_return_address for Sun C compiler
18065 2004-03-15 Zoltan Varga <vargaz@freemail.hu>
18067 * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
18069 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
18071 * basic-calls.cs: Add test for unaligned byref long argument passing.
18073 * mini-ops.h: Add sparcv9 compare and branch instructions.
18075 * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
18076 v9 instructions if we have a v9 cpu.
18078 * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
18079 registers for global allocation.
18081 * exceptions-sparc.c: Fixes.
18083 2004-03-11 Zoltan Varga <vargaz@freemail.hu>
18085 * liveness.c (mono_analyze_liveness): Optimized version.
18087 * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
18089 * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
18092 * basic-float.cs basic-calls.cs: New regression tests.
18094 2004-03-10 Zoltan Varga <vargaz@freemail.hu>
18096 * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
18097 sigaltstack implementation.
18099 * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
18101 * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
18102 stuff if SIGSEGV_ON_ALTSTACK is not defined.
18104 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
18106 * mini.c: Fix warnings.
18108 * mini.c (mono_resolve_patch_target): New function which contains the
18109 arch independent part of the patching process.
18111 * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
18112 patching code to a separate function.
18114 2004-03-09 Bernie Solomon <bernard@ugsolutions.com>
18116 * mini.c (add_signal_handler): ifdef out on Windows
18118 2004-03-08 Zoltan Varga <vargaz@freemail.hu>
18120 * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c
18121 cpu-sparc.md: Add exception handling support + other fixes.
18123 * driver.c: Print --help output to stdout. Fixes #55261. Also fix
18124 typed GC detection in --version.
18126 * basic.cs exceptions.cs: New regression tests.
18128 * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
18129 the arch specific code can store data during a compilation.
18131 * mini-ops.h: Add OP_SETFRET.
18133 * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
18134 function, register a separate icall for each arity, so the icalls can
18137 * mini.c (mono_print_tree): Print negative offsets in a more readable
18140 * mini.c: Make signal handling work on sparc.
18142 * mini.c (mini_init): Add emulation for lconv_to_r8_un.
18144 * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
18146 * jit-icalls.c: Emulate truncl by aintl on solaris.
18148 * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
18150 2004-03-05 Zoltan Varga <vargaz@freemail.hu>
18152 * mini.c (mini_init): fconv_to_ovf can raise exceptions.
18154 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
18156 * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
18157 a MarshalByRef type, inline a method that performs the check, taking into
18158 account that the object can be a proxy. Also implemented tow new opcodes:
18159 CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
18160 * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and
18161 OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
18163 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
18165 * mini-ppc.c: if a relative branch displacement is too big
18166 but it points to and area reachable with an absolute branch,
18169 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
18171 * mini.c: optimize small copies in cpblk.
18173 2004-03-01 Zoltan Varga <vargaz@freemail.hu>
18175 * basic-calls.cs basic-float.cs: New regression tests.
18177 * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at
18178 negative offsets from %fp. Implement localloc. Fix local register
18179 allocation. Fix the case when the this argument needs to be saved to
18180 the stack. Implement some missing opcodes.
18182 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
18184 * mini.c (mini_method_compile): Reenable global regalloc in methods
18185 with exception handlers.
18187 * linear-scan.c (mono_varlist_sort): Fix warning.
18189 * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
18191 * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
18194 * liveness.c: Make all variables uses in exception clauses volatile, to
18195 prevent them from being allocated to registers. Fixes #42136.
18197 2004-02-25 Zoltan Varga <vargaz@freemail.hu>
18199 * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
18200 causes regressions.
18202 * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
18203 argument to mono_arch_regalloc_cost.
18205 * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs
18208 2004-02-24 Zoltan Varga <vargaz@freemail.hu>
18210 * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c:
18211 Make the cost of allocating a variable to a register arch dependent.
18213 * basic-calls.cs: Fix compilation of tests.
18215 * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
18216 helper function to cut back on the number of #ifdefs needed.
18218 * mini-ppc.c: Fix compilation.
18220 * basic-calls.cs: New regression tests.
18222 * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
18224 * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
18225 of l0 since that is callee saved.
18227 * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
18230 * mini-sparc.c: Ongoing work + flag virtual calls with a special kind
18231 of delay instruction.
18233 * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
18235 * mini.h (MonoCallInst): Add 'virtual' flag.
18237 * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
18239 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
18241 * *.cs: New regression tests.
18243 * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc
18246 * mini.c (mono_runtime_install_handlers): Fix build.
18248 * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
18249 'signal_stack_size' members.
18251 * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an
18252 alternate signal stack.
18254 * exceptions-x86.c: Add stack overflow handling.
18256 * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing
18257 functions to arch independent code.
18259 * mini.c (mono_print_tree): Print more detailed info for load_membase
18262 2004-02-23 Martin Baulig <martin@ximian.com>
18264 * mini.c (mini_get_method): Set `gmethod->generic_inst'.
18266 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
18268 * mini-x86.c: fixed reg allocation for div/rem.
18270 2004-02-22 Miguel de Icaza <miguel@ximian.com>
18272 * driver.c (mono_main): Report some configuratio options on --version.
18274 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
18276 * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
18277 low in the address space. Correctly flush memory in thunks where we
18278 output native code.
18280 2004-02-20 Martin Baulig <martin@ximian.com>
18282 * mini.c (mini_get_method): New static method; inflate all generic
18283 methods and methods in open generic instances.
18284 (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
18285 (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
18287 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
18289 * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
18291 * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
18293 2004-02-19 Bernie Solomon <bernard@ugsolutions.com>
18295 * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
18297 * mini-sparc.c (flushi mono_arch_output_basic_block): make
18298 it compile using Sun's compiler.
18300 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
18302 * 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.
18304 * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
18306 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
18308 * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
18310 * mini-ppc.c: handle calls outside of the allowed range with thunks
18311 allocated using the code manager.
18312 * tramp-ppc.c: use the code manager to hold generated native code.
18313 Fixed the magic trampoline to just patch vtable entries.
18315 2004-02-17 Zoltan Varga <vargaz@freemail.hu>
18317 * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
18320 2004-02-16 Zoltan Varga <vargaz@freemail.hu>
18322 * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
18325 * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
18326 if we have a working __thread implementation.
18328 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove
18329 OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
18331 2004-02-15 Zoltan Varga <vargaz@freemail.hu>
18333 * mini-x86.c: Fix compilation under gcc 2.
18335 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
18337 * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
18338 contains a call to the wrapped function.
18340 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add
18341 OP_<CALL>_IMM opcodes, and use them under X86.
18343 * mini.c (mono_jit_find_compiled_method): Fix warning.
18345 * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
18347 * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
18349 * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
18350 functionality to mini.c.
18352 * mini.c (mono_create_jump_trampoline): New function to create a jump
18353 trampoline. Return a compiled method instead of a trampoline if it
18354 exists. Add a cache for jump trampolines.
18356 * mini.c (mono_jit_find_compiled_method): New function to return a
18357 compiled method if it exists.
18359 * mini-x86.c: Call mono_create_jump_trampoline instead of
18360 mono_arch_create_jit_trampoline.
18362 * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
18363 a jump trampoline. Fixes #52092.
18365 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
18367 * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
18368 which is not up-to-date. Add check_corlib_version () instead.
18370 * mini.c (mini_init): Call mono_thread_attach () so embedders do not
18373 * mini.c (mono_runtime_install_handlers): Remove check for valgrind
18374 since newer valgrind versions do not need it.
18376 * mini.c (mono_jit_compile_method_with_opt): New helper function to
18377 compile a method with a given set of optimizations.
18379 * mini.c: Compile icall wrappers on-demand instead of at startup.
18381 * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
18382 wrapper for an icall.
18384 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
18386 * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
18389 * iltests.il: Add test for non-empty stack before switch instruction.
18391 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
18393 * mini.c: Add support for new stringbuilder marshalling conventions.
18395 * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
18397 2004-02-01 Martin Baulig <martin@ximian.com>
18399 * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
18400 in `ginst->mtype_argv'.
18402 2004-01-31 Miguel de Icaza <miguel@ximian.com>
18404 * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
18405 facilitate grepping.
18407 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
18409 * mini.c: fixed buglet in initobj generic implementation for references.
18411 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
18413 * Makefile.am: make the version script conditional.
18414 * jit-icalls.c: handle missing truncl().
18416 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
18418 * exceptions.cs: Add more tests for double->int conversion.
18420 * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
18421 we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
18423 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
18425 * driver.c: make --verbose --version emit an error
18426 if the loaded corlib doesn't match the runtime version.
18428 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
18430 * mini-ppc.h: export ppc_patch().
18431 * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
18432 * tramp-ppc.c: call convention fixes: Linux/PPC support should be
18433 on par or better than on MacOSX.
18435 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
18437 * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
18438 mono_lookup_pinvoke_call.
18440 * mini-x86.c: Under windows, the default pinvoke calling convention is
18441 stdcall. Fixes #52834.
18443 * mini.c (optimize_branches): Add an upper bound to the number of
18444 iterations to prevent infinite loops on strange loops. Fixes #53003.
18446 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
18448 * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
18449 and ISINST. Fixes #52093.
18451 * objects.cs (test_0_vector_array_cast): New tests.
18453 2004-01-15 Zoltan Varga <vargaz@freemail.hu>
18455 * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
18456 checking in Array.Set ().
18458 * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
18461 * object.cs (test_0_multi_array_cast): New regression test.
18463 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
18465 * exceptions-ppc.c: fix build on Linux/PPC.
18467 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
18469 * tramp-x86.c (x86_magic_trampoline): Disable code patching when
18470 running under valgrind.
18471 (x86_magic_trampoline): Fix build bustage.
18473 * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
18474 negative values as well. This is needed for the encoding of the line number
18475 info, since sometimes the line numbers are not in increasing order.
18477 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
18479 * cpu-pentium.md (localloc): Increase the size of the localloc
18480 instruction since it is a loop under Win32.
18482 * debug-mini.c (record_line_number): Get rid of unneccesary memory
18485 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
18487 * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c
18488 tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from
18489 Max Horn (max@quendi.de). Fix file names in comments.
18491 2004-01-03 Zoltan Varga <vargaz@freemail.hu>
18493 * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
18494 avoid stack overflow.
18495 (replace_usage): Avoid uninitialized variable warnings.
18497 * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
18498 and taking the address of valuetype variables.
18500 2004-01-03 Patrik Torstensson
18502 * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
18503 for other purposes than FP later on.
18505 2004-01-02 Zoltan Varga <vargaz@freemail.hu>
18507 * mini.c (mono_method_to_ir): Prevent register allocation for arguments
18510 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
18512 * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
18514 2003-12-30 Patrik Torstensson <p@rxc.se>
18516 * mini-x86.h: Decreased number of availiable fp regs.
18517 Solves corner cases with FP spilling.
18519 2003-12-23 Patrik Torstensson <p@rxc.se>
18521 * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
18522 for floating point stack tracking / spilling on x86.
18525 * basic-float.cs: added float mul overflow test.
18527 2003-12-23 Zoltan Varga <vargaz@freemail.hu>
18529 * mini.c (mono_method_to_ir): Add workaround for bug #51126.
18531 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
18533 * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
18534 supports for cond branches that overflow the immediate
18535 overflow offset. mcs can compile simple programs.
18537 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
18539 * exceptions-ppc.c: exception handling support wip:
18540 finally handlers get run on exception.
18542 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
18544 * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while
18547 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
18549 * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
18550 initial support for stack walking and unwinding.
18552 2003-12-18 Zoltan Varga <vargaz@freemail.hu>
18554 * driver.c (mono_main): Make corlib-out-of-sync message more
18555 descriptive. Also remove verify_corlib call.
18557 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
18559 * mini.c: make CEE_NEWARR calls and other emulated opcodes
18560 not overlap with other call's arguments, too.
18562 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
18564 * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c:
18565 move to arch-specific code the choice of arch-specific
18566 intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
18567 * mini.c: ensure emulation calls will not interleave
18570 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
18572 * tramp-ppc.c, basic-calls.cs: rework trampolines so that
18573 the magic trampoline stack frame is dropped before executing
18576 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
18578 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
18579 and integer to fp conversions. Added support for overflowing
18580 arguments on the stack. Reserve a couple more registers as temps.
18581 Added support for aot compilation (as output still needs to be
18584 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
18586 * mini-ppc.c, basic-long.cs: fix jumps to known labels.
18587 Don't overwrite return register in some corner cases.
18589 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
18591 * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
18592 static constructors when AOT compiling.
18594 * driver.c (mono_main): Call mono_check_corlib_version.
18596 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
18598 * cpu-g4.md, basic.cs: fixed div target register.
18600 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
18602 * mini-ppc.c, basic.cs: shl_imm fix with test.
18604 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
18606 * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing
18607 structures by value. Misc fixes.
18608 * objects.cs: more tests.
18610 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
18612 * mini-ppc.c: lconv.ovf.i implemented.
18614 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18617 (mini_init): don't error out if someone already called g_thread_init.
18619 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
18621 * exceptions-x86.c, exceptions-ppc.c: allow the exception object
18622 to be any type per the spec. Fix abnormal memory usage when
18623 the same object is repeatedly thrown.
18625 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
18627 * mini.c: check for overruns in IL code.
18629 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
18631 * TODO: Add/remove some todo entries.
18633 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
18635 * driver.c (mono_main): Call mono_verify_corlib.
18637 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
18639 * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy.
18640 This has been moved to mini.c
18641 * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
18642 type being casted is marshalbyref it could be a proxy, so instead of
18643 emitting the type check code, emit a call to a runtime method that will
18644 perform the check by calling CanCastTo if needed.
18646 2003-12-06 Zoltan Varga <vargaz@freemail.hu>
18648 * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
18649 methods with large stack frames under Win32.
18651 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
18653 * Makefile.am: Distribute regression tests.
18655 * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
18656 at the end instead of inserting each variable into the sorted list.
18658 * linear-scan.c (mono_varlist_sort): New helper function.
18660 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
18662 * mini.c: ensure arguments and locals are within bounds.
18664 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
18666 * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and
18669 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
18671 * mini.c (mono_cprop_copy_values): Fix crash.
18673 * aot.c: Set verbosity back to 0.
18675 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
18677 * regalloc.c: complete memory leak fix by Laurent Morichetti
18680 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
18682 * driver.c (main_thread_handler): Revert the previous patch.
18684 * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
18687 * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
18688 memory from the memory pool.
18690 * driver.c (main_thread_handler): Turn on all optimizations when
18693 * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
18694 an array for better performance.
18696 * regalloc.c (mono_regstate_assign): Fix memory leak.
18698 * debug-mini.c (mono_debug_serialize_debug_info): New function to
18699 serialize the debug info.
18701 * debug-mini.c (mono_debug_add_aot_method): New function to load the
18702 debug info from the serialized representation.
18704 * aot.c: Save debug info into the generated file and load it when
18707 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
18709 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
18711 * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
18712 More FP-related fixes.
18714 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
18716 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
18717 and register allocation buglet. Hello world now runs.
18719 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
18721 * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
18722 * tramp-ppc.c: fixed class init trampoline.
18723 * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
18725 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
18727 * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
18728 mini.c: more ppc changes/fixes.
18730 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
18732 * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
18733 Also optimize the case when the arguments are the same in the caller
18736 * iltests.il: Add tests for tail calls with valuetype arguments.
18738 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
18740 * mini-ppc.c: fixes for struct return type.
18742 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
18744 * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move
18745 mono_spillvar_offset() to arch-specific code.
18747 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
18749 * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
18751 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
18753 * exceptions-x86.c: Fix stack space leaks.
18755 * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
18756 registers from the lmf if the method has save_lmf set.
18758 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
18760 * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
18761 of icall wrappers into InvokeInDomain, since these are now per-domain.
18763 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
18765 * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
18766 make some opcode emulation and intrinsic ops enabled/disabled
18767 according to the architecture. More fixes.
18769 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
18771 * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
18773 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
18775 * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
18776 arch-specific handling for 'this' and struct return type to
18777 arch-specific code.
18779 2003-11-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18781 * aot.c: prevent divide by zero error when reporting (it happened with
18782 Accessibility.dll).
18784 2003-11-25 Zoltan Varga <vargaz@freemail.hu>
18786 * mini.h (inst_switch): Remove unused macro.
18788 2003-11-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18791 (load_aot_module): free 'info->methods' and 'info' properly. No more
18792 "free(): invalid pointer blah" messages when you have an old aot
18795 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
18797 * jit-icalls.c, mini.c: Added support for context static fields.
18799 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
18801 * mini.c (mono_method_blittable): Methods which set LastError are not
18802 blittable either. Fixes #51108.
18804 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
18806 * mini.c: flush icache.
18807 * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
18809 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
18811 * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
18813 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
18815 * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
18818 * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with
18821 * inssel.brg (CEE_MKREFANY): Fix AOT case.
18823 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
18825 * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div
18826 instruction when the result is discarded.
18828 * iltests.il (test_0_div_regalloc): New regression test.
18830 * arrays.cs: Fix compilation error.
18832 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
18834 * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
18835 float rules to inssel-x86.brg: sane architectures with FP registers
18836 don't need to implement these rules.
18838 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
18840 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
18842 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
18844 * mini.h, inssel-long32.brg: fixed endianess issues in int64
18845 implementation of 32 bit systems.
18847 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
18849 * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
18850 (Jeroen Zwartepoorte).
18852 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
18854 * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
18855 the caller and the callee matches.
18857 * mini.c (mono_method_to_ir): Add comment.
18859 * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
18860 signbit is missing on some platforms.
18862 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
18864 * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
18866 * mini.c (setup_jit_tls_data): Call the new function.
18868 * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
18870 * mini-x86.c: Add experimental support for fast access to the lmf
18871 structure under NPTL/Linux 2.6.x.
18873 2003-11-06 Martin Baulig <martin@ximian.com>
18875 * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
18876 `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
18879 2003-11-02 Martin Baulig <martin@ximian.com>
18881 * mini.c (inflate_generic_field): New static method.
18882 (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
18883 generic instance and the field is declared in a generic type, call
18884 inflate_generic_field() to inflate it. Fixes gen-28.cs.
18886 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
18888 * mini.h mini.c (mono_method_same_domain): New function to return
18889 whenever the caller and the callee are in the same domain.
18891 * tramp-x86.c (x86_magic_trampoline): Use the new function.
18893 2003-10-30 Martin Baulig <martin@ximian.com>
18895 * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
18896 similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
18898 (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
18899 MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS().
18901 2003-10-29 Zoltan Varga <vargaz@freemail.hu>
18903 * mini.c mini-ops.h inssel.brg: Implement undeniable exception
18906 * mini.c (sigusr1_signal_handler): Move creation of the thread abort
18907 object here, so it is in the correct appdomain etc.
18909 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
18911 * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
18913 (mono_method_to_ir): Avoid freeing the type created returned from
18914 mono_type_create_from_typespec, since it is put into an internal cache
18915 by the function. Fixes pointer.exe.
18917 * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal
18918 trampolines for icalls and pinvokes as well. Fixes #33569.
18920 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
18922 * mini.c: Update after appdomain changes.
18924 * mini.c (mono_jit_compile_method_inner): Allways compile native
18925 method wrappers in the root domain, since there can only be one
18926 instance of them, whose address is stored in method->info.
18928 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
18930 * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
18931 environment variable. Instead detect automatically whenever running
18932 under valgrind using the magic macro RUNNING_ON_VALGRIND from
18935 2003-10-16 Miguel de Icaza <miguel@ximian.com>
18937 * trace.c, trace.h: New files that implement the new trace option
18940 * driver.c: Document new --trace options.
18942 * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
18945 - if (mono_jit_trace_calls)
18946 + if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
18948 * mini.h: prototypes.
18950 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
18952 * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
18954 * mini.c inssel.brg: Implement typedefbyref opcodes.
18956 * mini.c (mono_jit_compile_method): Remove unused local variable.
18958 * mini.c (mono_jit_compile_method_inner): Ditto.
18960 2003-10-12 Zoltan Varga <vargaz@freemail.hu>
18962 * tramp-x86.c (x86_class_init_trampoline): Fix build.
18964 * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
18966 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
18968 * mini.c (mono_no_aot): Remove unused global variable.
18970 * mini.c: Thread safety fixes.
18972 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
18974 * mini.c (mono_create_class_init_trampoline): Add a lock around
18975 class_init_hash_addr.
18977 * arrays.cs (test_0_newarr_emulation): Add new regression test for
18980 * mini.c: Decompose the NEWARR instruction before decomposing its
18981 arguments. Fixes #30073.
18983 2003-10-08 Zoltan Varga <vargaz@freemail.hu>
18985 * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
18988 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
18990 * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
18992 * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
18994 * driver.c: Add support for compiling icall wrappers to --compile.
18996 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
18998 * inssel.brg: The empty value in class->interface_offsets is -1, not
19001 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
19003 * objects.cs: New test for 'is' operator on an array of interfaces.
19005 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
19007 * tramp-ppc.c: update trampoline code to support jumps
19008 and class initialization.
19010 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
19012 * mini.c (mono_jit_compile_method): Fix reading of freed memory.
19014 * inssel.brg (OP_UNBOXCAST): Fix #46027.
19016 * inssel.brg (OP_UNBOX): Remove unused rule.
19018 * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
19019 region instead of one for each method. Fixes #47813.
19021 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
19023 * exceptions.cs (test_0_nested_finally): New regression test for
19024 nested exception handlers.
19026 * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
19028 * mini.c (mono_method_to_ir): Avoid inlining tail calls.
19030 * mini.c (mono_method_to_ir): Fix tail recursion in the presence of
19033 * mini.c (mono_method_check_inlining): Make the inlining limit
19034 configurable by an environment variable.
19036 * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
19038 * mini.h: Bump AOT file version.
19040 * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a
19041 token, store the image along with the token, since the token might not
19042 refer to the same image as the method containing the relocation,
19043 because of inlining.
19045 2003-09-27 Zoltan Varga <vargaz@freemail.hu>
19047 * mini.c (mono_precompile_assemblies): New function to compile
19048 all methods in all loaded assemblies.
19050 * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
19052 * regalloc.h regalloc.c (MonoRegState): Change the type of
19053 iassign and fassign to int*, since they can contain large negative
19054 values if the register is spilled. Also added some comments. Fixes
19057 * exceptions-x86.c (seh_handler): Fix handling of system exceptions
19058 under Win32. Fixes #42964.
19060 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
19062 * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
19064 * aot.c: Added support for AOT compiling methods which contain calls
19065 to wrappers. Currently, only remoting-invoke-with-check wrappers are
19068 * driver.c (compile_all_methods): Run the compilation in a thread
19069 managed by mono. Fixes #44023.
19071 * mini.c (mono_codegen): Print full method name in verbose output.
19073 * mini-x86.c (mono_arch_patch_code): Fix warning.
19075 * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
19076 jumps, since the method we are jumping to might be domain-specific.
19078 * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
19080 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
19082 * inssel.brg: string chars are unsigned.
19084 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
19086 * TODO: New todo item.
19088 * tramp-x86.c (x86_class_init_trampoline): New trampoline function
19089 which calls mono_runtime_class_init and patches the call site to
19090 avoid further calls.
19091 (mono_arch_create_class_init_trampoline): New arch specific function
19092 to create a class init trampoline.
19093 (create_trampoline_code): Generalized so it can create
19094 class init trampolines as well.
19096 * mini.c (helper_sig_class_init_trampoline): New helper variable.
19097 (mono_create_class_init_trampoline): New function to create and cache
19098 class init trampolines.
19099 (mono_find_class_init_trampoline_by_addr): New function to lookup the
19100 vtable given the address of a class init trampoline. Used by the
19102 (mono_codegen): Generate a call to a trampoline instead of
19103 mono_runtime_class_init in LDSFLD[A].
19104 (mono_codegen): Add relocations for the new trampoline.
19106 * mini.h mini-x86.c aot.c: Added a new relocation type:
19107 MONO_PATCH_INFO_CLASS_INIT.
19109 * mini.h: Bump AOT version number.
19111 * aot.c: Create a copy of the loaded code instead of using the original
19112 so methods which call each other will be close in memory, improving
19115 * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
19116 patch since it breaks the regression tests.
19118 * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
19119 for the register saving instruction sequence since the
19120 frame_state_for function in glibc 2.3.2 don't seem to detect it.
19122 2003-09-14 Zoltan Varga <vargaz@freemail.hu>
19124 * TODO: Fix todo item && remove another.
19126 2003-09-12 Zoltan Varga <vargaz@freemail.hu>
19128 * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
19131 * aot.c: Moved the check for MONO_LASTAOT into the initialization
19132 function of the module.
19134 * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
19135 turning on/off the usage of AOT code. Got rid of mono_no_aot and the
19136 --no-aot command line option.
19138 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
19140 * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
19141 by Bernie Solomon (bernard@ugsolutions.com).
19143 * inssel.brg: Refactor the interface offset table related code into
19144 its separate functions and add support for the AOT case.
19146 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
19148 * aot.c (mono_aot_get_method_inner): Fix memory leak.
19150 * aot.c: Added mono_aot_verbose variable and made all debugging
19151 output depend on the value of this variable.
19153 * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
19154 method_label and info_label.
19156 * mini.h mini-x86.c aot.c: Added a new relocation type
19157 MONO_PATCH_INFO_IID for klass->interface_id.
19159 * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
19160 the MonoJitInfo structure.
19162 * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
19163 a non-root appdomain in shared mode.
19165 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
19167 * aot.c: make aot loader less verbose. Remove free of unused variable.
19169 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
19171 * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
19173 * .cvsignore: Added *.dll.
19175 * mini.c (mono_print_tree_nl): New function callable while debugging.
19177 * mini.c (mono_print_code): Export this.
19179 * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
19182 2003-09-05 Zoltan Varga <vargaz@freemail.hu>
19184 * mini.h (MonoCompile): Added 'jit_info' field.
19186 * mini.c (mini_method_compile): Save the generated MonoJitInfo into
19187 the cfg structure, since it is needed by the AOT compiler.
19189 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
19191 * aot.c: A major rewrite. Changes include:
19192 - save exception tables for methods which have them.
19193 - cache failed lookups in aot_get_method () to avoid the (slow) calls
19194 to g_module_symbol.
19195 - reworked the file format so it is now much smaller and needs
19196 fewer relocation entries.
19198 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
19200 * aot.c (load_aot_module): Fix build bustage on platforms without
19203 2003-09-04 Martin Baulig <martin@ximian.com>
19205 * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
19207 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
19209 * TODO: Some new optimization ideas.
19211 * aot.c: Move AOT module loading logic here from mono_assembly_open.
19213 * aot.c: Save the optimization flags used to compile the code into
19216 * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
19217 support emitting domain specific code.
19219 * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is
19220 no longer domain neutral. It can be made domain neutral by compiling
19221 with --optimize=shared.
19223 * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
19224 between appdomains.
19226 * driver.c mini.h mini.c: New --no-aot debugging option which disables
19227 loading of AOT code.
19229 * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
19231 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
19232 if there is no domain neutrality information.
19234 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
19236 * aot.c (mono_compile_assembly): Emit a symbol containing the file
19237 format version into the generated library.
19239 * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
19240 callee method into the caller since one of them could be shared.
19242 * mini.h mini-x86.c aot.c: Added two new relocations so throwing
19243 system exceptions from AOT code now works.
19245 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling
19246 method if it is domain neutral and the callee is not.
19248 * graph.c (cfg_emit_one_loop_level): Fix warning.
19250 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
19252 * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
19255 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
19257 * mini.c (mini_init): Call mono_marshal_init () explicitly since it
19258 is needed by code which is executed before mono_runtime_init ().
19259 Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
19261 * mini.c (mono_thread_abort): Fix warning.
19262 (mono_jit_compile_method): Call static constructor in the AOT case too.
19264 * aot.c (mono_compile_assembly): Fix warning.
19266 2003-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19268 * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
19270 2003-08-28 Zoltan Varga <vargaz@freemail.hu>
19272 * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
19274 * cpu-pentium.md: Fix the length of call opcodes so they include the
19275 ESP restoring instruction. Fixes #47968.
19277 2003-08-28 Martin Baulig <martin@ximian.com>
19279 * mini-x86.c (mono_arch_call_opcode): Added support for
19280 MONO_TYPE_GENERICINST.
19282 * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.
19284 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
19286 * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
19287 a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
19289 * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
19292 2003-08-26 Martin Baulig <martin@ximian.com>
19294 * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
19295 when reporting an error, set this to the actual error location.
19296 (mono_method_to_ir): Report the correct error location if
19297 get_basic_blocks() returned an error.
19299 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
19301 * mini.c (mono_type_blittable): OBJECT is not blittable.
19302 (mono_method_blittable): Methods which have marshalling descriptors
19303 are not blittable either. Fixes #47842.
19305 2003-08-22 Zoltan Varga <vargaz@freemail.hu>
19307 * driver.c mini.c: Use an environment variable instead of a global
19308 variable. Also fix the build.
19310 * mini.c (mini_init): Call g_thread_init () to make glib thread-safe.
19311 Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
19314 * driver.c mini.c: Added --with-valgrind option to turn off some
19315 code which prevents mono from running under valgrind.
19317 * mini.c (mono_emit_call_args): Fixed warning.
19319 * mini.c (mono_emulate_opcode): Fixed warning.
19321 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
19323 * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
19324 * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
19325 regalloc.c, regalloc.h: specify available registers in arch-specific
19326 code and support floats in the regallocator (patch by Laurent Morichetti
19329 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
19331 * mini.c: mono_thread_current() can be called only after
19332 mono_runtime_init(): rearrange code to not call it early on.
19334 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
19336 * mini.c: allocate jump tables in the code mempools.
19338 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19340 * mini.c, mini.h: make sure per-thread data allocated by the jit is
19343 2003-08-10 Miguel de Icaza <miguel@ximian.com>
19345 * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
19346 12 to 16. This fixes bug #47453.
19349 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
19351 * mini-ppc.c: fixed indexed load and unsigned compares.
19353 2003-08-06 Lluis Sanchez Gual <lluis@ximian.com>
19355 * mini.c: reenabled installation of handler for
19356 thread abort signal.
19358 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
19360 * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
19361 by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
19362 until it's fixed and actually useful.
19364 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
19366 * inssel-long32.brg: couple more opcodes implemented.
19368 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
19370 * mini-sparc.c: Even more opcodes implemeted.
19372 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
19374 * mini-sparc.c: More opcodes implemented.
19376 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
19378 * mini-sparc.c: More opcodes implemented.
19380 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
19382 * inssel-sparc.brg: Add some needed rules. Direct
19384 * Makefile.am: Use inssel-sparc.brg
19385 * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
19386 an assert happy for now.
19388 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
19390 * mini-sparc.c: Fixed compile errors.
19391 * exceptions-sparc.c: Same. We now produce a mono binary
19392 on sparc-linux. Yea.
19394 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
19396 * mini-sparc.c: Renamed registers. Also some macro cleanups.
19397 * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
19398 They compile, but do not work.
19400 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
19402 * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
19403 mini-sparc.h, tramp-sparc.c: Beginning of sparc support
19404 from Mark Crichton <crichton@gimp.org> and Christopher Taylor
19407 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
19409 * mini.c: more opcodes implemented and better support for generics.
19411 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
19413 * cpu-g4.md, cpu-pentium.md: updates for new instructions.
19414 * mini.c, mini.h: first cut at generics support: some new instructions
19415 added and changed the behaviour of some of the existing ones.
19417 2003-07-21 Miguel de Icaza <miguel@ximian.com>
19419 * mini.c: Removed definition of metadata_shared mutex here.
19421 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
19423 * mini-x86.c: make vararg calls work for instance methods.
19425 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
19427 * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
19428 returns the arguments in a separte list, now.
19430 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
19432 * aot.c, mini.c: updates for array type representation changes.
19434 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
19436 * mini.c: register function to perform jit shutdown.
19438 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
19440 * mini.c: use a faster allocator if possible.
19442 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
19444 * aot.c: some cleanups and portability changes.
19446 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
19448 * mini.c: use faster allocation for CEE_BOX if possible.
19450 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
19452 * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
19453 Moved inlined mempcy code to its own function so that is can be
19454 reused. Added an inline memset function as well (optimized initobj).
19455 * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
19457 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
19459 * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
19461 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
19463 * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
19464 arch code can setup the cpu for CLR execution, if needed.
19465 We use it on x86 to set the precision of FP operations.
19467 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
19469 * mini.c: disable some optimizations if we can guess they'll cost too
19470 much for a given method.
19472 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
19474 * mini.h mini.c: Rework last patch based on suggestions by Paolo.
19476 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
19477 * mini.h mini.c mini-x86.c: Added instruction level coverage
19478 info collection support.
19480 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
19482 * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
19483 is now implemented in the profiling API. Get rid of a couple of
19484 unnecessary global variables.
19486 2003-06-15 Nick Drochak <ndrochak@gol.com>
19488 * basic-long.cs: tests for negative values for bigmul, and unsigned.
19489 * cpu-g4.md: add op_bigmul and op_bigmul_un
19490 * cpu_pentium.md: add op_bigmul_un
19491 * inssel-long32.brg: add rule for unsigned bigmul
19492 * mini-ops.h: define OP_BIGMUL_UN
19493 * mini-x86.c: THE BUG: handle (un)signed properly
19494 * mini.c: choose unsigned opcode if needed.
19495 This set of patches fixes bug #44291
19497 2003-06-13 Dietmar Maurer <dietmar@ximian.com>
19499 * mini.c (optimize_branches): improved to handle all kinds of
19500 conditional branches.
19502 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
19504 * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
19505 don't raise exceptions.
19507 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
19509 * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
19510 to arch-specific files.
19512 2003-06-09 Martin Baulig <martin@ximian.com>
19514 * Makefile.am (libs): Added $(LIBGC_LIBS).
19516 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
19518 * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
19519 and OP_ATAN (fixes bug#44293).
19521 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
19523 * Makefile.am, mini-x86.c: rename cpu description array to
19524 pentium_desc, since some compilers define the 'pentium' preprocessor
19527 2003-05-28 Dietmar Maurer <dietmar@ximian.com>
19529 * mini.c (mini_select_instructions): add explicit branch if the
19530 following block is not the false target of a conditional branch -
19531 we need this with any optimization that reorder or remove bblocks
19533 * mini.c (optimize_branches): bug fixes
19535 2003-06-06 Dietmar Maurer <dietmar@ximian.com>
19537 * mini.c (mono_method_to_ir): inline static readonly fields
19539 * ssa.c (fold_tree): start cfold support for long (very simple
19542 * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
19544 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
19546 * inssel.brg: fixed memcpy (bug #44219).
19548 2003-06-05 Dick Porter <dick@ximian.com>
19550 * driver.c: Set the glib log levels to not abort if g_message
19553 g_set_prgname() has to happen before mini_init() so that the
19554 process handle gets the info.
19556 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
19558 * driver.c: add intrins to the default optimizations to get wider
19561 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
19563 * mini.h: some large basic blocks will overflow a 16-bit
19564 integers for symbolic registers.
19566 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
19568 * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
19569 (mono_arch_output_basic_block): fix bug 43499
19571 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
19573 * mini.c: kill duplicated definition of mono_debug_format.
19575 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
19577 * mini-x86.c, arrays.cs: fixed register allocation bug.
19579 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
19581 * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
19583 * mini.c (mini_get_opcode_for_method): inline IEEERemainder
19585 2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19588 (print_method_from_ip): also print source location information if
19591 2003-06-02 Dietmar Maurer <dietmar@ximian.com>
19593 * mini.c (mono_find_block_region): bug fix in region code
19594 (mini_method_compile): enable removing unreachable code again, but
19595 only in methods without exception clauses.
19597 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
19599 * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
19600 Implemented arglist opcode and handling of TypedReference type.
19601 Fixed x86 call convention when a structure is returned.
19602 Minimal support for calling static vararg methods.
19604 2003-05-30 Dietmar Maurer <dietmar@ximian.com>
19606 * mini.c (mini_method_compile): always remove unreachable code,
19607 because the code in them may be inconsistent (access to dead
19608 variables for example).
19610 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
19612 * driver.c, debug-mini.c: warning fixes.
19614 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
19616 * Makefile.am, jit.h, mini.h: install header for embedding mono.
19618 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
19620 * mini.c: thread-static fields are registered in mono_class_vtable(),
19621 so ensure the function is called before checking for them.
19623 2003-05-27 Dietmar Maurer <dietmar@ximian.com>
19625 * mini.c (optimize_branches): fix for bug 43586
19627 * jit-icalls.c (mono_llmult_ovf): added an additional check for
19628 overflow (fixes Bug #43639)
19630 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19632 * mini.c, objects.cs: allow the use of stobj for primitive types.
19634 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19636 * mini.c: be less strict about argument checking until we support
19637 running the verifier.
19639 2003-05-27 Nick Drochak <ndrochak@gol.com>
19641 * basic-long.cs: tests for (ulong)int * (ulong)int also
19642 * mini.c: use the same trick for (ulong)int * (ulong)int
19644 2003-05-27 Nick Drochak <ndrochak@gol.com>
19646 * basic-long.cs: add regression test for (long)int * (long)int
19647 * cpu-pentium.md: add op_bigmul specification
19648 * inssel-long32.brg: add OP_BIGMUL rule
19649 * mini-ops.h: add OP_BIGMUL
19650 * mini-x86.c: register allocator: handle case where src1 needs to be
19652 * mini.c: substitute special BIGMUL opcode in the tree for
19653 (long)int * (long)int
19655 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
19657 * jit-icalls.c: call the type ctor on field access if needed.
19659 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
19661 * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
19662 to a method (including results of ldelema, bug#43207).
19664 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
19666 * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
19667 colors to show exception handler blocks.
19669 * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
19670 (fix for pinvoke7.cs).
19672 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19674 * mini.h, mini.c: ensure correct initialization order for types that
19675 require it. Prepare for lazy compilation of jit icall wrappers.
19676 Provide a name for opcode emulation to reduce unneeded mallocing.
19678 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
19680 * mini-x86.c: better register restoring code and profiling
19681 support for tail calls.
19683 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19685 * mini.h, driver.c: prepare for leaf methods optimization.
19687 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
19689 * mini.c: get targets of branches before converting a method.
19691 2003-05-23 Dietmar Maurer <dietmar@ximian.com>
19693 * mini.c (optimize_branches): added some experimental code (disbaled)
19695 2003-05-22 Dietmar Maurer <dietmar@ximian.com>
19697 * mini.c (optimize_branches): fix branch to branch optimization
19699 * exceptions-x86.c (mono_arch_handle_exception): bug fix.
19701 * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
19703 * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
19705 * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
19708 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
19710 * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
19711 enable use of interface variables again.
19713 * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
19714 I1 to registers because there is no simply way to sign extend 8bit
19715 quantities in caller saved registers on x86.
19717 * inssel-float.brg: set costs of some rules to 2 so
19718 that monobure always select the arch. specific ones if supplied,
19719 regardless of the order we pass the files to monoburg.
19721 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
19723 * mini.c, mini-x86.c: since the magic trampoline for jumps
19724 can't patch the code directly, we do it as soon as the
19725 method gets compiled.
19727 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
19729 * mini-x86.c, mini.h: introduce a new patching method
19730 to support CEE_JMP and tail calls.
19731 * mini.c: obey tail.call. Don't precompile methods target
19733 * tramp-x86.c: new trampoline code to handle methods
19734 reached through a jump.
19736 2003-05-20 Dietmar Maurer <dietmar@ximian.com>
19738 * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
19739 bit values to registers
19741 2003-05-19 Dietmar Maurer <dietmar@ximian.com>
19743 * mini.c (mono_compile_get_interface_var): share interface
19744 variables if possible.
19746 2003-05-16 Martin Baulig <martin@ximian.com>
19748 * debug-mini.c (mono_init_debugger): New function to initialize
19749 the debugger. This is not in the debugger since it needs to
19750 access some of mini's internals.
19752 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
19754 * mini.c (mono_method_to_ir): inlining fixes/cleanups
19756 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
19758 * mini.c, mini-opts.h, inssel.brg: inline small memcpy
19759 for value type handling.
19761 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
19763 * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
19764 (mono_method_check_inlining): enable inlining of all kinds of wrappers
19766 2003-05-15 Lluis Sanchez Gual <lluis@ideary.com>
19768 * mini.c: fixed little bug in CEE_NEWOBJ case when calling
19769 the constructor through a proxy.
19771 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
19773 * jit-icalls.c, inssel.brg: fixes to array element address
19776 2003-05-15 Dietmar Maurer <dietmar@ximian.com>
19778 * mini-x86.c (is_regsize_var): allocate pointer to registers
19780 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
19782 * driver.c: fixed typo, added intrins to the set of optimizations
19783 tested with regressions.
19785 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
19787 * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
19788 * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
19791 2003-05-14 Dietmar Maurer <dietmar@ximian.com>
19793 * inssel.brg: remove some common pop instructions without side effects
19795 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
19797 * inssel-x86.brg: fixed thinko in int to double conversions.
19799 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
19801 * mini.c, jit-icalls.c: added runtime thread-static variable support.
19803 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
19805 * inssel-long32.brg: two more missing instructions.
19807 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
19809 * mini.c (mono_emit_call_args): set the cil_code for all arguments
19810 if not already set.
19812 2003-05-12 Zoltan Varga <vargaz@freemail.hu>
19814 * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
19817 * basic-float.cs: Added tests for negative zero.
19819 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
19821 * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
19822 a couple of missing operations for long casts, with test cases.
19824 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19826 * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
19828 2003-05-09 Dietmar Maurer <dietmar@ximian.com>
19830 * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
19831 code size estimation.
19833 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
19835 * mini.c (mono_jit_create_remoting_trampoline): make it work with
19836 abstract methods (fix bug 42542)
19838 * aot.c: add ability to handle array types
19840 2003-05-08 Zoltan Varga <vargaz@freemail.hu>
19842 * mini.c: Call the _specific versions of the object allocation
19843 functions if possible.
19845 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
19847 * driver.c: call setlocale ().
19849 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
19851 * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
19854 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
19856 * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
19858 * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
19859 wrappers (fix bug 42122)
19861 2003-05-04 Martin Baulig <martin@ximian.com>
19863 * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
19865 * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
19866 s/mini_set_defaults/mono_set_defaults/g.
19868 2003-05-04 Martin Baulig <martin@ximian.com>
19870 * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
19872 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
19874 * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
19875 (reported by Don Roberts).
19877 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
19879 * mini.c: temporarily work around two bugs for this release.
19881 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
19883 * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
19884 that contains -export-dynamic and it makes using the ld script
19886 * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
19888 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
19890 * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
19893 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
19895 * mini.c: make sure leave calls all the needed finally blocks,
19896 even when the target jumps out of multiple exception clauses.
19898 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
19900 * ldscript, Makefile.am: add linker script to reduce the number of
19901 exported symbols (should also fix the issues with libwine defining
19902 some of the same symbols in io-layer).
19904 2003-05-01 Zoltan Varga <vargaz@freemail.hu>
19906 * driver.c (mini_main): Avoid assertion when no file name is given on
19909 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
19911 * driver.c: added --version/-V command line option.
19912 Added the inline optimization in the regression tests.
19914 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
19916 * mini.c, basic-calls.cs: when inlining, save arguments to locals according
19917 to the type in the method signature (fixes bug#42134).
19919 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
19921 * mini.c: when inlining, check this is not null only when needed (bug #42135).
19923 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
19925 * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
19927 2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19929 * driver.c: fixed bug #42100.
19931 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
19933 * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
19935 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
19937 * mini.c: moved most of the code required to do inlining to its own
19938 function so it can be reused. Inline also ctors if appropriate.
19940 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
19942 * Makefile.am: Link with -export-dynamic so shared libs loaded by
19943 the runtime can call mono API functions.
19945 2003-04-27 Martin Baulig <martin@ximian.com>
19947 * debug-mini.c (mono_debug_init_method): Added
19948 `guint32 breakpoint_id' argument; if the method has a breakpoint,
19949 send a notification to the debugger.
19951 * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
19952 running in the Mono Debugger, just pass the breakpoint number to
19953 mono_debug_init_method().
19955 * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
19957 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
19959 * mini.c: allow some more unsafe compares.
19961 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
19963 * mini-x86.c, Makefile.am: make distcheck works (partially from
19964 a patch by Richard Lee <r.h.lee@attbi.com>).
19965 * regset.c, regset.h: removed, they are unused.
19967 2003-04-25 Dick Porter <dick@ximian.com>
19969 * driver.c: Usage reports the name as 'mono' not 'mini'
19970 * exceptions-x86.c: Build and run on freebsd
19972 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
19974 * Makefile.am: install the program with the 'mono' name and
19975 the library as libmono instead of mini and libmini.
19977 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
19979 * driver.c: provide the APIs for the embedding interface of the old jit.
19981 2003-04-23 Dietmar Maurer <dietmar@ximian.com>
19983 * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
19985 2003-04-23 Martin Baulig <martin@ximian.com>
19987 * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
19989 * driver.c: Added `--debug' command line argument to enable
19992 2003-04-23 Martin Baulig <martin@ximian.com>
19994 * debug.[ch]: Removed. The code is now in
19995 ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
19997 * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
20000 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
20002 * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
20004 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20007 (mini_cleanup): moved mono_runtime_cleanup call after the call to
20008 mono_domain_finalize.
20009 (mini_method_compile): use mono_method_profile* if the the option is
20012 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
20014 * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
20015 methods with their wrapper.
20017 * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
20018 methods with their wrapper.
20020 * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
20023 * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
20026 * mini.c (mono_method_check_inlining): Avoid inlining synchronized
20029 2003-04-17 Dietmar Maurer <dietmar@ximian.com>
20031 * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
20033 2003-04-16 Dietmar Maurer <dietmar@ximian.com>
20035 * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
20036 of the mempool. This is slightly faster and uses less memory
20038 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
20040 * mini.c: avoid O(n) allocation for variables.
20042 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
20044 * mini.c: handle items on the stack after inlining methods.
20046 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
20048 * mini.c: make the method->opcode optimization dependent
20049 on MONO_OPT_INSTRINS and do it lazily.
20051 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
20053 * driver.c: print overall results at the end of regression run.
20055 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
20057 * inssel.brg: don't overwrite symbolic registers.
20059 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
20061 * inssel-x86.brg: fix conversion from long to float.
20063 2003-04-11 Dietmar Maurer <dietmar@ximian.com>
20065 * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
20067 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
20069 * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
20071 * driver.c: Added --print-vtable option as in the old JIT.
20073 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
20075 * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
20077 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
20079 * inssel.brg, basic.cs: fixed checked conversions to byte and short.
20081 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
20083 * mini.c regalloc.c regalloc.h: Fix memory leak.
20085 2003-04-09 Dietmar Maurer <dietmar@ximian.com>
20087 * aot.c (mono_aot_get_method): register all used strings
20089 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
20091 * mini.c: always intern strings references with ldstr at compile time.
20093 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
20095 * Makefile.am: add BUILT_SOURCES.
20097 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
20099 * driver.c: give a better error message when the assembly to execute
20100 doesn't have an entry point.
20102 2003-04-07 Dietmar Maurer <dietmar@ximian.com>
20104 * Makefile.am: added hack for automake
20106 * mono/mini/mini.c (mono_save_args): always copy arguments to keep
20109 * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
20111 22003-04-07 Martin Baulig <martin@ximian.com>
20113 * Makefile.am: Added Makefile.am.
20115 * debugger-main.c: Removed, this is now in the debugger where it
20118 * mini.pc.in: Call this package `mini' for the moment.