1 2009-10-16 Zoltan Varga <vargaz@gmail.com>
3 * aot-compiler.c (emit_extra_methods): Remove some asserts which are not needed.
5 2009-10-15 Zoltan Varga <vargaz@gmail.com>
7 * mini.c (mono_op_imm_to_op): Handle OP_AND/OR/XOR_IMM.
9 2009-10-14 Massimiliano Mantione <massi@ximian.com>
11 * mini-posix.c (sigprof_signal_handler):
12 Implemented support for building stat call chans in different ways.
14 2009-10-14 Massimiliano Mantione <massi@ximian.com>
16 * mini-exceptions.c (mono_find_jit_info):
17 Also check that a jit info has been found (fixes a profiler crash).
19 2009-10-14 Massimiliano Mantione <massi@ximian.com>
21 * mini.c (mono_codegen):
22 Call mono_profiler_code_buffer_new with correct code address.
24 2009-10-14 Zoltan Varga <vargaz@gmail.com>
26 * driver.c (mono_main): Change the date in the copyright.
28 2009-10-14 Mark Probst <mark.probst@gmail.com>
30 * method-to-ir.c (mono_method_to_ir): Don't use a managed array
31 allocator in shared generic code for open classes, because we
32 can't get those classes' vtables. We need to make managed
33 allocators not depend on the vtable at compile-time to solve this.
35 2009-10-13 Martin Baulig <martin@ximian.com>
37 * debug-mini.c (mono_debugger_trampoline_compiled): Add
38 `const guint8 *trampoline' argument; send both the old and the new
41 2009-09-30 Zoltan Varga <vargaz@gmail.com>
43 * aot-compiler.c (add_wrappers): Add a runtime invoke wrapper which is used by
44 mono_runtime_capture_context () without calling mono_runtime_invoke ().
45 (can_marshal_struct): Skip structures with auto layout.
47 * tramp-arm.c (GEN_TRAMP_SIZE): Increase this by 4.
49 2009-10-02 Zoltan Varga <vargaz@gmail.com>
51 * mini-sparc.c (mono_arch_emit_setret): Emit long return values using OP_LMOVE.
52 (mono_arch_create_vars): Instead of allocating a stack slot by hand, allocate
53 a variable to hold the stack slot used by the int<->float conversion opcodes.
55 * mini-sparc.c (mono_arch_build_imt_thunk): Implement support for fail_tramp.
57 2009-10-04 Zoltan Varga <vargaz@gmail.com>
59 * aot-compiler.c (add_generic_class): Only add GetGenericValueImpl wrappers
62 2009-10-06 Zoltan Varga <vargaz@gmail.com>
64 * aot-compiler.c (add_generic_class): Add an instance of GenericComparer<T> for
65 each instance of Comparer<T>.
67 * generics.cs: Add a new test.
69 2009-10-09 Zoltan Varga <vargaz@gmail.com>
71 * driver.c (parse_debug_options): Add a 'gdb' option.
73 * mini.c (mini_parse_debug_options): Add a 'gdb' option.
75 * image-writer.c: Add support for emitting the image into a memory buffer.
77 * dwarfwriter.c: Add support for sharing one IL file between multiple images.
79 * aot-compiler.c: Add support for registering debug info with GDB using the
80 new JIT debugging interface in GDB 7.0. It can be turned on by setting
83 2009-10-10 Zoltan Varga <vargaz@gmail.com>
85 * aot-compiler.c (mono_save_trampoline_xdebug_info): Implement this for the
88 2009-10-11 Zoltan Varga <vargaz@gmail.com>
90 * aot-compiler.c (mono_save_xdebug_info): Emit a symbol for the method which
91 can be used to set breakpoints in gdb.
93 * image-writer.c (bin_writer_emit_writeout): Add support for setting the text
94 segment to an absolute address.
96 2009-10-13 Mark Probst <mark.probst@gmail.com>
98 * method-to-ir.c: Use the managed array allocator method if
101 2009-10-13 Bill Holmes <billholmes54@gmail.com>
103 * aot-compiler.c : Fix the MSVC builds
105 Code is contributed under MIT/X11 license.
107 2009-10-13 Zoltan Varga <vargaz@gmail.com>
109 * aot-compiler.c (mono_save_xdebug_info): Group methods into groups of 10 to
110 avoid registering 1 symbol file per method with gdb.
112 2009-09-29 Zoltan Varga <vargaz@gmail.com>
114 * mini-sparc.c: Fix the handling of enums with base type long.
116 * mini-sparc.c (mono_arch_output_basic_block): Fix IREM_UN_IMM.
118 * mini-sparc.c (mono_arch_allocate_vars): Use mono_class_from_mono_type ()
119 instead of using type->data.klass as the later doesn't work with generics.
121 2009-09-25 Mark Probst <mark.probst@gmail.com>
123 * method-to-ir.c, mini.h, mini-alpha.c, mini-amd64.c, mini-arm.c,
124 mini-hppa.c, mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c,
125 mini-s390x.c, mini-sparc.c, mini-x86.c: Thread.get_CurrentThread
126 works differently now and we don't handle it in the JIT anymore.
128 * mini.c, mini-exceptions.c, mini-posix.c, debug-debugger.c,
129 debug-mini.c, tramp-amd64.c, tramp-x86.c: Changes resulting from
130 the Thread class split.
132 2009-09-25 Zoltan Varga <vargaz@gmail.com>
134 * driver.c: Don't run tests with the obsolete treeprop optimization.
136 * mini-sparc.c (mono_arch_create_vars): Make the component vars of a long ret
137 variable volatile. Fixes #541577.
139 * basic-calls.cs: Add a new test.
141 * basic-long.cs: Remove tests which are now in basic-calls.cs.
143 2009-09-24 Zoltan Varga <vargaz@gmail.com>
145 * dwarfwriter.c (emit_debug_info_end): Disable this as it doesn't seem to
146 work/required with recent iphone sdk versions.
148 * aot-compiler.c (add_wrappers): Generate PtrToStructure wrappers for more
151 * decompose.c (mono_decompose_vtype_opts): Avoid reading uninitialized memory
152 in the VCALL decomposition code.
154 2009-09-22 Zoltan Varga <vargaz@gmail.com>
156 * mini-ia64.c (mono_arch_output_basic_block): Fix ISHR/ISHR_IMM.
158 * basic.cs: Add a test.
160 * mini-ia64.c (mono_arch_build_imt_thunk): Implement support the virtual
163 * mini-exceptions.c (mini_jit_info_table_find): New helper function which
164 searches all the domains of the current thread.
166 * exceptions-<ARCH>.c: Use it. Fixes #539394.
168 2009-09-21 Zoltan Varga <vargaz@gmail.com>
170 * exceptions-arm.c (mono_arm_throw_exception): Set ctx->ebp to fp instead of sp
171 so catching exceptions thrown in the same method works. Fixes exception17.exe.
173 * tramp-arm.c (mono_arch_create_trampoline_code_full): Store NULL into lmf->method
174 for non-jit trampolines.
176 * mini.c (mono_jit_runtime_invoke): Allow string ctors with dyn runtime invoke.
178 * aot-compiler.c (add_wrappers): Ditto.
180 * mini-arm.c: Implement support for passing vtypes and floats, and increase
181 the size of the param area used by dyn_call to 6 which covers the majority of
184 * mini.c aot-compiler.c: Allow dyn_call for string methods except ctors.
186 * mini-arm.c: Implement support for passing/receiving
187 longs and receiving floats in the dyn_call code.
189 * mini-amd64.c: Implement support for receiving vtypes in registers in
192 * mini.c mini-amd64.c: Implement partial support for passing vtypes in
195 2009-09-20 Zoltan Varga <vargaz@gmail.com>
197 * mini-arm.c (get_call_info): Return more precise information in
199 (dyn_call_supported): Use the information in CallInfo.
201 * mini-arm.c: Enable support for returning vtypes in the dyn_call code.
203 * mini.c mini-amd64.c: Enable support for returning vtypes in the dyn_call
206 * mini-arm.c: Update after the dyn_call api changes.
208 * mini.c (mini_create_jit_domain_info): Register a destructor function
209 for the runtime_invoke_hash.
211 * mini-amd64.c (mono_arch_get_dyn_call_args): Rename this to
212 'mono_arch_dyn_call_start'. Pass the pointer to the return value buffer to
214 (mono_arch_get_dyn_call_ret): Rename this to 'mono_arch_dyn_call_finish'.
215 (dyn_call_supported): Simplify this by using get_call_info ().
216 (mono_arch_dyn_call_free): New destructor function.
218 * generics.cs: Remove a printf.
220 * method-to-ir.c (mono_method_to_ir): Allocate some param area for DYN_CALL.
222 * mini-arm.c: Add support for enum return values and passing a few arguments
225 * mini.c (mono_jit_runtime_invoke): Add support for enum return values to
228 * mini-amd64.c (mono_arch_get_dyn_call_ret): Ditto.
230 * aot-compiler.c (add_wrappers): Add a few restrictions for the use of
231 the dynamic invoke wrappers.
233 * mini-arm.c: Implement OP_DYN_CALL for arm.
235 * aot-compiler.c (add_wrappers): Avoid aot-ing runtime invoke wrappers
236 supported by the dynamic runtime invoke wrapper.
238 * aot-compiler.c aot-runtime.c: Add support for encoding the dynamic
239 runtime invoke wrapper.
241 * mini.c (mono_jit_runtime_invoke): Use the dynamic runtime invoke wrappers
242 if possible when running with full-aot.
244 * mini-ops.h: Add OP_DYN_CALL opcode.
246 * mini-amd64.c method-to-ir.c: Add infrastructure for making method calls
247 with dynamic arguments lists similar to libffi.
249 2009-09-19 Zoltan Varga <vargaz@gmail.com>
251 * method-to-ir.c: Fix the previous change on 64 bit platforms.
253 * method-to-ir.c: Applied patch from Rodrigo Kumpera. Allow an i8 argument
256 * iltests.il.in: Add a new test.
258 2009-09-18 Zoltan Varga <vargaz@gmail.com>
260 * aot-compiler.c (add_generic_instances): Add more instances of
261 GenericEqualityComparer.
263 2009-09-18 Rodrigo Kumpera <rkumpera@novell.com>
265 * mini.c: Add asserts for mono_class_vtable calls that are not meant to fail.
267 2009-09-18 Rodrigo Kumpera <rkumpera@novell.com>
269 * method-to-ir.c: Handle failures from mono_class_vtable. Added some
270 comments on some functions that now can fail.
272 2009-09-17 Andrew Jorgensen <ajorgensen@novell.com>
274 * Makefile.am: Add Info.plist to EXTRA_DIST
276 2009-09-16 Zoltan Varga <vargaz@gmail.com>
278 * method-to-ir.c (mono_method_to_ir): Allow AOT for CEE_LDTOKEN in
279 static synchronized wrappers. Fixes #539500.
281 2009-09-14 Rodrigo Kumpera <rkumpera@novell.com>
283 * jit-icalls.c (mono_class_static_field_address): handle vtable failure
286 2009-09-16 Zoltan Varga <vargaz@gmail.com>
288 * mini-exceptions.c (mono_handle_exception_internal): Store the computed
289 lmf before calling filter clauses as well. Fixes #539550.
291 * exceptions.cs: Add a test.
293 2009-09-14 Zoltan Varga <vargaz@gmail.com>
295 * aot-compiler.c (add_generic_class): Add instances of
296 Array.GetGenericValueImpl as well.
298 * Makefile.am (fullaotcheck): Copy and aot more assemblies so linq
301 * generics.cs: Add a fullaot linq test.
303 2009-09-10 Zoltan Varga <vargaz@gmail.com>
305 * aot-compiler.c (arch_emit_static_rgctx_trampoline): Don't clobber argument
308 2009-09-10 Bill Holmes <billholmes54@gmail.com>
310 * mini-trampolines.c (mono_delegate_trampoline) : Call
311 mono_cominterop_get_invoke if the delegate target object
314 Code is contributed under MIT/X11 license.
316 2009-09-09 Sebastien Pouliot <sebastien@ximian.com>
318 * method-to-ir.c: For CoreCLR throw a SecurityException if an
319 internal call is defined outside platform code. Reduce code
320 duplication with existing [Method|Field]AccessException
322 2009-09-08 Rodrigo Kumpera <rkumpera@novell.com>
324 * mini-x86.c (mono_arch_emit_call): Don't reduce stack usage by 4
325 if the return value is a small struct passed on regs.
327 2009-09-09 Zoltan Varga <vargaz@gmail.com>
329 * cpu-arm.md mini-arm.c: Remove unused opcodes.
331 * mini-codegen.c: Enable the cpu description validation for arm.
333 2009-09-08 Zoltan Varga <vargaz@gmail.com>
335 * basic-calls.cs: Move the test_0_float_load_and_store_with_big_offset ()
336 test which depends on structs to objects.cs.
338 * basic-calls.cs: Remove calls to Console.WriteLine and throws, since those
339 require object model related stuff working.
341 * cpu-x86.md mini-x86.c: Remove more unused opcodes.
343 * mini-ops.h: Fix OP_BIGMUL instruction descriptions.
345 * mini-codegen.c (mono_local_regalloc): Validate the cpu description
346 against the instruction metadata in mini-ops.h. amd64 only for now.
348 * mini-ops.h: Fix some instruction descriptions.
350 * mini-ops.h mini-x86.c mini-amd64.c cpu-<ARCH>.md: Remove some
353 2009-09-06 Zoltan Varga <vargaz@gmail.com>
355 * exceptions.cs: Add a new test.
357 2009-09-05 Rodrigo Kumpera <rkumpera@novell.com>
359 * mini-x86.c (needs_stack_frame): OSX requires full frames to keep proper alignment.
361 2009-09-06 Zoltan Varga <vargaz@gmail.com>
363 * mini-llvm.c (mono_llvm_emit_method): Add a few more missing casts,
364 skip empty phi opcodes.
366 * mini-llvm.c (mono_llvm_emit_method): Handle unsigned volatile variables
367 correctly by zero extending after loads. Skip methods containing calls
368 to the monitor enter/exit trampolines.
370 * tramp-x86.c (mono_arch_create_trampoline_code): Align the stack
371 when calling mono_thread_force_interruption_checkpoint ().
373 * mini.c (mini_method_compile): Disable llvm when AOT compiling.
375 * tramp-amd64.c (mono_arch_patch_callsite): Add support for 32 bit ->
377 (mono_arch_nullify_class_init_trampoline): Read 'buf' instead of 'code'.
379 * mini-llvm.c (mono_llvm_emit_method): Add a few missing conversions so a
382 2009-09-04 Zoltan Varga <vargaz@gmail.com>
384 * mini.c (mini_init): Set callbacks.get_runtime_build_info ().
386 2009-09-03 Zoltan Varga <vargaz@gmail.com>
388 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass the start
390 mono_breakpoint_clean_code () when using LLVM as the prologues generated by
391 LLVM might be very short.
393 * mini-x86.c (mono_arch_output_basic_block): Maintain stack alignment
396 * exceptions-x86.c: Rewrite the throw trampolines so they maintain stack
399 2009-09-03 Zoltan Varga <vargaz@gmail.com>
401 * mini-amd64.c (mono_arch_get_vcall_slot): Pass the start of the method to
402 mono_breakpoint_clean_code () when using LLVM as the prologues generated by
403 LLVM might be very short.
405 2009-09-01 Zoltan Varga <vargaz@gmail.com>
407 * exceptions-x86.c (throw_exception): Fix the previous change by substracting
408 the alignment for the value of sp.
410 2009-09-01 Geoff Norton <gnorton@novell.com>
412 * mini.c (mono_get_lmf_addr): Fix jit_thread_attach for native to
413 managed wrappers in full aot.
415 2009-08-31 Zoltan Varga <vargaz@gmail.com>
417 * exceptions-x86.c (get_throw_exception): Align the stack on osx.
419 2009-08-28 Zoltan Varga <vargaz@gmail.com>
421 * mini-llvm-cpp.cpp mini-llvm.c: Update to latest llvm api.
423 2009-08-25 Zoltan Varga <vargaz@gmail.com>
425 * aot-compiler.c (emit_exception_debug_info): Emit ei->flags too.
427 * aot-runtime.c (decode_exception_debug_info): Decode ei->flags from the
430 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
432 * aot-runtime.c aot-compiler.c: Emit exception causes fully so we don't
433 depend on the info MonoMethodHeader which could be missing in IL stripped
436 2009-08-25 Zoltan Varga <vargaz@gmail.com>
438 * mini-arm.c (add_general): Fix the passing of 64 bit values on darwin, where
439 they are only 4 byte aligned.
441 2009-08-21 Zoltan Varga <vargaz@gmail.com>
443 * mini-arm.c (mono_arch_allocate_vars): Use FP as the frame pointer as
444 was done previously, since using SP causes too many problems.
446 * exceptions-arm.c: Fix the handling of sp/fp so unwinding through
447 frames without a frame pointer works.
449 * mini-arm.c (mono_arch_get_global_int_regs): Avoid using V5 as a
450 global register in methods with calls, since the calls can go through
451 a static rgctx trampoline which doesn't save it.
453 2009-08-19 Zoltan Varga <vargaz@gmail.com>
455 * mini-arm.c (mono_arch_context_get_int_reg): Handle SP as well.
457 2009-08-18 Zoltan Varga <vargaz@gmail.com>
459 * aot-compiler.c (add_generic_instances): Fix the net 1.1 build.
461 2009-08-18 Christian Hergert <chris@dronelabs.com>
463 * method-to-ir.c: Fix warnings for uninitialized variables.
465 2009-08-18 Christian Hergert <chris@dronelabs.com>
468 * aot-compiler.c: Fix printf warnings.
470 2009-08-18 Zoltan Varga <vargaz@gmail.com>
472 * aot-compiler.c (add_generic_instances): Add string[] wrapper methods.
473 Add GetGenericValueImpl<string>.
475 * aot-compiler.c (add_generic_instances): Add instances of
476 GenericEqualityComparer<T> for primitive types. Only emit the array
477 wrappers into the mscorlib image.
479 2009-08-15 Zoltan Varga <vargaz@gmail.com>
481 * aot-runtime.c (load_method): Rename 'aot_module' -> 'amodule'. Allocate
482 the methods_loaded array using amodule->info->nmethods.
484 * mini.h (MonoAotFileInfo): Add an 'nmethods' field.
485 (MONO_AOT_FILE_VERSION): Bump this.
487 * aot-compiler.c: Emit more generic instances allowing some parts of linq
490 * aot-runtime.c (mono_aot_get_unwind_info): Handle the case when the
491 MonoJitInfo doesn't belong to its methods aot image.
493 2009-08-14 Zoltan Varga <vargaz@gmail.com>
495 * mini-arm.c (mono_arch_allocate_vars): Use SP as the default frame reg.
497 * mini-arm.c: Fix warnings.
499 * mini-arm.c (mono_arm_emit_load_imm): Only emit a movt if needed.
501 * mini-arm.c (mono_arm_emit_load_imm): Use movt/movw if the cpu
504 2009-08-12 Zoltan Varga <vargaz@gmail.com>
506 * aot-compiler.c (arch_emit_imt_thunk): Rework the arm code to
509 * mini-trampolines.c (mono_magic_trampoline): Allocate a local to
510 hold the trampoline argument, so its initial value is available during
513 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
518 * exceptions-s390x.c:
521 * exceptions-sparc.c:
522 * exceptions-alpha.c:
524 * mini-trampolines.c:
526 * exceptions-s390.c: add and use #define's instead of sizeof()
527 for MonoJitInfo and MonoJitInfoTable.
529 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
534 * tramp-x86.c: use a #define instead of sizeof() for a few
535 structures that use a zero-length array.
537 2009-08-07 Rodrigo Kumpera <rkumpera@novell.com>
539 * method-to-ir.c (mono_method_to_ir/CEE_CONSTRAINED_): Handle the
540 case when the method is dynamic. Fixes #529238.
542 2009-08-06 Zoltan Varga <vargaz@gmail.com>
544 * mini.c (mono_jit_compile_method_inner): Throw an exception instead
545 of asserting when a method is JIT compiled in full-aot mode.
547 2009-08-03 Jerry Maine <crashfourit@gmail.com>
549 Contributed under the terms of the MIT/X11 license by
550 Jerry Maine <crashfourit@gail.com>.
552 * fixed wrong dates in changelog.
554 2009-08-03 Jerry Maine <crashfourit@gmail.com>
556 Contributed under the terms of the MIT/X11 license by
557 Jerry Maine <crashfourit@gail.com>.
559 * basic-simd.cs: added test for packed double square root.
560 * cpu-amd64.md: added opcode info for packed double square root.
561 * cpu-x86.md: added opcode info for packed double square root.
562 * mini-ops.h: added IR opcode for packed double square root.
563 * mini-x86.c: added IR to native translation code for packed double square root.
564 * mini-amd64.c: removed todo for packed double square root.
565 * simd-intrinsics.c: added method to IR opcode converstion for
566 packed double square root.
568 2009-08-03 Jerry Maine <crashfourit@gmail.com>
570 Contributed under the terms of the MIT/X11 license by
571 Jerry Maine <crashfourit@gail.com>.
573 * mini-amd64.c: Added a change to help tell the difference as
574 to what perpose the xmm register is being used--mainly to help
576 * mini-amd64.h: Changed callee regs to use 15 out of 16
577 (one used for special cases) xmm registers for both fp
578 and simd ops. Added define to turn on new feature in the regalloc
579 that allows fp and simd ops to share the xmm regs happily.
580 * codegen.c: Added code to detect for which perpose an xmm reg is
581 being used (fp or simd) and to translate back and forth to the
582 correct logical reg bank (fp or simd) for 'spill load's.
584 2009-08-03 Jerry Maine <crashfourit@gmail.com>
586 Contributed under the terms of the MIT/X11 license by
587 Jerry Maine <crashfourit@gail.com>.
589 * basic-simd.cs: Added tests for stressing the regalloc when running with
590 16 simd regs and when simd and fp ops share the same reg bank.
592 2009-08-01 Mark Probst <mark.probst@gmail.com>
594 * method-to-ir.c (mini_emit_stobj): If we call mono_value_copy()
595 in shared generic code, we might have to look up the class in the
596 RGCTX. If we use the class directly, compute its GC descriptor.
598 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
600 * mini.c (mono_jit_runtime_invoke): Fix a warning.
602 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
604 * mini.c (mono_jit_runtime_invoke): Initialize the class and
605 check for errors. Fixed the case when the class with the Main
608 2009-07-31 Jerry Maine <crashfourit@gmail.com>
610 Contributed under the terms of the MIT/X11 license by
611 Jerry Maine <crashfourit@gail.com>.
613 * cpu-amd64.md: Fixed simple bug in machine discrition file.
615 2009-07-31 Zoltan Varga <vargaz@gmail.com>
617 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_IREM_UN_IMM.
619 2009-08-30 Rodrigo Kumpera <rkumpera@novell.com>
621 * method-to-ir.c: Fix naming of stelem and ldelem.
623 2009-07-30 Zoltan Varga <vargaz@gmail.com>
625 * driver.c (main_thread_handler): Check that the assembly loaded
626 matches the filename when doing AOT.
628 2009-07-30 Mark Probst <mark.probst@gmail.com>
630 * mini.c: get_ip_from_sigctx installer has been removed, so don't
633 * mini-x86.h, mini-amd64.h, mini-ppc.h: UCONTEXT macros moved (to
634 utils/mono-sigcontext.h).
636 * exceptions-amd64.c: Use the UCONTEXT_GREGS macro instead of an
639 2009-07-29 Massimiliano Mantione <massi@ximian.com>
641 * mini.c (mono_codegen):
642 Call profiler hook to keep track of method code buffers.
644 2009-07-27 Mark Probst <mark.probst@gmail.com>
646 * method-to-ir.c: Invoke write barriers for the
647 Interlocked.(Compare)Exchange JIT intrinsics.
649 2009-07-26 Raja R Harinath <harinath@hurrynot.org>
651 * Makefile.am (version.h): Fix issues when built out of tree.
652 Remove some redundant 'grep's piped through 'sed's.
654 Fri Jul 24 17:28:37 CEST 2009 Steven Munroe <munroesj@us.ibm.com>
656 This patch is contributed under the terms of the MIT/X11 license
658 * mini-ppc.c (mono_arch_output_basic_block):
659 (OP_STOREI1_MEMBASE_REG): Handle 32-bit offsets combining addis
660 for bits 32-47 with signed load/store diplacements for bits
661 48-63. Use prefered base/offset order for indexed form.
662 (OP_STOREI2_MEMBASE_REG, OP_STORE_MEMBASE_REG): Same.
663 (OP_LOAD_MEMBASE, OP_LOADI4_MEMBASE, OP_LOADU4_MEMBASE,
664 OP_LOADI1_MEMBASE, OP_LOADU1_MEMBASE, OP_LOADU2_MEMBASE,
665 OP_LOADI2_MEMBASE): Same.
666 (OP_STORER8_MEMBASE_REG, OP_LOADR8_MEMBASE,
667 OP_STORER4_MEMBASE_REG, OP_LOADR4_MEMBASE): Same.
668 (OP_STOREI1_MEMINDEX): Use prefered base/offset order for
670 (OP_STOREI2_MEMINDEX, OP_STORE_MEMINDEX): Same.
671 (OP_LOAD_MEMINDEX, OP_LOADI4_MEMINDEX, OP_LOADU4_MEMINDEX,
672 OP_LOADU2_MEMINDEX, OP_LOADI2_MEMINDEX, OP_LOADU1_MEMINDEX,
673 OP_LOADI1_MEMINDEX): Same
674 (OP_LOADR4_MEMINDEX, OP_LOADR8_MEMINDEX, OP_STORER4_MEMINDEX,
675 OP_STORER8_MEMINDEX): Same
676 (OP_JMP): Use addis/addi sequence for int cfg->stack_usage
678 (mono_arch_emit_prolog): Handle 32-bit offsets combining addis
679 for bits 32-47 with signed load/store diplacements for bits
680 48-63. Use prefered base/offset order for indexed form.
682 Fri Jul 24 16:57:12 CEST 2009 Steven Munroe <munroesj@us.ibm.com>
684 This patch is contributed under the terms of the MIT/X11 license
686 * mini-ppc.c: Define PPC_MOVE_FPR_GPR and PPC_ISA_64.
687 (mono_arch_get_vcall_slot): Fx pointer to int cast warning.
688 (mono_arch_decompose_opts): Make OP_ICONV_TO_R4 and
689 OP_ICONV_TO_R8 decompose conditional on !PPC_ISA_64.
690 (mono_arch_output_basic_block) [OP_JMP]: Use ppc_load32 for
691 cfg->stack_usage to avoid size warnings.
692 (mono_arch_output_basic_block) [__mono_ppc64__]: Replace
693 store/load sequence with mffgpr if PPC_MOVE_FPR_GPR is true.
694 (mono_arch_output_basic_block) [!__mono_ppc64__]: For
695 OP_ICONV_TO_R4 or OP_ICONV_TO_R8 and PPC_ISA_64 use fcfid
697 (mono_arch_emit_prolog): Move mono_emit_unwind_op_def_cfa
698 after code varible is initialized.
699 Add g_assert ppc_is_imm16 for ainfo->offset. Handle
700 ainfo->size == 8 when ainfo->offset !ppc_is_imm16.
701 (mono_arch_emit_epilog):
702 Move Use ppc_load32 for cfg->stack_usage to avoid size
705 2009-07-24 Mark Probst <mark.probst@gmail.com>
707 * method-to-ir.c: The write barrier doesn't do the store anymore,
708 so we have always to emit it. Also, emit the wbarrier after the
711 2009-07-24 Zoltan Varga <vargaz@gmail.com>
713 * mini-arm.c (mono_arch_get_delegate_invoke_impls): Add a trampoline
714 for argument count 3 too.
716 2009-07-23 Zoltan Varga <vargaz@gmail.com>
718 * mini.c (mono_jit_compile_method_with_opt): Add an 'ex' argument to let
719 the caller handle the exceptions.
720 (mono_jit_runtime_invoke): Handle exceptions thrown while compiling the
721 method. Fixes #524498.
723 2009-07-22 Geoff Norton <gnorton@novell.com>
725 * mini-exceptions.c: Fix build on ia64.
727 2009-07-22 Mark Probst <mark.probst@gmail.com>
729 * mini-exceptions.c (ves_icall_get_frame_info): Use write
732 2009-07-21 Zoltan Varga <vargaz@gmail.com>
734 * mini-arm.c (mono_arch_emit_prolog): Fix thread attaching in aot
737 2009-07-20 Zoltan Varga <vargaz@gmail.com>
739 * basic-simd.cs (Main): Pass args to the test driver.
741 2009-07-20 Geoff Norton <gnorton@novell.com>
743 * mini-x86.h: Fix the x86 version guards to use Apple's
744 properly defined macros.
746 2009-07-20 Geoff Norton <gnorton@novell.com>
748 * mini-x86.c: Fix --trace on darwin-x86 and other systems which require
751 2009-07-20 Zoltan Varga <vargaz@gmail.com>
753 * mini.c (mono_jit_runtime_invoke): Speed this up by adding a hash to
754 MonoJitDomainInfo which maps MonoMethod's to a structure containing all
755 the information which is needed for invokes, so only one locking+hash table
758 * aot-compiler.c: Add a 'tool-prefix' option to be used when cross-compiling.
760 * aot-compiler.c (add_generic_instances): Emit instances of
761 GenericComparer<T> for primitive types.
763 2009-07-19 Rodrigo Kumpera <rkumpera@novell.com>
765 * mini-posix.c: Fix linux build.
767 2009-07-19 Geoff Norton <gnorton@novell.com>
769 * mini.h: Add prototypes for mono_runtime_syscall_fork and
770 mono_gdb_render_native_backtraces
771 * mini-darwin.c: Apple's syscall(SYS_fork) is very weird on x86,
772 so we implement the sane semantics to the runtime here
773 (mono_gdb_render_native_backtraces). Apple also uses an ancient gdb
774 so we need to call it differently (mono_gdb_render_native_backtraces)
775 * mini-posix.c: Move the old semantics from mini.c to the prototypes
776 here for default implementations.
777 * mini.c: Refactor mono_handle_native_sigsegv so that we can properly
778 support Apple's weird syscall (SYS_fork) implementation and not busy
779 loop in abort() on native crashes on OSX anymore.
781 2009-07-18 Zoltan Varga <vargaz@gmail.com>
783 * aot-runtime.c (load_method): Change the handling of the
784 MONO_LASTAOT env variable so MONO_LASTAOT=0 means that no aot methods
787 * mini.c (mono_patch_info_equal): Really fix the handling of RGCTX_FETCH.
789 2009-07-17 Zoltan Varga <vargaz@gmail.com>
791 * mini.c (mono_patch_info_equal): Revert the last change for now as it
792 seems to break the aot tests.
794 * mini.c (mono_patch_info_equal): Fix the handling of
795 MONO_PATCH_INFO_RGCTX_FETCH.
797 2009-07-16 Zoltan Varga <vargaz@gmail.com>
799 * unwind.c: Use TARGET_AMD64 instead of __x86_64__.
801 * mini.c (mono_patch_info_hash): Fix the handling of
802 MONO_PATCH_INFO_INTERNAL_METHOD.
803 (mono_patch_info_equal): Ditto.
805 2009-07-16 Zoltan Varga <vargaz@gmail.com>
807 * mini-llvm.c (mono_llvm_emit_method): Use module instead of ctx->module
810 * mini-llvm.c: Add some infrastructure for AOT support.
812 2009-07-15 Zoltan Varga <vargaz@gmail.com>
814 * mini-llvm-cpp.c: Update to the latest llvm api.
816 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Set the EnablePrettyStackTrace
817 option to false to prevent llvm from installing signal handlers which
820 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
823 * cpu-amd64.md: Revert previous change as those instructions
824 take 2 separate arguments. Remember to read the arch docs more
827 2009-07-15 Zoltan Varga <vargaz@gmail.com>
829 * mini-llvm-cpp.cpp (mono_llvm_build_alloca): Update to latest llvm api.
831 Wed Jul 15 17:20:27 CEST 2009 Paolo Molaro <lupus@ximian.com>
833 * mini-ppc.c: exploit multiple load/store units if available (rest of
834 the change from Steven Munroe (<munroesj@us.ibm.com>) first patch at
835 http://bugzilla.novell.com/show_bug.cgi?id=487846).
837 Wed Jul 15 16:24:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
839 * mini-ppc.c: integrate most of Steven Munroe (<munroesj@us.ibm.com>)
840 first patch at http://bugzilla.novell.com/show_bug.cgi?id=487846.
842 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
844 * cpu-x86.md: Fix missing clobbering from trancendental simd
847 * cpu-amd64.md: Same.
849 2009-07-14 Jerry Maine <crashfourit@gmail.com>
851 Contributed under the terms of the MIT/X11 license by
852 Jerry Maine <crashfourit@gail.com>.
854 * basic-simd.cs: Added tests for single and doulble indexers.
856 * cpu-amd64.md: Added simd opcode information.
858 * mini-amd64.c: Added IR to native simd generation code.
859 Added simd register names and function that returns them.
861 * mini-amd64.h: Added marcos to turn on simd code compilation in
862 amd64. Added max simd register count marco. Added caller/callee
863 register mask marcos. Added marcos to use simd register bank.
865 * mini.h: Added helper marco for shufling dwords and simple
868 2009-07-14 Zoltan Varga <vargaz@gmail.com>
870 * mini-llvm-cpp.cpp: Update to latest llvm SVN api.
872 * Makefile.am (mono_LDADD): Pass LLVM_LDFLAGS to the linked.
874 * unwind.c (mono_unwind_get_ops_from_fde): Make this return
875 the length of the native code as well.
877 * basic-simd.cs: Add a test for #521662.
879 Mon Jul 13 17:58:50 CEST 2009 Paolo Molaro <lupus@ximian.com>
881 * mini-ppc.c: fixed bug introduced by Steven's TLS changes.
883 2009-07-13 Mark Probst <mark.probst@gmail.com>
885 * mini.c: Register function for getting the IP from a signal
886 context with metadata.
888 2009-07-13 Zoltan Varga <vargaz@gmail.com>
890 * method-to-ir.c (mono_method_to_ir): When calling a gshared method,
891 call a generic class init trampoline if needed. Fixes #519336.
893 * generics.cs: Add a test.
895 2009-07-09 Mark Probst <mark.probst@gmail.com>
897 * method-to-ir.c: When doing a call which might be remote from
898 shared generic code to other shared code with open type arguments,
899 get the remoting invoke wrapper from the RGCTX and do an indirect
902 2009-07-03 Zoltan Varga <vargaz@gmail.com>
904 * mini-trampolines.c (get_unbox_trampoline): Add an rgctx trampoline
905 after the unbox trampoline in the full-aot case.
907 2009-07-02 jonas echterhoff <jonas@unity3d.com>
909 * mini.c: Move initialization of jit_mutex before debugger initialization
914 * Info.plist: added Info.plist and link flag to enable the mono executable
915 to access other processes. Requires codesigning of the executable to work.
917 * mdb-debug-info32-darwin.s: The same as mdb-debug-info32.s, changed to
922 2009-06-30 Zoltan Varga <vargaz@gmail.com>
924 * driver.c (mini_regression): Handle loading errors. Fixes #508869.
926 2009-06-29 Zoltan Varga <vargaz@gmail.com>
928 * mini-exceptions.c (get_generic_context_from_stack_frame): Fix the case
929 when the generic instance is an instantiation of a subclass of the
930 methods class. Fixes #517166.
932 2009-06-26 Zoltan Varga <vargaz@gmail.com>
934 * mini-amd64.c (mono_arch_emit_prolog): Fix thread attaching in AOTed
937 * mini.c (mono_jit_thread_attach): Allow domain to be NULL for calls from
940 * CMakeLists.txt: Add minimal support for installation.
942 2009-06-25 Zoltan Varga <vargaz@gmail.com>
944 * aot-compiler.c (emit_and_reloc_code): Factor out the code to
945 determine whenever a method is directly callable to a separate function.
947 * mini-<ARCH>.c tramp-<ARCH>.c: Remove needless casts and add new
948 needed ones as a result of the previous change.
950 * mini-<ARCH>.c tramp-<ARCH>.c: Use mgreg_t* as the
951 type of register arrays.
953 * mini-trampolines.c tramp-<ARCH>.c aot-runtime.c: Use mgreg_t* as the
954 type of register arrays.
956 2009-06-24 Jerry Maine <crashfourit@gmail.com>
958 Contributed under the terms of the MIT/X11 license by
959 Jerry Maine <crashfourit@gail.com>.
961 * mini-amd64.c: Added code to convert simd IR to native amd64 sse.
963 2009-06-24 Zoltan Varga <vargaz@gmail.com>
965 * aot-compiler.c (emit_plt): Define debug labels for most plt entries.
967 2009-06-24 Neale Ferguson <neale@sinenomine.net>
969 * mini-s390x.c: Correct LCONV_TO_Ix and ICONV_TO_Ix routines. Fix leave_method
970 dump of structure return value. Fix some formatting.
971 * cpu-s390x.md: Fix lengths of instruction sequences.
972 * mini-s390.c: Minor formatting changes.
974 2009-06-24 Zoltan Varga <vargaz@gmail.com>
976 * mini-x86.h: Applied patch from Romain Tartiere (romain@blogreen.org).
977 Use sigaction on freebsd as well.
979 2009-06-23 Zoltan Varga <vargaz@gmail.com>
981 * mini.h: Don't define MONO_ARCH_HAVE_TLS_GET to 0, as some code
984 * mini.c (mini_init): Revert a change which breaks cross-compilation.
986 2009-06-22 Mark Probst <mark.probst@gmail.com>
988 * mini-ppc.c, cpu-ppc.md: Enable TLS on Darwin/G4.
990 2009-06-22 Mark Probst <mark.probst@gmail.com>
992 * mini.c, mini.h: Tell the runtime whether we support MONO_TLS.
994 2009-06-20 Martin Baulig <martin@ximian.com>
997 (MonoDebuggerThreadFlags): New enum typedef.
998 (MonoDebuggerThreadInfo): Added `guint32 thread_flags'.
999 (mono_debugger_thread_created): Added `gpointer func' argument;
1000 initialize the new `thread_flags' field.
1002 2009-06-18 Martin Baulig <martin@ximian.com>
1004 * debug-debugger.h (MonoDebuggerRuntimeFlags): New enum typedef.
1005 (MonoDebuggerInfo): Renamed the `dummy' field info `runtime_info'.
1008 (mini_debugger_set_attach_ok): New function; sets the attach-ok
1009 flag in `MONO_DEBUGGER__info.runtime_info'.
1012 (mono_main): Call mini_debugger_set_attach_ok() if generics
1013 sharing is disabled.
1015 2009-06-22 Zoltan Varga <vargaz@gmail.com>
1017 * aot-compiler.c (add_wrappers): Fix a warning.
1019 * mini-ppc.c tramp-ppc.c exceptions-ppc.c aot-compiler.c: Update after
1020 the ppc load/store macro changes.
1022 2009-06-21 Zoltan Varga <vargaz@gmail.com>
1024 * tramp-ppc.c (mono_arch_patch_plt_entry): Implement this.
1026 * aot-compiler.c (mono_compile_assembly): Sanitize the plt symbol too,
1027 not just the got symbol.
1029 * mini-ppc.c aot-compiler.c unwind.c: Implement generation of unwind info
1032 * aot-compiler.c unwind.c: Add infrastructure for unwind support on
1035 * aot-compiler.c: Remove some fixmes.
1037 * driver.c (mono_main): Print a helpful message when cross-compiling.
1039 * mini.c (mini_init): Disable signal handlers when cross-compiling.
1041 * method-to-ir.c (initialize_array_data): Do the optimization if the
1042 target byte order is little endian, instead of the host byte order.
1044 * aot-compiler.c: Emit sizes for most symbols, only emit runtime-invoke
1045 wrappers into the mscorlib image, Emit a unique plt symbol for each
1046 image, emit symbols for plt entries.
1048 * image-writer.c (img_writer_emit_symbol_size): New function to emit
1051 2009-06-20 Zoltan Varga <vargaz@gmail.com>
1053 * aot-compiler.c (add_wrappers): Avoid calling
1054 mono_marshal_get_type_info () since it can assert for some types.
1056 * method-to-ir.c (mono_method_to_ir): Disable aot when some forms of
1057 ldtoken are used inside wrappers.
1059 * helpers.c: Add support for prefixing tools with the arch name.
1061 * mini.h (OP_LOADR_MEMBASE): New opcodes to load/store pointer sized
1062 quantities when using ilp32.
1064 * mini-codegen.c: Use OP_LOADR_MEMBASE/OP_STORER_MEMBASE for loading/storing
1065 spill slots. Use sizeof(mgreg_t) for the spill slot size.
1067 * image-writer.c: Use .long on ilp32.
1069 * aot-compiler.c: Use 32 bit loads on ilp32.
1071 2009-06-19 Zoltan Varga <vargaz@gmail.com>
1073 * tramp-ppc.c (mono_arch_create_trampoline_code): Fix the ppc build.
1075 * mini-ops.h: Use TARGET_POWERPC define for consistency.
1077 * patch-info.h: Add 'MSCORLIB_GOT_ADDR' patch type.
1079 * aot-compiler.c aot-runtime.c: Put the mscorlib got address into the
1080 second got slot of every aot image.
1082 * aot-compiler.c aot-runtime.c mini-trampolines.c: Add support for
1083 aot on platforms with function pointers.
1085 * mini-ppc.h mini-ppp.c cpu-ppc.md exceptions-ppc.c tramp-ppc.c: Add
1086 support for aot/full aot on ppc/ppc64.
1088 * tramp-<ARCH>.c (mono_arch_patch_plt_entry): Add 'got' and 'regs'
1089 arguments which are needed on ppc.
1091 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Add 'regs'
1094 * mini-trampolines.c aot-runtime.c: Update after the above changes.
1096 * liveness.c (BITS_PER_CHUNK): Use MONO_BITSET_BITS_PER_CHUNK.
1098 * regalloc2.c (BITS_PER_CHUNK): Ditto.
1100 * aot-compiler.c (emit_got_info): Fix reading unused memory.
1102 * ir-emit.h (alloc_dreg): Add a 'return -1' to quiet some compilers.
1104 2009-06-17 Geoff Norton <gnorton@novell.com>
1106 * aot-compiler.c: Ensure we dont try to close a null dwarf writer.
1108 2009-06-17 Zoltan Varga <vargaz@gmail.com>
1110 * dwarfwriter.c (mono_dwarf_writer_create): Add an 'appending' parameter
1111 to control whenever the dwarf writer is in xdebug or aot mode.
1112 (emit_class_dwarf_info): Use a separate abbrev for structures without
1115 * aot-compiler.c: Pass the appending parameter to
1116 mono_dwarf_writer_create ().
1118 * branch-opts.c (mono_merge_basic_blocks): Fix the case when bbn
1119 falls through to its next bblock. Fixes #513931.
1121 * iltests.il: Add a test.
1123 * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Emit some line number
1124 infor even if emit_line is FALSE, as the apple linker seems to require it.
1126 * image-writer.c (asm_writer_emit_symbol_diff): Call get_label ().
1128 * dwarfwriter.c (emit_cie): Emit a separate symbol for the cie start, as
1132 2009-06-15 Zoltan Varga <vargaz@gmail.com>
1134 * exceptions-mips.c (mono_arch_get_throw_exception_by_name): Fix the
1137 2009-06-13 Zoltan Varga <vargaz@gmail.com>
1139 * mini.h (struct MonoBasicBlock): Add 'has_jump_table' and
1140 'has_call_handler' fields.
1142 * method-to-ir.c (mono_method_to_ir): Set them if needed.
1144 * branch-opts.c (mono_merge_basic_blocks): Avoid iterating through the
1145 first bblock if not needed. Fixes #512790.
1147 2009-06-11 Zoltan Varga <vargaz@gmail.com>
1149 * aot-compiler.c (mono_compile_assembly): Fix a warning.
1151 * aot-compiler.c (add_wrappers): Don't emit remoting-invoke-with-check
1154 * aot-runtime.c (mono_aot_get_method): Use the original method's code for
1155 remoting-invoke-with-check wrappers, which are not needed when running with
1156 full-aot, since it doesn't support remoting.
1158 2009-06-10 Zoltan Varga <vargaz@gmail.com>
1160 * aot-compiler.c (emit_got_info): Don't emit offsets for the plt got entries.
1162 * aot-compiler.c aot-runtime.c: Don't emit the first got offset in the
1163 method info, it is not used anymore.
1165 * mini.h: Bump AOT file format version.
1167 * aot-compiler.c (arch_emit_plt_entry): Make the arm plt entries one
1170 * aot-runtime.c (mono_aot_get_plt_info_offset): Update after the
1173 * tramp-arm.c (mono_arch_patch_plt_entry): Ditto.
1175 * mini.h: Bump AOT file format version.
1177 2009-06-10 Zoltan Varga <vargaz@gmail.com>
1179 * image-writer.c (asm_writer_emit_symbol_diff): Disable the
1180 TARGET_ASM_APPLE stuff for now, as it doesn't seem to work on the
1183 * mini-arm.c (mono_arch_output_basic_block): Fix the implementation
1184 of CKFINITE and FBGE for VFP.
1186 2009-06-09 Zoltan Varga <vargaz@gmail.com>
1188 * aot-compiler.c: Don't align code to 16 bytes on arm.
1190 * aot-compiler.c (emit_method_code): Emit the unbox trampolines right
1191 before the methods they belong to.
1193 * aot-runtime.c (mono_aot_plt_resolve): Avoid creating trampolines in
1194 the full-aot case if possible, since the trampoline will be called right
1197 * aot-compiler.c (mono_compile_assembly): Decrease the number of full aot
1198 trampolines to 1024 after the change above.
1200 * aot-compiler.c (arch_emit_specific_trampoline): Rework the arm
1201 trampoline to save 8 bytes per trampoline.
1203 * tramp-arm.c (mono_arch_create_trampoline_code_full): Update after the
1206 2009-06-08 Zoltan Varga <vargaz@gmail.com>
1208 * aot-compiler.c: Use acfg->temp_prefix instead of .L to prefix labels.
1210 2009-06-08 Martin Baulig <martin@ximian.com>
1213 (MonoDebuggerExceptionAction): Moved into debug-mini.h.
1214 (_mono_debugger_throw_exception): Don't make this static.
1215 (_mono_debugger_unhandled_exception): Likewise.
1216 (mono_debugger_handle_exception): Moved to mini-exceptions.c
1219 (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
1220 (_mono_debugger_throw_exception): Add function prototype.
1221 (_mono_debugger_unhandled_exception): Likewise.
1224 (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
1225 arg; return the first exception handler if the exception is caught
1226 and we're running inside the debugger.
1227 (mono_debugger_handle_exception): Moved here from debug-mini.c;
1228 improve exception handle inside runtime-invoke, check whether the
1229 exception is actually caught in the method being invoked and not
1230 by the runtime-invoke-wrapper.
1232 2009-06-08 Zoltan Varga <vargaz@gmail.com>
1234 * image-writer.c: Improve support for the osx assembler.
1236 * dwarfwriter.c: Avoid the usage of subsections if the assembler doesn't
1239 2009-06-08 Martin Baulig <martin@ximian.com>
1242 (MonoDebuggerExceptionAction): Moved into debug-mini.h.
1243 (_mono_debugger_throw_exception): Don't make this static.
1244 (_mono_debugger_unhandled_exception): Likewise.
1245 (mono_debugger_handle_exception): Moved to mini-exceptions.c
1248 (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
1249 (_mono_debugger_throw_exception): Add function prototype.
1250 (_mono_debugger_unhandled_exception): Likewise.
1253 (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
1254 arg; return the first exception handler if the exception is caught
1255 and we're running inside the debugger.
1256 (mono_debugger_handle_exception): Moved here from debug-mini.c;
1257 improve exception handle inside runtime-invoke, check whether the
1258 exception is actually caught in the method being invoked and not
1259 by the runtime-invoke-wrapper.
1261 2009-06-07 Zoltan Varga <vargaz@gmail.com>
1263 * image-writer.c (append_subsection): Don't align subsections of the
1264 debug_line section as a workaround.
1266 * dwarfwriter.c: Emit line number info in the AOT case as well.
1268 2009-06-06 Steven Munroe <munroesj@us.ibm.com>
1270 This patch is contributed under the terms of the MIT/X11 license
1272 * mini-ppc.c (mono_arch_emit_exceptions): Change assert to
1273 code_len <= code_size
1275 2009-06-06 Zoltan Varga <vargaz@gmail.com>
1277 * mini-mips.c (mips_emit_exc_by_name): Fix the mips build.
1279 2009-06-04 Zoltan Varga <vargaz@gmail.com>
1281 * aot-compiler.c aot-runtime.c: Delete references to static rgctx
1282 invoke wrappers, we now use trampolines instead.
1284 2009-06-04 Mark Probst <mark.probst@gmail.com>
1286 * mini-darwin.c: The exception thread must not be registered with
1289 2009-06-04 Mark Probst <mark.probst@gmail.com>
1291 * mini-gc.c: Disable the code because it makes SGen crash.
1293 2009-06-03 Zoltan Varga <vargaz@gmail.com>
1295 * aot-compiler.c (mono_compile_assembly): Handle file open errors gracefully
1296 instead of asserting.
1298 2009-05-31 Zoltan Varga <vargaz@gmail.com>
1300 * aot-compiler.c (mono_compile_assembly): Move the creation of the
1301 output file after the code has been compiled.
1303 2009-05-30 Zoltan Varga <vargaz@gmail.com>
1305 * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Fix 64 bit support.
1307 2009-05-31 Zoltan Varga <vargaz@gmail.com>
1309 * aot-compiler.c aot-runtime.c: Get rid of the shared/non-shared got
1310 entries distinction to simplify the code.
1312 * mini.h: Bump AOT file format version.
1314 2009-05-28 Zoltan Varga <vargaz@gmail.com>
1316 * objects.cs: Fix the signature of one of the tests.
1318 * mini.c (mini_create_ftnptr): New helper function, moved here from
1320 (mini_get_addr_from_ftnptr): Ditto.
1321 (mini_init): Install the new helpers.
1323 2009-05-28 Martin Baulig <martin@ximian.com>
1325 Correctly initialize the debugger when embedding Mono.
1327 * mdb-debug-info32.s, mdb-debug-info64.s: Add a global variable
1328 `MONO_DEBUGGER__using_debugger' to the `.mdb_debug_info' section;
1329 see documentation in mini_debug_running_inside_mdb().
1332 (mini_debug_running_inside_mdb): New function to check whether
1333 we're running inside mdb.
1335 * mini.c (mini_init): Call mini_debugger_init() if we're running
1336 inside the debugger.
1338 * driver.c (mono_main): Moved the call to mini_debugger_init()
1339 into mini_init() to make this work when embedding Mono.
1341 * debug-debugger.c (mini_debugger_init): Warn about duplicate
1342 calls to mini_debugger_init().
1344 * mini.h: Rename mono_debugger_init() -> mini_debugger_init(),
1345 mono_debugger_main() -> mini_debugger_main() and put them inside a
1346 `MONO_DEBUGGER_SUPPORTED' conditional.
1348 2009-05-26 Rodrigo Kumpera <rkumpera@novell.com>
1350 * mini-trampolines.c: Kill mono_find_delegate_trampoline_by_addr as
1351 this is no longer in use.
1354 2009-05-26 Zoltan Varga <vargaz@gmail.com>
1356 * mini-sparc.c (add_outarg_load): Fix the sparc build.
1358 * aot-compiler.c (emit_method_code): Always write out C style symbols for
1361 2009-05-27 Martin Baulig <martin@ximian.com>
1363 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
1365 * mini-x86.c (mono_arch_output_basic_block): Fix the precision of
1366 long_conv_to_r_un to 64 bits.
1368 * cpu-x86.md: Increase the instruction size due to the changes.
1370 * iltests.il.in: Add regression test.
1374 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
1376 * objects.cs: Move the previous test from basic.cs to here.
1378 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
1380 * basic.cs: Add regression test for #506915.
1382 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
1384 * method-to-ir.c (mono_method_to_ir): When doing the ldobj+stobj
1385 optimization we must check the bb of the first byte of stobj as
1386 it's the only one set in cil_offset_to_bb.
1390 2009-05-25 Zoltan Varga <vargaz@gmail.com>
1392 * image-writer.c: Fix pointer directive on ppc64.
1394 2009-05-24 Zoltan Varga <vargaz@gmail.com>
1396 * image-writer.c (asm_writer_emit_section_change): Avoid using
1397 .bss subsections on ppc too.
1399 2009-05-23 Zoltan Varga <vargaz@gmail.com>
1401 * image-writer.c: Fix the definition of TARGET_ASM_....
1403 * image-writer.c: Fix the emission of assembler directives in the last
1406 * mini-ppc.c (mono_arch_emit_exceptions): Increase the size of the
1407 exception throwing code to accomodate ppc64.
1409 * tramp-ppc.c (mono_arch_get_nullified_class_init_trampoline): Increase the
1410 size to work on ppc64 too.
1412 * mini-ppc.h (MonoCompileArch): Enable static rgctx trampolines on ppc64
1415 * image-writer.c: Clean up the #ifdef hell a bit by adding defines for
1416 the assembler dialect instead of using platform specific defines.
1418 2009-05-22 Geoff Norton <gnorton@novell.com>
1420 * mini-arm.c (get_call_info): If a structure is split between the stack
1421 and argument registers, we should not advance the stack pointer by the entire
1422 native size, but just by the amount that spilled.
1424 2009-05-22 Zoltan Varga <vargaz@gmail.com>
1426 * mini-arm.c (get_call_info): Handle structures with alignment requirements
1429 2009-05-21 Zoltan Varga <vargaz@gmail.com>
1431 * aot-compiler.c (emit_extra_methods): Encode direct runtime invoke
1434 * aot-compiler.c (add_extra_method): Fix up the collection of extra
1435 methods so wrapper don't get added twice.
1436 (add_generic_instances): Don't add methods of arrays.
1438 * generics.cs: Mark one test as !FULLAOT.
1440 2009-05-21 Rodrigo Kumpera <rkumpera@novell.com>
1442 * mini-x86.c (emit_move_return_value): Remove unused vars.
1444 2009-05-21 Rodrigo Kumpera <rkumpera@novell.com>
1446 * mini-x86.c (mono_arch_emit_call): The decompose code now supports
1447 decomposing 8 bytes structs into a LCALL.
1449 * mini-x86.c (emit_move_return_value): We no longer push the vtype
1450 pointer for where to store the returned regs.
1452 * decompose.c (mono_decompose_vtype_opts): Fix the comment to properly
1455 Fixes #471747, #471751 and #4734530 (in fact, it's a bunch of dups).
1457 2009-05-20 Miguel de Icaza <miguel@novell.com>
1459 * aot-runtime.c (mono_aot_init): Use g_getenv to work on systems
1462 2009-05-21 Zoltan Varga <vargaz@gmail.com>
1464 * aot-compiler.c (add_wrappers): Add StructureToPtr/PtrToStructure wrappers.
1466 * basic.cs: Move the test_2_cprop_bug () test to generics.cs as it involves
1469 2009-05-20 Rodrigo Kumpera <rkumpera@novell.com>
1471 * local-propagation.c (mono_local_cprop): Avoid local propagation
1472 across paired add/sub if the first instruction dest reg is it's
1473 source reg. For example:
1475 int_add_imm R12 <- R12 [1] clobbers: 1
1476 int_sub_imm R42 <- R12 [1] clobbers: 1
1478 The cprop pass would wrongly const prop + 1 to int_sub_imm which doesn't
1479 maintain the math identify.
1483 2009-05-20 Andreia Gaita <avidigal@novell.com>
1485 * Makefile.am: avoid going on the network just to get the revision,
1488 2009-05-19 Massimiliano Mantione <massi@ximian.com>
1490 Fixed estimate for short branches on amd64 (they were off mark, and
1491 enabling call prolog-epilog instrumentations caused assertions).
1492 * mini.h (struct MonoBasicBlock): added max_length field to hold the
1493 estimate for the maximum length of this basic block.
1495 - mono_arch_emit_prolog: compute max_length for each basic block
1496 (instead of max_offset), and inflate size estimate also for entry bb
1497 in case of code instrumentation.
1498 - mono_arch_output_basic_block: get rid of "cpos" (the current
1499 estimated "position" in the code), and always use "offset" instead,
1500 which is accurate; at the beginning of the function quickly recompute
1501 max_offset for all the remaining blocks, starting from the current
1502 cfg->code_len (which is correct, and not estimated) and using the
1503 estimated block lengths computed previously.
1505 2009-05-17 Zoltan Varga <vargaz@gmail.com>
1507 * exceptions-ppc.c: Remove the caching from the trampoline creation
1508 functions, it is already done in the caller.
1510 * mini-trampolines.c (mono_llvm_vcall_trampoline): Fix the llvm build.
1512 * mini-ppc.h mini-arm.h mini-x86.h mini-amd64.h: Add
1513 MONO_ARCH_GSHARED_SUPPORTED define.
1515 * mini.c (mini_init): Use the MONO_ARCH_GSHARED_SUPPORTED define.
1517 * mini-arm.c mini.c: Get rid of the unused mono_arch_fixup_jinfo ()
1520 2009-05-16 Zoltan Varga <vargaz@gmail.com>
1522 * jit-icalls.c (mono_helper_compile_generic_method): Get rid of the
1523 call to mono_marshal_get_rgctx_invoke ().
1525 * mini.c method-to-ir.c mini-trampolines.c: Get rid of the usage of
1526 mono_marshal_get_static_rgctx_invoke (), all platforms which support
1527 gshared use the static rgctx trampolines now.
1529 * mini.c (mini_init): Call mono_set_generic_sharing_supported () if the
1530 platform supports it.
1532 2009-05-15 Zoltan Varga <vargaz@gmail.com>
1534 * mini-arm.c (mono_arch_allocate_vars): Correctly save R5 when using AOT.
1536 * aot-compiler.c (emit_method_code): Avoid duplicate labels for methods.
1538 2009-05-15 Zoltan Varga <vargaz@gmail.com>
1540 * mini-ppc.c (mono_arch_emit_exceptions): Nullify the processed patches.
1542 * tramp-ppc.c (mono_arch_nullify_class_init_trampoline): Implement this
1545 2009-05-15 Massimiliano Mantione <massi@ximian.com>
1547 Made it possible for mono_arch_instrument_epilog to preserve
1548 argument registers, otherwise instrumenting the "epilogue" before
1549 a tail call would clobber them.
1550 * mini.h: Added "mono_arch_instrument_epilog_full" prototype, which
1551 if like mono_arch_instrument_epilog but with an additional parameter
1552 that states if argument registers must be preserved.
1553 * mini.c: implemented mono_arch_instrument_epilog as a call to
1554 mono_arch_instrument_epilog_full without asking to preserve argument
1555 registers (this makes the existing code work as usual).
1557 - mono_arch_instrument_epilog: add parameter to transform it into
1558 mono_arch_instrument_epilog_full, and preserve argument registers
1560 - mono_arch_output_basic_block, OP_TAILCALL case: call
1561 mono_arch_instrument_epilog_full.
1562 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
1563 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-x86.c:
1564 only transformed mono_arch_instrument_epilog into
1565 mono_arch_instrument_epilog_full.
1567 2009-05-15 Geoff Norton <gnorton@novell.com>
1569 * mini-darwin.c: This works on arm now.
1571 2009-05-14 Geoff Norton <gnorton@novell.com>
1573 * jit.h, driver.c: Allow full-aot to be decided programatically by the
1576 2009-05-15 Zoltan Varga <vargaz@gmail.com>
1578 * aot-compiler.c (emit_method_code): Skip a few more characters in the debug
1581 * mini-trampolines.c (mono_magic_trampoline): Handle static rgctx invoke
1582 wrappers during full aot mode correctly.
1584 * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle shared generic
1587 * aot-compiler.c (mono_aot_method_hash): Use our internal version of
1588 mono_metadata_type_hash ().
1590 2009-05-14 Massimiliano Mantione <massi@ximian.com>
1592 * mini.h, mini-codegen.c, mini-alpha.c, mini-amd64.c, mini-arm.c,
1593 mini-hppa.h, mini-hppa.c, mini-ia64.c, mini-mips.h, mini-mips.c,
1594 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-886.c:
1595 Removed MONO_INST_BRLABEL from the instruction flags, and the
1596 remaining code that used it, because we do not support branches inside
1597 basic blocks (and branch target labels) anymore.
1598 * Makefile.am: As part of the above cleanup, remove reference to
1599 BURG files which don't exist anymore.
1601 2009-05-14 Zoltan Varga <vargaz@gmail.com>
1603 * image-writer.c (asm_writer_emit_local_symbol): Make this a nop on
1606 * mini-mips.c mini-mips.h exceptions-mips.c: Transition the mips backend
1607 to use mono_arch_throw_corlib_exception.
1609 * mini-ppc.c mini-ppc.h exceptions-ppc.c: Use
1610 mono_arch_throw_corlib_exception for throwing corlib exceptions.
1612 * aot-runtime.c (decode_patch): Allocate the data for R4/R8 from the
1615 * mini.c (mono_patch_info_dup_mp): Copy the table of switch targets too.
1617 * aot-compiler.c: Emit a local symbol prefixed with the assembly name
1618 for the got to make debugging easier and to avoid confusing it with the
1621 * aot-compiler.c (emit_method_code): Emit a C style symbol for each
1622 method so a breakpoint can be set when using gdb.
1624 2009-05-13 Zoltan Varga <vargaz@gmail.com>
1626 * aot-compiler.c (mono_aot_method_hash): Implement this properly based
1627 on mono_method_get_imt_slot ().
1629 * aot-runtime.c (find_extra_method_in_amodule): Get rid of the
1630 num_decodes variables.
1632 * aot-compiler.c (mono_aot_method_hash): Revert part of the last
1633 change as it doesn't seem to work.
1635 * aot-compiler.c (mono_aot_method_hash): Improve the hashing of
1638 2009-05-12 Zoltan Varga <vargaz@gmail.com>
1640 * aot-compiler.c mini.c mini-amd64.h mini-arm.h: Kill
1641 MONO_ARCH_FULL_AOT_IMT_SUPPORTED define, both platforms now support imt.
1643 * mini.c (mini_init): Install mono_aot_get_imt_thunk as the IMT thunk
1644 builder when using full aot.
1646 * mini-amd64.c (mono_arch_build_imt_thunk): Don't handle the full-aot case
1647 here, it is already handled.
1649 * mini-arm.c (mono_arch_emit_imt_argument): Pass the dynamic imt arg
1652 * aot-compiler.c (arch_emit_imt_thunk): Implement this for ARM.
1654 * mini-arm.h: Enable IMT for full aot.
1656 * aot-compiler.c (mono_compile_assembly): Don't emit imt thunk if the
1657 arch doesn't support it.
1659 * mini.c (mini_init): Don't disable IMT for full aot if the
1660 architecture supports it.
1662 * mini.h (MonoAotTrampoline): New enum containing the different types
1663 of 'numerous' trampolines.
1664 (MONO_AOT_FILE_VERSION): Bump this.
1666 * aot-compiler.c aot-runtime.c: Unify the handling of specific and
1667 static rgctx trampolines. Add support for full-aot IMT thunks.
1669 * mini-amd64.h: Enable IMT for full aot.
1671 * TestDriver.cs: Add a CategoryAttribute class and an --exclude option
1672 to exclude tests belonging to a category.
1674 * generics.cs: Mark some tests with a !FULLAOT category.
1676 * Makefile.am (fullaotcheck): Run tests with --exclude !FULLAOT. Include
1679 2009-05-11 Zoltan Varga <vargaz@gmail.com>
1681 * aot-compiler.c (emit_and_reloc_code): Move the implementation of
1682 MONO_PATCH_INFO_GOT_OFFSET to a separate arch-specific function.
1683 (emit_plt): Fix a warning.
1685 2009-05-10 Zoltan Varga <vargaz@gmail.com>
1687 * aot-compiler.c aot-runtime.c: Fix the build by moving is_shared_got_patch
1688 back into aot-compiler.c to a place where the other functions shared by
1689 the runtime and aot compiler are.
1691 * aot-compiler.c aot-runtime.c: Emit the got addr using a separate symbol,
1692 as done previously, instead of in MonoAotFileInfo, since pointers might have
1693 alignment requirements.
1695 * mini.h: Bump AOT file format version.
1697 2009-05-10 Miguel de Icaza <miguel@novell.com>
1699 * aot-runtime.c (mono_aot_is_shared_got_patch): Move this routine
1700 that is used at runtime from the aot-compiler.c, this makes it
1701 work on setups that remove the AOT compiler from the output
1704 2009-05-09 Zoltan Varga <vargaz@gmail.com>
1706 * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Implement this for
1709 * mini-ppc.h: Enable static rgctx trampolines for ppc.
1711 * mini-<ARCH>.h: Kill the MONO_ARCH_ENABLE_EMIT_STATE_OPT define.
1713 * decompose.c (mono_decompose_long_opts): Move the ppc/sparc specific
1714 stuff to mono_arch_decompose_long_opts ().
1715 (mono_decompose_opcode): Remove some dead code.
1717 2009-05-08 Rodrigo Kumpera <rkumpera@novell.com>
1719 * method-to-ir.c (mono_method_to_ir): Fix boostrap of non amd64 builds
1720 cmethod can be null for quite a some reasons.
1722 2009-05-08 Rodrigo Kumpera <rkumpera@novell.com>
1724 * method-to-ir.c (mono_method_to_ir): Fix non amd64 builds.
1726 2009-05-08 Zoltan Varga <vargaz@gmail.com>
1728 * aot-compiler.c (arch_emit_got_access): Fix the aot-not-supported build.
1730 2009-05-08 Zoltan Varga <vargaz@gmail.com>
1732 * method-to-ir.c (mono_emit_call_args): Add a 'tail' flag argument.
1733 (mono_method_to_ir): Use MONO_ARCH_USE_OP_TAIL_CALL macro to determine
1734 whenever to make tail calls using OP_TAIL_CALL. Enable support for tail
1735 calls returning structures by addr on amd64.
1737 * mini-amd64.h (MONO_ARCH_USE_OP_TAIL_CALL): New arch-specific macro.
1739 * iltests.il.in: Restructure the tail call tests a bit.
1741 2009-05-07 Zoltan Varga <vargaz@gmail.com>
1743 * aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
1744 for virtual methods too.
1746 2009-05-06 Raja R Harinath <harinath@hurrynot.org>
1748 * method-to-ir.c (mono_method_to_ir): Revert change of 2009-05-02
1749 due to regression in verifying System.dll.
1751 2009-05-06 Zoltan Varga <vargaz@gmail.com>
1753 * debug-mini.c (mono_debugger_method_has_breakpoint): Allow breakpoints
1756 * dwarfwriter.c (emit_class_dwarf_info): Add support for generic
1759 * aot-compiler.c aot-runtime.c: Use our own hash function instead of
1760 g_str_hash () which can change.
1762 * driver.c (mini_regression): Disable optimizations not supported by
1763 the cpu. Fixes #500019.
1765 * aot-runtime.c (mono_aot_get_unwind_info): Fix the --enable-minimal=aot
1768 2009-05-06 Zoltan Varga <vargaz@gmail.com>
1770 * mini-llvm.c (mono_llvm_emit_method): Update the OP_TLS_GET implementation
1771 to the latest LLVM code.
1773 2009-05-05 Zoltan Varga <vargaz@gmail.com>
1775 * genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.
1777 2009-05-04 Zoltan Varga <vargaz@gmail.com>
1779 * mini-llvm.c (mono_llvm_emit_method): Implement TLS support on
1782 * aot-compiler.c (encode_patch_list): Simplify this considerably as we are
1783 no longer saving offsets, so just save the patch types along with the other
1785 * aot-runtime.c (load_patch_info): Update after the changes to
1786 encode_patch_list ().
1787 (decode_got_entry): Removed, merged into load_patch_info ().
1788 (is_shared_got_patch): Removed, call the same function from
1791 * mini.h: Bump aot file format version.
1793 * aot-compiler.c aot-runtime.c: Resurrect static linking support. Kill the
1794 half-finished no-dlsym code.
1796 * aot-runtime.c (load_method): Kill the old and bit-rotten use_loaded_code
1799 * mini-<ARCH>.h mini-trampolines.c aot-runtime.c: Kill the
1800 MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN define.
1802 2009-05-02 Zoltan Varga <vargaz@gmail.com>
1804 * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Increase the
1805 buffer length to work with AOT code.
1807 * method-to-ir.c (mono_method_to_ir): Handle loading errors in the
1808 ldfld/stfld opcodes.
1810 * exceptions-x86.c (mono_arch_get_throw_exception_by_name): Simplify this
1813 * mini-llvm.c mini-x86.c: Implement 32 bit and x86 support.
1815 * ssa.c (mono_ssa_compute): Don't skip I8 values when using LLVM.
1817 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Update to the latest
1820 * mini.c (mini_method_compile): Set the from_llvm flag in MonoJitInfo
1821 if needed. Don't decompose long operations when using llvm.
1823 2009-05-01 Zoltan Varga <vargaz@gmail.com>
1825 * aot-compiler.c aot-runtime.c: Use mono_pagesize () instead of the
1828 * aot-runtime.c (load_aot_module): Get rid of another mprotect call.
1830 2009-05-03 Martin Baulig <martin@ximian.com>
1832 * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
1833 mono_debugger_insert_method_breakpoint() since the class init
1834 handler we're inserting at the top of the method already gives us
1837 2009-04-30 Zoltan Varga <vargaz@gmail.com>
1839 * decompose.c (mono_decompose_long_opts): Move the implementation of LNEG
1840 to mono_arch_decompose_long_opts () for x86 and arm.
1842 2009-04-29 Zoltan Varga <vargaz@gmail.com>
1844 * mini-codegen.c (mono_regstate_alloc_int): Use __x86_64__ instead of
1847 2009-04-28 Zoltan Varga <vargaz@gmail.com>
1849 * *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in the
1852 2009-04-26 Zoltan Varga <vargaz@gmail.com>
1854 * aot-runtime.c (mono_aot_create_specific_trampoline): Add a stat for the
1855 number of trampolines used in full-aot mode.
1857 * aot-compiler.c: Add an ntrampolines option to set the number of
1858 trampolines emitted in full-aot mode.
1860 2009-04-27 Zoltan Varga <vargaz@gmail.com>
1862 * mini-llvm.c (mono_llvm_emit_method): Implement OP_CHECK_THIS using
1863 a volatile load. Get rid of get_tempname (), llvm assigns names
1866 * mini-llvm-cpp.cpp (mono_llvm_build_volatile_load): New instruction
1869 * mini-llvm.c (mono_llvm_emit_method): Don't call LLVMGetParam on
1872 * abcremoval.c (REPORT_ABC_REMOVAL): Don't output messages at verbose
1875 * mini-codegen.c (mono_local_regalloc): Prevent sreg1/dreg to be allocated
1876 to the same register as a fixed sreg2. Fixes #497271.
1878 * iltests.il.in: Add a new test.
1880 2009-04-26 Zoltan Varga <vargaz@gmail.com>
1882 * mini-amd64.c: Use moves instead of pushes for passing arguments on the
1883 stack, since pushes complicate exception handling.
1885 * exceptions-amd64.c (mono_arch_find_jit_info): Don't pop the arguments of
1886 the stack if they are passed using moves.
1888 * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
1890 * method-to-ir.c (mono_method_to_ir): Disable fast virtual generic methods
1893 * mini-llvm.c (mono_llvm_emit_method): Call jit icall wrappers, not the
1894 icalls themselves. Convert arguments of FCOMPARE. Convert the destination
1895 of FMOVE if it is an R4.
1897 2009-04-25 Zoltan Varga <vargaz@gmail.com>
1899 * mini-ops.h: Add OP_LLVM_OUTARG_VT opcode.
1901 * mini.h (LLVMCallInfo): New structure to store calling convention
1902 information for the LLVM back end similar to the CallInfo structures in
1905 * mini-amd64.c (mono_arch_get_llvm_call_info): New arch function to return
1906 call information in a format usable by LLVM.
1907 (mono_arch_emit_call): Move the LLVM handling code to mono_llvm_emit_call ().
1909 * method-to-ir.c (mono_emit_call_args): Emit calls using
1910 mono_llvm_emit_call () when compiling using LLVM.
1912 * mini-llvm.c: Implement support for passing/receiving valuetypes. Add
1913 comments to all functions. Fix memory leaks. Add a public init/cleanup
1916 * mini.c: Call the llvm init/cleanup functions in mini_init()/cleanup().
1918 * method-to-ir.c (handle_array_new): Disable llvm when calling the vararg
1919 mono_array_new_va () jit icall.
1921 Fri Apr 24 16:44:08 CEST 2009 Paolo Molaro <lupus@ximian.com>
1923 * Makefile.am, genmdesc.c, genmdesc.pl: tiny refactor to allow
1924 multiple machine description files to be specified.
1925 * mini-ops.h: fixes for cross-compilation.
1927 2009-04-22 Miguel de Icaza <miguel@novell.com>
1929 * aot-runtime.c (make_writable): Use mono_mprotect to simplify
1932 2009-04-22 Zoltan Varga <vargaz@gmail.com>
1934 * method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
1935 to prevent asserts in various passes. Fixes #497220.
1937 2009-04-21 Zoltan Varga <vargaz@gmail.com>
1939 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove
1942 * aot-compiler.c aot-runtime.c: Emit the unwind info into a separate
1943 table to avoid duplicates.
1945 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
1947 * aot-compiler.c (emit_method_code): Avoid writing symbols if the nodebug
1950 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
1952 * mini.c (mini_method_verify): Fail fulltrust code if the exception
1953 is for method or field access.
1955 2009-04-20 Zoltan Varga <vargaz@gmail.com>
1957 * mini-llvm-cpp.cpp (mono_llvm_dump_value): New helper function to print
1960 * mini-llvm.c (mono_llvm_emit_method): Use it.
1962 * mini-llvm.c (type_to_llvm_type): Fix the mapping of enums.
1963 (mono_llvm_emit_method): Add support for CAS. Fix handling of CSET opcodes
1966 * mini-trampolines.c (mono_llvm_vcall_trampoline): Add support for
1967 synchronized methods.
1969 * mini.c (mini_method_compile): Disable LLVM for dynamic methods.
1971 * mini.c (mini_method_compile): Enable ABCREM when running with LLVM.
1973 * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOADI4_MEM/
1976 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add a MONO_LLVM env variable
1977 allowing some options to be set dynamically.
1979 2009-04-19 Zoltan Varga <vargaz@gmail.com>
1981 * mini-llvm.c (mono_llvm_emit_method): Handle compares followed by an
1982 unconditional branch.
1984 * mini.h (MonoTrampolineType): Add new trampoline type
1985 'MONO_TRAMPOLINE_LLVM_VCALL' which handles virtual calls made from LLVM
1988 * mini-trampolines.c (mono_llvm_vcall_trampoline): New C trampoline
1991 * mini-trampolines.c (mono_create_llvm_vcall_trampoline): New trampoline
1994 * mini.c (mini_init): Avoid using the common vtable trampoline when LLVM
1995 is enabled. Instead, use the llvm vcall trampoline.
1997 * mini-trampolines.c (mono_get_vcall_slot_addr): New helper function.
1999 * mini-trampolines.c tramp-amd64.c tramp-x86.c: Use it.
2001 * mini-<ARCH>.c: Get rid of the identical mono_arch_get_vcall_slot_addr ()
2004 * mini-<ARCH>.h mini-trampolines.c mini.c: Get rid of
2005 MONO_ARCH_COMMON_VTABLE_TRAMPOLINE, it is supported by all archs.
2007 * mini-ia64.c (mono_arch_lowering_pass): Null out the sregs of the
2008 OP_IA64_CSET opcode.
2010 * mini.c: Fix a warning.
2012 * mini-llvm.c (mono_llvm_emit_method): Convert arguments of SWITCH and
2013 THROW to the appropriate llvm type.
2015 2009-04-18 Zoltan Varga <vargaz@gmail.com>
2017 * mini.c (mini_method_compile): Add statistics for methods JITted
2020 2009-04-17 Zoltan Varga <vargaz@gmail.com>
2022 * method-to-ir.c: Fix the computation of ins_sreg_counts for ia64
2023 OP_IA64_CMP_<cond>_IMM opcodes.
2025 2009-04-17 Zoltan Varga <vargaz@gmail.com>
2027 * mini-llvm.c (emit_cond_system_exception): Implement throwing of
2030 * dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
2033 * mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
2036 2009-04-17 Atsushi Enomoto <atsushi@ximian.com>
2038 * mini-exceptions.c : add thread id to EXCEPTION trace message.
2040 2009-04-17 Zoltan Varga <vargaz@gmail.com>
2042 * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Fix AOT
2045 * tramp-x86.c (mono_arch_get_unbox_trampoline): Implement static
2046 rgctx invoke trampolines for x86.
2048 * mini-x86.c (mono_arch_output_basic_block): Add a few nops before
2049 indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
2050 (mono_arch_get_vcall_slot): Simplify this.
2052 2009-04-16 Zoltan Varga <vargaz@gmail.com>
2054 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Move the calls to
2055 mono_debug_add_delegate_trampoline () to get_delegate_invoke_impl ().
2057 2009-04-14 Zoltan Varga <vargaz@gmail.com>
2059 * aot-compiler.c tramp-arm.c mini-arm.c: Implement static rgctx
2060 trampolines for ARM. Add full-aot support for delegate invokes for ARM.
2062 * mini-trampolines.c (mono_magic_trampoline): Fix the build.
2064 * liveness.c (visit_bb): Remove a needless assert.
2066 2009-04-13 Zoltan Varga <vargaz@gmail.com>
2068 * mini-trampolines.c (mono_create_delegate_trampoline): Delegate the
2069 full aot support to the arch specific code.
2071 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Add full-aot support.
2073 * aot-compiler.c (emit_trampolines): Emit delegate invoke impl trampolines.
2075 * aot-compiler.c (emit_named_code): Rename this to 'emit_trampoline'.
2077 * mini-amd64.c (mono_arch_get_delegate_invoke_impls): New function to
2078 collect information about the delegate invoke impl trampolines.
2080 * mini.h (MonoAotTrampInfo): New structure collecting the information needed
2081 to save trampolines during full-aot mode.
2083 * mini-trampolines.c (mono_create_static_rgctx_trampoline): New trampoline
2084 creation function which returns a trampoline which sets the rgctx
2086 (mono_magic_trampoline): Use the rgctx trampoline instead of an rgctx
2087 wrapper if possible.
2088 (mono_delegate_trampoline): Ditto.
2090 * mini.c (mono_jit_runtime_invoke): Ditto.
2092 * tramp-amd64.c: Add an implemention of static rgctx trampolines for AMD64.
2094 * aot-compiler.c aot-runtime.c: Add support for static rgctx trampolines.
2096 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2098 2009-04-12 Zoltan Varga <vargaz@gmail.com>
2100 * mini-ia64.c (mono_arch_lowering_pass): Use NULLIFY_INS instead of
2101 just setting the opcode to OP_NOP.
2103 2009-04-11 Zoltan Varga <vargaz@gmail.com>
2105 * mini.c (mini_method_compile): Put the last change inside an
2106 #ifdef MONO_ARCH_HAVE_LIVERANGE_OPS.
2108 * mini.c (mini_method_compile): Disable sharing of stack slots/registers
2109 and extend live ranges to cover the whole method when using xdb.
2111 * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
2112 do it in the trampolines.
2114 * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
2117 * mini-trampolines.c (mono_delegate_trampoline): Ditto.
2119 * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
2120 call code in full-aot mode since IMT is disabled there.
2121 (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
2122 new JIT no longer has that restriction.
2124 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2126 * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
2127 a more compact format.
2128 (mono_aot_wrapper_name): New function to return a unique name for a
2129 wrapper method, also used by the AOT runtime.
2131 * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
2134 * aot-compiler.c (add_generic_class): Add the helper methods from T[]
2135 when a ICollection<T> etc is encountered.
2136 (add_generic_instances): Process method arguments/locals too.
2137 (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
2140 * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
2142 2009-04-10 Zoltan Varga <vargaz@gmail.com>
2144 * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
2146 * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
2148 * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
2149 representing the result of the decomposition. Nullify instructions
2150 instead of setting them to OP_NOP since nops can't have registers
2153 2009-04-09 Zoltan Varga <vargaz@gmail.com>
2155 * aot-compiler.c (mono_compile_assembly): Split this huge function into
2156 smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
2157 info. Strip 'mapping symbols' on ARM.
2159 * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
2161 * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
2162 this with the native genmdesc.
2164 2009-04-08 Bill Holmes <billholmes54@gmail.com>
2166 * aot-runtime.c: Fixing the MSVC build.
2168 Code is contributed under MIT/X11 license.
2170 2009-04-08 Zoltan Varga <vargaz@gmail.com>
2172 * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since
2173 JITted code depends on it.
2175 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
2177 * aot-compiler.c: Use new MonoGenericParam accessors.
2179 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
2181 Reduce memory usage and improve correctness wrt MonoGenericParam
2182 * aot-runtime.c (decode_klass_ref): Simplify generic parameter
2183 handing. Avoid allocating MonoGenericParams, but use the ones in
2184 the container itself.
2186 2009-04-07 Miguel de Icaza <miguel@novell.com>
2188 * tasklets.c: Return exceptions in the out argument.
2190 2009-04-08 Zoltan Varga <vargaz@gmail.com>
2192 * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
2193 opcode. Use pointer types in more places instead of casting them to
2196 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
2198 (mono_llvm_optimize_method): New helper function to optimize a method.
2200 * method-to-ir.c (mono_emit_widen_call_res): Extract the call result
2201 widening code so it could be called from more places.
2202 (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
2203 code paths in the call opcodes.
2205 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
2207 * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
2209 2009-04-06 Zoltan Varga <vargaz@gmail.com>
2211 * dwarfwriter.c: Use _ to separate class name
2212 components as gdb can't handle '.'. Represent reference variables
2215 * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
2217 * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
2219 * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
2221 * gc-test.cs: New file with GC stack marking tests.
2223 * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
2224 negative numbers for vfp.
2226 * basic-float.cs: Add a test.
2228 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
2230 * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
2232 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
2234 * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
2235 part of tasklet/continuation support.
2237 2009-04-05 Zoltan Varga <vargaz@gmail.com>
2239 * mini-llvm.c (mono_llvm_emit_method): Move the handling of
2240 amd64 opcodes inside an ifdef.
2242 * dwarfwriter.c: Emit inheritance information for classes, emit fields
2245 * dwarfwriter.c (emit_type): Emit the class info for classes.
2247 2009-04-04 Zoltan Varga <vargaz@gmail.com>
2249 * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
2251 * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
2253 * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
2255 * ssa.c (mono_ssa_compute): Fix some memory leaks.
2257 2009-04-03 Zoltan Varga <vargaz@gmail.com>
2259 * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
2261 * mini-llvm.c: Update comments.
2263 * mini.h (COMPILE_LLVM): New macro.
2265 * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
2267 * ssa.c (mono_ssa_compute): Ditto.
2269 * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
2270 the unwind ops from a DWARF FDE.
2272 * mini-llvm.c: Implement generation of unwind info for LLVM compiled
2273 methods by extracting the dwarf unwind ops from the unwind info generated
2276 * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
2279 * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
2282 2009-04-02 Zoltan Varga <vargaz@gmail.com>
2284 * Makefile.am (llvm_sources): Enable this.
2286 * mini.c (mini_method_compile): Add support for compiling with LLVM,
2287 failing back to the JIT if something cannot be handled.
2289 * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
2290 compiling with LLVM.
2292 * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
2293 compiling with LLVM.
2295 * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when
2296 compiling with LLVM.
2298 * mini-ops.h: Add a few opcodes needed by LLVM.
2300 * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
2303 * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
2306 * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
2308 * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
2310 2009-04-01 Mark Probst <mark.probst@gmail.com>
2312 * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
2313 ridiculously large methods.
2315 2009-03-31 Martin Baulig <martin@ximian.com>
2317 * debug-debugger.c (debugger_remove_breakpoint): Call
2318 mono_debugger_remove_class_init_callback ().
2320 2009-03-31 Zoltan Varga <vargaz@gmail.com>
2322 * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
2323 right before emitting code, not at the start.
2325 * mini.c (mono_postprocess_patches): Extract this into a separate function
2326 from mono_codegen ().
2328 * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
2329 byref types correctly.
2331 2009-03-30 Zoltan Varga <vargaz@gmail.com>
2333 * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
2336 2009-03-29 Zoltan Varga <vargaz@gmail.com>
2338 * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before
2339 indirect calls, this avoids problems where get_vcall_slot () would get
2340 confused by the native code for the instruction preceeding the call.
2341 (mono_arch_get_vcall_slot): Simplify this.
2342 (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
2344 * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
2345 register allocator now seems to depend on them instead of the data in
2348 * mini.c (mini_method_compile): Throw the correct type of exception if
2349 mono_method_get_header () fails because of a loading error.
2351 2009-03-28 Zoltan Varga <vargaz@gmail.com>
2353 * mini.c (mini_method_compile): Clear the loader error if the method
2354 header cannot be decoded.
2356 * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual
2357 interface methods on proxies correctly.
2359 * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
2360 this argument for vtype methods. Add precise liveness info for arguments.
2362 * mini-codegen.c (mono_print_ins_index): Print the vreg of the
2363 LIVERANGE_START/END opcodes.
2365 * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
2366 for arguments and values in registers.
2368 2009-03-27 Zoltan Varga <vargaz@gmail.com>
2370 * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
2371 return a valuetype. Fixes #487518.
2373 * iltests.il: Add a test.
2375 * aot-compiler.c: Use mono_thread_create () to create helper threads.
2377 * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
2378 closed over a null reference correctly.
2380 2009-03-26 Zoltan Varga <vargaz@gmail.com>
2382 * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
2384 2009-03-25 Mark Probst <mark.probst@gmail.com>
2386 * mini-codegen.c (mono_local_regalloc): Don't let sregs get
2387 allocated to the same registers as fixed sregs.
2389 2009-03-24 Mark Probst <mark.probst@gmail.com>
2391 * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
2394 * method-to-ir.c: Handle more cases for
2395 Interlocked.CompareExchange.
2397 * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
2398 mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
2399 ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
2401 2009-03-23 Zoltan Varga <vargaz@gmail.com>
2403 * aot-runtime.c (decode_method_ref): Fix a warning.
2405 * unwind.c (mono_unwind_frame): Ditto.
2407 2009-03-22 Zoltan Varga <vargaz@gmail.com>
2409 * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
2410 (mono_compile_assembly): Enable the binary writer for full-aot as well.
2412 * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
2413 fix the handling of large values in the ALU_PC_G0_NC relocation.
2415 2009-03-22 Zoltan Varga <vargaz@gmail.com>
2417 * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
2419 2009-03-22 Mark Probst <mark.probst@gmail.com>
2421 * method-to-ir.c (mono_spill_global_vars): Support for ternary
2424 2009-03-22 Mark Probst <mark.probst@gmail.com>
2426 * method-to-ir.c: MINI_OP3 needs a comma.
2428 * method-to-ir.c, mini.h, mini.c: Remove
2429 mono_init_op_sreg_counts ().
2431 2009-03-22 Zoltan Varga <vargaz@gmail.com>
2433 * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
2436 * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
2439 * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
2441 * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
2444 2009-03-21 Mark Probst <mark.probst@gmail.com>
2446 * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
2447 liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
2448 mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
2451 2009-03-20 Zoltan Varga <vargaz@gmail.com>
2453 * driver.c: Change location of gc_wrapper.h.
2455 * method-to-ir.c (mono_find_block_region): Handle try clauses nested
2456 inside finally clauses correctly. Fixes #485721.
2458 * mini.c (mono_find_spvar_for_region): This needs to handle try regions
2459 after the change above.
2461 * exceptions.cs: Add a test.
2463 2009-03-19 Zoltan Varga <vargaz@gmail.com>
2465 * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
2467 * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
2468 into cfg->used_int_regs, it is not needed with the dwarf unwinder.
2469 (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
2471 * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
2472 the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
2474 2009-03-19 Sebastien Pouliot <sebastien@ximian.com>
2476 * method-to-ir.c: Allow CoreCLR to throw FieldAccessException.
2477 Simplify logic for ensure_method_is_allowed_to_call_method.
2478 Handle wrappers on callers.
2480 2009-03-19 Zoltan Varga <vargaz@gmail.com>
2482 * Makefile.am (fullaotcheck): Don't run the generics tests, some of
2485 * basic-simd.cs: Fix the names of some test methods.
2487 2009-03-18 Geoff Norton <gnorton@novell.com>
2489 * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
2491 2009-03-18 Zoltan Varga <vargaz@gmail.com>
2493 * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
2495 2009-03-17 Jb Evain <jbevain@novell.com>
2497 * driver.c: remove now uneeded call to mono_gc_base_init before
2500 2009-03-17 Jb Evain <jbevain@novell.com>
2502 * dwarfwriter.c (token_handler): handle more cases.
2504 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
2506 * method-to-ir.c: Remove more dead code (that was required only
2507 because of method_is_safe). Fix compiler warnings.
2509 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
2511 * method-to-ir.c: Remove unneeded/useless method_is_safe
2512 http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
2514 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
2516 * mini.c (mini_method_compile): Print the method been compiled with
2517 verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
2518 for people not familiar with the runtime.
2520 2009-03-17 Zoltan Varga <vargaz@gmail.com>
2522 * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
2523 a managed object which is later put into a GList. Return its class instead.
2525 * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
2526 stack slots when using sgen.
2528 2009-03-16 Zoltan Varga <vargaz@gmail.com>
2530 * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
2532 2009-03-14 Zoltan Varga <vargaz@gmail.com>
2534 * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
2535 > so it works on the first vreg as well.
2537 2009-03-13 Zoltan Varga <vargaz@gmail.com>
2539 * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
2542 * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
2544 * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
2547 2009-03-12 Zoltan Varga <vargaz@gmail.com>
2549 * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
2550 native->IL offset mapping.
2552 2009-03-11 Zoltan Varga <vargaz@gmail.com>
2554 * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
2556 * basic.cs: Add a test.
2558 2009-03-11 Mark Probst <mark.probst@gmail.com>
2560 * mini-x86.c (mono_arch_output_basic_block): Use different
2561 registers in case the ones we want to overwrite are used by the
2562 other operand. Fixes regression in #480807.
2564 2009-03-10 Zoltan Varga <vargaz@gmail.com>
2566 * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
2568 * dwarfwriter.c (emit_line_number_info): The line number info for
2569 IL code was off by one. Fix that.
2571 * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
2574 2009-03-09 Mark Probst <mark.probst@gmail.com>
2576 Contributed under the terms of the MIT/X11 license by Steven
2577 Munroe <munroesj@us.ibm.com>.
2579 * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
2582 2009-03-08 Zoltan Varga <vargaz@gmail.com>
2584 * dwarfwriter.c (token_handler): Decode method references in non-wrappers
2587 2009-03-06 Zoltan Varga <vargaz@gmail.com>
2589 * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
2590 the delegate ctor handling code. Fixes #482638.
2592 * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
2595 * iltests.il.in: Add a test.
2597 * mini-darwin.c (mono_chain_signal): Remove this, it is already in
2600 2009-03-05 Mark Probst <mark.probst@gmail.com>
2602 * mini-trampolines.c (mono_create_jump_trampoline): If the method
2603 is shared generic code, return the trampoline, even if the method
2604 has already been compiled. Fixes #479763.
2606 * mini.c, mini.h: New function
2607 mono_jit_find_compiled_method_with_jit_info() which is the same as
2608 mono_jit_find_compiled_method() but also returns the jit info.
2610 2009-03-05 Mark Probst <mark.probst@gmail.com>
2612 * method-to-ir.c (mono_method_to_ir): Only force the vtable var
2613 for methods which actually have one. For all other methods, make
2614 sure the this argument var is live the whole method.
2616 * mini.c (mini_method_compile): Every shared method has a
2617 this/vtable/mrgctx info. Fixes #480807.
2619 2009-03-05 Mark Probst <mark.probst@gmail.com>
2621 * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
2622 generic/imt thunks where some entries branch through the vtable,
2623 while other entries branch directly.
2625 2009-03-05 Zoltan Varga <vargaz@gmail.com>
2627 * mini-darwin.c (mono_chain_signal): Define this to fix the build.
2629 * mini-windows.c: Ditto.
2631 * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
2634 2009-03-04 Zoltan Varga <vargaz@gmail.com>
2636 * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
2639 2009-03-04 Mark Probst <mark.probst@gmail.com>
2641 * method-to-ir.c: Don't inline methods that use JMP. Fixes
2644 2009-03-04 Mark Probst <mark.probst@gmail.com>
2646 * exceptions-x86.c: Include debug-mini.h - fixes build.
2648 2009-03-04 Martin Baulig <martin@ximian.com>
2650 * debug-mini.c: Clean up the exception API and add documentation.
2651 (mono_debugger_handle_exception): New public method; this is
2652 called when throwing an exception or encountering an unhandled one.
2653 (mono_debugger_call_exception_handler): Formerly known as
2654 mono_debugger_handle_exception(); this is used to tell the
2655 debugger that we're about to invoke an exception handler.
2657 2009-03-04 Martin Baulig <martin@ximian.com>
2659 * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
2660 ../metadata/mono-debug-debugger.c; save and reset exception state.
2662 2009-03-02 Martin Baulig <martin@ximian.com>
2664 * debug-mini.c: Moved the debugger exception handling here from
2665 ../metadata/mono-debug-debugger.c.
2668 (MonoDebuggerExceptionAction): New exception typedef.
2671 (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
2673 * exceptions-amd64.c
2674 (mono_amd64_throw_exception): Use the new debugger exception
2678 (mono_handle_exception_internal): Don't call
2679 mono_debugger_unhandled_exception() here.
2681 2009-03-03 Zoltan Varga <vargaz@gmail.com>
2683 * mini.c aot-compiler.c: Update after the changes to
2684 mono_marshal_get_runtime_invoke ().
2686 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot):
2687 Virtual generic methods might not have method->slot set, work around
2690 * generics.cs: Add a test.
2692 2009-03-02 Geoff Norton <gnorton@novell.com>
2695 * driver.c: Allow signal chaining of SIGFPE as well.
2697 2009-03-02 Zoltan Varga <vargaz@gmail.com>
2699 * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
2700 this since it now receives the method not its generic context in the
2703 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
2704 generic/imt thunks where some entries branch through the vtable, while
2705 other entries branch directly.
2707 * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
2709 * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call
2710 support for interface methods as well.
2712 * mini-trampolines.c: Add support for virtual generic methods in interfaces
2713 using the normal IMT thunks.
2715 generics.cs: Add new tests.
2717 * method-to-ir.c (mono_method_to_ir): Pass the method instead of
2718 the generic inst to the generic imt thunks. This fixes AOT support,
2719 improves consistency with the normal IMT thunks, and makes it easier to
2720 add support for interface generic virtual methods later.
2722 * mini-trampolines.c (mono_magic_trampoline): Ditto.
2724 2009-02-28 Zoltan Varga <vargaz@gmail.com>
2726 * driver.c (mono_set_signal_chaining): New public API function to enable
2727 signal chaining on POSIX platforms.
2729 * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland
2730 (si@lindenlab.com) to implement signal chaining. The original patch was
2731 contributed under the MIT X/11 license:
2732 https://bugzilla.novell.com/show_bug.cgi?id=318894
2734 2009-02-27 Zoltan Varga <vargaz@gmail.com>
2736 * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
2737 too until it can be made to run on amd64.
2739 2009-02-26 Zoltan Varga <vargaz@gmail.com>
2741 * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
2742 to get_generic_context_from_code () + get_call_info () if possible.
2744 2009-02-25 Zoltan Varga <vargaz@gmail.com>
2746 * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
2747 suspend-on-sigsegv functionality.
2749 * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
2750 to suspend when a native SIGSEGV is received. This is useful for debugging
2751 crashes which don't happen under gdb, since a live process contains more
2752 information than a core file.
2754 * mini-exceptions.c (mono_print_thread_dump): Use
2755 MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
2757 * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
2759 * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
2761 * basic-float.cs: Disable the tests which currently fail on amd64.
2763 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null
2764 value to mono_arch_patch_callsite () to fix crashes.
2766 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
2768 2009-02-23 Zoltan Varga <vargaz@gmail.com>
2770 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
2771 nop code by patching the call address to point to the nullified class init
2772 trampoline, as the former does not seem to be safe on SMP machines.
2774 2009-02-23 Mark Probst <mark.probst@gmail.com>
2776 * mini-ops.h: Fix the argument types for a few x86 opcodes where
2779 2009-02-23 Zoltan Varga <vargaz@gmail.com>
2781 * basic-float.cs basic-calls.cs: Fix warnings.
2783 2009-02-22 Mark Probst <mark.probst@gmail.com>
2785 * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
2786 correct frame pointer in the LMF. Should fix #478394.
2788 2009-02-22 Zoltan Varga <vargaz@gmail.com>
2790 * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
2792 * image-writer.c: Make the binary writer less verbose.
2794 2009-02-21 Zoltan Varga <vargaz@gmail.com>
2796 * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
2797 are called from runtime invoke wrappers.
2799 2009-02-20 Zoltan Varga <vargaz@gmail.com>
2801 * cpu-ppc.md (store_memindex): Increase the size of this.
2803 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
2805 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2807 * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
2809 * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
2812 Last fix for of #467201.
2815 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
2817 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2819 * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
2820 and long_conv_to_r8_2:
2822 Fixed part of #467201.
2824 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
2826 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2828 * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
2829 conversion to 32 bits.
2831 * cpu-x86.md: Increase the size of int_conv_to_r4.
2833 * basic-float.cs: Add a test for this.
2835 Fixed part of #467201.
2837 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
2839 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2841 * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
2842 conversion to 64 bits.
2844 * basic-float.cs: Add a test for this.
2846 Fixed part of #467201.
2848 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
2850 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2852 * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
2853 This behavior is compatible with MS.
2855 * iltest.il.in: Add a test for this.
2857 Fixed part of #467201.
2859 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
2861 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2863 * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
2864 change the precision of the value.
2866 * cpu-x86.md: Define len for float_conv_to_r4.
2868 * basic-float.cs: Add a test for this.
2870 Fixed part of #467201.
2872 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
2874 * mini.c: Adjust locking order to the new semantics where the loader lock
2877 2009-02-18 Rodrigo Kumpera <rkumpera@novell.com>
2886 * mini-trampolines.c:
2899 * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
2901 2009-02-18 Zoltan Varga <vargaz@gmail.com>
2903 * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
2906 2009-02-17 Zoltan Varga <vargaz@gmail.com>
2908 * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
2909 for cctors if needed.
2911 2009-02-17 Mark Probst <mark.probst@gmail.com>
2913 * mini-ppc.c: Fix build on Darwin.
2915 2009-02-17 Zoltan Varga <vargaz@gmail.com>
2917 * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
2918 version instead of 3 as valgrind doesn't like version 3.
2920 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2922 * aot-compiler.c (mono_aot_method_hash): New function to return a hash
2923 usable for hashing methods.
2924 (emit_extra_methods): Use the new hash to avoid putting every method in the
2927 * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
2929 * aot-runtime.c (can_method_ref_match_method): New function to quickly check
2930 whenever a method ref could match a method.
2932 * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
2935 * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded
2938 * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
2940 * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
2941 the encoding buffer.
2943 * method-to-ir.c (mono_method_check_inlining): Avoid calling
2944 mono_method_get_header () on inflated methods as an optimization.
2946 2009-02-16 Zoltan Varga <vargaz@gmail.com>
2948 * ssa.c (fold_ins): Fix another crash if the instruction following the
2949 switch was optimized away.
2951 2009-02-16 Mark Probst <mark.probst@gmail.com>
2953 Contributed under the terms of the MIT/X11 license by Steven
2954 Munroe <munroesj@us.ibm.com>.
2956 * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
2958 2009-02-16 Zoltan Varga <vargaz@gmail.com>
2960 * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
2961 around the mono_domain_alloc calls, it is now done by the functions
2964 * aot-compiler.c (compile_method): Only add wrappers referenced by
2965 the method if compiling with full AOT.
2966 (mono_compile_assembly): Error out if --aot=full is specified on
2967 a platform where it is not supported.
2969 * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
2972 * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
2975 * aot-runtime.c (load_named_code): Handle
2976 mono_arm_throw_exception_by_token.
2978 * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
2980 * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
2983 * Makefile.am (fullaotcheck): Exit if a test fails.
2985 * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
2987 (mono_compile_assembly): Handle the assembler failing.
2989 * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
2990 accepting subsections of .bss.
2992 * ssa.c (visit_inst): Fix a crash if the instruction following a switch
2995 * aot-compiler.c: Remove some unused includes.
2997 * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
2998 now in MonoImageWriter.
3000 * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
3001 code sequence which matches a non-virtual call. Fixes #472654.
3003 2009-02-15 Zoltan Varga <vargaz@gmail.com>
3005 * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
3008 * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
3009 use the image/dwarf writers directly.
3011 * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
3014 * aot-compiler.c (MonoAotCompile): Remove fields which are now in
3017 * image-writer.h: Fix some typos.
3019 * dwarfwriter.h dwarfwriter.c: New files.
3021 * aot-compiler.c: Extract the DWARF info writing functionality into a
3024 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
3025 argument to return unwind info.
3027 * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
3029 * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
3031 * aot-runtime.c (decode_method_ref): Add a case for
3032 MONO_AOT_METHODREF_WRAPPER_NAME.
3034 * mini.h: Add constants for the magic numbers used in encode_method_ref ()
3037 * aot-compiler.c (encode_method_ref): Use the new constants.
3039 * aot-runtime.c (decode_method_ref): Ditto.
3041 * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
3042 be compiled, not the icall itself.
3044 2009-02-14 Zoltan Varga <vargaz@gmail.com>
3046 * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
3047 using decode_method_ref ().
3049 * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
3050 convert it to an in32. Fixes #475859.
3052 * arrays.cs: Add a test.
3054 2009-02-12 Zoltan Varga <vargaz@gmail.com>
3056 * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in
3059 * basic-long.cs: Add a test.
3061 2009-02-12 Mark Probst <mark.probst@gmail.com>
3063 * mini-x86.c, mini-x86.h: Very simple frame pointer removal. We
3064 remove the frame pointer in leaf methods which don't receive any
3065 arguments, don't throw exceptions and don't do dynamic stack
3068 2009-02-12 Zoltan Varga <vargaz@gmail.com>
3070 * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
3071 the fail_tramp changes. Hopefully fixes #475132.
3073 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
3075 * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
3076 instead of mono_metadata_signature_dup_full.
3078 2009-02-12 Zoltan Varga <vargaz@gmail.com>
3080 * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
3081 for processing jump tables. Fixes #473787.
3083 2009-02-11 Mark Probst <mark.probst@gmail.com>
3085 * mini-generic-sharing.c: mini_method_get_context() just calls
3086 mono_method_get_context_general() now.
3088 * mini.c, mini.h: Moved get_object_generic_inst(),
3089 construct_object_context_for_method() and
3090 mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
3092 2009-02-11 Zoltan Varga <vargaz@gmail.com>
3094 * branch-opts.c (mono_if_conversion): Handle the case where the merged
3095 basic block fell through to its successor bblock without a branch. Fixes
3098 * iltests.il.in: Add a test.
3100 * aot-compiler.c (encode_method_ref): Encode methods of array types.
3101 (can_encode_patch): We can now handle arrays of generic parameters and
3104 * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
3106 * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
3107 the AOT file to avoid some #ifdefs in aot-runtime.c
3109 * mini.h: Bump AOT file format version.
3111 2009-02-10 Zoltan Varga <vargaz@gmail.com>
3113 * Makefile.am (fullaotcheck): Make this run the tests.
3115 * aot-compiler.c: Make the printing of skipped methods runtime configurable.
3117 2009-02-10 Mark Probst <mark.probst@gmail.com>
3119 * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
3120 individually. Fixes #473482.
3122 2009-02-10 Zoltan Varga <vargaz@gmail.com>
3124 * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
3126 2009-02-09 Jeffrey Stedfast <fejj@novell.com>
3128 * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
3129 (mono_compile_assembly): Hush compile warnings about
3130 uninitialized [tmp_]outfile_name variables in the !use_bin_writer
3133 2009-02-10 Zoltan Varga <vargaz@gmail.com>
3135 * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
3137 * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
3139 * aot-compiler.c: Fix arm support.
3141 * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
3142 img_writer_emit_unset_mode () function.
3144 * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
3145 (mono_unwind_get_dwarf_pc_reg): Ditto.
3147 * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
3148 Move almost all platform specific code to a set of arch_ functions,
3149 and document them to ease porting.
3151 * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
3153 * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
3155 * aot-compiler.c: Extract the image writing functionality into a separate
3156 module to reduce the size of this file.
3158 2009-02-09 Geoff Norton <gnorton@novell.com>
3160 * mini-s390.c: Fix the signature of emit_sig_cookie.
3162 2009-02-09 Zoltan Varga <vargaz@gmail.com>
3164 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
3166 * aot-runtime.c (is_shared_got_patch): Ditto.
3168 * aot-runtime.c (load_named_code): Cope with the fact that
3169 decode_got_entry () won't decode the patch fully if its corresponding got
3170 entry is already filled.
3172 * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full):
3174 (mono_arch_create_monitor_exit_trampoline_full): Ditto.
3176 * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
3177 as the moving pointer instead of 'buf' for consistency with the rest of the
3179 (mono_arch_create_monitor_exit_trampoline): Ditto.
3181 * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
3182 generic_class_init trampolines.
3183 (add_generic_class): Extract some code from add_generic_instances () into a
3184 separate function so it can be called from other places too.
3185 (compile_method): Call add_generic_class () for the classes of inflated methods
3186 referenced by the method.
3187 (can_encode_patch): Allow references to generic parameters.
3189 * aot-runtime.c: Add support the patches required by the new trampolines.
3191 * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
3194 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
3197 * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
3198 this from get_throw_pending_exception, make the signature full aot compatible.
3200 * Makefile.am (fullaotcheck): New target to run full-aot tests.
3202 * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
3204 * exceptions.cs: Add a test.
3206 2009-02-07 Zoltan Varga <vargaz@gmail.com>
3208 * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
3209 use the DWARF_DATA_ALIGN constant instead.
3211 * exception-<ARCH>.c: Update after the above change.
3213 * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
3216 * mini-arm.c: Enable the dwarf unwinder.
3218 * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
3219 instead of mono_class_setup_vtable ().
3221 2009-02-07 Zoltan Varga <vargaz@gmail.com>
3223 * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
3226 * mini-x86.h: Enable the dwarf unwinder.
3228 2009-02-06 Raja R Harinath <harinath@hurrynot.org>
3230 Fix mcs/tests/test-7.cs
3231 * mini-amd64.c (mono_arch_allocate_vars): Revert change from
3234 2009-02-06 Zoltan Varga <vargaz@gmail.com>
3236 * mini.c (print_jit_stats): Remove some unused statistics.
3238 2009-02-05 Zoltan Varga <vargaz@gmail.com>
3240 * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
3242 2009-02-05 Mark Probst <mark.probst@gmail.com>
3244 * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
3245 the method we get from mono_object_get_virtual_method() because
3246 that function does it properly, now.
3248 2009-02-05 Zoltan Varga <vargaz@gmail.com>
3250 * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
3251 opcodes. Fixes #472775.
3253 2009-02-05 Mark Probst <mark.probst@gmail.com>
3255 * mini-exceptions.c (ves_icall_get_frame_info): Account for the
3256 fact that mono_find_jit_info() sometimes returns the context
3257 corresponding to the jit info in new_ctx. Fixes #472600.
3259 2009-02-05 Zoltan Varga <vargaz@gmail.com>
3261 * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
3262 mini-s390.c: Use mono_class_enum_basetype () instead of accessing
3263 klass->enum_basetype directly.
3265 * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
3268 * unwind.c: Avoid 0 sized arrays.
3270 2009-02-04 Zoltan Varga <vargaz@gmail.com>
3272 * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
3273 size on systems with 64k pages. Fixes #471389.
3275 2009-02-04 Mark Probst <mark.probst@gmail.com>
3277 Contributed under the terms of the MIT/X11 license by Steven
3278 Munroe <munroesj@us.ibm.com>.
3280 * mini-ppc.c (mono_arch_output_basic_block): Generate better code
3281 for LOADI4_MEMBASE. Use addi instead of addic if it's not
3284 2009-02-04 Mark Probst <mark.probst@gmail.com>
3286 Contributed under the terms of the MIT/X11 license by Steven
3287 Munroe <munroesj@us.ibm.com>.
3289 * exceptions-ppc.c (mono_arch_get_restore_context): Code size
3292 * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
3293 The trampoline can be longer on PPC64.
3295 2009-02-04 Mark Probst <mark.probst@gmail.com>
3297 Contributed under the terms of the MIT/X11 license by Steven
3298 Munroe <munroesj@us.ibm.com>.
3300 * mini-ppc.c: Compiler warning fixes and trivial code
3303 2009-02-04 Zoltan Varga <vargaz@gmail.com>
3305 * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
3306 ins->dreg which could be a hardware register, not a vreg.
3308 * aot-compiler.c (emit_method_dwarf_info): Ditto.
3310 * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
3311 (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
3313 * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
3315 * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
3316 ->dreg, that is not the vreg we are looking for.
3318 * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
3320 * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
3323 * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
3326 2009-02-03 Zoltan Varga <vargaz@gmail.com>
3328 * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
3330 * aot-compiler.c (emit_line_number_info): Fix line number emission when
3333 * aot-compiler.c: Add xdebug support on x86.
3335 * unwind.c: Add x86 support.
3337 * aot-compiler.c (emit_exception_debug_info): Control the emission of
3338 unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
3340 * mini.c (mini_method_compile): Ditto.
3342 * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
3345 * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
3346 which mimic .push_section/.pop_section in GAS.
3348 * aot-compiler.c: Emit precise live range information for variables.
3350 * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
3352 * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
3353 the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
3356 * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
3357 the live ranges of variables.
3359 * mini.h (struct MonoMethodVar): Add two fields containing the live range
3360 of the variable in terms of native offsets.
3362 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
3364 * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
3366 2009-02-02 Mark Probst <mark.probst@gmail.com>
3368 Contributed under the terms of the MIT/X11 license by Steven
3369 Munroe <munroesj@us.ibm.com>.
3371 * exceptions-ppc.c (restore_regs_from_context): Correct operand
3372 order (offset then base reg) for ppc_load_multiple_regs.
3373 (emit_save_saved_regs) Correct operand order for
3374 ppc_store_multiple_regs.
3375 (mono_arch_get_call_filter): Correct operand order for
3376 ppc_load_multiple_regs.
3378 * mini-ppc.c (emit_memcpy): Fix operand order for
3379 ppc_load_reg_update and ppc_store_reg_update.
3380 (mono_arch_output_basic_block): Correct operand order for ppc_lha.
3381 (mono_arch_emit_epilog): Correct operand order for
3382 ppc_load_multiple_regs.
3384 * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
3385 order for ppc_store_multiple_regs and ppc_load_multiple_regs.
3387 2009-02-02 Mark Probst <mark.probst@gmail.com>
3389 * cpu-ppc64.md: Fixed storer4_memindex length.
3391 2009-02-02 Zoltan Varga <vargaz@gmail.com>
3393 * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
3396 * aot-compiler.c (emit_line_number_info): Optimize this.
3398 2009-02-01 Zoltan Varga <vargaz@gmail.com>
3400 * aot-compiler.c: Disassemble tokens in the IL disassembly.
3402 * aot-compiler.c: Add debug info for methods without debug info by
3403 emitting an IL file and having the line number info referencing that file.
3405 * aot-compiler.c: Optimize the size of the generated line number info.
3407 * aot-compiler.c: Emit line number info in xdebug mode.
3409 * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
3412 2009-01-31 Zoltan Varga <vargaz@gmail.com>
3414 * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
3416 * driver.c (mono_main): Enable debugging support automatically if XDEBUG
3419 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
3421 * basic-calls.cs: Test for the weird crash found on arm.
3423 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
3425 * cpu-arm.md: Increase the size of storer8_membase_reg and
3426 loadr8_membase_reg to 24 bytes to accomodate the extra add.
3428 * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
3429 OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
3430 reg to LR otherwise we'll be loading/storing from just the offset.
3432 2009-01-30 Miguel de Icaza <miguel@novell.com>
3434 Question: if we are storing gint32's inside the "*native_offset",
3435 should we change the signature to "gint32 *native_offset" to
3436 ensure that we do not have type definition problems?
3438 * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
3439 an int * as this is what the other function expects, causes
3440 problems with Freescale's compiler that defined int32_t to be a
3441 long and makes int incompatible
3443 2009-01-30 Miguel de Icaza <miguel@novell.com>
3445 * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
3446 filename conflict with bjam.
3448 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
3450 * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
3451 as it might use decomposed ops.
3453 2009-01-30 Zoltan Varga <vargaz@gmail.com>
3455 * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
3457 * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
3460 * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
3462 * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
3465 * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
3466 way registers are stored in MonoContext on arm.
3468 * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
3469 instead of locking so mono_get_cached_unwind_info () becomes signal safe.
3471 * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
3473 * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
3475 * mini.c (mini_init): Register mono_isfinite.
3477 * jit-icalls.c (mono_isfinite): New jit icall.
3479 * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
3481 * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
3482 set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
3485 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
3487 * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
3488 separate frame and stack pointers, so we must use FP to find the register
3490 The FP reg is retrieved from the MonoContext::regs array.
3492 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
3494 * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
3497 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
3499 * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
3500 return R4 and R8 when not running under softfloat.
3502 Fixes basic-calls.exe
3504 2009-01-30 Zoltan Varga <vargaz@gmail.com>
3506 * mini-arm.c: Implement some overflow opcodes.
3508 2009-01-29 Miguel de Icaza <miguel@novell.com>
3510 * ssa.c: handle another alloca.h
3512 * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
3513 PLATFORM_WIN32 for detecting if we have sigaction. Instead use
3514 MONO_ARCH_USE_SIGACTION.
3516 * aot-runtime.c, mini-exceptions.c: Replace platform define with
3519 * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
3521 * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
3522 PPC targets as sigaction does not exist on all platforms, define
3523 this on a per-platform basis.
3525 Instead of erroring out if the platform is not defined, include
3526 mini-ppc-os.h, and expect that the OS specific setting provides
3527 the required information.
3529 2009-01-30 Zoltan Varga <vargaz@gmail.com>
3531 * aot-compiler.c: Fix --enable-minimal=aot.
3533 2009-01-30 Zoltan Varga <vargaz@gmail.com>
3535 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
3538 2009-01-29 Zoltan Varga <vargaz@gmail.com>
3540 * exceptions-arm.c: Fix warnings.
3542 * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
3545 * mini-x86.c: Fix --enable-minimal=jit build.
3547 * mini.c: Really fix --enable-minimal=jit build.
3549 * mini.c (construct_object_context_for_method): Move this outside
3550 the DISABLE_JIT block to fix the --enable-minimal=jit build.
3552 "Backported" of r124984 from 2.0 branch.
3554 * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
3556 "Backport" of r124977 + r124978 from 2.0 branch.
3558 * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
3559 to avoid calling mono_exception_from_token () from the throw trampoline.
3560 (mono_arch_get_throw_exception_generic): call throw_exception_by_token
3561 for throwing corlib exceptions, this fixes full-aot support for corlib
3564 * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
3566 2009-01-29 Miguel de Icaza <miguel@novell.com>
3568 * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
3569 part of the changes to split the code in mini into operating
3570 system specific files.
3572 This patch was done by copying mini.c to the respective files to
3573 preserve SVN history.
3575 2009-01-29 Zoltan Varga <vargaz@gmail.com>
3577 * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
3579 2009-01-28 Zoltan Varga <vargaz@gmail.com>
3581 * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
3582 remoting-invoke-with-check wrappers of shared methods.
3584 * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
3586 2009-01-27 Mark Probst <mark.probst@gmail.com>
3588 * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
3589 optimization if the top of stack is the last instruction in the
3590 bblock. Otherwise it might have been used after its definition.
3593 2009-01-27 Zoltan Varga <vargaz@gmail.com>
3595 * mini-trampolines.c (mono_magic_trampoline): Print out the caller
3596 method as well when get_vcall_slot () fails to match a code sequence.
3598 * mini-arm.c: Fix the android build, which doesn't have
3601 2009-01-26 Zoltan Varga <vargaz@gmail.com>
3603 * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
3606 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
3608 * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
3610 2009-01-26 Zoltan Varga <vargaz@gmail.com>
3612 * mini.c (mini_method_compile): Save the unwind info generated by the JIT
3613 and put its id into jinfo->used_regs. This is only used on amd64,
3614 which is currently the only platform generating unwind info.
3616 * exceptions-amd64.c: Instead of unwinding based on a register mask, use
3617 the dwarf unwinder. This is required to correctly handle async exceptions
3618 like thread abort and stack overflows, which can happen while a method
3619 is in the middle of its prolog or epilog.
3621 * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
3622 the unwind info belonging to an AOTed method.
3624 * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
3625 into cfg->unwind_ops.
3627 * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
3629 * mini.c (mini_init): Call mono_unwind_init ().
3630 (mini_cleanup): Call mono_unwind_cleanup ().
3632 * unwind.c: Add functions for managing a set of unwind info entries, allowing
3633 unwind info to be shared between methods.
3635 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
3638 * exceptions-amd64.c (mono_arch_exceptions_init): Call
3639 get_throw_pending_exception () to avoid initialization races.
3641 * mini-exceptions.c (mono_exceptions_init): Call an arch specific
3642 mono_arch_exceptions_init () function.
3644 * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
3646 2009-01-25 Zoltan Varga <vargaz@gmail.com>
3648 * mini.c (mono_get_domain_intrinsic): New helper function.
3649 (mono_get_thread_intrinsic): Ditto.
3651 * mini-arm.c mini-ia64.c: Use the new helper functions.
3653 * method-to-ir.c (mono_method_to_ir): Fix the comment for
3654 the last constrained_call change, since it is needed in the non-AOT
3657 * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
3659 * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of
3660 mono_get_lmf_addr () on arm eabi linux.
3662 2009-01-24 Zoltan Varga <vargaz@gmail.com>
3664 * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
3665 code sequence which matches a non-virtual call.
3667 2009-01-23 Mark Probst <mark.probst@gmail.com>
3669 * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
3672 2009-01-23 Zoltan Varga <vargaz@gmail.com>
3674 * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
3675 runtime-invoke wrappers, since they are also shared based on signature.
3677 2009-01-22 Mark Probst <mark.probst@gmail.com>
3679 * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
3680 info from the (correct) context.
3682 2009-01-22 Zoltan Varga <vargaz@gmail.com>
3684 * unwind.c (mono_unwind_frame): Remove a stray g_free ().
3686 * unwind.c (mono_unwind_frame): New function to unwind through a frame
3687 using dwarf unwinding info. Not yet used.
3689 * mini.c (mini_init): When using xdebug, disable freeing of domains.
3691 2009-01-21 Mark Probst <mark.probst@gmail.com>
3693 * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
3696 * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
3697 special case and handle mono_arch_delegate_invoke_impl() returning
3698 function descriptors.
3700 * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
3701 trampolines return function descriptors, too.
3703 2009-01-21 Zoltan Varga <vargaz@gmail.com>
3705 * method-to-ir.c (handle_alloc): Avoid generic instances in the
3706 out_of_line optimization.
3708 2009-01-21 Martin Baulig <martin@ximian.com>
3711 (MonoCompile): Added `disable_deadce_vars' to disable removing
3715 (mini_method_compile): Set `cfg->disable_deadce_vars' when running
3716 inside the debugger.
3718 * liveness.c (mono_analyze_liveness): Don't remove any unused
3719 variables if `cfg->disable_deadce_vars' is set.
3721 2009-01-21 Mark Probst <mark.probst@gmail.com>
3723 * method-to-ir.c: Only apply exception constructor optimization if
3724 the the method actually belongs to an exception class. Fixes
3727 2009-01-21 Zoltan Varga <vargaz@gmail.com>
3729 * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
3730 change inside a #ifdef __mono_ppc64__.
3732 * aot-compiler.c (compile_method): Remove the previous limitation.
3734 * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
3735 on type variables in AOTed code.
3737 * aot-compiler.c (compile_method): Skip generic methods having type
3738 constraints on their generic parameters.
3740 * aot-compiler.c (compile_method): Check for methods which cannot be
3741 encoded inside RGCTX_FETCH patches as well.
3743 * mini-exceptions.c (mono_print_thread_dump): Fix the windows
3746 2009-01-20 Mark Probst <mark.probst@gmail.com>
3748 * method-to-ir.c: Force the vtable variable in shared generic code
3749 for the case that they might show up on a stack trace where they
3752 * mini-exceptions.c: Save and use generic sharing info as well as
3753 IP in stack traces to resolve shared generic instantiations.
3755 2009-01-20 Zoltan Varga <vargaz@gmail.com>
3757 * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
3758 added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
3760 2009-01-20 Mark Probst <mark.probst@gmail.com>
3762 * method-to-ir.c: Do generic sharing for array constructors.
3764 2009-01-20 Rodrigo Kumpera <rkumpera@novell.com>
3766 * mini-exceptions.c (mono_print_thread_dump): Add information
3767 about the thread state using wapi_current_thread_desc.
3769 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
3771 * basic-simd.cs: Tests for the new constructors.
3773 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
3775 * mini-ops.h: Added OP_EXPAND_*
3779 * mini-x86.c (mono_arch_output_basic_block): Same.
3781 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
3783 2009-01-19 Zoltan Varga <vargaz@gmail.com>
3785 * iltests.il.in: Add a test for #467385.
3787 2009-01-18 Rodrigo Kumpera <rkumpera@novell.com>
3789 * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
3790 thread been cleaned up is not the same currently in execution.
3792 Fixes appdomain-unload crashes on windows, osx and linux variants
3793 without the __thread keyword.
3795 2009-01-18 Zoltan Varga <vargaz@gmail.com>
3797 * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
3798 (koush@koushikdutta.com). Implement this for android.
3800 * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
3801 begins with a digit.
3803 * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
3804 mono_marshal_get_write_barrier ().
3806 2009-01-17 Rodrigo Kumpera <rkumpera@novell.com>
3808 * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
3809 of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
3810 that pass them on a register pair.
3812 This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
3813 test was crashing due to that.
3815 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
3817 * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
3818 trampoline code. Include ucontext.h only if available.
3820 2009-01-15 Mark Probst <mark.probst@gmail.com>
3822 * mini.c: mono_domain_lookup_shared_generic() takes an open method
3823 and doesn't check whether it's sharable, like it was before
3824 removing the shared generics hash. This brings IronPython
3825 performance back to what it was before that change.
3827 2009-01-14 Mark Probst <mark.probst@gmail.com>
3829 * method-to-ir.c: Handle delegate invocation optimization earlier,
3830 otherwise it would be handled (much more slowly) by the
3831 final/sealed optimization.
3833 2009-01-13 Zoltan Varga <vargaz@gmail.com>
3835 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
3836 domain is not set. Fixes #465864.
3838 2009-01-12 Mark Probst <mark.probst@gmail.com>
3840 * method-to-ir.c: Don't stop sharing of generic methods with catch
3841 clauses - we already handle those.
3843 2009-01-12 Mark Probst <mark.probst@gmail.com>
3845 * mini.c, mini.h: lookup_generic_method() is now
3846 mono_domain_lookup_shared_generic() and uses the jit_code_hash,
3847 making the shared_generics_hash obsolete.
3849 2009-01-12 Mark Probst <mark.probst@gmail.com>
3851 * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
3852 use the red zone. Make room on the stack first and then use it,
3853 not the other way around.
3855 2009-01-12 Zoltan Varga <vargaz@gmail.com>
3857 * mini.c (mini_init): Call mono_xdebug_init ().
3859 * aot-compiler.c (mono_xdebug_init): Make this non-static.
3861 2009-01-11 Zoltan Varga <vargaz@gmail.com>
3863 * TestDriver.cs: Add an --iter argument to run tests multiple times.
3865 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
3868 * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
3869 debug+unwind info for trampolines.
3871 * mini.c (mono_create_unwind_op): New helper function.
3873 * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
3875 2009-01-10 Zoltan Varga <vargaz@gmail.com>
3877 * aot-compiler.c: Fix the build.
3879 2009-01-09 Zoltan Varga <vargaz@gmail.com>
3881 * Makefile.am: Update dtrace-prelink.sh location.
3883 2009-01-08 Zoltan Varga <vargaz@gmail.com>
3885 * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr
3886 optimization. Fixes #464520.
3888 2009-01-07 Bill Holmes <billholmes54@gmail.com>
3890 * mini-amd64.c : Adding code to save/restore non-volatile registers
3893 * exceptions-amd64.c : Adding code to save/restore non-volatile
3894 registers on Winx64.
3896 Contributed under MIT/X11 license.
3898 2009-01-07 Zoltan Varga <vargaz@gmail.com>
3900 * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
3901 __GNUC_MINOR__ which can break when the major version changes.
3903 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
3905 * basic-simd.cs: Add tests for usage of the sizeof opcode.
3907 2009-01-07 Geoff Norton <gnorton@novell.com>
3909 * helpers.c: Allow mono -v -v -v to work on darwin.
3911 2009-01-05 Bill Holmes <billholmes54@gmail.com>
3913 * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
3916 Contributed under MIT/X11 license.
3918 2009-01-05 Zoltan Varga <vargaz@gmail.com>
3920 * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
3921 instead of directly accessing type->data.klass. Fixes #462016.
3922 (mono_allocate_stack_slots_full): Ditto.
3924 * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio
3925 <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
3927 * aot-compiler.c (emit_plt): Fix ARM build.
3929 2009-01-04 Zoltan Varga <vargaz@gmail.com>
3931 * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
3933 * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
3936 * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
3937 instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
3940 * iltests.il.in: Add a regression test.
3942 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
3944 * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
3946 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
3948 * basic-simd.cs: Add a regression test for #462457.
3950 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
3952 * mini-ops.h: Add a definition of XPHI.
3954 * mini.h (MONO_IS_PHI): Make is aware of simd instrincs.
3956 * ssa.c (op_phi_to_move): Handle XPHI.
3958 * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
3962 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
3964 * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
3966 2008-12-31 Geoff Norton <gnorton@novell.com>
3968 * mini-ppc.c: The prolog size allocated can be too small for darwin
3969 ppc32 under certain circumstances. Also fix a small logic bug.
3971 2008-12-29 Zoltan Varga <vargaz@gmail.com>
3973 * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
3974 while loading AOT methods.
3976 * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
3977 since only the former is nulled out after a successful cast. This prevents
3978 crashes with rethrown exceptions when using --debug=casts.
3980 2008-12-24 Mark Probst <mark.probst@gmail.com>
3982 * mini.h: New macro for checking whether a method is final,
3983 i.e. whether the method or its class is marked final.
3985 * method-to-ir.c: Use the new macro for all final-checks
3986 consistently. Fixes the crash in the System.ServiceModel tests.
3988 2008-12-23 Mark Probst <mark.probst@gmail.com>
3990 * mini-exceptions.c (get_exception_catch_class): Corrected another
3991 overly strict assertion.
3993 2008-12-23 Mark Probst <mark.probst@gmail.com>
3995 * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
3996 Clobbering it is not allowed because the caller might use it as
3997 the vtable register in the interface call.
3999 2008-12-19 Mark Probst <mark.probst@gmail.com>
4001 * mini-exceptions.c (get_exception_catch_class): Corrected an
4002 overly strict assertion.
4004 2008-12-18 Mark Mason <mmason@upwardaccess.com>
4006 * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
4008 * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
4010 * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
4012 * cpu-mips.md: correct lengths for certain long_ opcodes.
4014 * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
4016 * 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().
4018 2008-12-17 Mark Mason <mmason@upwardaccess.com>
4020 * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
4022 2008-12-17 Mark Mason <mmason@upwardaccess.com>
4024 * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
4026 2008-12-16 Rodrigo Kumpera <rkumpera@novell.com>
4028 * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
4031 2008-12-16 Mark Mason <mmason@upwardaccess.com>
4033 * 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
4035 * 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)
4037 2008-12-15 Mark Mason <mmason@upwardaccess.com>
4039 * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
4041 2008-12-14 Zoltan Varga <vargaz@gmail.com>
4043 * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
4044 gshared code. Fixes #458947.
4046 * generics.cs: Add a test.
4048 2008-12-12 Mark Mason <mmason@upwardaccess.com>
4050 * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4052 * mini-mips.c: first pass n32 code generation.
4054 * mini-mips.h: datatypes and defines for n32 support.
4056 * exceptions-mips.c: first pass n32 code generation.
4058 * tramp-mips.c: first pass n32 code generation.
4060 * cpu-mips.md: add long_ opcodes.
4062 2008-12-12 Mark Mason <mmason@upwardaccess.com>
4064 * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4066 * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4068 * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4070 * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4072 * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4074 * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4076 * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4078 * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4080 * helpers.c: for mips/n32, don't pass -mips32 to objdump
4082 2008-12-12 Zoltan Varga <vargaz@gmail.com>
4084 * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
4086 2008-12-12 Andres G. Aragoneses <aaragoneses@novell.com>
4088 * driver.c: Sync --help-trace with man page (EXPR,EXPR).
4090 2008-12-12 Mark Probst <mark.probst@gmail.com>
4092 * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
4093 descriptors for helper functions directly in front of the code.
4095 2008-12-11 Mark Probst <mark.probst@gmail.com>
4097 * method-to-ir.c: Removed an unnecessary assertion.
4099 2008-12-10 Zoltan Varga <vargaz@gmail.com>
4101 * method-to-ir.c: Merge SGEN changes from the old JIT.
4103 2008-12-10 Zoltan Varga <vargaz@gmail.com>
4105 * driver.c (compile_all_methods_thread_main): Handle failure of
4108 2008-12-10 Mark Probst <mark.probst@gmail.com>
4110 * mini-ppc.c: Merged with mini-ppc64.c.
4112 * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
4114 * Makefile.am: Use the same sources for PPC and PPC64.
4116 * mini-ppc64.c: Removed.
4118 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
4120 * branch-opts.c (remove_block_if_useless): Extract fall through detection
4121 code to mono_bb_is_fall_through.
4123 * branch-opts.c (mono_remove_critical_edges): Same.
4125 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
4127 * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
4128 expect that an OP_BR_REG will be there.
4130 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
4132 * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
4133 for the many branch ops. The original check miss OP_BR_REG.
4137 2008-12-09 Mark Mason <mmason@upwardaccess.com>
4139 * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
4141 2008-12-09 Zoltan Varga <vargaz@gmail.com>
4143 * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
4144 while holding the aot lock.
4146 2008-12-09 Mark Mason <mmason@upwardaccess.com>
4148 * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
4150 2008-12-09 Bill Holmes <billholmes54@gmail.com>
4152 * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws
4153 to release all runtime callable wrappers held by the runtime.
4155 Contributed under MIT/X11 license.
4157 2008-12-09 Bill Holmes <billholmes54@gmail.com>
4159 * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
4162 Contributed under MIT/X11 license.
4164 2008-12-09 Zoltan Varga <vargaz@gmail.com>
4166 * aot-runtime.c (decode_exception_debug_info): Acquire the domain
4167 lock when calling mono_domain_alloc (). Hopefully fixes #415608.
4169 2008-12-09 Mark Mason <mmason@upwardaccess.com>
4171 * cpu-mips.md: fix ckfinite length
4173 * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
4174 (mono_arch_lowering_pass): cleanup, rearrange for clarity
4175 (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
4177 2008-12-08 Mark Mason <mmason@upwardaccess.com>
4179 * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
4181 2008-12-08 Geoff Norton <gnorton@novell.com>
4183 * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
4184 size by 8 bytes as well.
4186 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4188 * basic-simd.cs: Fix method names for Vector16b.
4190 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4192 * basic-simd.cs: Fix method names for Vector16sb.
4194 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4196 * basic-simd.cs: Fix method names for Vector8us.
4198 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4200 * basic-simd.cs: Fix method names for Vector8s.
4202 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4204 * basic-simd.cs: Fix method names for Vector4ui.
4206 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4208 * basic-simd.cs: Fix method names for Vector2l.
4210 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4212 * basic-simd.cs: Fix method names for Vector2d.
4214 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4216 * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
4217 that are extension methods.
4219 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4221 * basic-simd.cs: Fix method names for Vector4f.
4223 2008-12-08 Zoltan Varga <vargaz@gmail.com>
4225 * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
4226 as such. Fixes #456669.
4228 2008-12-07 Mark Mason <mmason@upwardaccess.com>
4230 * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
4232 2008-12-07 Mark Mason <mmason@upwardaccess.com>
4234 * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
4235 (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
4236 (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
4237 (mips_adjust_stackframe): handle FP spills
4239 * mini-ops.h: add mips_mtc1_s2
4241 * cpu-mips.md: add mips_mtc1_s2
4243 2008-12-07 Zoltan Varga <vargaz@gmail.com>
4245 * unwind.c: New file, move the unwind info encoding functions here from
4246 aot-compiler.c, so they could be used at runtime too.
4248 2008-12-05 Mark Mason <mmason@upwardaccess.com>
4250 * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
4251 (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
4253 2008-12-05 Mark Mason <mmason@upwardaccess.com>
4255 * mini-mips.c: cleanup warnings
4256 (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
4257 (mips_adjust_stackframe): handle case of taking the address of stack locals
4259 2008-12-05 Zoltan Varga <vargaz@gmail.com>
4261 * aot-compiler.c: Implement a few functions missing from the asm writer.
4262 (emit_method_code): Only write symbols for methods when using the bin
4263 writer, since the assembler can't deal with the characters in our method
4266 * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
4268 * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
4271 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
4272 a bit to also restore %rax.
4274 2008-12-05 Mark Probst <mark.probst@gmail.com>
4276 * mini-ppc.c: Some simple merges from mini-ppc64.c.
4278 2008-12-05 Zoltan Varga <vargaz@gmail.com>
4280 * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
4283 2008-12-05 Mark Probst <mark.probst@gmail.com>
4285 * exceptions-ppc.c: Merged with exceptions-ppc64.c.
4287 * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
4288 MONO_ARCH_FRAME_ALIGNMENT. Struct for PPC64 function descriptors.
4290 * exceptions-ppc64.c: Removed.
4292 * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
4294 2008-12-05 Mark Probst <mark.probst@gmail.com>
4296 * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
4299 * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
4301 * tramp-ppc64.c: Removed.
4303 2008-12-05 Zoltan Varga <vargaz@gmail.com>
4305 * aot-compiler.c (add_generic_instances): Skip non-generic classes in
4308 2008-12-05 Mark Probst <mark.probst@gmail.com>
4310 * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
4312 * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
4313 mini-ppc.h instead of mini-ppc64.h.
4315 * mini-ppc64.h: Removed.
4317 2008-12-04 Mark Mason <mmason@upwardaccess.com>
4319 * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
4321 * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
4323 2008-12-05 Mark Probst <mark.probst@gmail.com>
4325 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
4326 Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
4329 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
4331 * basic-simd.cs: Tests for operator == and != on Vector8us and Vector16b.
4333 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
4335 * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
4337 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
4339 * basic-simd.cs: Tests for operator == and != on Vector4f.
4341 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
4343 * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
4345 * simd-intrinsics.c: Kill useless enum.
4347 2008-12-04 Mark Mason <mmason@upwardaccess.com>
4349 * cpu-mips.md: add long_conv_to_ovf_i4_2
4350 * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
4352 2008-12-04 Mark Mason <mmason@upwardaccess.com>
4354 * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
4356 * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
4358 2008-12-04 Mark Mason <mmason@upwardaccess.com>
4360 * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
4362 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
4364 * basic-simd.cs: Add tests for new methods.
4366 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
4368 * simd-intrinsics.c: Add support for operator == and !=
4371 * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
4373 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
4375 * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
4377 2008-12-04 Zoltan Varga <vargaz@gmail.com>
4379 * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
4381 * mini.c (mono_resolve_patch_target): Allow pinvoke methods in
4382 MONO_PATCH_INFO_ICALL_ADDR.
4384 * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
4386 * aot-compiler.c: Resurrect full-aot support.
4388 2008-12-04 Mark Mason <mmason@upwardaccess.com>
4390 * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
4392 2008-12-04 Mark Mason <mmason@upwardaccess.com>
4394 * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
4396 2008-12-03 Rodrigo Kumpera <rkumpera@novell.com>
4398 * basic-simd.cs: Fix tests to work under ppc.
4399 Remove tests for methods that will be removed.
4401 2008-12-03 Mark Probst <mark.probst@gmail.com>
4403 * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
4404 generic type (via a typedef or typeref) correctly.
4406 2008-12-03 Zoltan Varga <vargaz@gmail.com>
4408 * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
4409 diagnose an assertion failure.
4411 2008-12-02 Mark Probst <mark.probst@gmail.com>
4413 * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
4414 Fix trampoline size.
4416 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
4417 conversion opcodes are implemented natively instead via emulation.
4419 2008-12-01 Mark Mason <mmason@upwardaccess.com>
4421 * cpu-mips.md: remove mips_xori
4423 * mini-ops.h: remove mips_xori
4425 * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
4427 * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
4429 * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
4431 2008-12-01 Mark Mason <mmason@upwardaccess.com>
4433 * cpu-mips.md: fix instruction lengths.
4435 * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
4437 * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
4439 * mini-ops.h: fix slti / sltiu op profiles.
4441 2008-12-02 Martin Baulig <martin@ximian.com>
4443 * method-to-ir.c (mono_method_to_ir): Disable debugging
4444 information for the init locals block to make the debugger stop
4445 after all locals have been initalized.
4447 2008-12-02 Martin Baulig <martin@ximian.com>
4449 * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
4450 running inside the debugger.
4452 2008-12-01 Zoltan Varga <vargaz@gmail.com>
4454 * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
4457 * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the
4458 alu->alu imm optimization which only shows if deadce is disabled.
4460 * aot-compiler.c: Rename the function names for the binary and asm writers
4461 so they can coexist in the same process. Rework the xdebug code to use the
4462 asm writer. This avoids the need to call into the runtime to dump the
4463 debugging info. Add more debugging info for types.
4465 * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
4467 * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
4468 cpu description tables, they can't occur in cpu-<ARCH>.md.
4470 * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
4471 the stack in CEE_LDFLDA. Fixes #450542.
4473 * generics.cs: Add a new test.
4475 2008-12-01 Mark Mason <mmason@upwardaccess.com>
4477 * mini-ops.h: updated MIPS opcodes
4478 * mini-mips.c: decompose long opts
4479 * mini-mips.h: decompose long opts
4481 2008-11-29 Mark Mason <mmason@upwardaccess.com>
4483 * cpu-mips.md: fix length on int_rem_un
4484 * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
4486 2008-11-29 Zoltan Varga <vargaz@gmail.com>
4488 * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
4490 * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
4492 2008-11-29 Martin Baulig <martin@ximian.com>
4494 * mini-exceptions.c (mono_handle_native_sigsegv): Check
4495 mono_debug_using_mono_debugger() in addition to the
4496 `no_gdb_backtrace' flag in the `MonoDebugOptions'.
4498 2008-11-28 Mark Mason <mmason@upwardaccess.com>
4500 * mini-ops.h: updated more MIPS opcodes
4501 * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
4502 * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
4504 2008-11-28 Mark Probst <mark.probst@gmail.com>
4506 * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
4508 2008-11-28 Mark Mason <mmason@upwardaccess.com>
4510 * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
4511 * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
4512 * mini-ops.h: correct selected mips opcode entries
4514 2008-11-28 Mark Probst <mark.probst@gmail.com>
4516 * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
4519 2008-11-28 Mark Probst <mark.probst@gmail.com>
4521 * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
4523 2008-11-28 Mark Mason <mmason@upwardaccess.com>
4525 * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
4526 * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
4527 * mini-mips.h: disable IMT
4528 * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
4530 2008-11-28 Mark Probst <mark.probst@gmail.com>
4532 * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
4534 2008-11-28 Mark Probst <mark.probst@gmail.com>
4536 * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
4538 2008-11-28 Zoltan Varga <vargaz@gmail.com>
4540 * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
4543 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
4545 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
4546 for Set/GetVector aligned versions.
4548 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
4550 * basic-simd.cs: Add tests for Get/SetVector.
4552 2008-11-27 Mark Probst <mark.probst@gmail.com>
4554 * mini.c: Removed g_slist_append_mempool(). Now in
4557 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
4559 * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
4560 size properly and make the bounds check optional.
4562 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
4563 for SetVector and IsAligned.
4565 2008-11-27 Zoltan Varga <vargaz@gmail.com>
4567 * mini.c: Remove unused mono_normalize_opcodes () function.
4569 2008-11-26 Mark Probst <mark.probst@gmail.com>
4571 * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
4572 using the new atomic add ops now.
4574 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
4577 2008-11-26 Mark Probst <mark.probst@gmail.com>
4579 * mini-ppc64.c: Several fixes.
4581 2008-11-25 Mark Mason <mmason@upwardaccess.com>
4583 * cpu-mips.md: added jump_table
4584 * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.
4586 2008-11-25 Mark Mason <mmason@upwardaccess.com>
4588 * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
4590 2008-11-25 Mark Mason <mmason@upwardaccess.com>
4592 * mini-ops.h: corrected a handful of MIPS opcodes.
4594 2008-11-25 Mark Mason <mmason@upwardaccess.com>
4596 * aot-compiler.c: MIPS to use ELF writer
4598 2008-11-25 Mark Mason <mmason@upwardaccess.com>
4600 * mini-codegen.c: remove MIPS specific assert.
4602 2008-11-25 Mark Probst <mark.probst@gmail.com>
4604 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
4605 fixes. PPC64 now passes most of the runtime regressions.
4607 2008-11-24 Zoltan Varga <vargaz@gmail.com>
4609 * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
4610 volatile intervals a bit.
4612 2008-11-24 Mark Probst <mark.probst@gmail.com>
4614 * basic-long.cs: New test case.
4616 2008-11-23 Zoltan Varga <vargaz@gmail.com>
4618 * mini.c (mini_method_compile): Disable globalra for large methods for
4621 * regalloc2.c (order_moves): Add fp support.
4623 * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
4624 source bblock ends with an OP_BR_REG.
4626 * ratests.cs: Add a new test.
4628 2008-11-23 Mark Probst <mark.probst@gmail.com>
4630 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
4631 sharing. PPC64 now passes generics.exe.
4633 2008-11-23 Mark Probst <mark.probst@gmail.com>
4635 * mini-ppc64.c: Several fixes. PPC64 now runs iltests.exe.
4637 2008-11-23 Zoltan Varga <vargaz@gmail.com>
4639 * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
4640 memory when mono_jit_info_table_find () can't find the method in the
4643 * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
4646 * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
4649 2008-11-23 Mark Probst <mark.probst@gmail.com>
4651 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
4652 Several fixes. PPC64 now runs exceptions.exe and
4653 devirtualization.exe.
4655 2008-11-22 Mark Probst <mark.probst@gmail.com>
4657 * mini-ppc64.c, tramp-ppc64.c: Small fixes. PPC64 now runs
4658 arrays.exe and basic-math.exe.
4660 2008-11-22 Mark Probst <mark.probst@gmail.com>
4662 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
4663 cpu-ppc64.md: Several fixes. PPC64 now runs objects.exe.
4665 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
4667 * simd-intrinsics.c: Add support ArrayExtension intrinsics.
4669 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
4671 * method-to-ir.c: Move bounds checking macros to ir-emit.h
4673 * ir-emit.h: Move macros from method-to-ir.c to here.
4675 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
4677 * mini-ops.h: Correct the long simd ops to use LREG.
4679 2008-11-21 Zoltan Varga <vargaz@gmail.com>
4681 * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
4683 * mini-ops.h: Correct the dreg type of a few long opcodes.
4685 * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
4688 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
4690 * mini-ppc.c: remove negative stack references in epilog
4691 for platforms that don't support the red zone.
4693 2008-11-21 Mark Probst <mark.probst@gmail.com>
4695 * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
4696 point regs. Now PPC64 passes basic-calls.exe.
4698 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4700 * basic-simd.cs: Add tests for accessors of Vector2l.
4702 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4704 * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
4706 * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
4708 * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
4710 2008-11-21 Mark Probst <mark.probst@gmail.com>
4712 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes. Now
4713 PPC64 passes basic-long.exe.
4715 2008-11-20 Mark Probst <mark.probst@gmail.com>
4717 * decompose.c: Decompose carry and overflow add on PPC64 like on
4718 other 64 bit archs. Don't decompose sub at all on PPC64.
4720 * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
4721 Several fixes and new opcodes. Now PPC64 runs (but doesn't pass)
4724 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4726 * basic-simd.cs: Add tests for accessors of Vector2d.
4728 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4730 * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
4734 * mini-x86.c (mono_arch_output_basic_block): Same.
4736 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
4738 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4740 * basic-simd.cs: Add tests for accessors of Vector4f.
4742 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4744 * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
4748 * mini-x86.c (mono_arch_output_basic_block): Same.
4750 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
4752 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4754 * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
4756 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4758 * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
4762 * mini-x86.c (mono_arch_output_basic_block): Same.
4764 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
4766 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4768 * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
4770 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4772 * simd-intrinsics.c: Enable setters for Vector16sb.
4774 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4776 * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
4780 * mini-x86.c (mono_arch_output_basic_block): Same.
4782 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
4784 2008-11-19 Rodrigo Kumpera <rkumpera@novell.com>
4786 * simd-intrinsics.c: Implement setter for Vector8us.
4788 2008-11-19 Zoltan Varga <vargaz@gmail.com>
4790 * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
4793 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
4795 * mini-ppc.c: remove references to the red zone in the prolog
4796 (for systems that don't support it).
4798 2008-11-19 Mark Probst <mark.probst@gmail.com>
4800 * cpu-ppc64.md: Fixed a few instruction lengths.
4802 * mini-ppc64.c: Don't emit SETLRET. PPC64 passes basic-float.exe,
4805 2008-11-19 Mark Probst <mark.probst@gmail.com>
4807 * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes. PPC64 passes
4810 2008-11-19 Zoltan Varga <vargaz@gmail.com>
4812 * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
4814 2008-11-18 Rodrigo Kumpera <rkumpera@novell.com>
4816 * mini-ops.h: Added OP_INSERT_I2.
4820 * mini-x86.c (mono_arch_output_basic_block): Same.
4822 * simd-intrinsics.c: Implement setter for Vector8s.
4824 * simd-methods.h: Add the names of get setters of Vector8s.
4826 2008-11-18 Zoltan Varga <vargaz@gmail.com>
4828 * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
4830 * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
4833 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
4835 2008-11-18 Mark Probst <mark.probst@gmail.com>
4837 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
4838 for PPC64. An empty program runs now.
4840 2008-11-18 Zoltan Varga <vargaz@gmail.com>
4842 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
4844 * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
4845 a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
4846 info for JITted code is emitted into a shared library, loadable into gdb.
4848 2008-11-18 Mark Probst <mark.probst@gmail.com>
4850 * Makefile.am: Changes to build PPC64.
4852 * mini-arch.h: Include mini-ppc64.h on PPC64.
4854 2008-11-18 Mark Probst <mark.probst@gmail.com>
4856 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
4857 in PPC code up to r119147.
4859 2008-11-18 Mark Probst <mark.probst@gmail.com>
4861 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
4862 cpu-ppc64.md: Changes for PPC64.
4864 Based on code submitted by andreas.faerber@web.de at
4865 https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
4868 2008-11-18 Mark Probst <mark.probst@gmail.com>
4870 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
4871 cpu-ppc64.md: Copied from the corresponding PPC files from
4874 2008-11-18 Scott Peterson <lunchtimemama@novell.com>
4876 * mini-ops.h: Added OP_ROUND.
4878 * cpu-x86.md: Added round.
4880 * mini-x86.c: Added support for intrinsicing Math.Round (double).
4882 * basic-math.cs: Added test_0_round to test rounding.
4884 Contributed under MIT/X11 license.
4886 2008-11-17 Bill Holmes <billholmes54@gmail.com>
4888 * aot-compiler.c : Fix the Winx64 build.
4890 Contributed under MIT/X11 license.
4892 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
4894 * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
4895 in OP_EXTRACT_R8 to avoid possible stack corruption.
4897 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
4899 * mini-ops.h: Added OP_EXTRACT_R8/I8.
4901 * cpu-x86.md: Added extract_r8.
4903 * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
4905 * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
4906 a couple of OP_EXTRACT_I4.
4908 * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
4910 * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
4912 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
4914 * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
4917 2008-11-17 Zoltan Varga <vargaz@gmail.com>
4919 * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
4920 trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
4922 * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
4923 are not needed any more.
4925 * mini.h: Remove the unused INS_LIST macros.
4927 * mini.c (mini_method_compile): Remove a disable globalra case which is no
4930 * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
4933 * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
4934 mono_alloc_ireg () instead.
4936 * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
4939 * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
4942 * aot-runtime.c (load_aot_module): Disable AOT when running under
4945 * mini-amd64.h: Change the monitor fastpath defines to check for
4946 !PLATFORM_WIN32 so they work on *bsd too.
4948 * mini.h mini.c mini-hhpa.c: Remove more unused code.
4950 * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
4952 * mini.h (MonoCompile): Remove new_ir flag.
4954 * regalloc.h regalloc.c: Remove unused code.
4956 * cpu-*.md: Remove more unused opcodes.
4958 * simple-cee-ops.h simple-mini-ops.h: Removed.
4960 * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
4962 2008-11-17 Zoltan Varga <vargaz@gmail.com>
4964 * aliasing.h: Removed.
4966 * *.c: Remove references to aliasing.h and inssel.h.
4968 * mini.c: Remove additional unused functions.
4970 * mini-ops.h cpu-*.md: Remove unused opcodes.
4972 2008-11-16 Zoltan Varga <vargaz@gmail.com>
4974 Remove the old JIT code.
4976 * inssel*.brg: Removed.
4978 * ssa.c abcremoval.c aliasing.c: Removed.
4980 * ssa2.c: Renamed to ssa.c.
4982 * abcremoval2.c: Renamed to abcremoval.c.
4984 * *.c: Removed all !cfg->new_ir code.
4986 * mini-<ARCH>.c: Removed mono_arch_call_opcode (),
4987 mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
4989 * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
4991 2008-11-16 Zoltan Varga <vargaz@gmail.com>
4993 * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
4994 to simplify the code and cut back on the number of global symbols in the AOT
4997 * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
4999 2008-11-15 Zoltan Varga <vargaz@gmail.com>
5001 * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
5002 with the got/got_info tables.
5004 * mini.h: Bump AOT file format version.
5006 * unwind.h: New file, contains definitions for stack unwinding.
5008 * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
5011 * aot-compiler.c: Generalize the emitting of unwind information to use the
5012 information in cfg->unwind_ops.
5014 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
5016 * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
5017 AOT method frames. Enable writing symbols for methods by default.
5019 2008-11-14 Rodrigo Kumpera <rkumpera@novell.com>
5021 * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
5022 and make it work with vectors of element sizes 1, 2 and 4.
5024 * simd-intrinsics.c: Enable getter for all vectors with element size
5027 * simd-methods.h: Add the names of other getters.
5029 * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
5035 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
5037 * mini-ppc.h: portability fix.
5039 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
5041 * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
5042 buggy and will overwrite it.
5044 2008-11-14 Zoltan Varga <vargaz@gmail.com>
5046 * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
5047 Use it to emit local symbols for all methods so AOTed methods show up with
5048 their full name in gdb/valgrind output.
5050 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
5052 * mini-ppc.c: portability fixes.
5054 2008-11-14 Zoltan Varga <vargaz@gmail.com>
5056 * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
5057 entries out of the if (!generic_shared...) code so it is always done.
5058 (mono_class_init_trampoline): Do the patching when running under valgrind
5059 too, newer versions of valgrind have no problems with it.
5061 2008-11-13 Zoltan Varga <vargaz@gmail.com>
5063 * aot-compiler.c (emit_writeout): Rework this to make it easier to add
5066 2008-11-13 Mark Probst <mark.probst@gmail.com>
5068 * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
5071 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
5073 * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui.
5075 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
5077 * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
5083 * simd-intrinsics.c: Same.
5085 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
5087 * simd-intrinsics.c: Enable constructor intrinsics for all types.
5089 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
5091 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
5092 to work with more Vector types.
5094 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
5096 * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
5097 store the elemens directly instead of using and intermediate.
5099 2008-11-13 Zoltan Varga <vargaz@gmail.com>
5101 * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
5103 * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
5104 to preserve %eax for aot plt trampolines.
5106 * aot-compiler.c (compile_method): Don't skip synchronized methods.
5107 (encode_method_ref): Flag synchronized methods so they won't go through
5110 * aot-compiler.c: Additional work to support AOTing synchronized methods/
5113 * cpu-ia64.md (jmp): Increase max length.
5115 2008-11-12 Zoltan Varga <vargaz@gmail.com>
5117 * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
5118 open generic classes.
5120 * aot-compiler.c: Enable the ELF writer on ELF platforms.
5122 * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
5123 box+brtrue optimization since it causes test failures on x86.
5125 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
5127 * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
5133 * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
5134 for simd ctor values.
5136 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
5137 instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
5139 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
5141 * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
5144 * simd-instrincs.c: Same.
5146 * basic-simd.cs: Same.
5148 2008-11-12 Zoltan Varga <vargaz@gmail.com>
5150 * ratests.cs: Add more tests.
5152 * regalloc2.c (add_spill_code): Handle more corner cases.
5154 2008-11-11 Zoltan Varga <vargaz@gmail.com>
5156 * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
5157 (update_liveness): Avoid holes in the liveness ranges of hregs if they are
5158 both the source an destination of an instruction.
5160 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
5162 * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
5163 wapihandles.c: more portability changes.
5165 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
5167 * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
5168 * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
5169 safe to execute in a signal handler and the kernel provides better
5170 the info in /proc/self/smaps. Avoid the assert on sigaction during
5173 2008-11-11 Zoltan Varga <vargaz@gmail.com>
5175 * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
5176 do the bblock linking hack if it is actually needed.
5178 * Makefile.am (patch-libtool): New helper target to patch libtool to speed
5181 * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
5182 crash problem is fixed.
5184 * branch-opts.c (mono_remove_critical_edges): Link up newly added
5187 * mini.c (mini_method_compile): Compute unreachable bblocks properly even
5189 (mini_method_compile): Set the starting value of next_vreg to
5190 MAX_IREGS + MAX_FREGS when using globalra.
5192 * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
5193 filter clauses with BB_EXCEPTION_HANDLER.
5195 * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
5197 2008-11-10 Mark Probst <mark.probst@gmail.com>
5199 * mini-x86.c (mono_arch_get_argument_info): Don't align argument
5200 space for stdcall. Fixes regressions on Win32.
5202 2008-11-10 Zoltan Varga <vargaz@gmail.com>
5204 * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
5206 (linear_scan): Remove an assert which doesn't seem to be needed.
5208 * local-propagation.c (mono_local_deadce): Avoid a call to
5209 MONO_DELETE_INS which would screw up the instruction linking.
5211 * mini.c (mono_decompose_op_imm): Make this work with globalra.
5213 * regalloc2.c: Upgrade to work the current JIT code.
5215 2008-11-09 Zoltan Varga <vargaz@gmail.com>
5217 * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
5220 * aot-runtime.c: Remove some dead code.
5222 * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
5224 (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
5226 * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
5227 trampolines using sscanf since atoi doesn't work on large unsigned values.
5229 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full):
5230 Initialize code_size.
5232 2008-11-08 Mark Probst <mark.probst@gmail.com>
5234 * method-to-ir.c (mini_emit_inst_for_method): Make
5235 Interlocked.CompareExchange work for Int arguments on 32 bit
5238 2008-11-07 Mark Probst <mark.probst@gmail.com>
5240 * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
5242 2008-11-06 Bill Holmes <billholmes54@gmail.com>
5244 * main.c Fix MSVC build.
5246 Contributed under MIT/X11 license.
5248 2008-11-06 Mark Probst <mark.probst@gmail.com>
5250 * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
5251 alignment larger than 8 bytes are aligned correctly, too.
5253 * mini.c: Honor the min_align field of MonoClass when laying out
5256 2008-11-06 Zoltan Varga <vargaz@gmail.com>
5258 * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
5260 * aot-compiler.c (emit_plt): Fix a warning.
5262 * aot-compiler.c: Implement ARM support in the binary writer.
5264 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
5266 * basic-simd.cs: Add test for getter with byref arg.
5267 Fix the naming of a few tests.
5268 Add missing checks to a test.
5270 2008-11-05 Zoltan Varga <vargaz@gmail.com>
5272 * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
5274 * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
5275 most of the full-aot support for monitor enter/exit trampolines.
5277 * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
5278 enter/exit trampoline creation functions.
5280 * Makefile.am: Fix the generation of buildver.h so it is not invoked during
5283 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
5285 * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
5286 incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
5287 implement the needed functionality without adding crap to the runtime.
5289 2008-11-05 Zoltan Varga <vargaz@gmail.com>
5291 * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
5294 * mini.c (mono_build_date): New global version holding the build date in
5297 * Makefile.am (buildver.c): Generate a file containing the build date.
5299 * main.c: Set the build date from the generated file.
5301 * mini.c (mono_get_runtime_build_info): New helper function returning build
5302 information in a string format.
5304 * driver.c (mono_main): Print the build date in --version.
5306 * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
5307 file when the bind-to-runtime-version option is used.
5309 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
5311 * simd-intrinsics.c: Fix bug when using getters and byref args.
5313 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
5315 * simd-methods.h: Rename prefetch methods.
5317 * simd-intrinsics.c: Same.
5319 2008-11-05 Mark Probst <mark.probst@gmail.com>
5321 * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
5324 2008-11-04 Zoltan Varga <vargaz@gmail.com>
5326 * aot-compiler.c: Use the bundled elf header files instead of depending on
5329 * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
5332 * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
5335 2008-11-04 Rodrigo Kumpera <rkumpera@novell.com>
5337 * cpu-x86.md: Add store nta ops.
5343 * mini.h: Add an enum for simd prefetch modes.
5345 * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
5346 of store. Use the changed code to support store nta.
5348 * simd-intrinsics.c: Add prefetch ops for all vector types.
5350 2008-11-04 Zoltan Varga <vargaz@gmail.com>
5352 * aot-compiler.c: Add an option for JIT compiling the methods by multiple
5355 * aot-compiler.c: Use statically allocated buffers for constructing symbol
5358 * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
5361 2008-11-04 Mark Probst <mark.probst@gmail.com>
5363 * mini-x86.c: Fixed commit.
5365 2008-11-04 Zoltan Varga <vargaz@gmail.com>
5367 * aot-compiler.c (emit_plt): Align the plt section only on x86.
5369 2008-11-04 Mark Probst <mark.probst@gmail.com>
5371 * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
5372 and MONITOR_EXIT, for the ASM fastpaths.
5374 * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
5377 * mini.c, patch-info.h: Signature and patch infos for
5378 Monitor.Enter/Exit trampolines.
5380 * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
5382 * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
5383 Monitor.Enter/Exit ASM fastpath for Linux.
5385 2008-11-04 Zoltan Varga <vargaz@gmail.com>
5387 * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
5389 * objects.cs: Add a new test.
5391 * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
5393 * aot-runtime.c (load_method): Run class initialization in the PLT case even
5394 if MONO_LOG_LEVEL is set.
5396 * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
5398 * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
5400 * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
5402 * aot-compiler.c: Change the relocation code to use virtual addresses instead
5403 of file offsets. Align the sections belonging to the data segment to
5406 2008-11-03 Zoltan Varga <vargaz@gmail.com>
5408 * aot-compiler.c: Simplify the elf writer by depending on the definitions in
5409 elf.h. Port it to amd64.
5411 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
5413 * driver.c: Enable SIMD by default.
5415 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
5417 * cpu-x86.md: Add prefetch op.
5423 * mini.h: Add an enum for simd prefetch modes.
5425 * simd-methods.h: Add prefetch function names.
5427 * simd-intrinsics.c: Add prefetch ops for all vector types.
5429 2008-11-03 Zoltan Varga <vargaz@gmail.com>
5431 * aot-compiler.c (emit_bytes): Speed this up a little.
5433 2008-11-02 Zoltan Varga <vargaz@gmail.com>
5435 * aot-compiler.c: Add JIT time etc. statistics.
5437 * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
5439 * mini.h (MonoCompile): Add 'got_offset' field.
5441 * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
5442 method_got_offsets array.
5444 * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
5447 * aot-compiler.c (compile_method): Add generic method instances referenced
5448 by the method to the list of methods to be compiled, this is required so if
5449 A<T> references B<T>, and another assembly references A<int>, then it will
5450 also get a copy of B<int>.
5452 * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
5453 when checking for monitor enter/exit.
5455 2008-10-30 Mark Probst <mark.probst@gmail.com>
5457 * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
5458 for Monitor.Enter and Monitor.Exit if enabled.
5460 * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
5463 2008-10-30 Zoltan Varga <vargaz@gmail.com>
5465 * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
5466 of an OP_MOVE. Fixes #440046.
5468 * basic-long.cs: Add a new test.
5470 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
5472 * mini.h: Add synchronization note for the managed counter-part.
5474 * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
5475 returns the simd caps of the current cpu.
5477 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
5479 * basic-simd.cs: Remove Console.WriteLine.
5481 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5483 * basic-simd.cs: New tests for Vector2ul.
5485 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5487 * simd-intrinsics.c: Add new vector type Vector2ul.
5489 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5491 * basic-simd.cs: New tests for Vector2l.
5493 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5495 * cpu-x86.md: Add long version of most packed int ops.
5501 * simd-intrinsics.c: Add new vector type Vector2l.
5503 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5505 * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
5507 * simd-methods.h: Remove SN_op_BitwiseXor.
5509 2008-10-28 Zoltan Varga <vargaz@gmail.com>
5511 * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
5514 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
5516 * basic-simd.cs: Test for Vector2d.
5518 * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
5521 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
5523 * cpu-x86.md: Add double version of all packed float ops.
5529 * simd-intrinsics.c: Add new vector type Vector2d.
5531 * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
5533 * simd-methods.h: Add Duplicate.
5535 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
5537 * basic-simd.cs: Test for packing with signed saturation.
5539 2008-10-28 Zoltan Varga <vargaz@gmail.com>
5541 * aot-compiler.c (add_generic_instances): Add all methods of generic instances
5542 found in the TYPESPEC table.
5544 2008-10-26 Zoltan Varga <vargaz@gmail.com>
5546 * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
5549 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
5551 * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
5552 instead of the RVA, since the RVA can be changed by tools like the cil
5555 * method-to-ir.c (mono_method_to_ir2): Ditto.
5557 * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
5558 (deserialize_variable): Ditto.
5560 2008-10-25 Martin Baulig <martin@ximian.com>
5562 * debug-mini.c (write_variable): Use
5563 `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
5565 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5567 * cpu-x86.md: Add unsigned variants of packd and packw.
5571 * mini-x86.h: Emit the right instruction for packd and packw.
5572 Add unsigned variants of packd and packw.
5574 * simd-intrinsics.c: Packd and packw were used in place of their
5575 unsigned variants. Change that.
5576 Add intrinsics for (Signed)PackWithSignedSaturation.
5578 * simd-methods.h: Add (Signed)PackWithSignedSaturation.
5580 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5582 * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
5584 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5586 * mini-ops.h: Remove dword packed add/sub with saturation ops.
5588 * cpu-x86.md: Remove dword packed add/sub with saturation ops.
5590 * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
5593 * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
5595 2008-10-24 Mark Probst <mark.probst@gmail.com>
5597 * method-to-ir.c, mini.c: Special casing for the synchronized
5598 wrapper for the ldtoken+GetTypeFromHandle case.
5600 2008-10-24 Zoltan Varga <vargaz@gmail.com>
5602 * mini.c (mono_replace_ins): Move this to branch-opts.c.
5604 * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
5605 created/split bblocks.
5607 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5609 * mini-ops.h: Add packed signed mul high.
5613 * mini-x86.c (mono_arch_output_basic_block): Same.
5615 * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
5617 * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
5619 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5621 * basic-simd.cs: Tests for Vector16sb.
5623 2008-10-24 Zoltan Varga <vargaz@gmail.com>
5625 * inssel.brg (stmt): Fix OP_HARD_NOP rule.
5627 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
5629 * mini-ops.h: Add packed signed min, max and compare greater.
5633 * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
5636 * simd-methods.h: Add CompareGreaterThan.
5638 * simd-methods.h: Remove CompareEquals.
5640 * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
5642 * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
5644 * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
5647 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
5649 * basic-simd.cs: Fix tests due to change in the API.
5651 2008-10-21 Zoltan Varga <vargaz@gmail.com>
5653 * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
5655 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
5657 * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
5659 * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
5660 inst_offset as this has invalid values for LDADDR.
5662 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
5664 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
5666 * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
5668 2008-10-21 Zoltan Varga <vargaz@gmail.com>
5670 * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
5671 for accessing field->data.
5673 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
5675 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
5677 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
5679 * simd-methods.h: Add SignedPackWithUnsignedSaturation.
5681 * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
5683 2008-10-21 Zoltan Varga <vargaz@gmail.com>
5685 * dominators.c (mono_compute_natural_loops): Allocate GList enties
5686 from the cfg mempool.
5688 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
5690 * basic-simd.cs: Tests for new methods in Vector8us.
5692 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
5694 * mini-ops.h: Add multiply and store high.
5698 * mini-x86.c (mono_arch_output_basic_block): Same.
5700 * simd-methods.h: Same.
5702 * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
5705 2008-10-19 Zoltan Varga <vargaz@gmail.com>
5707 * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
5708 mono_class_setup_vtable ().
5710 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
5711 mono_class_get_vtable_entry () for accessing klass->vtable.
5713 * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
5715 * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
5718 * method-to-ir.c (mono_save_token_info): Don't save references made from
5721 * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
5722 of generic instances.
5724 * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
5726 2008-10-19 Mark Probst <mark.probst@gmail.com>
5728 * cpu-ppc.md, mini-ppc.c: The length of the code generated for
5729 OP_JMP depends on the method signature. Calculate it properly.
5731 2008-10-19 Zoltan Varga <vargaz@gmail.com>
5733 * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
5736 * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
5738 (emit_extra_methods): Add another table mapping method indexes to
5739 offsets in the extra_method_info table.
5741 * mini.h: Bump AOT file format version.
5743 * aot-runtime.c: Merge most of the code from mono_aot_get_method
5744 and mono_aot_get_method_from_token () into one function.
5746 2008-10-19 Mark Probst <mark.probst@gmail.com>
5748 * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
5751 2008-10-18 Zoltan Varga <vargaz@gmail.com>
5753 * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
5756 * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
5759 * mini.c (mono_patch_info_equal): Compare the generic context as well.
5761 * mini.h: Bump aot file format version.
5763 * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
5764 AOT file can contain native code for methods which are not in the METHOD
5765 table. Generate code for non-sharable generic instances of generic methods
5766 found in the METHODSPEC table.
5768 * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
5769 encoding generic type handles.
5771 * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
5772 (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
5774 * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
5775 macros + MONO_ADD_INS.
5777 * mini.c (mono_jump_info_token_new2): New function which takes a generic
5780 * mini.h (MonoJumpInfoToken): Include fields for a generic context.
5782 * mini.h: Bump aot file format version.
5784 * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
5786 2008-10-17 Mark Probst <mark.probst@gmail.com>
5788 * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
5789 platforms, with definable stack alignment value. Set to 16 now
5792 * mini.c, mini.h, driver.c: Command line option for disabling
5795 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
5797 * basic-simd.cs: Tests for new methods in Vector4ui.
5799 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
5801 * mini-ops.h: Add packed int shuffle.
5805 * mini-x86.c (mono_arch_output_basic_block): Same.
5807 * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
5808 extract mask, max, min, shuffle.
5810 * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
5812 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
5814 * basic-simd.cs: Tests for new methods in Vector8us.
5816 2008-10-17 Mark Probst <mark.probst@gmail.com>
5818 * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
5819 RuntimeTypeHandle, not a TypedReference.
5821 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
5823 * simd-intrinsics.c: remove relocations.
5825 2008-10-17 Zoltan Varga <vargaz@gmail.com>
5827 * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM
5828 optimizations from the x86 backend.
5830 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
5832 * simd-methods.h, simd-intrinsics.c: debloat method names and
5833 prepare for no relocations.
5835 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
5837 * mini-ops.h: Add packed min/equal and sum of absolute differences.
5841 * mini-x86.c (mono_arch_output_basic_block): Same.
5843 * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
5844 extract mask, max, min and sum of absolute differences.
5846 * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
5849 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
5851 * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
5852 Renamed one test for consistency.
5854 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
5856 * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
5857 fix to the code that deal with other blocks.
5859 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
5861 * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
5863 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
5865 * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
5866 that deals with vreg interference. Explicitly check for OP_LDADDR to be
5867 able to process the source reg.
5869 2008-10-16 Martin Baulig <martin@ximian.com>
5871 * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
5873 * inssel.brg: Add `OP_HARD_NOP'.
5875 * mini.h (MonoCompile): Added `keep_cil_nops' flag.
5877 * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
5878 `OP_HARD_NOP' instruction when running inside the debugger.
5880 * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
5881 `OP_HARD_NOP' instruction when running inside the debugger.
5883 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
5885 * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
5886 now works. The issue with the regalloc tripping up no longer
5889 * simd-intrinsics.c (load_simd_vreg): Same.
5891 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
5893 * basic-simd.cs: Tests for new Vector8ui methods.
5895 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
5897 * simd-intrinsics.c (get_simd_vreg): Simplify code and test
5898 only for type. This fixes crashes where MonoInst::klass is checked
5899 for ops of type != VTYPE or OBJ.
5901 * simd-intrinsics.c (load_simd_vreg): Same.
5903 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
5905 * mini-ops.h: Add ops for packed shuffle/max/avg and
5910 * mini-x86.c (mono_arch_output_basic_block): Same.
5912 * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
5915 * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
5916 to emit extract mask op.
5918 * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
5919 to emit word shuffles.
5921 2008-10-15 Mark Probst <mark.probst@gmail.com>
5923 * mini.c (mono_allocate_stack_slots_full): Align stack frame to
5924 the largest alignment needed by a variable, but at least
5927 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
5929 * basic-simd.cs: Tests for the fixes in the last commit.
5931 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
5933 * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
5934 no longer handles STACK_PTR input.
5936 * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
5938 * simd-intrinsics.c (load_simd_vreg): New function that works like
5939 get_simd_vreg but handles STACK_PTR input.
5941 * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
5942 as the input can be an arbitrary pointer.
5944 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
5945 LDADDR local optimization directly otherwise use a store op.
5947 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
5949 * basic-simd.cs: Tests for dup low and dup high.
5951 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
5953 * mini-ops.h: Add dup low and dup high ops.
5957 * mini-x86.c (mono_arch_output_basic_block): Same.
5959 * simd-intrinsics.c (vector4f_intrinsics): Same.
5961 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
5963 * basic-simd.cs: Tests for recently added functionality.
5965 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
5967 * mini-ops.h: Add remaining sse1 fp ops.
5969 * cpu-x86.md: Add remaining sse1 fp ops.
5971 * mini-x86.c (mono_arch_output_basic_block): Same.
5973 * mini.h: Add enum for simd FP compare conditions.
5975 * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
5977 * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
5978 so the backed can generate the appropriate op.
5980 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
5981 This patch squeese one more byte from the SimdIntrinsc struct.
5983 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
5984 a a shift amount intead of simply or'ing it.
5986 * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
5988 * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
5989 byte so we can have an aditional flags field without increasing struct size.
5991 * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
5992 against the simd_supported_versions bitmask.
5994 * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
5996 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
5998 * mini.c: remove rawbuffer code (the only use here is unsafe because
5999 it takes locks during signal handling and the kernel now provides much
6000 better info in proc/pid/smaps these days).
6002 2008-10-13 Zoltan Varga <vargaz@gmail.com>
6004 * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
6005 OP_X86_PUSH_OBJ. Fixes #434620.
6007 * objects.cs: Add a test.
6009 2008-10-12 Rodrigo Kumpera <rkumpera@novell.com>
6011 * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
6012 that the packuswb/packusdw don't work with unsigned numbers for what
6013 would be negative numbers in signed format.
6015 * cpu-x86.md: Add doubleword forms of many ops and packing ones.
6016 Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
6018 * mini-ops.h: Add doubleword forms of many ops and packing ones.
6020 * mini-x86.c: Emit doubleword forms of many ops and packing ones.
6022 * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
6024 * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
6026 * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
6029 * simd-intrinsics.c (simd_version_name): New function, returns the name of the
6030 version as the enum in mini.h.
6032 * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
6033 for sse3 ops, check the simd_version field if present. This way the code
6034 works with all versions of sse.
6036 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6038 * simd-intrinsics.c: Fixed intrinsic name typo.
6040 * mini.h: Added missing simd exported function.
6042 * basic-simd.cs: Added tests for Vector4ui.
6043 Fixed broken test for Vector16b.
6045 2008-10-10 Zoltan Varga <vargaz@gmail.com>
6047 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
6048 the max length to 64.
6050 2008-10-10 Mark Probst <mark.probst@gmail.com>
6052 * method-to-ir.c: Only do the fast virtual generic method call for
6053 non-wrapper methods.
6055 * mini.h, mini-trampolines.c: The new generic virtual remoting
6056 trampoline handles virtual method calls via the vtable (as done by
6057 the fast virtual generic method calls) to remoting proxies.
6059 * mini.c (mono_jit_create_remoting_trampoline): For generic
6060 methods reate a generic virtual remoting trampoline.
6062 * mini-amd64.h: Enable fast virtual generic method calls again.
6064 2008-10-10 Mark Probst <mark.probst@gmail.com>
6066 * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
6067 restore registers when doing tail calls.
6069 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6071 * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
6074 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6076 * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
6078 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6080 * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
6082 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6084 * basic-simd.cs: Retrofit for API changes.
6086 2008-10-10 Mark Probst <mark.probst@gmail.com>
6088 * mini-ppc.c: Handle integer stack arguments for tail calls.
6090 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6092 * optflags-def.h: Removed sse3 optimization.
6096 * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
6099 * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
6101 * mini.h: Added enumeration with simd versions.
6103 * simd-intrinsics.c (emit_intrinsics): Use the new static var
6106 * simd-intrinsics.c: Added mono_simd_intrinsics_init.
6108 * mini.c (mini_init): Call mono_simd_intrinsics_init.
6110 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
6112 * basic-simd.cs: Added tests for Vector8u and Vector16u.
6114 * basic-simd.cs: Fixed test naming.
6116 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
6118 * mini-ops.h: Added ops for packed and saturated math, shifts
6119 and packing/unpacking.
6121 * cpu-x86.md: Added descriptors for the above ops.
6123 * mini-x86.c: Added code to emmit the above ops.
6125 * simd-intrinsics.c: Added support for Vector16u and Vector8u.
6127 2008-10-08 Zoltan Varga <vargaz@gmail.com>
6129 * aot-compiler.c (compile_method): Enable AOT for generic code.
6131 * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
6133 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
6135 * mini.c: add a workaround for a common screwup that ends up blamed
6136 to mono (other processes blocking signal delivery).
6138 2008-10-07 Zoltan Varga <vargaz@gmail.com>
6140 * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
6141 in the LDFLD/STFLD opcodes. Fixes #432673.
6143 * iltests.il.in: Add a new test.
6145 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
6147 * mini-arm.c: attach the thread in unmanaged->managed transitions
6148 using delegates (bug #433148).
6150 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
6152 * basic-simd.cs: Use new ShuffleSel constants.
6154 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
6156 * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
6158 * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
6159 only disable simd intrinsics if no sse2 is detected.
6161 * optflags-def.h: Added sse3.
6163 * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
6166 2008-10-07 Zoltan Varga <vargaz@gmail.com>
6168 * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
6169 when adding delegate-invoke wrappers.
6171 2008-10-07 Zoltan Varga <vargaz@gmail.com>
6173 * Makefile.am: Reenable the simd tests.
6175 2008-10-07 Bill Holmes <billholmes54@gmail.com>
6177 * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
6178 add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
6179 other vreg is allocated to that hreg.
6181 Contributed under MIT/X11 license.
6183 2008-10-07 Zoltan Varga <vargaz@gmail.com>
6185 * Makefile.am: Disable the simd tests for now as Mono.Simd is not
6188 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
6190 * basic-simd.cs: New test suite for SIMD intrinsics.
6192 * Makefile.am: Added new tests.
6194 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
6196 * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
6200 * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
6202 * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
6203 using SSE2 aware opcodes.
6205 * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
6206 is enabled, this code path is only reachable if conversion ops are emmited after
6209 * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
6211 This optimization saves 6 bytes per conversion against the old version.
6213 2008-10-06 Zoltan Varga <vargaz@gmail.com>
6215 * aot-compiler.c (compile_method): Don't skip methods referencing
6216 generic methods without a corresponding entry in token_info_hash, since
6217 encode_method_ref () can handle all generic methods now.
6219 * method-to-ir.c (mono_save_token_info): Don't save the token info if a
6220 generic context is set.
6222 * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
6223 generic sharing of LDTOKEN.
6225 2008-10-06 Mark Probst <mark.probst@gmail.com>
6227 * mini-amd64.h: Temporarily disabled fast virtual generic method
6228 calls because it breaks the System.Runtime.Remoting tests.
6230 2008-10-06 Zoltan Varga <vargaz@gmail.com>
6232 * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
6234 * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
6235 so inlining actually works.
6236 (check_inline_caller_method_name_limit): Ditto.
6238 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
6240 * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
6241 64 bit safety (from Olaf Hering and Andreas Farber).
6243 2008-10-06 Zoltan Varga <vargaz@gmail.com>
6245 * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
6246 mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
6247 unused virtual call support code.
6249 * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
6251 * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
6252 which can't use aot trampolines.
6253 (decode_patch): Don't create aot trampolines for methods which can't use
6256 * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
6257 use aot trampolines.
6259 * mini.h: Bump AOT image format version.
6261 2008-10-05 Zoltan Varga <vargaz@gmail.com>
6263 * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
6264 to save_token_info () since cmethod is inflated for constrained calls.
6266 * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
6268 2008-10-04 Andreas Farber <andreas.faerber@web.de>
6270 * Makefile.am: Add build rules for ppc64.
6271 This avoids the build failing at pedump with unresolved symbols
6272 due to lack of arch_sources. Instead it will now fail earlier
6273 due to lack of cpu-ppc64.md.
6275 Contributed under MIT/X11 license.
6277 2008-10-04 Mark Probst <mark.probst@gmail.com>
6279 * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
6282 * iltests.il.in: Add test case for tail call with many arguments.
6284 2008-10-03 Zoltan Varga <vargaz@gmail.com>
6286 * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
6287 to the fast virtual generic method code until the aot case is fixed.
6289 2008-10-03 Mark Probst <mark.probst@gmail.com>
6291 * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
6293 2008-10-03 Mark Probst <mark.probst@gmail.com>
6295 * mini-amd64.c, mini-amd64.h: Implement generic virtual method
6298 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
6300 * simd-intrinsics.c: Forgot to add this one.
6302 * mini-codegen.c: Fix macro in case SIMD is not supported.
6304 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
6306 This patch land initial JIT support for simd intrinsics.
6308 * mini-x86.h: Added new define to make --enable_minimal work on x86.
6310 * Makefile.am: Added simd-intrinsics.c
6312 * simd-intrinsics.c: New file with simd instrinsic related
6315 * cfold.c (mono_constant_fold_ins2): Fold XZERO.
6317 * cpu-x86.md: Add simd related instructions.
6319 * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
6321 * driver.c: Added two new --regression variants.
6323 * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
6325 * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
6327 * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
6328 extract some complicated logic to helper functions.
6330 * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
6332 * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
6334 * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
6335 the specialized simplification pass.
6337 * method-to-ir.c (mono_spill_global_vars): Use new macro.
6339 * mini-codegen.c: Added SIMD constants to all regbanks arrays.
6341 * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
6344 * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
6345 if MONO_ARCH_NEED_SIMD_BANK is defined.
6347 * mini-ops.h: Added the new simd ops.
6349 * mini-x86.c: Added mono_arch_xregname.
6351 * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
6353 * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
6355 * mini-x86.h: Define simd related MONO_ARCH macros.
6357 * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
6359 * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
6361 * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
6362 MONO_CLASS_IS_SIMD to deal with simd related IR.
6364 * mini.h (MonoInst): Added spill_var to the backend union.
6366 * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
6368 * mini.h: Added forward declarations of the new simd fuctions.
6370 * optflags-def.h: Added new optimization names SIMD.
6372 * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
6374 * regalloc.h: Added support for working with 3 register banks.
6376 * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
6378 * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
6380 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
6382 * mini-exceptions.c: remove 64 bit related ifdef clutter.
6384 2008-10-03 Zoltan Varga <vargaz@gmail.com>
6386 * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
6387 instead of one on 64 bit systems.
6389 * method-to-ir.c: Remove unused includes.
6391 2008-10-02 Zoltan Varga <vargaz@gmail.com>
6393 * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
6394 cfg->used_int_regs, since the two are different on arm.
6396 2008-10-02 Mark Probst <mark.probst@gmail.com>
6398 * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
6399 mono_method_get_vtable_index() to get the vtable index.
6401 2008-10-02 Mark Probst <mark.probst@gmail.com>
6403 * method-to-ir.c (mono_method_to_ir2): Don't create native
6404 wrappers for array methods, because they're never called (and if
6405 they were called they wouldn't work).
6407 2008-10-02 Mark Probst <mark.probst@gmail.com>
6409 * method-to-ir.c (mono_method_to_ir2): Array methods are
6410 special-cased and must not be invoked indirectly via the (M)RGCTX
6411 when generic sharing is turned on. Fixes #431413.
6413 2008-10-01 Mark Probst <mark.probst@gmail.com>
6415 * method-to-ir.c: When generic sharing is active, call
6416 non-interface virtual generic methods via the standard trampoline.
6418 * mini-trampolines.c: Handle virtual generic shared methods.
6420 * mini.h, mini-x86.c, mini-x86.h: New argument for
6421 mono_arch_build_imt_thunk() which is non-NULL for virtual generic
6422 method thunks and which is the trampoline to call if the lookup
6423 fails. Enable the virtual generic method thunk for x86.
6425 * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
6426 mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
6427 argument but assert that it's NULL, because these archs don't yet
6428 implement the virtual generic method thunk. Changes in the IMT
6429 thunk data structures.
6431 2008-10-01 Zoltan Varga <vargaz@gmail.com>
6433 * aot-compiler.c (emit_globals): Avoid invalid characters in
6434 the static linking symbol.
6436 * objects.cs: Add a test for the range check optimization. Fix warnings.
6438 * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
6439 optimization from the current JIT.
6441 * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
6442 later in decompose_array_access_opts () to allow more optimizations.
6444 * method-to-ir.c (mono_handle_soft_float): Rename this to
6445 mono_decompose_soft_float () for consistency.
6447 * mini-ops.h: Fix arguments of OP_STRLEN.
6449 * method-to-ir.c (save_cast_details): Extract the cast details saving code
6450 into a separate function.
6451 (reset_cast_details): Ditto.
6452 (handle_unbox): Save cast details. Fixes #431254.
6454 * method-to-ir.c: Remove some obsolete FIXMEs.
6456 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
6458 * ir-emit.h (alloc_dreg): Write a warning before crashing.
6460 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
6462 * mini-codegen.c: More work on macros to make them
6463 ready for multiple regbanks.
6465 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
6467 * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
6469 * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
6471 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
6473 * mini-codegen.c (mono_spillvar_offset): Proper support for
6476 2008-09-30 Zoltan Varga <vargaz@gmail.com>
6478 * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
6479 the stack overflow changes.
6481 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
6483 * mini-codegen.c: Make all bank macros depend on reg_bank.
6485 * mini-codegen.c (mono_local_regalloc): Make free mask
6486 initialization regbank aware.
6488 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
6490 * mini-codegen.c (mono_local_regalloc): Extract callee
6491 mask selection to a function and make it regbank aware.
6493 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
6495 * mini-codegen.c (mono_local_regalloc): Changed the cloberring
6496 code to deal with many regbanks.
6498 2008-09-30 Zoltan Varga <vargaz@gmail.com>
6500 * mini-codegen.c: More fp->regbank changes.
6502 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
6504 * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
6505 of a hardcoded constant.
6507 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
6509 * method-to-ir.c (type_from_stack_type): Fix typo.
6511 2008-09-29 Zoltan Varga <vargaz@gmail.com>
6513 * mini-ia64.c (emit_move_return_value): Convert float return values to
6516 * objects.cs: Add a new test.
6518 * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
6519 VARARG methods to fix an assert later.
6521 * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
6522 end so it at least compiles.
6524 2008-09-28 Zoltan Varga <vargaz@gmail.com>
6526 * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
6528 2008-09-28 Rodrigo Kumpera <rkumpera@novell.com>
6530 * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
6531 optimization to a new function (emit_optimized_ldloca_ir) and enable
6532 it for both ldloca and ldloca_s.
6534 2008-09-28 Zoltan Varga <vargaz@gmail.com>
6536 * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
6537 gshared CASTCLASS code.
6539 * driver.c (mono_main): Add a workaround for shutdown crashes seen on
6540 amd64, where the libc stack unwinder encounters stack frames referring to
6541 native code in unmapped memory.
6543 * method-to-ir.c (mini_emit_check_array_type): Add support for generic
6546 * generics.cs: Add new test.
6548 2008-09-27 Zoltan Varga <vargaz@gmail.com>
6550 * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
6551 add a check that one of the ARM_FPU_ constants is defined.
6553 * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
6555 * mini-exceptions.c: Fix build on non-altstack platforms.
6557 * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
6560 * ir-emit.h: Add a comment to NEW_PCONST.
6562 * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
6564 * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
6566 * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
6567 after the changes to MonoJitDomainInfo.
6569 2008-09-27 Mark Probst <mark.probst@gmail.com>
6571 * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
6573 2008-09-27 Mark Probst <mark.probst@gmail.com>
6575 * mini-ppc.c: Compiler warning fixes.
6577 2008-09-27 Mark Probst <mark.probst@gmail.com>
6579 * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
6582 2008-09-27 Mark Probst <mark.probst@gmail.com>
6584 * exceptions-ppc.c, mini-ppc.h: Compile
6585 mono_arch_handle_altstack_exception() on Darwin, too.
6587 2008-09-27 Mark Probst <mark.probst@gmail.com>
6589 * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
6590 work on archs which don't have generic sharing implemented, only
6591 without the vtable_arg.
6593 2008-09-26 Mark Probst <mark.probst@gmail.com>
6595 * mini.c: Added comment explaining why delegate ctor icall
6596 wrappers are compiled.
6598 2008-09-26 Mark Probst <mark.probst@gmail.com>
6600 * mini.c: Don't produce trampolines to delegate ctor icall
6601 wrappers but compile them upfront.
6603 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
6605 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
6606 runtime-set function when going back to managed code. Currently this
6607 is used to set back the protection on the soft ovf pages and/or to
6608 throw the stack overflow exception that happened in unmanaged code.
6610 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
6612 * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
6613 runtime-set function when going back to managed code. Currently this
6614 is used to set back the protection on the soft ovf pages and/or to
6615 throw the stack overflow exception that happened in unmanaged code.
6617 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
6619 * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
6620 the support code for restoring stack protection after stack overflows
6621 that happen in unmanaged code. Don't set the exec permission on the
6624 2008-09-26 Zoltan Varga <vargaz@gmail.com>
6626 * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
6627 delegate->method_ptr is set. Fixes #428054.
6629 2008-09-25 Zoltan Varga <vargaz@gmail.com>
6631 * tests.cs: Rename to ratests.cs.
6633 * method-to-ir.c: Merge the emit_get_rgctx () calls into the
6634 emit_get_rgctx_... functions.
6636 2008-09-25 Mark Probst <mark.probst@gmail.com>
6638 * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
6640 2008-09-25 Mark Probst <mark.probst@gmail.com>
6642 * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
6643 before asserting that method is sharable.
6645 2008-09-25 Mark Probst <mark.probst@gmail.com>
6647 * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
6648 whether method needs a static RGCTX wrapper used instead of
6651 * generic-sharing.c, mini.h: A few functions moved to
6652 metadata/generic-sharing.c.
6654 2008-09-25 Mark Probst <mark.probst@gmail.com>
6656 * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
6657 Generic code sharing for value types, which essentially means
6658 treating value type methods like static methods. The RGCTX is
6659 passed in the same way.
6661 2008-09-25 Zoltan Varga <vargaz@gmail.com>
6663 * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
6664 opcode when creating multi-dimensional arrays of open types.
6666 * generic-sharing.c (mono_method_check_context_used): Handle arrays of
6669 * generics.cs: Add a test.
6671 * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
6673 2008-09-24 Zoltan Varga <vargaz@gmail.com>
6675 * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
6677 * mini.c (mini_method_compile): Set it when running under the debugger.
6679 * method-to-ir.c (mono_handle_global_vregs): Disable global->local
6680 vreg optimization if the flag is set.
6682 * driver.c (mono_main): Add --attach= option to pass options to
6685 * mini.c (sigquit_signal_handler): Start the attach agent.
6687 * ssapre.c: Disable this to save space since it is not yet ported to
6690 * regalloc2.c: Disable this to save space.
6692 * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
6694 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
6696 * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
6697 the -v option useful again.
6699 2008-09-24 Zoltan Varga <vargaz@gmail.com>
6701 * mini-amd64.c (mono_arch_output_basic_block): Add support for
6704 * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
6705 arrays of arrays. Fixes #428406.
6707 * method-to-ir.c (mini_emit_castclass): Ditto.
6709 * objects.cs: Add new test.
6711 2008-09-23 Rodrigo Kumpera <rkumpera@novell.com>
6713 * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
6714 was wrong at it choked against target_type_is_incompatible for byref types.
6716 2008-09-23 Zoltan Varga <vargaz@gmail.com>
6718 * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most
6721 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
6723 * mini-exceptions.c: update a few more exceptions-related counters.
6725 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
6727 * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
6728 new functions to allocate from persistent mempools.
6730 2008-09-23 Zoltan Varga <vargaz@gmail.com>
6732 * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow
6733 multiple register banks in the future.
6735 * mini-codegen.c (mono_local_regalloc): Fix a warning.
6737 2008-09-22 Rodrigo Kumpera <rkumpera@novell.com>
6739 * mini.c (type_to_eval_stack_type): Remove duplicated function.
6741 * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
6743 * mini.h: Export type_to_eval_stack_type.
6745 This function was nearly duplicated in method-to-ir.c and mini.c. The difference
6746 is only ins->klass of byref types.
6748 2008-09-22 Zoltan Varga <vargaz@gmail.com>
6750 * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
6751 (mini_emit_memcpy2): Ditto.
6753 * mini-amd64.c: Fix a warning.
6755 2008-09-21 Mark Probst <mark.probst@gmail.com>
6757 * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
6760 2008-09-19 Rodrigo Kumpera <rkumpera@novell.com>
6762 * method-to-ir.c: Extract stloc micro-optimization to a
6763 function and apply it to all cases.
6765 2008-09-19 Mark Probst <mark.probst@gmail.com>
6767 * method-to-ir.c: Don't fail generic code sharing in cases we
6770 2008-09-18 Mark Probst <mark.probst@gmail.com>
6772 * mini-ppc.c: Handle structs in tailcalls on Darwin.
6774 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
6776 * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
6779 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
6781 * trace.c: make tracing more useful and correct, with per-thread
6784 2008-09-15 Mark Probst <mark.probst@gmail.com>
6786 * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
6787 doing a method call and the argument is an R4.
6789 2008-09-14 Zoltan Varga <vargaz@gmail.com>
6791 * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
6794 2008-09-13 Mark Probst <mark.probst@gmail.com>
6796 * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
6798 2008-09-12 Zoltan Varga <vargaz@gmail.com>
6800 * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
6801 (MONO_JUMP_TABLE_FROM_INS): Ditto.
6803 2008-09-11 Zoltan Varga <vargaz@gmail.com>
6805 * driver.c: Add a --agent argument (not supported yet) to load managed
6806 agent assemblies before loading the main assembly, similarly to how the
6807 Java VM handles agents.
6809 2008-09-11 Mark Probst <mark.probst@gmail.com>
6811 * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
6812 function to do stack layout of local variables.
6814 2008-09-11 Mark Probst <mark.probst@gmail.com>
6816 * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
6819 2008-09-11 Zoltan Varga <vargaz@gmail.com>
6821 * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
6822 abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
6823 JIT if DISABLE_JIT is defined.
6825 * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
6828 2008-09-10 Mark Probst <mark.probst@gmail.com>
6830 * iltests.il.in: Disable the fconv test on PPC (the result is
6831 undefined according to ECMA).
6833 2008-09-10 Mark Probst <mark.probst@gmail.com>
6835 * iltests.il.in: Enable tail call tests for PPC.
6837 * mini.h: Add variable for storing incoming valuetype argument
6838 addresses for tail calls.
6840 * mini-ppc.c: Implement valuetype arguments and return values for
6843 2008-09-09 Mark Probst <mark.probst@gmail.com>
6845 * mini-ppc.c: Partially implement tail calls (struct arguments and
6846 return values not supported).
6848 * method-to-ir.c: Enable tail calls on PPC.
6850 2008-09-08 Zoltan Varga <vargaz@gmail.com>
6852 * aot-compiler.c (emit_wrapper_info): Omit the klass name from
6853 runtime-invoke wrappers to work around the problem of them getting
6854 assigned to a random class.
6856 * aot-runtime.c (mono_aot_get_method): Ditto.
6858 2008-09-07 Zoltan Varga <vargaz@gmail.com>
6860 * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
6861 the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
6863 2008-09-07 Mark Probst <mark.probst@gmail.com>
6865 * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
6866 until they're implemented properly.
6868 * exceptions-ppc.c: Use arch-independent exception-handling code
6869 instead of custom one.
6871 * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
6874 * tramp-ppc.c, mini-ppc.c: Fixed warnings.
6876 * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
6877 applies when __powerpc__ is defined.
6879 2008-09-06 Zoltan Varga <vargaz@gmail.com>
6881 * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
6882 methods to their code to avoid computing the full name of wrappers and
6883 doing a lookup in a string hash table.
6885 2008-09-05 Zoltan Varga <vargaz@gmail.com>
6887 * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
6888 we identify bblocks before method_to_ir () is ran.
6890 * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
6891 Also avoid optimizing branches pointing to themselves.
6893 * mini.c (mini_method_compile): Ditto. Fixes #422947.
6895 2008-09-05 Rodrigo Kumpera <rkumpera@novell.com>
6897 * driver.c (mono_main): Enable the new verifier under core-clr and cas.
6899 2008-09-05 Zoltan Varga <vargaz@gmail.com>
6901 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
6902 (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
6903 (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
6906 * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all
6907 jumped to the same entry in plt_jump_table.
6909 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
6911 * method-to-ir.c (initialize_array_data): Handle field with RVA from
6914 2008-08-31 Zoltan Varga <vargaz@gmail.com>
6916 * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
6917 other assignment can be if converted. Saves 1.5% on corlib size and fixes
6920 2008-08-29 Geoff Norton <gnorton@novell.com>
6922 * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
6923 segment, and doesn't properly handle .space as .text. Fixes
6926 2008-08-29 Geoff Norton <gnorton@novell.com>
6928 * mini.c: Disable the mach exception handler when running on
6931 2008-08-29 Geoff Norton <gnorton@novell.com>
6933 * aot-compiler.c: Patch from Renaldas Zioma to properly register
6934 globals on Darwin/ARM
6936 2008-08-28 Zoltan Varga <vargaz@gmail.com>
6938 * mini.c: Avoid not initializing the runtime when doing AOT compilation,
6939 since too many things depend on it. Instead, call
6940 mono_runtime_set_no_exec ().
6942 * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
6945 * aot-compiler.c: Add an 'asm-only' AOT option.
6947 * mini.c: Avoid initializing the runtime when doing AOT compilation.
6949 * aot-compiler.c (compile_method): Disable gshared support for now as it
6952 2008-08-27 Bill Holmes <billholmes54@gmail.com>
6954 * mini-amd64.h : Fix a compiler warning.
6956 * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
6957 Changed to use a callback function to retrieve the unwind info.
6958 This avoids problems observed when code blocks were removed by
6959 unloading an app domain.
6961 * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole
6962 and branch excludes for Winx64. The fix in exceptions-amd64.c allows them
6965 Contributed under MIT/X11 license.
6967 2008-08-27 Bill Holmes <billholmes54@gmail.com>
6969 * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
6970 case to keep the stack aligned to 8.
6972 Contributed under MIT/X11 license.
6974 2008-08-26 Zoltan Varga <vargaz@gmail.com>
6976 * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
6977 avoid repeated linear searches.
6979 2008-08-25 Zoltan Varga <vargaz@gmail.com>
6981 * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
6982 methods it can't handle.
6984 * aot-compiler.c (add_method): Avoid adding a method twice.
6985 (add_wrappers): Add runtime invoke wrappers for all methods.
6987 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
6988 function to create an aot-compatible version of this trampoline.
6990 * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
6992 2008-08-24 Zoltan Varga <vargaz@gmail.com>
6994 * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
6996 * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
6997 with a generic sharing failure.
6999 * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
7001 * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
7002 CEE_RETHROW. Fixes #419634.
7004 * mini.c (mono_method_to_ir): Ditto.
7006 * exceptions.cs: Add a new test.
7008 * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
7009 to mono_type_stack_size_internal () since some callers might not pass in
7012 * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
7013 instrument_prolog. Fixes #419878.
7015 * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
7016 doubles in soft float mode volatile.
7018 2008-08-23 Zoltan Varga <vargaz@gmail.com>
7020 * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
7022 * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
7023 to handle soft float correctly.
7025 * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
7028 * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
7030 * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
7031 to sp, since the generics catch code requires it.
7033 * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
7036 * method-to-ir.c (emit_imt_argument): Pass imt_arg to
7037 mono_arch_emit_imt_argument ().
7039 * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
7041 * mini-arm.c tramp-arm.c: Generic sharing updates.
7043 2008-08-22 Zoltan Varga <vargaz@gmail.com>
7045 * mini-arm.c: Fix the arm build.
7047 * generic-sharing.c (mini_type_get_underlying_type): New helper function
7048 handling enums, generic instances and generic sharing.
7049 (mini_type_stack_size_full): Ditto.
7051 * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
7053 * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
7055 * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
7057 * tramp-arm.c: Implement the rgctx fetch and the generic class init
7060 * mini-arm.c: Various small generic sharing changes.
7062 * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
7064 (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
7067 * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
7068 helper function to return a generic class init trampoline.
7070 * method-to-ir.c mini.c: Use it.
7072 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
7073 arch-specfic function to return a generic class init trampoline.
7075 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
7076 the GENERIC_CLASS_INIT custom code.
7078 * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
7079 a fatal error, not a sharing failure.
7081 * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
7084 * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
7085 trampoline argument from MONO_ARCH_VTABLE_REG.
7087 * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
7088 order of the arguments to the C trampoline: pass 'slot' as the trampoline
7089 argument, and pass the vtable in VTABLE_REG.
7091 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
7092 order of the arguments to the C trampoline: pass 'slot' as the trampoline
7093 argument, and pass the vtable in VTABLE_REG.
7094 (mono_arch_create_trampoline_code_full): Remove some special casing for
7095 the rgctx fetch trampoline.
7097 * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
7100 * iltests.il: Add a test for it.
7102 2008-08-21 Zoltan Varga <vargaz@gmail.com>
7104 * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
7106 * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
7109 * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
7110 use mono_jit_info_table_find () to avoid recursion.
7111 (mono_delegate_trampoline): Add a sync wrapper here.
7113 * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
7116 * mini.c (mono_method_to_ir): Ditto.
7118 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
7119 add_sync_wrapper argument. Don't add a sync wrapper here.
7120 (mono_create_jump_trampoline): Don't add a sync wrapper here.
7122 * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
7124 2008-08-20 Bill Holmes <billholmes54@gmail.com>
7126 * exceptions-amd64.c (seh_handler): For Winx64 adding missing copy
7127 of nonvolatile registers back from MonoContext to CONTEXT.
7129 Contributed under MIT/X11 license.
7131 2008-08-20 Bill Holmes <billholmes54@gmail.com>
7133 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): When shifting the
7134 arguments on Winx64 there are only 4 argument registers. For this
7135 logic to work the last argument must be pulled from the stack.
7137 Contributed under MIT/X11 license.
7139 2008-08-20 Zoltan Varga <vargaz@gmail.com>
7141 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7143 * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
7144 MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
7145 encode/decode_method_ref ().
7147 * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
7149 * aot-runtime.c (decode_patch): Ditto.
7151 * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
7152 MONO_PATCH_INFO_METHOD.
7154 * aot-runtime.c (decode_exception_debug_info): Decode the contents of
7157 * aot-compiler.c (emit_exception_debug_info): Emit the contents of
7160 * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
7162 * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
7163 one from the caller.
7165 * aot-runtime.c (decode_generic_inst): New function to decode and
7166 return a interned generic inst.
7167 (decode_klass_ref): Use it.
7168 (decode_method_ref): Ditto.
7170 * aot-compiler.c (emit_exception_debug_info): Save
7171 jinfo->has_generic_jit_info too.
7173 2008-08-19 Zoltan Varga <vargaz@gmail.com>
7175 * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
7177 * iltests.il.in: Add a test for fconv_to_i.
7179 * liveness.c: Disable the liveness2 pass for now to save space.
7181 * regalloc2.c: Include mempool-internals.h to fix warnings.
7183 * aot-compiler.c (encode_method_ref): Encode the context of generic
7186 * aot-runtime.c (decode_method_ref): Inflate generic methods using
7187 the context saved in the aot file.
7189 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7191 * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
7193 * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
7194 volatile so they won't be optimized away.
7196 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
7202 * dominators.c: Remove duplicated functions that now are in
7203 mempool-internals.h.
7205 2008-08-19 Zoltan Varga <vargaz@gmail.com>
7207 * aot-compiler.c: Fix warnings.
7209 * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
7211 * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
7213 * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
7216 * mini.c (mono_resolve_patch_target): Ditto.
7218 * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
7219 (encode_klass_ref): Add support for encoding VARs/MVARs.
7221 * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
7223 * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
7224 the handling of the got entries into a separate 'decode_got_entry' function.
7225 Add support for RGCTX_FETCH.
7227 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
7228 clobbered by the trampoline code.
7230 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
7231 not clobbered by the indirect calling code.
7233 2008-08-18 Zoltan Varga <vargaz@gmail.com>
7235 * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
7238 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
7240 * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
7241 signature using the compilation mempool otherwise we would leak it.
7243 2008-08-18 Zoltan Varga <vargaz@gmail.com>
7245 * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
7246 mono_emit_abs_call ().
7248 * patch-info.h: Add GENERIC_CLASS_INIT.
7250 * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
7252 * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
7253 as their target as a near call.
7255 * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
7257 (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
7259 * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
7260 call to a runtime function described by a patch.
7262 * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
7263 mono_emit_abs_call, this has the advantage that the ABS handling code in
7264 mono_codegen () can handle them both, and can handle other stuff in the
7265 future without additional code.
7267 * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
7269 (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
7272 * mini.h: Add missing bblock related prototypes.
7274 * mini.h (MonoCompile): Remove unused reverse_inst_list and
7275 reverse_inst_list_len fields.
7277 * mini.c: Refactor this file a bit by moving branch optimizations to
7280 * method-to-ir.c: Merge generic sharing changes missed earlier.
7282 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
7284 * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
7285 shared patches. Process METHODCONST as a shared patch.
7287 * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
7288 as it crashes on the 2.0 mscorlib.
7290 * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
7293 * aot-compiler.c: Use is_plt_patch () in a few additional places.
7294 (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
7297 * aot-compiler.c: Reorganize the got handling code to be a bit more
7300 2008-08-17 Zoltan Varga <vargaz@gmail.com>
7302 * aot-compiler.c: Make the patch_to_plt_offset hash table use
7303 mono_patch_info_equals/hash, and use it to massively simplify
7306 * mini.c (mono_patch_info_hash): Simplify this and add support for
7309 * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
7311 * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
7312 handling code, since an offset is not enough to identify a trampoline.
7314 * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
7316 2008-08-17 Mark Probst <mark.probst@gmail.com>
7318 * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
7320 * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
7322 * mini-ops.h: Argument and result types for OVF_CARRY ops.
7324 * decompose.c: PPC decompositions for various ops.
7326 * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
7328 2008-08-17 Zoltan Varga <vargaz@gmail.com>
7330 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
7331 call the generic trampoline code using a call, instead of a jump, to
7332 remove some special casing from the generic trampoline code.
7334 * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
7335 (mono_codegen): Ditto.
7337 * aot-compiler.c aot-runtime.c: Ditto.
7339 * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
7341 * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
7342 helper function to find the offset corresponding to a lazy fetch trampoline.
7344 * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
7345 when doing generic sharing.
7347 * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
7350 * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
7351 mini-trampolines.c to be with the other trampoline creation functions.
7353 * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
7354 as it is equal to method->signature in most cases, add a
7355 mono_emit_method_call_full variant which takes a signature and an imt
7358 2008-08-16 Zoltan Varga <vargaz@gmail.com>
7360 * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
7361 to this function, since it could be computed easily from the method
7363 (mono_helper_compile_generic_method_wo_context): Removed, not needed any
7366 * method-to-ir.c mini.c: Remove references to
7367 compile_generic_method_wo_context.
7369 * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
7370 generic method calls.
7372 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
7373 dimensional non-szarrays.
7375 * mini.c (mini_init): Register mono_array_new_1.
7377 * jit-icalls.c (mono_array_new_1): New jit icall.
7379 * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
7380 pointing to the method.
7382 * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
7383 method addresses belonging to METHOD_JUMP patches in the
7384 jump_target_got_slot_hash.
7385 (mono_aot_load_method): Ditto.
7387 * aot-compiler.c (compile_method): Allow AOT compilation of methods with
7388 METHOD_JUMP patches.
7390 * mini.c (mini_create_jit_domain_info): New helper function which
7391 initializes/frees domain->runtime_info.
7392 (mini_free_jit_domain_info): Ditto.
7393 (mini_init): Install the domain hook functions with the runtime.
7395 * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
7396 information maintained by the JIT.
7398 * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
7399 insertion into jump_table_hash into mono_codegen (), also implement proper
7402 * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
7403 tail calls, it is already done by the aot code.
7405 * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
7408 * iltests.il.in: Make the jmp test a bit more complex.
7410 * aot-compiler.c (encode_method_ref): Handle references to normal methods of
7411 generic instances which doesn't have a token.
7413 * aot-runtime.c (decode_method_ref): Ditto.
7415 * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
7416 can handle this case now.
7417 (handle_box): Ditto.
7419 2008-08-15 Geoff Norton <gnorton@novell.com>
7421 * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
7424 2008-08-15 Zoltan Varga <vargaz@gmail.com>
7426 * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
7427 calling generic methods.
7429 * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
7431 * aot-runtime.c (decode_patch_info): Ditto.
7433 * mini.c (mono_resolve_patch_target): Ditto.
7435 * patch-info.h: Add METHOD_RGCTX.
7437 * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
7439 2008-08-14 Zoltan Varga <vargaz@gmail.com>
7441 * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
7442 arguments in registers.
7444 * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
7445 OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
7447 * mini.c (mini_method_compile): Abort aot compilation for generic
7448 methods if generic sharing is disabled.
7450 * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
7453 * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls
7454 requiring an mrgctx.
7456 * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
7457 store instructions when converting a vcall to a normal call.
7459 * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
7460 mono_arch_find_jit_info.
7462 2008-08-13 Zoltan Varga <vargaz@gmail.com>
7464 * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
7465 avoid calling mono_method_full_name () for every method even if the
7467 (check_inline_caller_method_name_limit): Ditto.
7469 2008-08-12 Zoltan Varga <vargaz@gmail.com>
7471 * driver.c (main_thread_handler): Allow AOT compilation of multiple
7472 assemblies in one run.
7474 * aot-compiler.c (mono_compile_assembly): Only print out a count of
7475 skipped methods if it is not 0.
7477 * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
7479 2008-08-12 Bill Holmes <billholmes54@gmail.com>
7481 * mini.c (mono_codegen): Changing a preprocessor check from WIN64 to
7482 MONO_ARCH_HAVE_UNWIND_TABLE.
7484 Contributed under MIT/X11 license.
7486 2008-08-12 Bill Holmes <billholmes54@gmail.com>
7488 * mini-amd64.c (mono_arch_cpu_optimizazions): Remove peephole and branch
7489 from default optimizaton list on Winx64.
7491 * mini-amd64.c (emit_tls_get): Added Winx64 specific implementation for GetTLS.
7493 * mini-amd64.c (mono_arch_emit_prolog): Adding an offset on Winx64 to get
7494 the LMF from the MonoJitTlsData structure.
7496 * mini-amd64.c (mono_arch_setup_jit_tls_data): Added Winx64 implementation.
7498 Contributed under MIT/X11 license.
7500 2008-08-12 Zoltan Varga <vargaz@gmail.com>
7502 * mini.c (sigsegv_signal_handler): Fix the build.
7504 * mini-amd64.c (emit_call_body): Use image->aot_module instead of
7505 assembly->aot_module.
7507 * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
7508 hash table. This simplifies and speeds up a lot of code, and fixes support
7511 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
7514 * mini-exceptions.c: Ditto.
7516 * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
7517 'native_offset' argument, since these are computed in the
7518 mono_find_jit_info () function.
7520 * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
7521 is used by exceptions-ppc.c.
7523 * exceptions-ppc.c: Call mono_find_jit_info () instead of
7524 mono_arch_find_jit_info ().
7526 * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
7527 mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
7528 generic code in mini-exceptions.c.
7530 2008-08-11 Zoltan Varga <vargaz@gmail.com>
7532 * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
7534 * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
7536 * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
7537 the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
7538 called while holding the loader lock. Fixes #415608.
7539 (mono_aot_get_method_from_token_inner): Ditto.
7541 2008-08-09 Zoltan Varga <vargaz@gmail.com>
7543 * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
7544 to reduce differences between this and the generic implementation in
7546 (ves_icall_get_frame_info): Ditto.
7548 * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
7550 * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
7553 * exceptions-ppc.c (arch_get_call_filter): Rename this to
7554 mono_arch_get_call_filter () and make it non-static, for consistency with the
7555 other architectures.
7557 2008-08-09 Rodrigo Kumpera <rkumpera@novell.com>
7560 * local-propagation.c:
7561 * mini-x86.c: Correct the name of arch defines.
7563 2008-08-09 Zoltan Varga <vargaz@gmail.com>
7565 * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
7566 NO_EMULATE_LONG_SHIFT_OPS define.
7568 2008-08-08 Zoltan Varga <vargaz@gmail.com>
7570 * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
7571 now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
7573 * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
7574 MACH fixes. Merged from the 2.0 branch.
7576 * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
7578 * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
7579 (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
7581 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
7583 * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
7584 mono_marshal_get_native_wrapper () signature changes.
7586 2008-08-07 Rodrigo Kumpera <rkumpera@novell.com>
7588 * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
7589 conversion bug under arm.
7591 2008-08-06 Rodrigo Kumpera <rkumpera@novell.com>
7593 * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
7595 * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
7596 with overflow checking.
7598 2008-08-05 Marek Habersack <mhabersack@novell.com>
7600 * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
7601 to the genmdesc.pl file
7603 2008-08-05 Zoltan Varga <vargaz@gmail.com>
7605 * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
7606 arg_array in the soft-float versions of the LOAD/STORE macros.
7608 * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
7611 * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
7613 2008-08-02 Zoltan Varga <vargaz@gmail.com>
7615 * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
7616 a float HFA. Fixes #413621.
7618 2008-08-02 Gert Driesen <drieseng@users.sourceforge.net>
7620 * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
7621 frame_size to args_size. Fixes build.
7623 2008-08-02 Zoltan Varga <vargaz@gmail.com>
7625 * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
7626 and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
7628 * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
7629 the stack are not unaligned. Fixes #413247.
7631 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
7633 * mini.c: update jitted methods performance counters.
7635 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
7637 * mini-exceptions.c: increase the exceptions thrown performance
7638 counter in mono_handle_exception ().
7640 2008-07-29 Zoltan Varga <vargaz@gmail.com>
7642 * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
7643 can work with netmodules.
7645 2008-07-28 Geoff Norton <gnorton@novell.com>
7647 * mini-x86.h: Correct the frame alignment on OSX. Fixes the jit
7650 2008-07-28 Zoltan Varga <vargaz@gmail.com>
7652 * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
7655 2008-07-28 Bill Holmes <billholmes54@gmail.com>
7657 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
7658 The float param registers and other param registers must be the
7659 same index on Windows x64.
7661 * mini-amd64.c (mono_arch_allocate_vars) : Implementing the
7662 ArgValuetypeAddrInIReg argument case. Setting the argument
7663 op to OP_VTARG_ADDR (OP_REGOFFSET)).
7665 * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix. Use the size
7666 variable computed above as the copy length for arguments of storage
7667 type ArgValuetypeAddrInIReg.
7669 * mini-amd64.c (mono_arch_emit_call) : Implementing the
7670 ArgValuetypeAddrInIReg argument case. This case will rely on
7671 mono_arch_emit_outarg_vt to emit the correct code later in the process.
7673 * mini-amd64.c (mono_arch_emit_call) : On Winx64 there always needs to be
7674 a 32 byte stack allocation for all calls. We will omit the adjustment for
7675 jump and tail call instructoins as they do not follow the typical call behavior.
7677 * mini-amd64.c (mono_arch_emit_outarg_vt) : Implementing the case for
7678 ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
7679 local variable and pass the local variable by reference to the called method.
7681 * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
7682 Implementing the ArgValuetypeAddrInIReg argument case. When the address
7683 of a struct is passed in a register it must be saved with the other
7684 volatile argument on the stack.
7686 * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix. When omitting the
7687 frame pointer the stack adjustment value must be saved to the unwind
7690 Contributed under MIT/X11 license.
7692 2008-07-28 Zoltan Varga <vargaz@gmail.com>
7694 * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
7695 which got lost in the merge.
7697 2008-07-27 Zoltan Varga <vargaz@gmail.com>
7699 * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
7702 * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
7704 * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
7705 icalls, since they won't be patched.
7707 * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
7708 different code sequence when running under valgrind to prevent some valgrind
7711 * iltests.il.in: Add new regression test.
7713 * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
7716 * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
7717 accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
7719 * iltests.il.in: Add new test.
7721 * aot-compiler.c: Fix some warnings.
7723 * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
7726 2008-07-27 Zoltan Varga <vargaz@gmail.com>
7728 * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
7729 (mini_usage_jitdeveloper): Add a missing --wapi option.
7731 2008-07-25 Zoltan Varga <vargaz@gmail.com>
7733 * mini-codegen.c: Simplify the is_fp macros.
7734 (free_up_ireg): Remove, use free_up_reg instead.
7735 (free_up_reg): Fix the fp case.
7737 2008-07-26 Zoltan Varga <vargaz@gmail.com>
7739 * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
7742 * exceptions-x86.c: Merge some changes which seemed to have got lost
7743 in the linear-ir merge.
7745 * liveness.c: Disable the liveness2 pass on 32 bit platforms.
7747 * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
7748 long vreg volatile even if the variable was already created.
7750 * liveness.c (update_liveness2): Avoid eliminating dead definitions of
7753 2008-07-26 Zoltan Varga <vargaz@gmail.com>
7755 * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
7757 * mini.c (mono_jit_compile_method_inner): Add support for
7758 MONO_EXCEPTION_BAD_IMAGE.
7760 * method-to-ir.c (mono_method_to_ir2): Avoid a crash if
7761 mini_method_get_context () returns NULL. Fixes #356531.
7763 * mini.c (mono_method_to_ir): Ditto.
7765 * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
7766 accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
7768 2008-07-25 Zoltan Varga <vargaz@gmail.com>
7770 * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
7771 in the LDFTN implementation.
7773 2008-07-25 Mark Probst <mark.probst@gmail.com>
7775 * mini-trampolines.c (mono_magic_trampoline): When sharing generic
7776 code, patch calls to icalls, too, even if they're not in the
7777 shared generic code hash. Fixes #411962.
7779 2008-07-25 Zoltan Varga <vargaz@gmail.com>
7781 * cpu-x86.md: Increase the length of the fcall opcodes.
7783 * mini-x86.c (emit_move_return_value): Avoid some precision issues for
7784 calls returning floats.
7786 * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
7789 * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
7792 * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
7793 into the domain->method_code_hash.
7795 * aot-compiler.c: Fix win32 build.
7797 * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
7799 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
7800 gshared NEWARR implementation.
7802 * cpu-sparc.md: Remove duplicate localloc_imm opcode.
7804 * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
7805 can be used outside of method_to_ir.
7807 * mini.h (MonoCompile): Add arg_types field.
7809 * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
7811 * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
7812 the values of the local arg_array and param_types array.
7814 2008-07-24 Zoltan Varga <vargaz@gmail.com>
7816 * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
7817 got accesses might only get generated later when NEWOBJ is decomposed.
7819 * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
7820 looking up the native code of the target method when a delegate is called
7823 * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
7826 * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
7828 * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
7829 AOT work on platforms without a working dlsym implementation.
7831 * mini.h: Bump AOT image format version.
7833 2008-07-24 Mark Probst <mark.probst@gmail.com>
7835 * mini-exceptions.c: Free a MonoType with
7836 mono_metadata_free_type() instead of g_free().
7838 * aot-runtime.c: Free a MonoType.
7840 2008-07-24 Zoltan Varga <vargaz@gmail.com>
7842 * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
7845 * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
7848 2008-07-23 Massimiliano Mantione <massi@ximian.com>
7849 * mini.c (sigprof_signal_handler): call the new "runtime initialized"
7852 2008-07-23 Zoltan Varga <vargaz@gmail.com>
7854 * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
7855 NEWOBJ calls on valuetypes.
7857 * iltests.il.in: Add new test.
7859 * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
7861 2008-07-22 Zoltan Varga <vargaz@gmail.com>
7863 * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
7864 is no longer needed.
7866 * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
7867 non register sized integer arguments.
7868 (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
7869 (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to
7872 * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
7875 * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
7876 two a binop with different sized arguments is emitted.
7878 * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
7879 instruction in the ins==NULL case.
7881 2008-07-23 Zoltan Varga <vargaz@gmail.com>
7883 * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
7885 * mini-x86.c: Fix osx build.
7887 * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
7890 * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
7891 instruction for non int sized variables.
7893 * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
7896 2008-07-23 Robert Jordan <robertj@gmx.net>
7898 * method-to-ir.c: Fix MSVC build.
7900 2008-07-22 Zoltan Varga <vargaz@gmail.com>
7902 * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
7903 a non int sized type, widen it to an int since newer versions of gcc seem to
7904 generate code which needs this.
7906 * ssa2.c abcremoval2.c: Fix warnings.
7908 * *: Merge the Linear IR branch.
7910 The original branch is at trunk/branches/vargaz/mini-linear-il, and
7911 the ChangeLog file there describes all the changes done over the years.
7912 Further documentation can be found at www.mono-project.com/Linear_IL.
7914 2008-07-21 Bill Holmes <billholmes54@gmail.com>
7916 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
7917 The float param registers and other param registers must be the
7918 same index on Windows x64.
7920 Contributed under MIT/X11 license.
7922 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
7924 * mini.c: Make the previous fix GC safe.
7926 2008-07-21 Raja R Harinath <harinath@hurrynot.org>
7928 * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
7930 2008-07-21 Bill Holmes <billholmes54@gmail.com>
7932 * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
7933 on Winx64. This type will not be passed on the stack (ArgOnStack), but
7934 ArgValuetypeAddrInIReg instead.
7936 Contributed under MIT/X11 license.
7938 2008-07-21 Zoltan Varga <vargaz@gmail.com>
7940 * mini-codegen.c (get_register_spilling): Fix a warning.
7942 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
7944 * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
7945 for types which the initialization fails. Raises the provided exception
7946 at the right stop after cleanup.
7948 2008-07-16 Zoltan Varga <vargaz@gmail.com>
7950 * aot-compiler.c: Free most of the memory allocated during compilation.
7952 * mini.c (mini_parse_debug_options): Fix a leak.
7954 * mini.c (mini_method_compile): Don't add the method to the jit info tables
7955 during aot compilation.
7957 2008-07-14 Zoltan Varga <vargaz@gmail.com>
7959 * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as
7960 it has too much register pressure.
7962 2008-07-13 Zoltan Varga <vargaz@gmail.com>
7964 * inssel.brg (CEE_CASTCLASS): Remove some dead code.
7966 2008-07-12 Zoltan Varga <vargaz@gmail.com>
7968 * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
7971 * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
7972 on amd64 similar to the way it is done on arm.
7974 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
7976 * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for
7977 consistency, normalize error messages, avoid loading aot-only modules in
7980 * driver.c (mono_main): Rename --aot-only command line option to --full-aot
7983 * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
7985 2008-07-11 Martin Baulig <martin@ximian.com>
7988 (MonoDebuggerInfo): Add `interruption_request'.
7990 2008-07-12 Zoltan Varga <vargaz@gmail.com>
7992 * aot-compiler.c (emit_plt): Remove some dead code.
7994 * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
7996 * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
7997 return the plt info offset belonging to a given plt entry.
7999 * mini-trampolines.c (mono_aot_plt_trampoline): Use
8000 mono_aot_get_plt_info_offset.
8002 * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
8003 similar to the amd64 code by makeing jumps through a separate jump table
8004 instead of embedding the jump addresses into the code.
8006 2008-07-11 Zoltan Varga <vargaz@gmail.com>
8008 * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
8011 2008-07-10 Martin Baulig <martin@ximian.com>
8013 * mini.c (mini_method_compile): Disable generics sharing when
8014 running in the debugger.
8016 2008-07-10 Zoltan Varga <vargaz@gmail.com>
8018 * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
8020 * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
8021 the local register allocator from running out of registers on x86 when
8024 2008-07-10 Bill Holmes <billholmes54@gmail.com>
8026 * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when
8027 expressing IntMin for the VS Compiler. See Compiler Warning (level 2)
8030 Contributed under MIT/X11 license.
8032 2008-07-10 Zoltan Varga <vargaz@gmail.com>
8034 * aot-compiler.c: Get rid of whitespace in the generated assembly file to
8035 speed up the assembler.
8037 2008-07-09 Zoltan Varga <vargaz@gmail.com>
8039 * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
8042 * mini.c: Move the soft float handling macros a bit earlier, add
8043 NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
8046 * mini.h: Add prototype for mono_arch_fixup_jinfo.
8048 * mini.c (mini_init): In aot-only mode, set the root domain code manager to
8049 read-only to help catch code allocation requests.
8051 * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
8052 and turn it off when using --aot-only or when compiling with --aot=full.
8054 * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
8055 jump table for switches from the normal domain mempool, not the code
8058 * mini-trampolines.c (get_unbox_trampoline): New function to return an
8059 unbox trampoline which handles aot-only mode too.
8061 * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
8062 an AOTed unbox trampoline.
8064 * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
8066 2008-07-09 Bill Holmes <billholmes54@gmail.com>
8068 * wapihandles.c: Fixing MSVC builds. Include statement changed from <> to
8071 Contributed under MIT/X11 license.
8073 2008-07-09 Bill Holmes <billholmes54@gmail.com>
8075 * mini.c (mono_codegen): Allocate space at the end of the code block and store
8076 the unwind information for the method at the end of the allocated block.
8078 * mini-amd64.h: Added declarations for the unwind routines and adding field to
8079 MonoCompileArch to hold the unwind info for SEH on Winx64
8081 * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
8082 frame pointer info for the method being compiled.
8084 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
8085 the call to mono_exception_from_token.
8087 * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations. This code is responsible
8088 storing the method prolog information in a format that the Winx64 SEH can understand. This
8089 information is stored a the end of the method block because it is all 32-bit offset based.
8091 Contributed under MIT/X11 license.
8093 2008-07-09 Zoltan Varga <vargaz@gmail.com>
8095 * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
8097 * wapihandles.c: Fix warnings.
8099 * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
8102 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling
8103 mono_jit_compile_method in aot-only mode since that calls the type
8106 * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
8107 get_delegate_invoke_impl in aot-only mode.
8109 * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
8111 2008-07-08 Zoltan Varga <vargaz@gmail.com>
8113 * trace.c (mono_trace_enter_method): Fix printing of Type instances.
8115 * aot-compiler.c (compile_method): Disable the check for GSHARED since it
8118 * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
8120 * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
8121 init trampoline from the AOT file as well.
8123 * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
8124 mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
8127 * mini.c (mini_init): Move the call to mono_exceptions_init () after
8130 * exceptions-amd64.c: Add _full variants for the remaining exception code
8131 creation functions as well, allow emission of relocatable code, remove
8132 caching since that is now done by the caller.
8134 * mini-exceptions.c: Add _full variants for the remaining exception code
8135 creation functions as well, add aot-only support.
8137 * aot-compiler.c (compile_method): Allow calls to methods of constructed types
8138 if we can determine a proper token for them.
8139 (add_wrappers): Add a few more wrappers.
8140 (emit_method_code): Remove some dead code.
8141 (emit_trampolines): Emit exception code too.
8143 * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
8145 * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
8146 mono_array_new_va which avoids varargs.
8148 * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
8150 * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
8151 mono_arch_create_specific_trampoline () in all places.
8153 * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
8154 a bit so it can be used for other things as well.
8156 * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
8159 * exceptions-amd64.c: Rename the caching from the exception code creation
8160 functions, it is done by the caller instead.
8162 * exceptions-amd64.c: Change the signature of the exception code creation
8163 functions to allow the creation of relocatable code later.
8165 * mini-exceptions.c: Add a set of functions to query the various
8166 runtime-generated exception functions.
8168 * mini.c mini-exceptions.c: Use the newly added functions instead of the
8169 mono_arch_.. () functions.
8171 2008-07-07 Zoltan Varga <vargaz@gmail.com>
8173 * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
8175 * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
8177 * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
8178 (mini_get_vtable_trampoline): Ditto.
8180 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
8181 code in the AOT case by returning the code size and a list of relocations to
8184 * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
8186 2008-07-07 Bill Holmes <billholmes54@gmail.com>
8188 * mini-amd64.c: On Winx64 the calling convention always requires the caller to
8191 Contributed under MIT/X11 license.
8193 2008-07-07 Zoltan Varga <vargaz@gmail.com>
8195 * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
8196 so the buffer size can be computed correctly. Fixes #404735.
8198 * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
8199 normally as cfg->debug_info is already freed.
8201 2008-07-06 Zoltan Varga <vargaz@gmail.com>
8203 * mini-amd64.c: For calls returning vtypes in registers, don't store
8204 the return address on the stack, instead allocate a separate local for
8207 2008-07-05 Mark Probst <mark.probst@gmail.com>
8209 * mini-trampolines.c, mini.h: Add an argument to
8210 mono_create_jit_trampoline_in_domain() for turning off the adding
8211 of the sync wrapper.
8213 * mini.c: Use the JIT trampoline without sync instead of
8214 ldftn_nosync in static RGCTX invoke wrappers so that the call can
8217 2008-07-04 Mark Probst <mark.probst@gmail.com>
8219 * driver.c: Turn on GSHARED optimization by default.
8221 2008-07-04 Zoltan Varga <vargaz@gmail.com>
8223 * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
8224 to MONO_TRAMPOLINE_JIT since it better reflects what it does.
8226 * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
8227 create a variant of the generic trampoline code callable from AOTed trampolines.
8229 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
8230 trampoline code callable from AOTed trampolines.
8232 * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
8234 2008-07-04 Mark Probst <mark.probst@gmail.com>
8236 * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
8237 pass-through manner.
8239 * mini.c: Generic method sharing. Pass MRGCTX to generic methods
8240 and don't fail sharing for them anymore.
8242 * mini-exceptions.c: Handle exceptions in shared generic methods.
8244 * generic-sharing.c: When checking the context of a generic
8245 method, also check its class's context. Don't treat wrappers as
8248 * mini-trampolines.c: Some code factored out to
8249 metadata/generic-sharing.c. Handle the MRGCTX case.
8251 * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
8252 we must deal with the method being of another instantiation of the
8253 class. Add static rgctx invoke wrappers to generic methods.
8255 2008-07-04 Mark Probst <mark.probst@gmail.com>
8257 * mini.c: Provide all jit infos of generic shared methods with a
8260 * mini-exceptions.c: Handle the new situation that a generic info
8261 might be available, but not info about the this/vtable/mrgctx
8264 2008-07-03 Mark Probst <mark.probst@gmail.com>
8266 * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
8269 2008-07-03 Zoltan Varga <vargaz@gmail.com>
8271 * dominators.c (check_dominance_frontier): Fix a warning.
8273 * mini.h: Add some missing prototypes.
8275 * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
8277 * driver.c (mono_jit_init_version): Correct the comments since the first
8278 argument should be the name of the root domain, not a filename.
8280 * aot-runtime.c (make_writable): Error out if this is called while running
8282 (load_aot_module): Ditto.
8284 * aot-compiler.c: Really fix the computation of method indexes.
8286 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous
8287 optimizations as this is no longer called frequently.
8289 * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
8290 method and the invoke impl code and pass it to the delegate trampoline instead of
8291 just the delegate class.
8293 2008-07-02 Zoltan Varga <vargaz@gmail.com>
8295 * aot-compiler.c: Fixup the computation of method indexes.
8296 (add_wrappers): Create the base methods of the runtime invoke wrappers using
8297 the method builder infrastructure.
8299 * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
8302 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
8303 mode, load the method right away instead of creating a trampoline.
8305 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
8307 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
8310 2008-07-01 Zoltan Varga <vargaz@gmail.com>
8312 * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
8313 (mono_aot_load_method): Use method_index instead of method->token.
8315 * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
8316 can handle icalls etc. properly.
8318 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8320 * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
8322 * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
8323 (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
8324 JIT_ICALL_ADDR patch type.
8326 * patch-info.h: Add JIT_ICALL_ADDR patch type.
8328 * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
8330 (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
8332 * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
8334 2008-06-30 Zoltan Varga <vargaz@gmail.com>
8336 * mini.c: Use domain->jit_code_hash_lock for controlling access to
8337 domain->jit_code_hash.
8339 2008-06-29 Zoltan Varga <vargaz@gmail.com>
8341 * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
8343 2008-06-27 Zoltan Varga <vargaz@gmail.com>
8345 * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
8346 get_this_arg_from_call, let it compute it when needed.
8348 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
8349 gsctx from code only when needed.
8351 * mini-trampolines.c (get_generic_context): Rename this to
8352 mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
8353 it can be called by the arch backends.
8355 * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
8357 2008-06-26 Zoltan Varga <vargaz@gmail.com>
8359 * driver.c (mono_main): Add experimental --aot-only command line option.
8361 * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
8364 2008-06-26 Kornel Pal <kornelpal@gmail.com>
8366 * driver.c (DllMain): Remove mono_module_handle.
8368 Contributed under MIT/X11 license.
8370 2008-06-25 Zoltan Varga <vargaz@gmail.com>
8372 * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
8373 for emitting methods which are not in the source assembly. Detect and report
8374 failure of assembling+linking.
8376 * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
8378 * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
8380 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
8382 * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
8384 2008-06-24 Zoltan Varga <vargaz@gmail.com>
8386 * mini.h: Remove some obsolete prototypes.
8388 * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
8390 2008-06-24 Mark Probst <mark.probst@gmail.com>
8392 * mini.c (get_object_generic_inst): Variable-sized arrays are not
8393 supported by Visual Studio, so use alloca().
8395 2008-06-23 Zoltan Varga <vargaz@gmail.com>
8397 * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
8400 2008-06-23 Mark Probst <mark.probst@gmail.com>
8402 * mini.c: Fail sharing of a generic method if it contains an open
8403 catch clause (because we don't pass MRGCTXs yet).
8405 2008-06-23 Mark Probst <mark.probst@gmail.com>
8407 * mini.c: When compiling a method with generic sharing, insert the
8408 method instantiated with an all-Object generic context into the
8409 jit info table, instead of the context of the first instantiation
8410 of the method we happen to compile.
8412 2008-06-18 Martin Baulig <martin@ximian.com>
8414 * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
8415 `major_version' and `minor_version'.
8417 2008-06-17 Mark Probst <mark.probst@gmail.com>
8419 * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
8420 mono_method_is_generic_sharable_impl() takes an additional
8421 argument specifying whether to treat type variables as reference
8424 2008-06-17 Mark Probst <mark.probst@gmail.com>
8426 * mini.h: Removed obsolete prototypes.
8428 2008-06-17 Mark Probst <mark.probst@gmail.com>
8430 * mini.c: Don't fail generic sharing for initobj and sizeof - we
8431 already handle them.
8433 2008-06-17 Mark Probst <mark.probst@gmail.com>
8435 * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
8436 tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
8437 tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
8438 tramp-x86.c: Added a MonoGenericContext* argument to
8439 mono_arch_get_unbox_trampoline() so that it can call other
8440 functions which require it.
8442 2008-06-17 Mark Probst <mark.probst@gmail.com>
8444 * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
8445 mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
8446 mono_arch_get_this_arg_from_call() takes a
8447 MonoGenericSharingContext* as well.
8449 2008-06-17 Mark Probst <mark.probst@gmail.com>
8451 * mini.c: Factor out code for emitting unbox into emit_unbox() and
8452 implement generic sharing of unbox.
8454 2008-06-17 Mark Probst <mark.probst@gmail.com>
8456 * mini.c: Don't compute the vtable to determine whether a field is
8457 special static, because it might not work for open types.
8459 2008-06-17 Mark Probst <mark.probst@gmail.com>
8461 * mini.c: Removed the unused token_type and token_source arguments
8462 from get_runtime_generic_context_ptr().
8464 2008-06-17 Marek Habersack <mhabersack@novell.com>
8466 * mini.c (ADD_BINOP): fix the build
8468 2008-06-16 Zoltan Varga <vargaz@gmail.com>
8470 * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
8473 2008-06-16 Mark Probst <mark.probst@gmail.com>
8475 * mini.h: Removed class relations enum that's not used anymore.
8477 2008-06-16 Mark Probst <mark.probst@gmail.com>
8479 * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
8481 * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
8482 the lazy fetch trampoline access code.
8484 2008-06-15 Zoltan Varga <vargaz@gmail.com>
8486 * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
8488 2008-06-14 Zoltan Varga <vargaz@gmail.com>
8490 * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
8492 * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
8494 * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
8496 2008-06-13 Zoltan Varga <vargaz@gmail.com>
8498 * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
8501 * mini-ops.h: Add MIN/MAX_UN opcodes.
8503 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
8506 * basic-math.cs: Add more min/max tests.
8508 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
8510 2008-06-13 Mark Probst <mark.probst@gmail.com>
8512 * mini.c: Small fix in the prologue of emit_castclass.
8514 2008-06-13 Zoltan Varga <vargaz@gmail.com>
8516 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
8518 * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
8519 do not work even for unsigned types. Fixes #400014.
8521 * basic-math.cs: Add regression tests for unsigned Min/Max.
8523 2008-06-13 Mark Probst <mark.probst@gmail.com>
8525 * mini.c: Added additional context_used argument to several
8526 functions, which will be needed for sharing generic methods. Use
8527 GET_RGCTX macro wherever appropriate. Declare only one
8528 context_used in mono_method_to_ir().
8530 2008-06-13 Mark Probst <mark.probst@gmail.com>
8532 * mini.c, generic-sharing.c: Removed generic class relations.
8534 * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
8535 functions due to MRGCTX changes.
8537 2008-06-13 Mark Probst <mark.probst@gmail.com>
8539 * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
8540 graph.c, local-propagation.c, aliasing.c: New opcodes for calls
8541 with calculated IMT.
8543 * mini.c: Generic sharing of calls via generic interfaces.
8545 * jit-icalls.c, jit-icalls.h: Helper function for compiling a
8546 generic method with non-constant MonoGenericContext*. Instead,
8547 the context is taken out of the method itself.
8549 2008-06-13 Mark Probst <mark.probst@gmail.com>
8551 * mini.c: Generic sharing of ldvirtftn.
8553 2008-06-13 Mark Probst <mark.probst@gmail.com>
8555 * mini.c: Generic sharing of ldftn.
8557 2008-06-13 Mark Probst <mark.probst@gmail.com>
8559 * mini.c: Do pass VTable/RGCTX argument to static generic methods.
8561 2008-06-13 Mark Probst <mark.probst@gmail.com>
8563 * mini.c: Generic sharing of the special case of ldtoken followed
8564 by a call to GetTypeFromHandle.
8566 2008-06-13 Mark Probst <mark.probst@gmail.com>
8568 * mini.c: Generic sharing of box for nullable types.
8570 2008-06-13 Zoltan Varga <vargaz@gmail.com>
8572 * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
8573 are passed on the stack. Fixes #324807.
8575 2008-06-12 Bill Holmes <billholmes54@gmail.com>
8577 * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
8578 for the ArgValuetypeAddrInIReg case.
8580 * mini-amd64.c:mono_arch_allocate_vars: Adding a case for
8581 ArgValuetypeAddrInIReg to avoid asserts. Code needs to be added here.
8583 * mini-amd64.c: mono_arch_call_opcode: Adding Winx64 code for an ArgInfo of
8584 type ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
8585 local variable and pass the local variable by reference to the called method.
8587 * mini-amd64.c: mono_arch_emit_prolog: Adjust the stack for calls to
8588 mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
8590 Contributed under MIT/X11 license.
8592 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
8594 * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
8596 * debug-mini.c (mono_debug_print_vars): Release memory after printing
8599 2008-06-10 Martin Baulig <martin@ximian.com>
8602 (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
8604 2008-06-09 Kornel Pal <kornelpal@gmail.com>
8606 * main.c: Add and set argv [argc] to NULL to match C specification that fixes
8607 possible error when no arguments are passed.
8609 Contributed under MIT/X11 license.
8611 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
8613 * mini-exceptions.c (ves_icall_get_trace): Skip source locations
8614 where the file name is NULL.
8616 2008-06-09 Zoltan Varga <vargaz@gmail.com>
8618 * mini.c: Fix s390 build.
8620 2008-06-08 Zoltan Varga <vargaz@gmail.com>
8622 * trace.c (mono_trace_parse_options): Fix warnings.
8624 * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
8626 2008-06-07 Zoltan Varga <vargaz@gmail.com>
8628 * mini.c (remove_block_if_useless): Avoid printing the method name.
8630 * mini.c: Remove needless setting of ins->cil_code which is now done by
8633 * mini-amd64.c: Add some code to avoid saving callee saved registers in the
8636 * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
8637 translated code after it has been patched.
8639 2008-06-06 Zoltan Varga <vargaz@gmail.com>
8641 * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
8642 avoid problems during code patching on SMP systems.
8643 (emit_call): Avoid adding a patch info which is already added by
8645 (mono_arch_emit_exceptions): Ditto.
8647 2008-06-05 Zoltan Varga <vargaz@gmail.com>
8649 * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
8650 MONO_TYPE_ISSTRUCT already checks for it.
8652 2008-06-05 Bill Holmes <billholmes54@gmail.com>
8654 * mini-amd64.c:merge_argument_class_from_type: When marshaling
8655 structs with floats on Winx64 the float registers are not used.
8656 The integer registers are always used..
8657 * mini-amd64.c:add_valuetype: When marshaling structs on Winx64
8658 only one register will be used and only if the size of the struct
8659 is 1,2,4, or 8 bytes.
8661 * tramp-amd64.c : Adjusting size used for mono_global_codeman_reserve
8664 Contributed under MIT/X11 license.
8666 2008-06-05 Martin Baulig <martin@ximian.com>
8668 * debug-debugger.c (debugger_lookup_class): Also call
8669 mono_class_setup_methods() here; we're only called from RTI.
8671 2008-06-05 Andreas Farber <andreas.faerber@web.de>
8673 * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
8674 (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
8675 * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
8676 Post-process object files and add dtrace-generated object, if necessary.
8678 Contributed under MIT/X11 license.
8680 2008-06-04 Mark Probst <mark.probst@gmail.com>
8682 * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
8685 * mini.c: Generic sharing for unbox.any and castclass.
8687 2008-06-04 Mark Probst <mark.probst@gmail.com>
8689 * mini.c: Ignore tailcall prefix in shared generic code and when
8690 doing calls which require a vtable/rgctx argument.
8692 2008-06-04 Mark Probst <mark.probst@gmail.com>
8694 * mini.c: Don't free the JIT info.
8696 * driver.c: Changes in the JIT info table testing code.
8698 2008-06-03 Zoltan Varga <vargaz@gmail.com>
8700 * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread
8701 interruption. Fix some warnings.
8703 * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
8704 interruption_checkpoint.
8706 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
8708 * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
8709 from embedding applications.
8711 2008-06-02 William Holmes <billholmes54@gmail.com>
8713 * mini-amd64.c : Correcting some of the issues for Winx64 dealing with
8714 reserving 32 bytes on the stack when making calls.
8716 Contributed under MIT/X11 license.
8718 2008-06-01 Zoltan Varga <vargaz@gmail.com>
8720 * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
8721 the linear IL branch.
8723 * driver.c: Print out more information for --version on arm.
8725 2008-05-30 Zoltan Varga <vargaz@gmail.com>
8727 * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
8728 bb_exit instead, since out of line bblocks might not actually be emitted
8731 * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
8732 maximum epilog size for out of line bblocks if tracing is enabled.
8734 * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
8736 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8738 * arrays.cs: Regression tests for allocating arrays with negative sizes.
8740 2008-05-28 Zoltan Varga <vargaz@gmail.com>
8742 * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
8743 CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE
8746 2008-05-27 Zoltan Varga <vargaz@gmail.com>
8748 * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
8749 the 'value' to store is a constant.
8751 * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
8753 * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
8754 of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
8756 2008-05-26 Zoltan Varga <vargaz@gmail.com>
8758 * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
8759 for accessing method->generic_container.
8761 2008-05-24 Zoltan Varga <vargaz@gmail.com>
8763 * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
8765 * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
8767 * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
8769 * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
8772 2008-05-23 Zoltan Varga <vargaz@gmail.com>
8774 * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
8776 * mini.c: Handle the case when mono_class_vtable () fails.
8778 2008-05-23 Massimiliano Mantione <massi@ximian.com>
8779 * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
8782 2008-05-22 Mark Probst <mark.probst@gmail.com>
8784 * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
8785 together with domain sharing.
8787 2008-05-22 Mark Probst <mark.probst@gmail.com>
8789 * mini.c: Treat callvirts to final methods like non-virtual calls
8790 when doing generic sharing, i.e. look them up in the runtime
8793 2008-05-22 Mark Probst <mark.probst@gmail.com>
8795 * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
8796 with computed types (for generic sharing).
8798 * mini.c: Generic sharing for mkrefany and refanyval.
8800 2008-05-22 Zoltan Varga <vargaz@gmail.com>
8802 * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
8805 * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
8806 the generic sharing code.
8808 * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
8811 2008-05-21 Zoltan Varga <vargaz@gmail.com>
8813 * mini.h: Remove the declaration of mono_aot_init_vtable ().
8815 2008-05-21 C.J. Adams-collier <cjac@colliertech.org>
8817 * driver.c: updated copyright date
8819 2008-05-21 Zoltan Varga <vargaz@gmail.com>
8821 * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
8824 2008-05-19 Martin Baulig <martin@ximian.com>
8826 * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
8827 pointing to the new `_mono_debug_using_mono_debugger' variable.
8830 (mono_main): Check mono_debug_using_mono_debugger() rather than
8831 the `MONO_INSIDE_MDB' environment variable to check whether we're
8832 inside the debugger.
8834 2008-05-19 Zoltan Varga <vargaz@gmail.com>
8836 * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
8839 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
8841 * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
8843 * mini.c: Added mini_assembly_can_skip_verification. This
8844 function checks if the assembly requested to skip verification.
8845 Fixes part of #387274.
8847 2008-05-07 Zoltan Varga <vargaz@gmail.com>
8849 * mini.c (mini_get_method): Disable the check for open generic classes when
8850 using generic sharing.
8852 * generics.cs: Add a test for #387034.
8854 * mini.c (mini_get_method): Check whenever the method class is an open generic
8855 type, and return NULL in that case, causing a verification error. Fixes
8858 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
8860 * driver.c (mono_main): Revert r102623. The right
8861 thing to do is to enable the verifier under verifiable
8862 unless a --security flag was passed.
8864 We need this non-trivial behavior for --verify-all otherwise
8865 mcs-compileall won't be able to use it. As it needs everything to
8866 be verified under validil.
8868 2008-05-06 Martin Baulig <martin@ximian.com>
8872 * debug-mini.c (mono_debugger_thread_created): Add proper locking.
8873 (mono_debugger_thread_cleanup): Likewise.
8874 (mono_debugger_extended_notification): Likewise.
8876 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
8878 * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
8879 against both inflated and non-inflated methods. We need to check against the
8880 generic definition for cases where the instantiated method is not visible.
8881 We need to check against the inflated types for cases where the instantiation
8882 changes any super type. This fixes #382986.
8884 Note that this doesn't need to be applied to other parts of mono_method_to_ir
8885 that check for visibiliy as generic params only appears as the type subject
8886 of tokens on call opcodes. Field manipulation and ldftn must always
8887 target an exact type.
8889 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
8891 * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
8892 if no related --security flag is passed.
8894 2008-05-05 Andreas Farber <andreas.faerber@web.de>
8896 * mini-arch.h: Prepare support for ppc64.
8898 Contributed under MIT/X11 license.
8900 2008-05-05 Andreas Farber <andreas.faerber@web.de>
8902 * aot-runtime.c: Prepare support for ppc64.
8904 Contributed under MIT/X11 license.
8906 2008-05-05 Andreas Farber <andreas.faerber@web.de>
8908 * mini-ops.h: Prepare support for ppc64.
8910 Contributed under MIT/X11 license.
8912 2008-05-04 Andreas Farber <andreas.faerber@web.de>
8914 * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
8916 Contributed under MIT/X11 license.
8918 2008-05-03 Zoltan Varga <vargaz@gmail.com>
8920 * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
8921 assemblies, since aot_name is not a full path, causing us to load MS.NET
8922 assemblies on windows.
8924 ?2008-04-28 Kornel Pal <kornelpal@gmail.com>
8926 * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
8927 for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
8928 * main.c: Use UTF-8 encoded command line instead of Windows default code
8929 page on Windows to support Unicode.
8930 * driver.c (DllMain): New function for mixed-mode assembly support.
8931 * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
8932 export __stdcall functions without decoration.
8934 Contributed under MIT/X11 license.
8936 2008-04-28 Mark Probst <mark.probst@gmail.com>
8938 * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
8939 saving it very early.
8941 2008-04-28 Mark Probst <mark.probst@gmail.com>
8943 * mini.h, mini.c: Lots of code for accessing the old RGCTX
8944 deleted. The only way to access the new RGCTX is via the
8947 * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
8948 vtable instead of the RGCTX to static methods.
8950 * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
8951 accessing the new RGCTX.
8953 * generic-sharing.c: There is no separation between self, type
8954 arguments and other types in the RGCTX anymore.
8956 2008-04-25 Jonathan Chambers <joncham@gmail.com>
8958 * mini-amd64.c (add_general): Remove previous stack adjustment.
8959 (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
8960 adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
8961 for 32 bytes of stack space reserved for all calls.
8963 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
8964 (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack
8967 Code contributed under MIT/X11 license.
8969 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
8971 * mini.c (mini_method_verify): Only verify non-inflated methods, check
8972 against the root definition, peeling out method and type instantiations.
8973 Cache verify success results, code that fails verification is still
8974 checked multiple times.
8976 2008-04-23 Zoltan Varga <vargaz@gmail.com>
8978 * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
8980 2008-04-23 Jonathan Chambers <joncham@gmail.com>
8982 * mini-amd64.c (add_general): Always increment stack on Win64.
8983 (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
8986 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for
8987 stack based argument handling on Win64.
8989 Code contributed under MIT/X11 license.
8991 2008-04-23 Raja R Harinath <harinath@hurrynot.org>
8993 * Makefile.am (version.h): Add support for git-svn.
8995 2008-04-22 Zoltan Varga <vargaz@gmail.com>
8997 * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
8998 so instead of calling g_spawn_command_line_sync, we do everything by hand,
8999 avoiding allocations and libc functions which might deadlock.
9001 * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
9002 'no-gdb-backtrace' option is set.
9004 * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
9006 * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
9008 2008-04-21 Martin Baulig <martin@ximian.com>
9010 * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
9011 and `get_lmf_addr'; `notification_address' is no longer a pointer.
9013 2008-04-21 Martin Baulig <martin@ximian.com>
9015 * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
9016 `thread_vtable', `event_handler_ptr' and `event_handler'.
9018 2008-04-21 Martin Baulig <martin@ximian.com>
9020 * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
9021 allows delayed initialization of the `executable_code_buffer' when
9024 2008-04-21 Martin Baulig <martin@ximian.com>
9026 * mini.h (mono_debugger_create_notification_function): Removed.
9027 * tramp-*.c (mono_debugger_create_notification_function): Removed.
9029 * mdb-debug-info64.s
9030 (MONO_DEBUGGER__notification_function): Added this in the .text section.
9032 * mdb-debug-info32.s
9033 (MONO_DEBUGGER__notification_function): Added this in the .text section.
9035 * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
9036 currently only works on x86 and x86_64, so don't create it on ppc.
9038 2008-04-21 Martin Baulig <martin@ximian.com>
9040 * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
9043 (mini_method_compile): In the fp elimination check, check
9044 `debug_options.mdb_optimizations' in addition to
9045 mono_debug_using_mono_debugger().
9047 * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
9048 disable some JIT optimizations which are only disabled when
9049 running inside the debugger.
9050 Added `--help-debug' option to describe the debugging options.
9051 (parse_debug_options): New static function to parse the `--debug'
9052 options, so we can easily add more stuff in future.
9054 2008-04-20 Zoltan Varga <vargaz@gmail.com>
9056 * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
9057 the method has no body.
9059 2008-04-19 Jonathan Chambers <joncham@gmail.com>
9061 * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
9062 assembly is not allowed in MSVC 64-bit compiler.
9063 (mono_arch_cpu_init): Don't set floating point precision on MSVC build
9064 as we get floating point exceptions everywhere.
9066 * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
9067 correctly align arguments for call to throw_exception.
9068 (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
9070 Code contributed under MIT/X11 license.
9072 2008-04-19 Zoltan Varga <vargaz@gmail.com>
9074 * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
9076 2008-04-17 Zoltan Varga <vargaz@gmail.com>
9078 * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
9080 * mini-amd64.c (NEW_INS): Set cil_code.
9082 * mini.c (mini_method_compile): Move the disabling of fp elimination to here
9083 from mini-amd64.c so all debugger related logic is in one place.
9085 * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
9086 later won't have a random ip assigned to them.
9088 2008-04-16 Zoltan Varga <vargaz@gmail.com>
9090 * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
9091 the arch specific function initializes code_size.
9092 (mono_create_delegate_trampoline): Ditto.
9094 * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
9095 tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
9098 * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if
9099 running under the debugger.
9101 * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
9104 * mini.c (mini_method_compile): Set a few flags in cfg if running under the
9105 debugger. Also move the disabling of optimizations here from driver.c.
9106 (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
9109 * mini.h (MonoCompile): Add a few new flags.
9111 2008-04-15 Zoltan Varga <vargaz@gmail.com>
9113 * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
9114 so the cil_code field of created MonoInst's is properly set.
9115 (mini_select_instructions): Ditto.
9117 * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
9118 (MONO_INST_NEW_CALL): Ditto.
9120 * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
9121 in many places so the ins->cil_code field is properly initialized.
9123 * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
9126 2008-04-14 Zoltan Varga <vargaz@gmail.com>
9128 * mini.c (mini_method_compile): Print a different message when compiling a
9131 * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
9134 2008-04-11 Zoltan Varga <vargaz@gmail.com>
9136 * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
9139 * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
9141 2008-04-11 Zoltan Varga <vargaz@gmail.com>
9143 * mini.c (handle_stack_args): Make this return void since its return value was
9144 never used. Also set cfg->unverifiable for invalid IL instead of calling
9147 2008-04-10 Mark Probst <mark.probst@gmail.com>
9149 * mini.c: Make sure "this" is live in catch clauses with type
9150 variables in shared generic code.
9152 2008-04-08 Mark Probst <mark.probst@gmail.com>
9154 * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
9155 generic_class_is_reference_type() to ensure the proper behaviour
9156 when sharing generic code and the type in question is a type
9159 2008-04-08 Zoltan Varga <vargaz@gmail.com>
9161 * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
9162 race conditions when printing thread dumps. Fixes #377738.
9164 2008-04-08 Massimiliano Mantione <massi@ximian.com>
9166 aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
9167 shows up when both MonoInst arguments can cause aliasig.
9168 There is likely no way in the current JIT to trigger this problem, but
9169 it showed up in the development of generics sharing, when in a new
9170 opcode both args of an OP_GROUP can be aliases (addresses of a local).
9171 When the generics sharing code will be committed, its tests will be
9172 valid also for this bug.
9174 2008-04-08 Zoltan Varga <vargaz@gmail.com>
9176 * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
9179 * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
9182 2008-04-07 Zoltan Varga <vargaz@gmail.com>
9184 * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
9185 use a more detailed exception message for InvalidCastException.
9187 * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
9189 * driver.c (mono_main): Add --debug=casts option to turn on better
9190 InvalidCastException message details.
9192 * mini.c (mini_get_debug_options): New helper function to return the address of
9193 the debug_options variable.
9195 * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
9196 the jit_tls TLS variable.
9198 * mini.c (mono_jit_tls): New TLS variable.
9200 * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
9203 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
9205 * mini.h: Removed verifer related stuff. This code was moved to verify.c
9207 * mini.c: Removed verifer related stuff, code moved to verify.c.
9209 * driver.c: Using code from verify.c instead of mini.c.
9211 2008-04-05 Zoltan Varga <vargaz@gmail.com>
9213 * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
9216 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
9218 * mini.c (check_for_method_verify): Enabling verification of
9219 corlib if mono_verify_all is set. Bugs in the verifier preventing that
9222 2008-04-04 Zoltan Varga <vargaz@gmail.com>
9224 * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
9225 caller saved registers as well.
9227 * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
9228 saved registers as well.
9230 2008-03-30 Zoltan Varga <vargaz@gmail.com>
9232 * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
9234 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
9237 2008-03-27 Zoltan Varga <vargaz@gmail.com>
9239 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
9241 (get_call_info): Take a gsctx argument instead of 'cfg'.
9243 2008-03-26 Zoltan Varga <vargaz@gmail.com>
9245 * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
9246 mono_verify_all is set.
9248 * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
9250 * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
9252 2008-03-25 Zoltan Varga <vargaz@gmail.com>
9254 * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
9257 * driver.c mini.c mini.h: Add a --verify-all development option to test the
9258 verifier and the code generated by the compiler.
9260 2008-03-25 Mark Probst <mark.probst@gmail.com>
9262 * mini.c: Generic sharing of the non-nullable case of the box
9265 2008-03-24 Zoltan Varga <vargaz@gmail.com>
9267 * inssel.brg: Fix the build.
9269 * iltests.il.in: Add a test for lconv.ovf.u8.un.
9271 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
9273 * mini.c (mono_method_to_ir): Implement readonly for ldelema and
9274 Array:Address. Fixes #372410.
9276 * iltests.il.in: New tests for readonly prefix.
9278 2008-03-23 Zoltan Varga <vargaz@gmail.com>
9280 * mini.h mini.c mini-trampolines.c: Move trampoline related code to
9283 * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to
9286 * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
9288 * mini.c (mono_decompose_op_imm): New helper function.
9290 * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
9291 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
9294 * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
9295 mono_arch_output_basic_block. Fix warnings.
9297 * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
9300 2008-03-22 Zoltan Varga <vargaz@gmail.com>
9302 * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
9303 since the extra frame is now detected automatically inside the loop.
9305 * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole
9306 opts which are now in mono_peephole_ins ().
9308 * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
9310 * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
9311 frames and skip duplicate managed-to-native frames. Fixes #367665.
9313 * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
9314 opts which are now in mono_peephole_ins ().
9315 (mono_arch_peephole_pass_2): Ditto.
9317 * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
9319 * mini-codegen.c (mono_peephole_ins): New helper function containing the
9320 arch independent peephole optimizations.
9322 * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
9323 opts which are now in mono_peephole_ins ().
9325 * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
9327 * mini-s390.c (mono_arch_output_basic_block): Fix build.
9329 * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
9332 * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
9333 CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
9336 2008-03-21 Zoltan Varga <vargaz@gmail.com>
9338 * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
9339 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
9342 * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
9343 mono_arch_output_basic_block. Fix warnings.
9345 2008-03-20 Zoltan Varga <vargaz@gmail.com>
9347 * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
9350 2008-03-20 Zoltan Varga <vargaz@gmail.com>
9352 * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
9355 * iltests.il: Add new tests.
9357 2008-03-20 Kornel Pal <kornelpal@gmail.com>
9359 * mini.c: Removed Windows version macros.
9361 2008-03-20 Mark Probst <mark.probst@gmail.com>
9363 * generic-sharing.c: Put reflection types in the extensible part
9364 of the runtime generic context.
9366 * mini.c: Generic sharing of the GetTypeHandle special case of the
9367 ldtoken instruction.
9369 2008-03-20 Zoltan Varga <vargaz@gmail.com>
9371 * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
9373 * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
9375 * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for
9376 consistency with the other version on the linear IR branch.
9378 * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
9380 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
9382 * iltests.il.in: Add new tests.
9384 2008-03-19 Zoltan Varga <vargaz@gmail.com>
9386 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
9388 * iltests.il.in: Add new tests.
9390 2008-03-19 Mark Probst <mark.probst@gmail.com>
9392 * mini.c: Two variables with the same name were declared in
9393 nesting contexts and one wasn't initialized. Fixed.
9395 2008-03-19 Mark Probst <mark.probst@gmail.com>
9397 * mini.c: Generic sharing of the initobj instruction.
9399 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
9401 * mini.c: make the test to optimize ldtoken from typeof() more
9404 2008-03-18 Mark Probst <mark.probst@gmail.com>
9406 * mini.c: Generic sharing of the initobj instruction for reference
9409 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
9411 * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
9412 the mono_breakpoint_clean_code() code to perform bound checks.
9414 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
9416 * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
9417 mono_arch_patch_callsite() to include the start of the managed method
9418 to be able to perform bound checks.
9420 2008-03-17 Mark Probst <mark.probst@gmail.com>
9422 * mini.c: Generic sharing for the isinst instruction.
9424 2008-03-17 Mark Probst <mark.probst@gmail.com>
9426 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
9427 inssel-long32-mips.brg: Added opcodes for doing indirect calls
9428 with the runtime generic context argument.
9430 * mini.c: Share calls to several types of unsharable methods by
9431 putting the address of the method code in the runtime generic
9432 context and doing an indirect call.
9434 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
9437 2008-03-16 Mark Probst <mark.probst@gmail.com>
9439 * generic-sharing.c: Change due to a change in the runtime genric
9442 2008-03-15 Martin Baulig <martin@ximian.com>
9445 (mono_arch_nullify_class_init_trampoline): Add call to
9446 mono_breakpoint_clean_code() to make things work when running
9447 inside the debugger.
9450 (mono_arch_nullify_class_init_trampoline): Add call to
9451 mono_breakpoint_clean_code() to make things work when running
9452 inside the debugger.
9454 2008-03-14 Zoltan Varga <vargaz@gmail.com>
9456 * inssel-long.brg (reg): Fix 64 bit build.
9458 2008-03-14 Mark Probst <mark.probst@gmail.com>
9460 * mini.c, mini.h: Share static generic code by passing it an
9461 implicit argument pointing to the runtime generic context.
9463 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
9464 inssel-long32-mips.brg: New opcodes for calling shared static,
9465 which need to be passed the runtime generic context.
9467 * mini-amd64.c, mini-x86.c: Save the runtime generic context
9468 argument on the stack in the prologue if needed. New function for
9469 finding the runtime generic context argument from the registers
9470 saved by the trampoline.
9472 * mini-amd64.h, mini-x86.h: Specify which register to use for the
9473 runtime generic context argument.
9475 * tramp-amd64.c: Also restore the register used for the runtime
9476 generic context argument.
9478 * mini-trampoline.c: Resolve shared static calls by consulting the
9479 runtime generic context via the new argument.
9481 * generic-sharing.c: Add an argument to sharability-checking
9482 functions that specifies whether type variables should be treated
9483 as sharable type arguments.
9485 * inssel-x86.brg: Removed a superfluous, buggy rule.
9487 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
9490 2008-03-14 Martin Baulig <martin@ximian.com>
9492 * debug-debugger.c (main_thread_handler): Call
9493 mono_runtime_run_main() without sending any notifications.
9495 * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
9497 2008-03-14 Zoltan Varga <vargaz@gmail.com>
9499 * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
9501 2008-03-14 Mark Probst <mark.probst@gmail.com>
9503 * tramp-x86.c: Fixed register restore offsets in the trampoline
9504 code for ECX and EDX.
9506 2008-03-12 Geoff Norton <gnorton@novell.com>
9508 * mini-arm.h: Add some #defines for locating sp, pc, r4 with
9509 different ucontext_t implementations.
9510 * exceptions-arm.c: Use the above defines to get exceptions working on
9511 iPhone (based on a patch by Luke Howard lukeh@padl.com)
9512 * mini-arm.c: Implement iPhone icache support (based on a patch by
9513 Luke Howard lukeh@padl.com)
9515 2008-03-12 Mark Probst <mark.probst@gmail.com>
9517 * mini.c: Enable generic sharing of calls to non-static
9518 non-interface non-generic non-value-type methods.
9520 * mini-trampolines.c: Resolve calls from shared generic code.
9522 2008-03-11 Zoltan Varga <vargaz@gmail.com>
9524 * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
9526 * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
9528 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
9530 * mini.c: some fixes for the AOT compiler.
9532 2008-03-07 Zoltan Varga <vargaz@gmail.com>
9534 * cpu-amd64.md: Add clob:1 to some float opcodes.
9536 2008-03-07 Rodrigo Kumpera <rkumpera@novell.com>
9538 * mini.h: Added MiniVerifierMode enumeration.
9540 * mini.c: Added mini_verifier_set_mode to control
9541 the usage of the new verifier.
9543 * mini.c (mono_method): Integrated the new verifier.
9545 * driver.c: Extended --security option with validil and
9546 verifiable options to activate the new verifier.
9548 2008-03-07 Zoltan Varga <vargaz@gmail.com>
9550 * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation
9551 optimization to ctors taking 0 or 2 arguments too.
9553 * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
9556 * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
9558 * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
9560 2008-03-06 Zoltan Varga <vargaz@gmail.com>
9562 * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
9563 non-aot case as well.
9565 * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
9567 * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
9570 * aot-compiler.c (encode_patch): Ditto.
9572 * mini.h (G_MININT32): Fix the definition of this.
9574 2008-03-05 Zoltan Varga <vargaz@gmail.com>
9576 * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
9578 * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
9580 2008-03-04 Zoltan Varga <vargaz@gmail.com>
9582 * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for
9583 methods returning vtypes in registers.
9584 (mono_arch_allocate_vars): Ditto.
9586 * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
9588 * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().
9590 * generics.cs: Add a test from the linear IR branch.
9592 * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
9594 * mini.c (inline_method): Cache failed inline attempts.
9596 2008-03-04 Mark Probst <mark.probst@gmail.com>
9598 * mini.c: For shared methods of generic classes put the location
9599 of "this" into the MonoGenericJitInfo.
9601 * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
9602 register out of a MonoContext by register number. Add the generic
9603 sharing context as an argument to mono_arch_find_this_argument().
9605 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
9606 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
9607 for new arch function.
9609 * mini-exception.c: Handle open exception clauses in shared
9612 * mini-trampolines.c: Supply additional argument to
9613 mono_arch_find_this_argument().
9615 2008-03-04 Zoltan Varga <vargaz@gmail.com>
9617 * Makefile.am (regtests): Run the bench.exe tests last.
9619 2008-03-03 Zoltan Varga <vargaz@gmail.com>
9621 * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
9624 2008-03-02 Zoltan Varga <vargaz@gmail.com>
9626 * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
9629 * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
9631 * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
9633 * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
9634 whose class has no cctor.
9636 * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
9638 2008-03-01 Zoltan Varga <vargaz@gmail.com>
9640 * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
9643 2008-02-29 Zoltan Varga <vargaz@gmail.com>
9645 * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
9646 to be in sync with the code on the linear IR branch.
9648 * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
9650 * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
9652 2008-02-27 Zoltan Varga <vargaz@gmail.com>
9654 * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
9656 * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
9658 * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
9660 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
9662 * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
9664 * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
9667 2007-11-14 Yoichi NAKAYAMA <nakayama@pixela.co.jp>
9669 * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
9670 OP_LOADR4_MEMBASE emission.
9672 * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
9673 (mono_spillvar_offset_float): Ditto.
9675 * mini-mips.c (mono_arch_emit_prolog): Ditto.
9677 * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
9680 * basic-long.cs: Add regression tests for them.
9682 * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
9684 (mono_arch_allocate_vars): Fix representation of single-precision float
9686 (mono_arch_output_basic_block): Ditto.
9688 * inssel-mips.brg: Ditto, remove duplicate items.
9690 * mini-mips.c (emit_load_volatile_arguments): New function to handle
9691 arguments of tail calls as on other platforms.
9692 (mono_arch_output_basic_block): Handle tail calls.
9694 * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
9697 * objects.cs (test_5_pass_static_struct): Add test for it.
9699 Contributed under MIT/X11 license.
9701 2008-02-26 Zoltan Varga <vargaz@gmail.com>
9703 * Makefile.am: Use gmcs for compiling the regression tests.
9705 * *.2.cs *.2.il: Rename to *.cs and *.il.
9707 2008-02-24 Zoltan Varga <vargaz@gmail.com>
9709 * regalloc.h: Make the vassign array smaller.
9711 * mini.c (mini_method_compile): Remove an unused field in cfg.
9713 * mini-codegen.c: Add a bunch of micro optimizations.
9715 2008-02-23 Zoltan Varga <vargaz@gmail.com>
9717 * regalloc.h: Remove some unused fields.
9719 2008-02-22 Zoltan Varga <vargaz@gmail.com>
9721 * mini-amd64.c (mono_arch_patch_code): Fix a warning.
9723 * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
9725 2008-02-22 Mark Probst <mark.probst@gmail.com>
9727 * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
9729 * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
9730 trampoline: Fetch an entry from the runtime generic context. If
9731 it's NULL, jump to the actual trampoline to fill the runtime
9732 generic context. Otherwise, return it.
9734 * mini.c: Call the lazy fetch trampoline to get entries out of the
9735 runtime generic context.
9737 * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
9738 tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
9739 tramp-sparc.c: Stubs for the lazy fetch trampoline.
9741 2008-02-21 Mark Probst <mark.probst@gmail.com>
9743 * mini.c: Fetch data out of the extensible part of the runtime
9744 generic context instead of calling a helper function.
9746 * generic-sharing.c: Some functions moved into
9747 metadata/generic-sharing.c. Helper function for fetching other
9748 types now checks and asserts against extensible rgctx (just for
9749 debugging purposes - the helper function isn't called anymore
9750 unless for debugging).
9752 2008-02-21 Zoltan Varga <vargaz@gmail.com>
9754 * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
9755 for tail calls up to the point that the tests in iltests.exe run. Also add a
9756 dummy CKFINITE implementation.
9757 (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
9758 needed for trampoline LMF frames.
9760 * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for
9761 trampoline LMF frames.
9763 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
9765 * mini.c (inline_method): clean any pending loader error when inlining fail.
9766 Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
9768 2008-02-21 Zoltan Varga <vargaz@gmail.com>
9770 * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
9772 * aot-runtime.c (decode_patch_info): Ditto.
9774 * mini.c (mono_resolve_patch_target): Ditto.
9776 * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
9779 * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
9781 * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
9782 if it references an icall address.
9784 2008-02-20 Zoltan Varga <vargaz@gmail.com>
9786 * cpu-s390x.md: Remove some more unused opcodes.
9788 * cpu-s390x.md: Remove some unused opcodes.
9790 * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
9791 mono_op_imm_to_op ().
9793 * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
9794 instead of a switch statement.
9796 * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
9797 the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
9799 * mini-codegen.c: Eliminate rassign macro which is no longer needed.
9801 * mini-codegen.c: Remove unused mono_regstate2_... functions.
9803 * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
9806 2008-02-19 Zoltan Varga <vargaz@gmail.com>
9808 * driver.c (mono_main): Improve error reporting when an assembly cannot be
9809 opened. Fixes #362607.
9811 * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
9813 * iltests.il.in: Add a test for static methods in interfaces.
9815 2008-02-18 Zoltan Varga <vargaz@gmail.com>
9817 * genmdesc.c (build_table): Fix a crash on older glib versions.
9819 * cpu-sparc.md: Remove some unused opcodes.
9821 * genmdesc.c: Error out if the .md contains CEE_ opcodes if
9822 MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
9824 * cpu-amd64.md: Remove some unused opcodes.
9826 * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
9827 like the other opcodes.
9829 2008-02-17 Zoltan Varga <vargaz@gmail.com>
9831 * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
9833 * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
9835 * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
9836 variables 'cfg' instead of 'm' for consistency.
9838 * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
9840 * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
9841 argument holding the vtype return address, to avoid the ambigious use of
9842 cfg->ret for this purpose.
9844 * mini.c (NEW_RETLOADA): Use vret_addr if set.
9846 * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
9848 * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
9849 new mono_print_ins () function which only takes one argument.
9851 2008-02-15 Zoltan Varga <vargaz@gmail.com>
9853 * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
9856 2008-02-14 Zoltan Varga <vargaz@gmail.com>
9858 * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
9860 * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
9862 * mini-x86.c: Sync with the version on the linear IR branch by adding new
9863 opcodes and other small changes.
9865 * mini-ops.h: Add some new opcodes from the linear IR branch.
9867 * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
9869 * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
9870 opcodes, use the REG_MEMBASE opcodes instead.
9872 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
9873 opcodes, use the REG_MEMBASE opcodes instead.
9875 * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
9878 * mini.c (mono_op_imm_to_op): New helper function.
9880 * mini-ops.h: Add some opcodes from linear IR branch.
9882 2008-02-13 Zoltan Varga <vargaz@gmail.com>
9884 * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov
9887 2008-02-12 Zoltan Varga <vargaz@gmail.com>
9889 * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to
9892 * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
9894 2008-02-09 Zoltan Varga <vargaz@gmail.com>
9896 * aot-compiler.c (emit_method_code): Add an assert.
9898 * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
9899 the IMT code so it is AOT friendly. Enable AOT for methods which call interface
9902 2008-02-08 Zoltan Varga <vargaz@gmail.com>
9904 * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for
9905 some load/store opcodes so they are consistent.
9906 (mono_arch_emit_prolog): Simplify some code.
9908 * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
9910 * objects.cs: Add tests for large argument offsets on ARM.
9912 * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large
9913 stack offsets. Fixes #359651.
9915 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
9917 * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
9919 * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
9921 * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
9923 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
9925 * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
9926 rid of CEE_CONV_R_UN.
9928 * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
9930 2008-02-07 Zoltan Varga <vargaz@gmail.com>
9932 * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
9934 * mini.c (mono_normalize_opcodes): Add some more opcodes.
9936 * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
9938 * cpu-amd64.md: Remove some unused opcodes.
9940 * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
9942 * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
9944 * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make
9945 arch specific functions for its parts. Call the peephole pass after local
9946 regalloc so the prolog can compute a more accurate max_offset.
9948 * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
9949 the corresponding OP_I/OP_L opcodes.
9951 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
9953 * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
9955 2008-02-06 Zoltan Varga <vargaz@gmail.com>
9957 * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
9958 as they are handled in mini.c.
9960 * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
9962 * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
9963 case since it is handled in mini.c.
9965 * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
9967 * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
9969 * *.c: Use the new opcodes in the IR and back end code.
9971 * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
9973 * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
9975 2008-02-06 Mark Probst <mark.probst@gmail.com>
9977 * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
9978 an assert because it has a race condition.
9980 2008-02-06 Zoltan Varga <vargaz@gmail.com>
9982 * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
9984 * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
9986 * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
9988 * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
9989 use OP_MOVE/OP_FMOVE/OP_ICONST instead.
9991 2008-02-05 Zoltan Varga <vargaz@gmail.com>
9993 * cpu-amd64.md (move): Correct the maximum size of move.
9995 2008-02-05 Mark Probst <mark.probst@gmail.com>
9997 * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
9998 the generic class init trampoline to return quickly if the class
10001 2008-02-04 Zoltan Varga <vargaz@gmail.com>
10003 * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
10004 issues where an 32 bit callsite cannot be patched by a 64 bit address.
10006 2008-02-03 Zoltan Varga <vargaz@gmail.com>
10008 * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
10011 2008-01-31 Zoltan Varga <vargaz@gmail.com>
10013 * objects.cs: Add some soft-float tests.
10015 * mini.c: Fix a couple more soft-float issues.
10017 * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
10019 * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
10020 avoid a REX prefix.
10022 2008-01-30 Zoltan Varga <vargaz@gmail.com>
10024 * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
10025 exception happens while compiling a virtual method.
10027 2008-01-29 Zoltan Varga <vargaz@gmail.com>
10029 * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
10031 * mini-sparc.c: Fix build.
10033 * mini-sparc.c (get_call_info): Add support for generic sharing.
10035 * mini-exceptions.c: Add a FIXME.
10037 2008-01-27 Zoltan Varga <vargaz@gmail.com>
10039 * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
10040 altstack handling code.
10042 * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
10044 * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
10046 * mini-s390.c: Add support for generic sharing.
10048 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
10050 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
10052 * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
10054 * mini-s390x.c: Add support for generic sharing.
10056 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
10058 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
10060 * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
10061 can be used since it takes a 16 bit signed immediate.
10063 * inssel-s390x.brg: Fix OP_SETRET.
10065 * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
10067 * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
10069 * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
10071 * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
10073 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
10076 * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
10079 * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
10080 of the unused mono_arch_patch_delegate_trampoline stuff.
10082 2008-01-26 Zoltan Varga <vargaz@gmail.com>
10084 * basic-long.cs: Move the fp related tests to basic-float.cs.
10086 * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
10088 * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
10090 * basic-calls.cs: Add a test for proper float argument passing.
10092 * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
10093 if the context corresponds to an exception received through a signal.
10095 * exceptions.cs: Add a test for nullref handling at the start of a try
10098 * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
10100 * jit-icalls.c (mono_break): New JIT icall.
10102 * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
10104 * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
10106 2008-01-25 Zoltan Varga <vargaz@gmail.com>
10108 * cpu-*.md: Get rid of unused opcodes.
10110 * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
10112 * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
10115 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
10118 * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
10119 the arch independent trampoline code in mini-trampolines.c.
10121 * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
10123 * mini.c (get_runtime_generic_context_ptr): Fix a warning.
10125 * mini-s390.h: Remove an unused define.
10127 * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
10128 the arch independent trampoline code in mini-trampolines.c.
10130 * mini-arm.c (mono_arch_emit_prolog): Fix build.
10132 2008-01-24 Zoltan Varga <vargaz@gmail.com>
10134 * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
10136 * mini-s390.c (mono_arch_emit_prolog): Fix build.
10138 * mini-s390x.c (mono_arch_emit_prolog): Fix build.
10140 * mini-ppc.c (mono_arch_emit_prolog): Fix build.
10142 * cpu-amd64.md: Use smaller sizes for int opcodes.
10144 * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
10146 * *.cs: Add some tests from the linear-ir branch. Move structs tests to
10149 * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
10152 * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
10153 instead of though a pointer to save an indirection when accessing elements of
10156 * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
10158 (NOT_IMPLEMENTED): New helper macro.
10159 (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
10162 * *.c: Use the new helper macro.
10164 2008-01-21 Zoltan Varga <vargaz@gmail.com>
10166 * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
10168 2008-01-20 Zoltan Varga <vargaz@gmail.com>
10170 * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
10173 2008-01-18 Zoltan Varga <vargaz@gmail.com>
10175 * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
10176 profiling is enabled.
10178 * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
10180 (mono_arch_emit_prolog): Add more first bblock optimizations.
10182 * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
10183 in order if possible.
10184 (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
10185 bblock, since the arguments are still in their original registers.
10187 * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
10189 2008-01-17 Zoltan Varga <vargaz@gmail.com>
10191 * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
10194 * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
10197 * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
10199 * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
10200 process async exceptions received while in unmanaged code.
10202 * mini.c (mini_init): Install a callback with the runtime which will be called
10203 when a thread receives an async exception while in unmanaged code.
10205 * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
10207 * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
10209 2008-01-16 Wade Berrier <wberrier@novell.com>
10216 2008-01-16 Zoltan Varga <vargaz@gmail.com>
10218 * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
10219 compilation with sun cc.
10221 * cpu-*.md: Fix the build.
10223 * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
10225 * mini-amd64.h: Add some comments to the MonoLMF structure.
10227 * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
10229 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
10230 in the LMF structure if possible. This saves two instructions in the
10231 managed->native wrappers.
10233 * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
10235 2008-01-16 Mark Probst <mark.probst@gmail.com>
10237 * generic-sharing.c: New type argument lookup code which uses the
10238 runtime generic context template.
10240 2008-01-15 Zoltan Varga <vargaz@gmail.com>
10242 * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
10244 * mini-arm.c (add_general): Fix arm eabi parameter passing.
10245 (mono_arch_output_basic_block): Fix localloc implementation.
10247 * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
10249 * mini-ia64.c (peephole_pass): Fix ia64 build.
10251 * mini-amd64.c (peephole_pass): Fix a warning.
10253 * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
10254 at a constant offset from sp/fp.
10256 * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
10257 instead of obtaining it from *lmf in the managed method case.
10259 2008-01-14 Zoltan Varga <vargaz@gmail.com>
10261 * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
10263 Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
10265 * mini.h (MonoInstList): New type.
10266 (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
10267 __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
10268 MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
10269 __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
10270 MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
10271 MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
10272 MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
10273 MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
10274 MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
10275 MONO_INST_LIST_FOR_EACH_PREV_SAFE,
10276 MONO_INST_LIST_FOR_EACH_ENTRY,
10277 MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
10278 MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
10279 mono_inst_list_first, mono_inst_list_last,
10280 mono_inst_list_next, mono_inst_list_prev): New instruction
10281 list handling interfaces.
10282 (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
10283 list head 'ins_list'.
10284 (MonoInst): Replace next pointer with list head 'node'.
10285 (MonoCallInst): Make 'out_args' a MonoInstList.
10286 (MONO_INST_NEW_CALL): Explicitly init ->out_args.
10287 (MonoCompile): Delete reverse_inst_list and
10288 reverse_inst_list_len.
10289 * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
10290 mono_arch_lowering_pass, mono_arch_local_regalloc,
10291 mono_arch_output_basic_block, mono_arch_emit_prolog):
10292 Convert to new instruction lists.
10293 (insert_after_ins): Delete.
10294 * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
10296 * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
10297 * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
10298 split_bblock, mono_add_ins_to_end, mono_emit_call_args,
10299 mono_emulate_opcode, mono_emit_load_got_addr,
10300 inline_method, mono_method_to_ir, mono_print_bb_code,
10301 print_dfn, decompose_pass, nullify_basic_block,
10302 replace_out_block_in_code, remove_block_if_useless,
10303 merge_basic_blocks, move_basic_block_to_end,
10304 try_unsigned_compare, optimize_branches, mono_print_code,
10305 mini_select_instructions, remove_critical_edges): Likewise.
10306 * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
10307 peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
10308 mono_arch_output_basic_block, mono_arch_emit_prolog):
10310 * mini-mips.c (mono_arch_call_opcode, peephole_pass,
10311 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
10312 mono_arch_output_basic_block): Likewise.
10313 (inst_list_prepend, insert_after_ins): Delete.
10314 * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
10315 MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
10317 * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
10318 peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
10319 mono_arch_emit_prolog): Likewise.
10320 * cfold.c (mono_constant_fold): Likewise.
10321 * liveness.c (visit_bb, mono_analyze_liveness,
10322 optimize_initlocals): Likewise.
10323 * ssapre.c (dump_code, process_bb, code_motion): Likewise.
10324 * graph.c (mono_draw_code_cfg): Likewise.
10325 * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
10326 mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
10327 mono_ssa_cprop): Likewise.
10328 * abcremoval (get_relations_from_previous_bb, process_block):
10330 * local-propagation (mono_cprop_invalidate_values,
10331 mono_local_cprop_bb): Likewise.
10332 * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
10333 peephole_pass, mono_arch_output_basic_block,
10334 mono_arch_emit_prolog): Likewise.
10335 * mini-arm.c (mono_arch_call_opcode, peephole_pass,
10336 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
10337 mono_arch_emit_prolog): Likewise.
10338 (insert_after_ins): Delete.
10339 * aliasing.c (print_code_with_aliasing_information,
10340 mono_build_aliasing_information, mono_aliasing_deadce):
10341 Convert to new instruction lists.
10342 * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
10343 peephole_pass, NEW_INS, mono_arch_lowering_pass,
10344 mono_arch_local_regalloc, mono_arch_output_basic_block):
10346 (insert_after_ins): Delete.
10347 * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
10348 peephole_pass, mono_arch_output_basic_block): Convert to
10349 new instruction lists.
10350 * mini-codegen (InstList, inst_list_prepend,
10351 insert_after_ins): Delete.
10352 (insert_before_ins, get_register_force_spilling,
10353 get_register_spilling, free_up_ireg, free_up_reg,
10354 create_copy_ins, create_spilled_store, alloc_int_reg,
10355 alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
10356 to new instruction lists.
10357 * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
10358 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
10359 mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
10360 (insert_after_ins): Delete.
10361 * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
10362 mono_arch_local_regalloc, mono_arch_output_basic_block,
10363 mono_arch_call_opcode): Convert to new instruction lists.
10364 (insert_after_ins): Delete.
10365 * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
10366 peephole_pass, mono_arch_output_basic_block,
10367 mono_arch_emit_prolog): Convert to new instruction lists.
10369 2008-01-11 Zoltan Varga <vargaz@gmail.com>
10371 * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
10373 * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
10376 * Makefile.am (version.h): Make this work with non-bash shells.
10378 2008-01-10 Zoltan Varga <vargaz@gmail.com>
10380 * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
10382 2008-01-08 Zoltan Varga <vargaz@gmail.com>
10384 * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
10385 the InitializeArray optimization.
10387 2008-01-06 Zoltan Varga <vargaz@gmail.com>
10389 * mini.c driver.c: Don't include os/gc_wrapper.h.
10391 2008-01-05 Zoltan Varga <vargaz@gmail.com>
10393 * mini.c (print_jit_stats): Print GC statistics if available.
10395 2008-01-04 Zoltan Varga <vargaz@gmail.com>
10397 * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
10399 2007-12-29 Zoltan Varga <vargaz@gmail.com>
10401 * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
10403 2007-12-26 Zoltan Varga <vargaz@gmail.com>
10405 * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
10407 * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
10409 * driver.c (mono_main): Ditto.
10411 2007-12-23 Zoltan Varga <vargaz@gmail.com>
10413 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
10415 * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
10416 in the vtable can't be encoded.
10417 (compile_method): Ditto.
10419 2007-12-21 Zoltan Varga <vargaz@gmail.com>
10421 * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
10424 * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
10427 * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
10428 the top LMF entry belongs to the current method.
10430 * mini.c: Update after renaming of mono_thread_get_pending_exception ().
10432 2007-12-20 Zoltan Varga <vargaz@gmail.com>
10434 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
10436 * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
10438 * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
10440 * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
10442 * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
10444 * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
10447 * basic-float.cs: Add an ulong->double cast test.
10449 2007-12-15 Zoltan Varga <vargaz@gmail.com>
10451 * mini.c (mono_method_to_ir): Fix a warning.
10453 2007-12-14 Zoltan Varga <vargaz@gmail.com>
10455 * mini-ops.h: Add OP_SWITCH.
10457 * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
10458 CEE_SWITCH in back-end code, use OP_SWITCH instead.
10460 2007-12-11 Geoff Norton <gnorton@novell.com>
10462 * mini-s390x.c: Minor change to the MAX() define to allow
10463 it to compile with other gcc versions.
10465 2007-12-11 Geoff Norton <gnorton@novell.com>
10468 * mini-s390x.c: Implement sext_i4 to fix the build on s390x
10470 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
10472 exceptions-arm.c (mono_arch_get_restore_context): Restore
10475 exceptions-arm.c (throw_exception): Save the frame pointer.
10476 This is a partial fix for #323747. Only the client side is
10479 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
10481 * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
10482 was using an unrelated variable to log the class which
10483 needed the cctor to be called. This was crashing on arm.
10485 2007-12-09 Robert Jordan <robertj@gmx.net>
10487 * mini-x86.c (mono_arch_emit_epilog):
10488 Consider all kinds of 64-bit types. Fixes #323114.
10490 2007-12-08 Zoltan Varga <vargaz@gmail.com>
10492 * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
10494 2007-12-07 Zoltan Varga <vargaz@gmail.com>
10496 * mini-amd64.c (peephole_pass): Add a missing instruction check.
10498 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10500 * mini.c: run type ctor before allocating an object, not only
10501 when running it's constructor method (fixes at least part of bug #342507).
10503 2007-12-07 Zoltan Varga <vargaz@gmail.com>
10505 * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
10507 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
10508 * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
10511 * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
10512 mono_generic_class_init_trampoline () the same as it is done with the other
10515 * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
10516 aot-runtime.c aot-compiler.c: Implement AOT support.
10518 2007-12-07 Mark Probst <mark.probst@gmail.com>
10520 * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
10521 build for archs which don't have the vtable trampoline defined
10524 2007-12-07 Zoltan Varga <vargaz@gmail.com>
10526 * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
10528 * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
10530 * mini-trampolines.c (mono_get_trampoline_func): New helper function.
10532 * tramp-<ARCH>.c: Use the new helper function.
10534 2007-12-07 Mark Probst <mark.probst@gmail.com>
10536 * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
10537 trampoline call, which takes a vtable argument.
10539 * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
10540 OP_TRAMPCALL_VTABLEs like other calls.
10542 * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
10543 register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
10544 call. Implemented a support function which fetches the vtable
10545 from a register set.
10547 * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
10548 Implemented a generic class init trampoline, using the
10549 OP_TRAMPCALL_VTABLE opcode.
10551 * mini.c: Implemented static field access when sharing generic
10552 code. This implies initing the class using the new
10553 OP_TRAMPCALL_VTABLE call.
10555 2007-12-07 Mark Probst <mark.probst@gmail.com>
10557 * mini.c: Don't compile methods with sharing enabled if their
10558 classes are disabled for sharing.
10560 2007-12-06 Zoltan Varga <vargaz@gmail.com>
10562 * inssel.brg: Add a missing sign extension to the GETCHR and array access
10563 opcodes. Fixes #346563.
10565 * objects.cs: Add a new test.
10567 * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
10569 * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
10570 HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
10572 2007-12-06 Zoltan Varga <vargaz@gmail.com>
10574 * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
10576 2007-12-03 Zoltan Varga <vargaz@gmail.com>
10578 * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
10581 2007-12-02 Zoltan Varga <vargaz@gmail.com>
10583 * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
10585 * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
10586 optimization in the AOT case.
10588 2007-11-30 Zoltan Varga <vargaz@gmail.com>
10590 * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
10592 * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
10594 * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
10596 * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
10598 * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
10599 is created by the inlined delegate ctor.
10601 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
10603 * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
10605 2007-11-29 Zoltan Varga <vargaz@gmail.com>
10607 * cpu-x86.md: Fix the length of ckfinite.
10609 2007-11-28 Zoltan Varga <vargaz@gmail.com>
10611 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
10613 * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
10614 (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
10616 * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
10618 * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
10619 OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
10621 2007-11-28 Martin Baulig <martin@ximian.com>
10624 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
10625 after creating the trampoline.
10627 2007-11-27 Zoltan Varga <vargaz@gmail.com>
10629 * aot-runtime.c (load_aot_module): Check runtime version if needed.
10631 * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
10634 * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
10635 instead of the calling method to help AOT.
10637 * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
10639 2007-11-26 Zoltan Varga <vargaz@gmail.com>
10641 * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
10644 2007-11-23 Zoltan Varga <vargaz@gmail.com>
10646 * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
10648 * aot-compiler.c (compile_method): Correct check for generic method definitions.
10649 (encode_method_ref): No need to handle generic method definitions specially.
10651 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
10653 * aot-runtime.c (decode_klass_ref): Clean this up and rename from
10656 * aot-compiler.c (encode_klass_ref): Clean this up and rename from
10658 (compile_method): Enable generic sharing.
10660 2007-11-22 Zoltan Varga <vargaz@gmail.com>
10662 * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
10663 (mini_method_compile): Add preliminary support for AOTing shared generic code.
10665 * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
10668 * mini-trampolines.c: Fix a warning.
10670 * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
10672 (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
10673 (generic_class_is_reference_type): Remove unused function.
10675 * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
10676 in the generic vtable trampoline case.
10678 * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
10680 * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
10681 return an AOT method based on a vtable slot.
10683 * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
10685 * mini.c (mini_get_vtable_trampoline): Export this.
10687 2007-11-22 Martin Baulig <martin@ximian.com>
10690 (MonoDebuggerInfo): Move `debugger_version' up.
10692 2007-11-22 Martin Baulig <martin@ximian.com>
10695 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
10697 * mini-trampolines.c
10698 (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
10699 after compiling the method.
10701 2007-11-20 Martin Baulig <martin@ximian.com>
10704 (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
10705 (mono_debugger_remove_breakpoint): Likewise.
10706 (mono_debugger_check_breakpoints): Likewise.
10708 * debug-debugger.c: Implement the new breakpoint interface here.
10710 2007-11-18 Zoltan Varga <vargaz@gmail.com>
10712 * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
10713 CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
10715 * mini-x86.c (mono_arch_output_basic_block): Ditto.
10717 2007-11-17 Zoltan Varga <vargaz@gmail.com>
10719 * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
10721 * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
10724 * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
10727 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
10728 returning a vtype in a register.
10730 * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
10731 here from the arch specific code.
10733 * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
10736 * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
10737 (mono_arch_emit_prolog): Increment maximum prolog size.
10739 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
10740 START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
10742 * mini-x86.c (get_call_info): Receive a MonoCompile instead of a
10743 MonoGenericSharingContext.
10745 * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
10746 MonoGenericSharingContext. Allocate memory from the cfg mempool.
10748 2007-11-15 Mark Probst <mark.probst@gmail.com>
10750 * mini.c, mini.h, generic-sharing.c: Functions for producing code
10751 which extract fields out of the runtime generic context. Full
10752 sharing of the NEWARR opcode.
10754 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
10756 * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
10757 --enable-minimal=ssa.
10759 2007-11-13 Zoltan Varga <vargaz@gmail.com>
10761 * mini-trampolines.c (mono_delegate_trampoline): Update after
10762 mono_marshal_get_delegate_invoke () signature change.
10764 2007-11-13 Mark Probst <mark.probst@gmail.com>
10766 * mini.c: Removed the shared context in favor of the generic
10767 sharing context. Allocate the MonoJitInfo structure with room for
10768 the generic sharing context if it's needed.
10770 * mini.h: Remove MonoGenericSharingContext declaration. It's in
10771 domain-internals.h now.
10773 * mini-x86.c: Pass the generic sharing context to get_call_info ().
10775 * generic-sharing.c: Several changes for working without a shared
10776 context and instead operating on open types instead.
10778 2007-11-12 David S. Miller <davem@davemloft.net>
10780 * inssel-sparc.brg: Fix double instruction emit.
10782 2007-11-12 Zoltan Varga <vargaz@gmail.com>
10784 * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
10785 Get/Set/Address methods.
10787 * mini.c debug-debugger.c mini-trampolines.c: Update after
10788 mono_marshal_get_delegate_invoke signature change.
10790 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
10792 * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
10793 This can happens with dynamic methods. Fixes the other bug in #322722.
10795 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
10797 * tramp-arm.c (mono_arch_patch_callsite): Support patching
10800 * mini-arm.c (arm_patch): Implement patching of BX call
10801 sequence. Fixes one of the bugs in #322722.
10803 2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
10805 * mini-sparc.c (mono_arch_flush_icache): Make more efficient
10806 under Linux. We only need to flush every 32-byte cache line.
10808 2007-11-07 Massimiliano Mantione <massi@ximian.com>
10811 move_basic_block_to_end: Add branches when needed, eventually creating
10813 optimize_branches: added a parameter that tells if it's ok to create
10814 new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
10815 and avoid calling move_basic_block_to_end when it's not ok.
10818 2007-11-07 Mark Probst <mark.probst@gmail.com>
10820 * mini.c: Abort inlining call to InitializeArray if something
10821 looks wrong. Let the icall handle it, which now has proper safety
10824 2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
10826 * mini.c (mono_spill_call): add support for soft-float.
10828 * mini.c (mono_method_to_ir): add support for soft-float
10829 to inlined functions that return float.
10831 * mini.c (mono_method_to_ir): add support for soft-float
10832 to cee_stsfld opcode on float fields.
10834 2007-11-05 Geoff Norton <gnorton@novell.com>
10836 * mini-x86.h: Fix the structure access for X86 Leopard.
10839 2007-11-05 Martin Baulig <martin@ximian.com>
10841 * mini-trampolines.c
10842 (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
10843 after compiling the method to notify the debugger.
10845 2007-11-05 Martin Baulig <martin@ximian.com>
10847 * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
10849 2007-11-02 Zoltan Varga <vargaz@gmail.com>
10851 * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
10852 David Miller <davem@davemloft.net>. Allow larger offsets in branches.
10854 2007-11-01 Zoltan Varga <vargaz@gmail.com>
10856 * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
10857 native-to-managed wrappers.
10859 2007-11-01 Geoff Norton <gnorton@novell.com>
10861 * mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
10864 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
10866 * mini.c, mini-x86.c: when getting back from unmanaged code
10867 to managed via a marshaled delegate we also need to set the
10870 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
10872 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
10875 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
10877 * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
10878 let the debugger or other external agents to tell the JIT when
10879 a sw breakpoint has been inserted in the code that the JIT needs
10880 to be able to inspect.
10882 2007-10-31 Martin Baulig <martin@ximian.com>
10885 (MonoDebuggerInfo): Remove `runtime_class_init'.
10887 2007-10-30 Martin Baulig <martin@ximian.com>
10890 (mono_debugger_thread_created): Added `MonoThread *' argument.
10891 (mono_debugger_extended_notification): New public method.
10892 (mono_debugger_trampoline_compiled): New public method.
10895 (MonoDebuggerThreadInfo): Added `thread' and
10896 `extended_notifications' fields.
10899 (debugger_executable_code_buffer): New static variable.
10902 (MonoDebuggerInfo): Added `executable_code_buffer',
10903 `executable_code_buffer_size', `breakpoint_info_area',
10904 `breakpoint_table' and `breakpoint_table_size'.
10906 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
10908 * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
10909 that IP either is an unused value or the vtable pointer. IMT
10910 calls use vtable + offset now. Reduced by almost half the size
10913 2007-10-26 Jonathan Chambers <joncham@gmail.com>
10915 * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
10916 defines to access param registers. Replace long usage with
10917 gsize as sizeof(long) != sizeof(void*) on Win64.
10919 * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
10920 on Win64. Fix intrinsic, use _AddressOfReturnAddress
10921 instead of non-existant _GetAddressOfReturnAddress.
10923 * tramp-amd64.c: Use AMD64_ARG_REG# defines to access
10924 param registers. Save/restore %rdi and %rsi in MonoLMF.
10926 * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
10927 param registers. Modify (throw_exception) signature to take
10928 %rdi and %rsi on Win64.
10930 Code is contributed under MIT/X11 license.
10932 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
10934 * helpers.c: unlink debugging output files.
10936 2007-10-25 Zoltan Varga <vargaz@gmail.com>
10938 * mini.c: Move mono_create_ftnptr () to object.c.
10940 2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
10942 * helpers.c (mono_disassemble_code): MonoCompile parameter is now
10943 optional. This function can now be used to disassemble code generated
10944 outside the JIT such as trampolines and IMT thunks.
10946 * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
10948 * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
10949 vtable pointer from a ldr instruction.
10951 * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
10952 new IMT call sequence.
10954 * mini-arm.c (mono_arch_output_basic_block): emit the IMT
10955 call sequence for interface invocations.
10957 * mini-arm.c (mono_arch_emit_imt_argument): added, required
10958 for imt support. This function is empty since IMT on ARM requires no
10959 special handling on the IR side.
10961 * mini-arm.c (mono_arch_find_imt_method): added, required for
10964 * mini-arm.c (mono_arch_find_this_argument): added, required
10967 * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
10968 a ldr instruction to load a value stored in the code stream.
10970 * mini-arm.c (mono_arch_build_imt_thunk):added, required
10974 2007-10-23 Zoltan Varga <vargaz@gmail.com>
10976 * mini.c (mini_init): Install the jump trampoline callback.
10978 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
10980 * mini-trampolines.c: handle synchronized methods with the common
10981 vtable trampoline (bug #335601).
10983 2007-10-17 Zoltan Varga <vargaz@gmail.com>
10985 * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
10987 * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
10990 * mini-ia64.h mini-ia64.c: Add support for IMT.
10992 * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
10993 prolog. Fixes #331958.
10995 2007-10-15 Zoltan Varga <vargaz@gmail.com>
10997 * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
10999 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11001 * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
11004 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11006 * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
11009 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
11011 * mini-x86.c, mini-x86.h: x86 support for the common vtable
11014 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
11016 * mini-trampolines.c: changed the magic rampoline to understand
11017 the common vtable trampoline method: the method to invoke is
11018 determined by the vtable displacement of the call.
11020 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11022 * mini.c, mini.h: register the common vtable trampoline if the
11023 architecture supports it.
11025 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11027 * cpu-amd64.md: use the correct max length for tls_get.
11029 2007-10-14 Zoltan Varga <vargaz@gmail.com>
11031 * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
11032 CEE_STELEM_ANY. Fixes #333696.
11034 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
11036 * exceptions-x86.c: provide more graceful handling of the case where
11037 we followed a bogus function pointer from managed code (bug #332866).
11039 2007-10-11 Mark Probst <mark.probst@gmail.com>
11041 * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
11042 replaces the generic_shared flag and will carry more information
11045 * generic-sharing.c: Added mini_type_stack_size() which allows
11046 allows open types if given a generic sharing context.
11047 mini_get_basic_type_from_generic() takes a
11048 MonoGenericSharingContext* instead of a MonoCompile* now.
11050 * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
11051 mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
11052 mini-sparc.c, mini-x86.c: Trivial changes required by the two
11053 changes above. Just passing arguments through to the right
11056 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11058 * mini-arm.c: unify the call emission to emit_code_seq().
11060 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
11062 * tramp-arm.c: reduced the trampoline size.
11064 2007-10-10 Mark Probst <mark.probst@gmail.com>
11066 * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
11067 variable handling out of arch-specific code.
11069 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
11071 * mini-arm.c: implemented fast delegate dispatch.
11073 2007-10-09 Zoltan Varga <vargaz@gmail.com>
11075 * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
11076 that fp elimination is turned off if the space required by locals is too
11077 big. Fixes #331958.
11079 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
11081 * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
11082 ARM to the new style trampoline.
11084 2007-10-09 Zoltan Varga <vargaz@gmail.com>
11086 * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
11088 * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
11090 2007-10-09 Martin Baulig <martin@ximian.com>
11093 (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
11094 `field_info_offset_offset'.
11096 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
11098 * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
11099 removed more internal usage of the r11 register and made it available
11100 to the register allocator.
11102 2007-10-08 Mark Probst <mark.probst@gmail.com>
11104 * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
11105 when sharing generics and treat type variables as references.
11107 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11109 * mini-ppc.c: started removing the internal uses of register r11
11110 to eventually allow the register allocator to manage it as an
11111 additional available register.
11113 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
11115 * tramp-amd64.c: fixed memory corruption in the trampoline generation.
11117 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
11119 * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
11120 specific trampolines as they are not performance critical as a jump
11121 target (maybe align as before only for AOT code?). This saves about
11122 200 KB of native code on x86 for monodevelop startup.
11124 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
11126 * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
11127 monodevelop startup.
11129 2007-10-06 Zoltan Varga <vargaz@gmail.com>
11131 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
11133 * mini-sparc.h mini-sparc.c: Implement IMT support.
11135 * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
11136 its smaller and doesn't clobber sparc_g1.
11138 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
11140 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11142 * mini-ppc.c: optimized the size of the IMT thunks a bit.
11144 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
11146 * mini-ppc.c: implemented fast delegate invocation.
11148 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
11150 * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
11152 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11154 * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
11155 code to the new style trampoline in preparation for IMT support.
11157 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
11159 * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
11160 systems already. This also reduces the specific trampiline sizes and
11161 prepares for the use of r12 as the IMT identifier register.
11163 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11165 * mini-mips.h: endianess fix (simplified from a patch by
11166 Thomas Kunze <thommy@tabao.de>, bug #323737).
11168 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11170 * exceptions-ppc.c, mini-ppc.h: refactor to use macros
11171 to access ucontext fields and enable netbsd support
11172 (partially from Magnus Henoch <mange@freemail.hu>).
11174 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11176 * genmdesc.pl: patch from Henryk Plotz <henryk@openmoko.org> to
11177 use the preprocessor from the CPP env var if it is set.
11179 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11181 * mini-trampolines.c: fixed an assertion and moved it earlier in the
11182 code, before interface_offset gets used.
11184 2007-10-02 Zoltan Varga <vargaz@gmail.com>
11186 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
11187 mono_class_setup_vtable () before accessing klass->vtable.
11189 2007-10-01 Zoltan Varga <vargaz@gmail.com>
11191 * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
11194 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11196 * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
11197 IMT slots (this saves hundreds of KB of memory in programs like
11198 IronPython and Monodevelop).
11200 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
11202 * mini.c: print the delegate counter.
11204 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
11206 * mini-x86.c: make it easier to enable the debugging code for IMT
11209 2007-09-28 Martin Baulig <martin@ximian.com>
11212 (MonoDebuggerMetadataInfo): Add `klass_image_offset',
11213 `mono_method_klass_offset' and `mono_method_token_offset'.
11215 2007-09-20 Mark Probst <mark.probst@gmail.com>
11217 * mini.c: First generics sharing implementation. Can only share
11218 in very simple cases. If sharing doesn't work it falls back to
11219 dedicated compilation.
11221 * mini.h: Flag in MonoCompile to specify whether generic
11222 compilation is shared. Flags enum for marking which generic inst
11223 of a context is used. Prototypes for helper functions.
11225 * generic-sharing.c: Helper functions for generic method sharing.
11227 * optflags-def.h: Optimization flag (gshared) for enabling generic
11228 method sharing added.
11230 * Makefile.am: generic-sharing.c added.
11232 2007-09-19 Daniel Nauck <dna@mono-project.de>
11234 * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
11236 2007-09-19 Massimiliano Mantione <massi@ximian.com>
11237 * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
11240 2007-09-19 Martin Baulig <martin@ximian.com>
11242 * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
11243 mono_debug_cleanup() is now part of mono_cleanup().
11245 2007-09-18 Zoltan Varga <vargaz@gmail.com>
11247 * driver.c (mono_main): Fix a warning.
11249 2007-09-17 Zoltan Varga <vargaz@gmail.com>
11251 * aot-compiler.c: Optimize various parts when processing large assemblies.
11254 * mini.c (mono_patch_info_hash): Improve hash function.
11256 2007-09-14 Jonathan Chambers <joncham@gmail.com>
11258 * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
11260 Code is contributed under MIT/X11 license.
11262 2007-09-14 Zoltan Varga <vargaz@gmail.com>
11264 * mini.c (mini_init): Fix a leak.
11266 * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
11268 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
11270 * mini.c: redirect string.InternalAllocStr() to the managed allocator.
11272 2007-09-14 Zoltan Varga <vargaz@gmail.com>
11274 * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
11276 2007-09-13 Zoltan Varga <vargaz@gmail.com>
11278 * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
11281 * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
11283 * mini.c (handle_alloc): Enable managed allocators in AOT code.
11285 * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
11287 * aot-runtime.c (decode_patch_info): Ditto.
11289 2007-09-12 Jonathan Chambers <joncham@gmail.com>
11291 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
11292 static case. Cache delegates in architecture specific code,
11293 based on number of parameters.
11295 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
11296 in architecture specific code, based on number of parameters.
11298 * mini-trampolines.c (mono_delegate_trampoline): Architecture specific
11299 caching happen in architecture specific code now.
11301 Code is contributed under MIT/X11 license.
11303 2007-09-12 Jonathan Chambers <joncham@gmail.com>
11305 * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
11306 mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
11307 mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
11309 Code is contributed under MIT/X11 license.
11311 2007-05-15 Massimiliano Mantione <massi@ximian.com>
11312 * mini.c: (mono_thread_abort) Fixed bug #82416.
11314 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
11316 * mini.: hook the new managed GC allocation feature into the JIT.
11318 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
11320 * mini.c: implementation for the new runtime tls opcode.
11322 2007-09-11 Martin Baulig <martin@ximian.com>
11325 (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
11326 `mono_method_inflated_offset'.
11328 2007-09-07 Zoltan Varga <vargaz@gmail.com>
11330 * driver.c mini.h mini.c: Add a new devel command line option for injecting
11331 async exceptions into a method.
11333 * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
11334 purpose of testing whenever the unwinder works at every instruction.
11336 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
11338 * mini.c: check accessibility of method used in ldftn (fixes
11341 2007-09-04 Zoltan Varga <vargaz@gmail.com>
11343 * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
11345 * inssel.brg: Fix a warning.
11347 2007-09-03 Martin Baulig <martin@ximian.com>
11349 * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
11350 now takes the `main_method' as argument.
11352 2007-09-02 Zoltan Varga <vargaz@gmail.com>
11354 * cpu-sparc.md (endfilter): Add missing src1:i argument.
11356 2007-08-30 Jonathan Chambers <joncham@gmail.com>
11358 * driver.c: include the cil-coff.h header on Windows.
11360 Code is contributed under MIT/X11 license.
11362 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
11364 * mini.c, driver.c: don't include the cil-coff.h header.
11366 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
11368 * mini.c: flag places that needs fixes fo soft-float support.
11370 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
11372 * mini.h, inssel-float.brg: fix soft-float constant loads on big
11373 endian systems (partially from Dean Jenkins, bug #81924).
11375 2007-08-28 Mark Probst <mark.probst@gmail.com>
11377 * mini.c (check_linkdemand): Remove embedded reference object in
11378 call to LinkDemandSecurityException.
11379 (mono_jit_compile_method_inner): Call LinkDemandSecurityException
11380 with an IntPtr instead of a reference object.
11382 2007-08-28 Zoltan Varga <vargaz@gmail.com>
11384 * mini.c (handle_initobj): Handle alignment properly.
11386 * inssel.brg (mini_emit_memset): Ditto.
11388 * inssel.brg (mini_emit_memcpy): Ditto.
11390 * inssel-sparc.brg: Ditto.
11392 * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
11394 2007-08-26 Zoltan Varga <vargaz@gmail.com>
11396 * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
11397 exceptions raised in unmanaged code. Fixes part of #82594.
11399 2007-08-24 Mark Probst <mark.probst@gmail.com>
11401 * mini.c (mono_method_to_ir), declsec.c
11402 (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
11404 2007-08-22 Martin Baulig <martin@ximian.com>
11407 (MonoDebuggerThreadInfo): New typedef.
11408 (mono_debugger_thread_table): New global variable.
11409 (mono_debugger_thread_created): New public function.
11410 (mono_debugger_thread_cleanup): New public function.
11413 (MonoDebuggerInfo):
11414 - removed `get_current_thread' and `lookup_assembly'.
11415 - removed `data_table'.
11416 - added `thread_table'.
11419 (mono_thread_start_cb): Call mono_debugger_thread_created().
11420 (mono_thread_attach_cb): Likewise.
11421 (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
11422 (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
11425 * driver.c (mono_main): Move mono_debug_init() up, before calling
11426 mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
11428 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
11430 * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
11431 together when passing several arguments of type double (gives a small
11432 speedup and saves a few bytes of generated code).
11434 2007-08-20 Jb Evain <jbevain@novell.com>
11436 * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
11438 2007-08-20 Jb Evain <jbevain@novell.com>
11440 * mini.c (mono_method_to_ir): throw MethodAccessException
11441 and FieldAccessException instead of InvalidProgramException.
11443 2007-08-20 Mark Probst <mark.probst@gmail.com>
11445 * mini.c: CoreCLR security checks.
11447 * mini.h: Removed MonoSecurityMode (moved to
11448 metadata/security-manager.h) and mono_security_mode global var
11449 (replaced by set/get functions in security-manager.h).
11451 * driver.c: Added "core-clr-test" security mode for testing. Used
11452 set-function for setting security mode.
11454 2007-08-17 Mark Probst <mark.probst@gmail.com>
11456 * mini.c: MonoJitInfo's are freed hazardously now. Statistics for
11457 the new jit_info_table.
11459 * driver.c: Test code for the new jit_info_table (enabled by the
11460 define MONO_JIT_INFO_TABLE_TEST).
11462 2007-08-14 Zoltan Varga <vargaz@gmail.com>
11464 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
11465 detection of call <REG> instruction sequence. Fixes build on freebsd.
11467 2007-08-13 Zoltan Varga <vargaz@gmail.com>
11469 * mini-exceptions.c: Fix a warning.
11471 2007-08-11 Zoltan Varga <vargaz@gmail.com>
11473 * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
11474 stack overflow handling code on amd64 too.
11476 * mini-exceptions.c (mono_setup_altstack): Make this use
11477 mono_thread_get_stack_bounds ().
11479 * mini-x86.h: Disable sigaltstack on solaris x86.
11481 2007-08-10 Zoltan Varga <vargaz@gmail.com>
11483 * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
11485 2007-08-10 Geoff Norton <gnorton@customerdna.com>
11487 * tramp-x86.c: Remove some unneeded alignment changes on Apple. Fixes #82387.
11489 2007-08-08 Zoltan Varga <vargaz@gmail.com>
11491 * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
11493 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
11495 2007-08-03 Neale Ferguson <neale@sinenomine.net>
11497 * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
11500 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
11502 * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
11503 to be emitted (bug #82281).
11505 2007-08-01 Martin Baulig <martin@ximian.com>
11507 Merged the `debugger-dublin' branch.
11509 * debug-debugger.h (MonoDebuggerInfo):
11510 Removed the `old_*' compatibility entries.
11511 Added `debugger_version' and `data_table'.
11512 Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
11513 Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
11516 (MiniDebugMethodBreakpointInfo): Add `address_list'.
11517 (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
11518 instead of a `gconstpointer'.
11519 (mono_debugger_insert_method_breakpoint): Return a
11520 `MonoDebugMethodAddressList *'.
11522 2007-06-28 Martin Baulig <martin@ximian.com>
11524 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
11526 2007-08-01 Zoltan Varga <vargaz@gmail.com>
11528 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using
11529 __builtin_frame_address () since it is broken on older gcc versions.
11531 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11533 * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
11534 on the stack overflow handling and made the managed stack overflows
11535 catchable in most cases using soft guard pages.
11536 * exceptions-x86.c: added code to restore the protection in the soft
11537 guard pages at the end of exception handling.
11539 2007-07-31 Zoltan Varga <vargaz@gmail.com>
11541 * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
11543 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
11545 * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
11546 exception handling.
11548 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
11550 * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
11551 signal handling support until it has been ported to the new mechanism.
11552 * mini.c: fixed stack overflow detection and use the new
11553 architecture code to handle signals on the altstack.
11555 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
11557 * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
11558 stack overflows on the alt stack.
11560 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
11562 * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
11563 stack overflows on the alt stack.
11565 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
11567 * exceptions-ppc.c: cleanup preparing for altstack support.
11569 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
11571 * exceptions-arm.c: cleanup preparing for altstack support.
11573 2007-07-27 Mark Probst <mark.probst@gmail.com>
11575 * mini.c (print_jit_stats): Output hazard pointer stats.
11577 2007-07-26 Mark Probst <mark.probst@gmail.com>
11579 * driver.c, mini.c: Replaced security mode flags with a single
11582 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11584 * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
11586 2007-07-25 Mark Probst <mark.probst@gmail.com>
11588 * mini.c, mini.h, driver.c (mono_main): Added command-line flag
11589 (which doesn't do anything yet) for activating Core CLR
11590 (Silverlight) security.
11592 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
11594 * mini-codegen.c: work around a possible gcc bug on arm.
11596 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
11598 * driver.c, mini-x86.h, mini-amd64.h: print a nice error
11599 message for platforms that don't support AOT compilation.
11601 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
11603 * mini.h, mini.c, driver.c: temporary smcs hack.
11605 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
11607 * mini-arm.h, mini-arm.c: arm EABI fixes.
11609 2007-07-22 Zoltan Varga <vargaz@gmail.com>
11611 * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
11614 * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
11615 trampolines taking a method argument.
11617 * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
11619 * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
11620 * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
11622 * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
11623 JIT compilation throws an exception. Fixes #82050.
11625 2007-07-19 Mark Probst <mark.probst@gmail.com>
11627 * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
11628 with the MONO_EXCEPTION_ defines.
11630 2007-07-17 Zoltan Varga <vargaz@gmail.com>
11632 * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
11635 * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
11636 the cause of an assertion.
11638 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
11640 * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
11643 2007-07-15 Zoltan Varga <vargaz@gmail.com>
11645 * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
11646 assert. Should fix #82103.
11648 2007-07-14 Zoltan Varga <vargaz@gmail.com>
11650 * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
11651 here too. Fixes #82095.
11653 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
11656 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
11658 * mini-amd64.h: Enable IMT for amd64.
11660 * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
11662 2007-07-12 Zoltan Varga <vargaz@gmail.com>
11664 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
11666 2007-07-12 Mark Probst <mark.probst@gmail.com>
11668 * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
11669 as soon as check_linkdemand sets an exception_type.
11671 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
11673 * mini-x86.c: fixed offsets for IMT call sequence.
11674 * mini-x86.h: enable IMT again.
11676 2007-07-11 Zoltan Varga <vargaz@gmail.com>
11678 * trace.c (mono_trace_enter_method): Decode MonoType too.
11680 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
11682 * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
11684 * mini-amd64.c: Add preliminary IMT implementation.
11686 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
11688 * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
11689 understand the new IMT-base interface invocation (thanks to
11690 Daniel Nauck for the report and the remote debugging session).
11692 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
11694 * mini-x86.c: size and speed optimizations for the IMT bsearch.
11696 2007-07-11 Zoltan Varga <vargaz@gmail.com>
11698 * Makefile.am (aotcheck): Make this actually use the AOTed code.
11700 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
11702 * mini-trampolines.c: implement AOT IMT support.
11703 * mini-x86.h: enable IMT support for wider testing.
11705 2007-07-10 Zoltan Varga <vargaz@gmail.com>
11707 * inssel.brg (emit_imt_argument): Add aot support here.
11709 * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
11711 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11713 * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
11714 of the IMT implementation, partially from massi, with my
11715 implementation of the bsearch sequence. Disabled by default until
11716 the AOT code is implemented.
11718 2007-07-10 Zoltan Varga <vargaz@gmail.com>
11720 * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
11722 * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
11724 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11726 * inssel.brg, mini.c, mini.h, mini-trampolines.c:
11727 arch-independent IMT JIT code from Massimiliano
11728 Mantione (massi@ximian.com) with small cleanups from me.
11730 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
11732 * Makefile.am: fix svn invocation to get the svn revision to be
11733 independent of the local language (build fix).
11735 2007-07-09 Mark Probst <mark.probst@gmail.com>
11737 * mini.c (inline_method): Reset cfg->exception_type if the
11738 inlining is aborted. Fixes: 82049.
11740 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
11742 * mini.c: remove assert from exception handling code when exception_ptr
11745 2007-07-05 Zoltan Varga <vargaz@gmail.com>
11747 * mini.c (mono_codegen): Add an assert.
11749 * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method
11750 enter and leave code.
11751 * mini-amd64.c (mono_arch_emit_prolog): Likewise.
11753 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11755 * mini-ppc.c: fixed memory corruption for localloc(0)
11758 2007-07-05 Zoltan Varga <vargaz@gmail.com>
11760 * mini.c: Fix warnings.
11762 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
11764 * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
11765 to emit better double->int conversions.
11767 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
11769 * mini.c: the provided Min/Max optimizations are valid for unisgned
11772 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
11774 * 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
11776 2007-06-28 Miguel de Icaza <miguel@novell.com>
11778 * mini.c (mono_running_on_valgrind): Add support for reporting the
11779 method and its boundaries to valgrind.
11781 2007-06-28 Martin Baulig <martin@ximian.com>
11783 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
11785 2007-06-25 Zoltan Varga <vargaz@gmail.com>
11787 * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
11789 * generic.2.cs: Add new test case.
11791 2007-06-25 Martin Baulig <martin@ximian.com>
11793 Merged the `debugger-dublin' branch.
11796 (mono_debugger_insert_method_breakpoint): New public method.
11797 (mono_debugger_remove_method_breakpoint): Likewise.
11798 (mono_debugger_check_breakpoints): New static method.
11799 (mono_debug_close_method): Call mono_debugger_check_breakpoints().
11801 * debug-debugger.h (MonoDebuggerInfo):
11802 Renamed (to keep backward compatibility in the vtable):
11803 `insert_breakpoint' -> `old_insert_breakpoint'.
11804 `remove_breakpoint' -> `old_remove_breakpoint'.
11805 `create_string' -> `old_create_string'.
11806 `lookup_class' -> `old_lookup_class'.
11807 `lookup_type' -> removed; changed into a dummy field.
11808 `lookup_assembly' -> `old_lookup_assembly'.
11809 Added (same functionality, but different signature):
11810 `create_string', `lookup_class', `lookup_assembly'
11812 `get_method_addr_or_bpt', `remove_method_breakpoint',
11813 `runtime_class_init'.
11815 * debug-debugger.c: Merged the `debugger-dublin' branch.
11817 2007-06-23 Zoltan Varga <vargaz@gmail.com>
11819 * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
11821 (peephole_pass): Likewise.
11823 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
11825 * driver.c: hopefully make setaffinity work also for ancient
11828 2007-06-22 Atsushi Enomoto <atsushi@ximian.com>
11830 * driver.c : win32 build fix.
11832 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
11834 * driver.c: check for the MONO_NO_SMP env var and bind to a single
11835 processor if it is set.
11837 2007-06-21 Martin Baulig <martin@ximian.com>
11839 * debug-mini.h: New file.
11842 (mono_debugger_insert_breakpoint_full): Moved here from
11843 ../metadata/mono-debug-debugger.c.
11844 (mono_debugger_remove_breakpoint): Likewise.
11845 (mono_debugger_breakpoint_callback): Likewise.
11847 2007-06-15 Raja R Harinath <rharinath@novell.com>
11849 * jit-icalls.c (mono_helper_compile_generic_method): Update to
11850 changes in MonoGenericClass.
11852 2007-06-14 Zoltan Varga <vargaz@gmail.com>
11854 * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
11856 2007-06-14 Raja R Harinath <rharinath@novell.com>
11858 * jit-icalls.c (mono_helper_compile_generic_method): Update to
11859 removal of MonoGenericMethod.
11861 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
11863 * mini-exceptions.c: hooks for the exception events profiling API.
11865 2007-06-14 Randolph Chung <tausq@debian.org>
11867 * Makefile.ma: Add hppa target.
11868 * mini-arch.h: Include mini-hppa.h
11869 * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
11870 mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
11871 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
11873 2007-06-14 Randolph Chung <tausq@debian.org>
11875 * inssel.brg: Add rules for "chained" compare-branch operations so that
11876 a single compare op can affect multiple branches. Adjust cost for
11877 OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
11878 * inssel-long32.brg: Update rules to use compare-branch macros. Adjust
11879 cost for some rules so that they can more easily be overridden by
11880 per-arch rules (with fixes from lupus).
11881 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
11883 2007-06-13 Randolph Chung <tausq@debian.org>
11885 * mini-ops.h: Reorder branch ops so that they match the order of the
11886 corresponding CEE_* ops. The code expects them this way.
11887 Add new ops for HPPA target.
11888 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
11890 2007-06-13 Randolph Chung <tausq@debian.org>
11892 * mini-exceptions.c: Handle cases where the stack grows towards
11894 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
11896 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
11898 * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
11900 * driver.c: explain where a non-matching corlib is found.
11902 2007-06-13 Mark Probst <mark.probst@gmail.com>
11904 * mini.c (print_jit_stats): Output dynamic code allocation stats.
11906 2007-06-10 Sanghyeon Seo <sanxiyn@gmail.com>
11908 * mini-exceptions.c: Generate a method profile leave event during
11909 an exception to ensure that the profiler gets notified.
11911 2007-06-07 Zoltan Varga <vargaz@gmail.com>
11913 * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir
11916 * cpu-amd64.md: Add long_and/or/xor opcodes.
11918 2007-06-06 Wade Berrier <wberrier@novell.com>
11920 * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
11921 (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction
11922 length of instruction shr_imm (expected 8, got 10)
11924 2007-06-06 Zoltan Varga <vargaz@gmail.com>
11926 * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
11928 2007-06-06 Mark Probst <mark.probst@gmail.com>
11930 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
11931 MonoInternalHashTable again (fixed bug in the internal hash table
11934 2007-06-06 Mark Probst <mark.probst@gmail.com>
11936 * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
11937 Have to figure out what makes it crash the SWF regression.
11939 2007-06-05 Zoltan Varga <vargaz@gmail.com>
11941 * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
11943 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
11945 * mini.c: optimize out the type check when storing null in a
11948 2007-06-04 Mark Probst <mark.probst@gmail.com>
11950 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
11951 MonoInternalHashTable.
11953 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
11955 * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
11956 signed integer methods.
11958 2007-06-02 Zoltan Varga <vargaz@gmail.com>
11960 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case
11961 permanently since the current approach doesn't work.
11963 2007-06-02 Zoltan Varga <vargaz@gmail.com>
11965 * inssel.brg (stmt): Only call delegate->invoke_impl if
11966 MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
11968 2007-06-01 Zoltan Varga <vargaz@gmail.com>
11970 * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
11971 the sreg2==rdx case.
11973 * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
11974 account if it contains a rex prefix.
11975 (peephole_pass): Handle OP_FMOVE as well.
11977 2007-06-01 Zoltan Varga <vargaz@gmail.com>
11979 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
11980 as it causes regressions.
11982 2007-05-31 Zoltan Varga <vargaz@gmail.com>
11984 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
11985 static case as well.
11987 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
11989 * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
11990 (mono_arch_get_this_arg_from_call): Ditto.
11992 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
11994 * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
11997 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
11998 (mono_arch_get_this_arg_from_call): Ditto.
12000 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
12002 * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
12003 try to create optimized invoke code and use that for further invocations.
12004 Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
12006 * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
12008 2007-05-29 Rodrigo Kumpera <kumpera@gmail.com>
12010 * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
12011 sealed classes or methods.
12012 *devirtualization.cs: tests for the new optimization
12014 2007-05-29 Zoltan Varga <vargaz@gmail.com>
12016 * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
12017 by the update_volatile () function.
12019 2007-05-27 Zoltan Varga <vargaz@gmail.com>
12021 * driver.c (mono_main): Call g_thread_init () early since newer glib versions
12024 * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
12026 2007-05-24 Jonathan Chambers <joncham@gmail.com>
12028 * mini.c: Add configure checks for header files.
12029 * mini-x86.c: Add configure checks for header files.
12030 * trace.c: Add configure checks for header files.
12031 * aot-runtime.c: Add configure checks for header files.
12032 * aot-compiler.c: Add configure checks for header files.
12033 * driver.c: Add configure checks for header files.
12034 * mini-codegen.c: Add configure checks for header files.
12036 Code is contributed under MIT/X11 license.
12038 2007-05-22 Zoltan Varga <vargaz@gmail.com>
12040 * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
12041 icompare_imm -128 + op_iclt. Fixes #81703.
12043 2007-05-19 Zoltan Varga <vargaz@gmail.com>
12045 * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
12047 2007-05-15 Massimiliano Mantione <massi@ximian.com>
12049 * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
12050 inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
12051 so that all isinst checks now use "interface_bitmap".
12053 2007-05-15 Zoltan Varga <vargaz@gmail.com>
12055 * cpu-amd64.md (jmp): Fix a warning.
12057 * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
12059 * basic.cs: Add new regression test.
12061 * basic.cs: Remove test which is now in basic-long.cs.
12063 * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
12065 * basic-long.cs: Add new test.
12067 2007-05-13 Zoltan Varga <vargaz@gmail.com>
12069 * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
12071 2007-05-12 Zoltan Varga <vargaz@gmail.com>
12073 * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
12075 * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
12078 * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception
12079 throwing code a bit.
12081 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of
12082 the exception throwing code a bit.
12084 * mini-x86.c (get_call_info): Allocate result from a mempool.
12086 2007-05-11 Zoltan Varga <vargaz@gmail.com>
12088 * aot-compiler.c (find_typespec_for_class): Fix the assert.
12090 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
12092 * mini.h (MonoCompile): Add 'token_info_hash' field.
12094 * mini.c: Save token->method associations during compilation so the AOT
12095 compiler can use it.
12097 * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
12098 which reference generic classes and methods.
12100 2007-05-10 Zoltan Varga <vargaz@gmail.com>
12102 * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
12104 * aot-compiler.c (compile_method): Fix a typo in a comment.
12106 * aot-runtime.c (decode_cached_class_info): Skip generic types.
12108 * aot-compiler.c: Add minimal support for AOTing generic code by skipping
12109 everything generic.
12111 * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
12113 2007-05-09 Zoltan Varga <vargaz@gmail.com>
12115 * mini.h (MonoCompile): Add 'args' field.
12117 * mini.c (mono_compile_create_vars): Store variables representing the arguments
12120 * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
12122 2007-05-08 Zoltan Varga <vargaz@gmail.com>
12124 * mini.c (mono_compile_get_interface_var): Remove this unused function.
12126 * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
12128 * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
12129 opcodes for some opcodes.
12131 * mini.h *.brg *.c: Use the new opcodes.
12133 2007-05-08 Massimiliano Mantione <massi@ximian.com>
12135 * mini.h: Bumped aot revision.
12137 * inssel.brg: modified code generation of type checks for interfaces
12138 to use the new "MonoClass.interface_bitmap" instead of the old
12139 "MonoClass.interface_offsets".
12141 2007-04-30 Zoltan Varga <vargaz@gmail.com>
12143 * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
12145 2007-04-29 Zoltan Varga <vargaz@gmail.com>
12147 * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
12150 2007-04-27 Neale Ferguson <neale@sinenomine.net>
12152 * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
12154 2007-04-27 Wade Berrier <wberrier@novell.com>
12156 * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in
12157 mini.h) to fix build.
12159 2007-04-26 Zoltan Varga <vargaz@gmail.com>
12161 * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
12163 * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
12164 causes the corlib unit tests to fail.
12166 2007-04-25 Zoltan Varga <vargaz@gmail.com>
12168 * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
12170 * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
12172 * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional
12173 opcodes to the comparison relations.
12175 * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional
12176 opcodes to their types.
12178 * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
12180 * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache
12181 it in cfg->arch.cinfo.
12183 * local-propagation.c (mono_local_cprop_bb): Fix a warning.
12185 * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in
12186 cfg->cil_offset_to_bb.
12188 2007-04-24 Zoltan Varga <vargaz@gmail.com>
12190 * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
12191 created becase of initlocals.
12193 2007-04-23 Zoltan Varga <vargaz@gmail.com>
12195 * mini-alpha.c cpu-alpha.md: More alpha port work from
12196 Sergey Tikhonov <tsv@solvo.ru>.
12198 2007-04-21 Andreas Faerber <andreas.faerber@web.de>
12200 * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
12202 2007-04-19 Zoltan Varga <vargaz@gmail.com>
12204 * cpu-s390.md (break): Correct the length of break instruction.
12206 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
12208 * mini.c: fix a couple of soft-float issues and comments.
12210 2007-04-15 Miguel de Icaza <miguel@novell.com>
12212 * trace.c (is_filenamechar): - is also a filename char.
12214 2007-04-15 Neale Ferguson <neale@sinenomine.net>
12216 * mini-s390.c: Correct checking for enum type in return value processing.
12218 2007-04-14 Raja R Harinath <rharinath@novell.com>
12220 * Makefile.am (BUILT_SOURCES): Add 'version.h'.
12221 (version.h): Makefile is in the build directory.
12223 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
12225 * mini-amd64.h: fix for assertion failure on Solaris/amd64
12227 2007-04-11 Martin Baulig <martin@ximian.com>
12229 * mini.c (can_access_member): Fix handling of generic classes;
12232 2007-04-10 Zoltan Varga <vargaz@gmail.com>
12234 * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
12236 2007-04-05 Zoltan Varga <vargaz@gmail.com>
12238 * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
12240 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
12242 * mini-codegen.c: make sure the right spill amount is
12243 used for fp or integer registers (fixes the float_sub_spill() on ppc).
12245 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
12247 * mini-ppc.c: fixes for the fp_branch_nan test.
12249 2007-03-23 Zoltan Varga <vargaz@gmail.com>
12251 * basic.cs: Comment out new test which still fails on ia64.
12253 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
12255 * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
12257 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12259 * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
12261 2007-03-22 Zoltan Varga <vargaz@gmail.com>
12263 * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
12264 on 64 bit machines. Fixes part of #80738.
12266 * basic.cs: Add regression test.
12268 2007-03-17 Zoltan Varga <vargaz@gmail.com>
12270 * inssel.brg basic.cs: Revert previous change to fix build.
12272 * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
12275 * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
12277 * basic.cs: Add new regression test.
12279 2007-03-17 Zoltan Varga <vargaz@gmail.com>
12281 * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
12284 2007-03-16 Neale Ferguson <neale@sinenomine.net>
12286 * cpu-s390x.md: Correct length of break instruction.
12288 2007-03-16 Neale Ferguson <neale@sinenomine.net>
12290 * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
12291 * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
12293 2007-03-15 Jonathan Chambers <joncham@gmail.com>
12295 * *.c: Begin WIN64 port.
12296 * mini.c: Use correct register in profiler.
12297 * mini-amd64.c: No inline assembly on Win64.
12298 * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
12299 Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
12300 * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
12301 is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
12302 mono_arch_ip_from_context for Win64.
12304 Contributed under MIT/X11 license.
12306 2007-03-15 Zoltan Varga <vargaz@gmail.com>
12308 * exceptions-amd64.c (seh_handler): Ditto.
12310 * exceptions-x86.c (seh_handler): Fix a memory leak.
12312 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
12314 * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
12315 mini-s390x.c: fixed peephole optimizations to deal
12316 correctly with 1 and 2 byte reload avoidance.
12318 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
12320 * cpu-s390.md, cpu-s390x.md: update localloc length.
12322 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
12324 * cpu-g4.md: added missing descriptions.
12326 2007-03-14 Miguel de Icaza <miguel@novell.com>
12328 * Makefile.am: Add support so the tail tests are not executed on
12329 PowerPC as that is a known limitation of the PowerPC port.
12331 2007-03-13 Jonathan Chambers <joncham@gmail.com>
12333 * runmdesc.bat: Move to msvc directory.
12335 2007-03-13 Jonathan Chambers <joncham@gmail.com>
12337 * runmdesc.bat: Run executable that was produced by the current
12338 target and sent via an argument.
12340 2007-03-11 Zoltan Varga <vargaz@gmail.com>
12342 * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
12345 * generics.2.cs: Add regression test.
12347 2007-03-09 Wade berrier <wberrier@novell.com>
12349 * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
12351 2007-03-09 Zoltan Varga <vargaz@gmail.com>
12353 * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
12354 AOT code depends on this.
12356 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
12358 * mini.c: more precise tracking of types in the eval stack
12359 (part of fix for bug #81044).
12361 2007-03-07 Zoltan Varga <vargaz@gmail.com>
12363 * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
12365 * aot-compiler.c (encode_patch): Remove an obsolete comment.
12367 2007-03-06 Zoltan Varga <vargaz@gmail.com>
12369 * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
12371 * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
12373 2007-02-22 Zoltan Varga <vargaz@gmail.com>
12375 * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
12376 a pointer on 64 bit systems. Fixes #80190.
12378 * iltests.il: Add new regression test.
12380 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12382 * mini.c: inline a constant for Environment.IsRunningOnWindows.
12384 2007-02-19 Geoff Norton <gnorton@customerdna.com>
12386 * trace.c: Remove an erroneous alignemnt check when tracing.
12387 Fixes --trace on OSX86.
12389 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
12391 * mini-$(arch).h: initialize SP in context for all the archs.
12393 2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
12395 * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
12396 regressions in the thread tests.
12398 2007-02-14 Zoltan Varga <vargaz@gmail.com>
12400 * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
12401 - fixed implementation of LOCALLOC opcode
12402 - implemented non-un compare for floats
12404 - implementation of FDIV and CKFINITE opcodes
12405 - fixes for latest mono updates
12406 - additional arch opcodes
12408 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
12410 * Makefile.am: simplify and merge rules for cross-compilation.
12412 2007-02-07 Massimiliano Mantione <massi@ximian.com>
12414 * local-propagation.c: Actually *apply* the fix for bug 80591...
12416 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
12418 * mini-exceptions.c: backuot part of the last change
12419 (fixes cas tests on amd64 related to GetExecutingAssembly ()).
12421 2007-02-06 Massimiliano Mantione <massi@ximian.com>
12422 * inssel.brg: Fix bug 59286.
12425 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
12427 * mini-exceptions.c: patch from Zoltan to correctly check for
12428 stack boundaries (using the stack register, not the frame register),
12429 fixes bugs #80724, #79717.
12431 2007-02-03 Zoltan Varga <vargaz@gmail.com>
12433 * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
12434 OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
12436 * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
12437 presence of frame pointer elimination.
12439 2007-02-01 Geoff Norton <gnorton@customerdna.com>
12441 * mini-x86.h: NetBSD UCONTEX_REG defines.
12443 2007-02-01 Zoltan Varga <vargaz@gmail.com>
12445 * inssel-amd64.brg: Fix amd64 build.
12447 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
12449 * mini.h: remove extern to workaround what looks likes gcc bug 26905
12452 2007-01-31 Zoltan Varga <vargaz@gmail.com>
12454 * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
12457 * mini-<ARCH>.c: Use mono_is_regsize_var ().
12459 2007-01-30 Mark Mason <mason@broadcom.com>
12461 * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
12462 * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
12463 * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
12464 beginning support for CEE_JMP [not quite working yet]
12465 * tramp-mips.c: LMF handling now works
12467 2007-01-30 Zoltan Varga <vargaz@gmail.com>
12469 * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
12471 * mini.h (NULLIFY_INS): New macro.
12473 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
12475 * mini.c: statistical profiler fix for windows, patch
12476 from Tor Lillqvist (tml@novell.com).
12478 2007-01-30 Massimiliano Mantione <massi@ximian.com>
12479 * local-propagation.c: Fix bug 80591.
12481 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
12483 * Makefile.am: put back the --export-dynamic option as with
12484 the previous gmodule flags (thanks to Robert Jordan).
12486 2007-01-28 Zoltan Varga <vargaz@gmail.com>
12488 * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
12490 mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
12491 simplify and speed up the local register allocator. Also rename some fields
12492 like iassign->vassign.
12494 * regalloc.c: Remove some functions which are no longer used since their
12495 inlined version is in mini-codegen.c.
12497 * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
12499 * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
12501 2007-01-27 Zoltan Varga <vargaz@gmail.com>
12503 * mini-amd64.c (peephole_pass): Remove optimizations which omit a
12504 narrowing. Fixes #80622.
12506 * iltests.il: Add new regresssion test.
12508 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
12510 * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
12511 debug-debugger.c, debug-debugger.h: warning fixes.
12512 * driver.c: updated copyright year and made it fit in one line.
12514 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
12516 * aot-runtime.c: updated to use mono-dl instead of gmodule.
12518 2007-01-25 Zoltan Varga <vargaz@gmail.com>
12520 * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
12522 * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
12524 * iltests.il: Add new test for bug #80507.
12526 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12528 * mini-arm.h: use soft-float also on vfp for now.
12530 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
12532 * mini.c: fix some more soft-float issues.
12534 2007-01-24 Zoltan Varga <vargaz@gmail.com>
12536 * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
12538 2007-01-24 Massimiliano Mantione <massi@ximian.com>
12539 * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
12540 mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
12541 MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
12543 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
12545 * mini-arm.c: typo fix.
12547 2007-01-23 Neale Ferguson <neale@sinenomine.net>
12549 * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
12551 2007-01-21 Zoltan Varga <vargaz@gmail.com>
12553 * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
12554 Share stack slots for scalar types. Avoid expensive g_list_free () calls.
12556 * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
12558 * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto.
12560 * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
12562 * inssel.brg: Fix a warning.
12564 * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
12566 * abcremoval.c ssa.c ssapre.c: Update after this change.
12568 * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
12570 * dominators.c (df_set): Use mono_bitset_union_fast.
12572 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
12574 * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
12575 mini-codegen.c: reduce relocations and memory usage for the cpu
12578 2007-01-20 Zoltan Varga <vargaz@gmail.com>
12580 * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
12582 * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
12583 to reduce their size.
12585 2007-01-19 Mark Mason <mason@broadcom.com>
12587 * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
12588 * mini-mips.c: more configuration macros, support long conditional branches, additional
12589 asserts, fix epilog instrumentation.
12590 * mini-mips.h: use standard stack walk
12591 * cpu-mips.md: increase size of div, rem and conditional branches
12593 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
12595 * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
12598 2007-01-19 Zoltan Varga <vargaz@gmail.com>
12600 * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
12601 (compile_method): Ditto.
12603 * aot-runtime.c (decode_klass_info): Ditto.
12605 * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
12606 needed by the code generated by inssel.brg. Also fix a warning.
12608 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
12610 * mini.c: deal with enums that become genericinsts by
12611 being nested in a generic class (bug #79956).
12613 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
12615 * mini.c: match the generic definition to check for
12616 private access with generic types (bug #78431).
12618 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
12620 * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
12621 to make life easier for people cross-compiling that insist on not
12624 2007-01-17 Mark Mason <mason@broadcom.com>
12626 * inssel-long.brg: patch to deal with mips missing flags
12627 * inssel-long32-mips.brg: implement overflow checks
12628 * insset-mips.brg: implement overflow checks
12629 * mini-mips.h: implement conditional exception handling
12630 * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
12631 Remove unused code, minor cleanups.
12632 * exceptions-mips.c: minor cleanups
12633 * mini-ops.h: add mips conditional exception ops
12634 * cpu-mips.md: add mips conditional exception ops
12637 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
12639 * inssel.brg: patch from Mark Mason <mason@broadcom.com>
12640 to deal with mips missing of flags.
12642 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
12644 * exceptions-ppc.c: execute fault handlers.
12646 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
12648 * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
12650 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
12652 * mini.c: handle also floating point values in initialize_array.
12654 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
12656 * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
12657 array initialization and make it conditional on the intrins option.
12659 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
12661 * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
12662 relocations and put the patch info names close to the enum definition.
12664 2007-01-15 Mark Mason <mason@broadcom.com>
12666 * basic.cs, exceptions.cs: break up large tests to increase debugability.
12668 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
12670 * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
12672 2007-01-12 Raja R Harinath <rharinath@novell.com>
12674 * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
12676 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
12678 * Makefile.am: distribute the mips sources.
12680 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
12682 * mini-codegen.h: handle bug #80489 here, by excluding ecx
12685 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
12687 * cpu-x86.md: back out for now as this triggers other regressions.
12689 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
12691 * cpu-x86.md: force src1 and dest regpair for long shift instructions
12692 to eax:edx, so ecx can't get allocated to them (bug #80489).
12694 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
12696 * mini.c, mini-exceptions.c: enabled running fault handlers
12699 2007-01-03 Miguel de Icaza <miguel@novell.com>
12701 * driver.c: If nothing fail, do not use the string "failed",
12702 because it makes it very annoying to view test result logs on the
12705 2006-12-30 Miguel de Icaza <miguel@novell.com>
12707 * debug-debugger.c (mono_debugger_main): Rename "main" to
12708 "main_method" to prevent a warning.
12710 Remove a warning for unused field.
12712 2006-12-28 Martin Baulig <martin@ximian.com>
12715 (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
12717 2006-12-22 Martin Baulig <martin@ximian.com>
12719 * mdb-debug-info32.s, mdb-debug-info64.s: New files.
12720 Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
12721 seperate `.mdb_debug_info' section, so we can access it from the
12722 debugger even if the binary is stripped.
12724 * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
12725 from the `.mdb_debug_info' here to prevent the linker from
12726 removing that section.
12728 * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
12729 mdb-debug-info64.s.
12731 2006-12-19 Robert Jordan <robertj@gmx.net>
12733 * mini-x86: enable the code to return small structures in
12734 registers for FreeBSD as well. Fixes bug #80278.
12735 * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
12737 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12739 * mini-x86.c: align the stack when calling the profiler
12740 function instrumenting the prolog (on OSX).
12742 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
12744 * mini.c: emit a break opcode where Debugger.Break () is called.
12746 2006-12-13 Miguel de Icaza <miguel@novell.com>
12748 * mini.c (mono_method_to_ir): Provide useful information on this
12749 assert, to prevent others from debugging like I did.
12751 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
12753 * mini.c: enable code which was incorrectly commented
12756 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
12758 * mini-x86.c: enable on OSX, too, the code to return small
12759 structures in registers.
12761 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
12763 * mini-x86.c: remove the use of the dynamic code manager here, too.
12765 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
12767 * mini.h, debug-debugger.c, tramp-*.c: fixed
12768 mono_debugger_create_notification_function() to use
12769 mono_global_codeman_reserve () instead of a dynamic code manager.
12771 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
12773 * mini.c, jit-icalls.h, jit-icalls.c: remove the
12774 ves_array_element_address() jit icall and use a generated
12775 managed method instead (which is about 4 times faster for a rank 3
12778 2006-11-29 Mark Mason <mason@broadcom.com>
12780 * basic-calls.cs: additional tests for passing
12781 structures as function arguments.
12783 2006-11-29 Mark Mason <mason@broadcom.com>
12785 * mini-mips.h: disable custom exception handling
12786 * mini-mips.c: throw/rethrow should use jalr to call
12787 exception stubs. Fixed bug with passing structures
12788 by value. More support for tracing floating point
12791 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12793 * mini.c: fixed typo in the soft-float ldind.r4 handling
12796 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
12798 * mini.c, mini.h, driver.c: added --runtime command line
12799 option to select a different runtime than the autodetected one.
12800 * jit.h: added API for embedders to initialize with a specific
12803 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
12805 * mini.c: handle also boxing of r4 values (bug #80024).
12807 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
12809 * mini-ppc.c: force indirect calls until we reserve
12810 enough address space for all the generated code.
12812 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
12814 * exceptions-arm.c: workaround bugs in the libc definition
12815 of struct ucontext.
12817 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
12819 * inssel.brg: fixes from me and Mark Mason.
12821 2006-11-23 Dick Porter <dick@ximian.com>
12823 * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
12824 semaphore display now we've fixed the initial value
12826 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
12828 * inssel.brg: partially revert the last change to fix the build.
12830 2006-11-21 Mark Mason <mason@broadcom.com>
12832 * inssel.brg: Add and use compare-and-branch macros to support
12833 architectures that do not have condition code registers (ie. MIPS).
12834 * *-mips.{c,brg,md}: Fix copyright statements
12836 2006-11-20 Mark Mason <mason@broadcom.com>
12838 * Makefile.am: remove mini-codegen.c from list of MIPS sources
12839 * mini.c: Allow GET_CONTEXT to be specified by the arch port
12840 * mini.h: Added declaration for mono_print_ins()
12841 * mini-codegen.c: added ins_spec initializer for MIPS
12842 * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
12843 vreg to be virtual and hreg to be non-virtual.
12844 * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
12845 is not yet working/implemented correctly.
12846 * mini-codegen.c (print_ins): rename to mono_print_ins(), make
12847 non-static, fixup calls to print_ins() from other parts in the file.
12849 2006-11-20 Mark Mason <mason@broadcom.com>
12851 * basic-calls.cs: added tests for passing structures as arguments
12854 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
12856 * inssel-long32.brg: optimize signed division by power of two.
12858 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
12860 * mini-arm.c: added support for interworking with thumb code
12861 (mono must be still be built using the ARM instruction encoding).
12863 2006-11-19 Miguel de Icaza <miguel@novell.com>
12865 * mini.c (type_from_op): Separate the conditions for OP_EQ as the
12866 verifier has different rules for it. Fixes a few verifier issues
12869 * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
12870 at the end, so people know what happened.
12872 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
12874 * brach-opts.c: in optimize_exception_target() make sure we
12875 are in a catch clause (fixes bug #79871).
12877 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
12879 * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
12880 more soft-float support fixes.
12882 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
12884 * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
12885 that are passed half on the stack and half in registers.
12887 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
12889 * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
12890 more mips integration work from Mark E Mason
12891 <mark.e.mason@broadcom.com>.
12893 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
12895 * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
12896 cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
12897 tramp-mips.c: added sources for the mips port, not
12898 integrated in the build yet. Contributed by
12899 Mark E Mason <mark.e.mason@broadcom.com>.
12901 2006-11-14 Neale Ferguson <neale@sinenomine.net>
12903 * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
12905 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
12907 * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
12908 put the soft-float rules in its own file since it seems to
12909 break s390 compilation.
12911 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
12913 * mini-arm.c: fixed wrnings.
12915 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
12917 * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
12918 inssel-arm.brg: ARM support for soft-float.
12920 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
12922 * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
12923 loads and stores of 32 bit fp values.
12925 2006-11-10 Zoltan Varga <vargaz@gmail.com>
12927 * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
12929 * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
12930 works. Fixes #79852 and #79463.
12932 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
12934 * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
12935 more soft-float support WIP and fixes.
12937 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
12939 * mini-arm.c: some VFP updates.
12941 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
12943 * mini-exceptions.c: 0 is a valid local var offset in some
12944 architectures, don't assert (bug #78508).
12946 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
12948 * exceptions-arm.c: fixed off by one error in stack walk code.
12950 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
12952 * mini.h, mini.c: more precise tracking of type load exceptions.
12954 2006-11-03 Robert Jordan <robertj@gmx.net>
12956 * Makefile.am: [WIN32] Add monow.exe target.
12957 * driver.c: [WIN32] Don't detach the console when debugging.
12960 2006-10-30 Miguel de Icaza <miguel@novell.com>
12962 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
12964 2006-10-23 Zoltan Varga <vargaz@gmail.com>
12966 * aot-compiler.c (emit_method_info): Add a case missed earlier.
12968 * driver.c (mini_regression): Fix --regression with AOT.
12970 * aot-compiler.c (emit_method_info): Fix AOT on amd64.
12972 2006-10-17 Zoltan Varga <vargaz@gmail.com>
12974 * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
12976 * mini-sparc.h: Don't use sigaction on sparc/linux.
12978 * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
12980 * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
12982 * mini-exceptions.c: Add proper include files for getpid ().
12984 2006-10-16 Zoltan Varga <vargaz@gmail.com>
12986 * aot-runtime.c (mono_aot_get_method): Change this to return the native code
12987 address instead of a MonoJitInfo* to avoid decoding the exception info for the
12990 * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
12991 name cache to reduce its size.
12993 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
12995 2006-10-15 Zoltan Varga <vargaz@gmail.com>
12997 * mini-x86.c: Save/restore the current LMF structure more efficiently using
12998 the mono_lmf TLS variable.
13000 * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in
13001 trampoline lmf frames.
13003 * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
13005 2006-10-14 Zoltan Varga <vargaz@gmail.com>
13007 * mini-amd64.c: Save/restore the current LMF structure more efficiently using
13008 the mono_lmf TLS variable.
13010 * mini-exceptions.c: Access the LMF structure through accessors.
13012 * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS
13013 variable instead of in jit_tls->lmf.
13015 * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
13017 * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in
13018 trampoline lmf frames.
13020 * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
13022 2006-10-12 Zoltan Varga <vargaz@gmail.com>
13024 * mini.c trace.c mini-x86.c: Revert these too.
13026 * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
13029 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
13031 * genmdesc.c: removed now dead code.
13033 2006-10-09 Robert Jordan <robertj@gmx.net>
13035 * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
13037 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
13039 * mini.h: do not leave gaps in the opcode values.
13041 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
13043 * jit-icalls.h: flag functions as internal here, too.
13045 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
13047 * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
13048 functions with the internal attribute.
13050 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
13052 * aot-compiler.c: fclose the file descriptor in the profile read loop.
13054 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
13056 * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
13059 2006-10-05 Zoltan Varga <vargaz@gmail.com>
13061 * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
13062 tail calls as on other platforms.
13064 * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
13066 * iltests.il: Add a few tailcall tests.
13068 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
13070 * driver.c: fix loop for old compilers (bug #79521).
13072 2006-10-02 Zoltan Varga <vargaz@gmail.com>
13074 * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
13076 * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
13078 * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
13079 metadata without any code.
13081 * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
13082 more precise debugging information using gdb.
13084 2006-09-30 Zoltan Varga <vargaz@gmail.com>
13086 * inssel-ia64.brg: Make the helper methods static.
13088 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
13090 * inssel-x86.brg: make the helper methods static.
13092 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
13094 * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
13096 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
13098 * mini.c: updates for monoburg changes.
13099 * inssel.brg: make a few helper functions static as they should.
13101 2006-09-27 Zoltan Varga <vargaz@gmail.com>
13103 * Makefile.am: Move mini-codegen.c to common_sources.
13105 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
13107 * mini.h: instroduce inst_call in MonoInst for use in OUTARG
13109 * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
13110 mini-ppc.h: port to use the common local register allocator.
13112 2006-09-26 Zoltan Varga <vargaz@gmail.com>
13114 * mini.h: Remove the comment too then.
13116 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
13118 * mini.h: put back backend.data which is to be used shortly and
13119 doesn't increase the size of MonoInst. If any 64 bit arch aligned
13120 pointers on 4 byte boundaries it'd have much bigger issues running
13121 and you can ifdef it out anyway.
13123 2006-09-26 Zoltan Varga <vargaz@gmail.com>
13125 * mini.h (MonoInst): Remove backend.data field since it is unused and increases
13126 MonoInst size by 4 bytes on 64 bit machines.
13128 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
13130 * *.{c,h,brg}: long due removal of the unused field in MonoInst and
13131 replacement with more meaningful field names. Arch maintainers, please
13132 check the assigned names are good enough for your arch.
13134 2006-09-26 Zoltan Varga <vargaz@gmail.com>
13136 * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the
13137 OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
13139 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
13141 * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
13142 relocations and memory requirements, put the optimization flags
13143 definitions in their own file.
13145 2006-09-24 Zoltan Varga <vargaz@gmail.com>
13147 * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
13149 * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
13151 2006-09-22 Zoltan Varga <vargaz@gmail.com>
13153 * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
13155 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
13157 * inssel.brg: use the correct function to get the size of an item
13158 in an array, given an element class.
13159 * aot-compiler.c: do not access class->class_size directly.
13161 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
13163 * mini.h, debug-mini.c: added a debugging function to print
13164 info about local variables and arguments in a jitted method.
13166 2006-09-20 Zoltan Varga <vargaz@gmail.com>
13168 * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
13170 * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
13172 2006-09-19 Zoltan Varga <vargaz@gmail.com>
13174 * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
13175 inner and outer loops when passing vtypes.
13177 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
13179 * mini-ppc.c: take into account the cpu errata for cache flushing
13180 which caused some random errors (bug #79381).
13182 2006-09-19 Zoltan Varga <vargaz@gmail.com>
13184 * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to
13185 mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
13187 2006-09-17 Zoltan Varga <vargaz@gmail.com>
13189 * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
13192 * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
13193 freebsd ports tree.
13195 * mini-amd64.c (emit_call): Avoid near calls on freebsd.
13196 (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
13198 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
13201 2006-09-13 Zoltan Varga <vargaz@gmail.com>
13203 * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
13205 2006-09-12 Zoltan Varga <vargaz@gmail.com>
13207 * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this
13208 macro does not have to be changed during debugging.
13210 * 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>.
13212 * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
13214 * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
13216 * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if
13217 MONO_ARCH_NO_EMULATE_MUL is defined.
13219 * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
13221 * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
13223 * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
13225 * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
13227 2006-09-11 Zoltan Varga <vargaz@gmail.com>
13229 * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
13230 stuff to mini-exceptions.c where it is used.
13232 * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
13233 setup code, the real one is in mini-exceptions.c.
13235 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
13236 layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
13237 some changes from the freebsd ports tree.
13239 * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
13242 * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
13244 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
13246 * mini.c: on Linux, check for /proc to be mounted
13247 (bug# 79351, novell bug#201204).
13249 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
13251 * mini.c: handle cases where pthread_attr_getstack() behaves
13252 incorrectly (bug #78096).
13254 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
13256 * mini-arm.c: support larger stack frames (bug #79272).
13258 2006-09-08 Zoltan Varga <vargaz@gmail.com>
13260 * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
13262 * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef
13265 * aot-runtime.c (mono_aot_get_class_from_name): New function used by
13266 mono_class_from_name () to find a class from its name.
13268 * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
13270 2006-09-07 Zoltan Varga <vargaz@gmail.com>
13272 * mini-amd64.c (emit_call): Avoid strstr () call if possible.
13274 2006-09-05 Kornel Pal <kornelpal@gmail.com>
13276 * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
13278 2006-09-04 Zoltan Varga <vargaz@gmail.com>
13280 * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
13281 callinfo->trampoline.
13283 * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
13285 (mono_arch_patch_code): Add some debug code to help track down similar failures in the
13288 2006-09-03 Zoltan Varga <vargaz@gmail.com>
13290 * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
13292 2006-09-02 Zoltan Varga <vargaz@gmail.com>
13294 * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
13295 stats.method_trampolines, it is already done by the generic trampoline code.
13297 * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
13299 2006-09-01 Zoltan Varga <vargaz@gmail.com>
13301 * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
13303 * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
13305 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
13307 * mini.c (print_jit_stats): Print mscorlib mempool size too.
13309 * mini.c (print_jit_stats): Print new stats.
13311 * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
13313 2006-08-31 Zoltan Varga <vargaz@gmail.com>
13315 * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
13316 Address on two dimensional arrays. Fixes #78729.
13318 * mini.h (MonoCompile): Add a 'skip_visibility' field.
13320 * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
13323 * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
13325 * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
13328 * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
13330 (mini_get_ldelema_ins): Ditto.
13332 2006-08-30 Zoltan Varga <vargaz@gmail.com>
13334 * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
13335 (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation.
13338 2006-08-29 Neale Ferguson <neale@sinenomine.net>
13340 * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
13341 mono_arch_get_patch_offset as a dummy entry point to allow successful link.
13343 * exceptions-s390x.c: Cosmetic change.
13345 * tramp-s390.c: Fix warning.
13347 * cpu-s390.md: Correct length of mul_imm.
13349 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
13351 * aot-compiler.c: added binary writer with ELF backend
13352 implementation (only on Linux/x86 for now).
13354 2006-08-18 Zoltan Varga <vargaz@gmail.com>
13356 * Makefile.am: Don't run net 2.0 AOT tests.
13358 * aot-compiler.c (compile_method): Skip methods with tail calls as well.
13359 (mono_compile_assembly): Skip net 2.0 assemblies as well.
13361 * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
13363 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
13365 * aot-compiler.c: simplified and refactored the asm-writing code
13366 to allow different backends.
13368 2006-08-18 Zoltan Varga <vargaz@gmail.com>
13370 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
13372 * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a
13373 little. Share patches of type TYPE_FROM_HANDLE as well.
13375 * mini.c (mono_patch_info_equal): New helper function.
13376 (mono_patch_info_hash): Ditto.
13378 * aot-compiler.c (emit_method_code): Fix s390 build.
13380 * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
13381 is not handled because it is stored as a flag and not as a type ctor. Fixes
13384 2006-08-17 Zoltan Varga <vargaz@gmail.com>
13386 * aot-compiler.c: Fix computation of GOT slot statistics.
13388 * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
13389 Also remove support for not PIC AOT.
13391 * mini.h: Bump AOT file format version.
13393 * objects.cs: Add a test for #78990.
13395 * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
13396 (peter.dettman@iinet.net.au). Fixes #79087.
13398 * basic-long.cs: Add a test for the above.
13400 2006-08-16 Zoltan Varga <vargaz@gmail.com>
13402 * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
13404 * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
13407 2006-08-15 Zoltan Varga <vargaz@gmail.com>
13409 * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
13412 2006-08-10 Jonathan Chambers <joncham@gmail.com>
13414 * mini.c: Don't verify COM proxy invoke calls
13417 2006-08-10 Dick Porter <dick@ximian.com>
13419 * wapihandles.c (mini_wapi_seminfo): More info, to help track down
13420 which process is holding semaphores locked.
13422 2006-08-08 Zoltan Varga <vargaz@gmail.com>
13424 * mini-ia64.c mini-amd64.c: Fix #79027.
13426 * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
13428 * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
13430 * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
13431 implicit arguments in a vararg call. Fixes #79027.
13433 2006-08-07 Zoltan Varga <vargaz@freemail.hu>
13435 * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
13436 (mono_get_array_new_va_signature): Ditto.
13438 2006-08-05 Zoltan Varga <vargaz@gmail.com>
13440 * aot-runtime.c: Call init_plt lazily.
13442 * inssel-long.brg: Fix unsigned long->int conversion.
13444 * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
13446 * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
13447 that most data is now in the .rss/.data section.
13449 2006-08-04 Zoltan Varga <vargaz@gmail.com>
13451 * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.
13453 * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
13455 * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
13457 * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
13459 * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
13460 virtual call. Fixes #79010.
13462 * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method
13463 and use the result as the this argument in the real call.
13465 * generics.2.cs: Add a new test for #79010.
13467 2006-08-03 Zoltan Varga <vargaz@gmail.com>
13469 * mini-x86.c: Fix a warning.
13471 * aot-compiler.c: Add a bunch of statistics.
13473 * mini.c (inline_method): Disable inlining in out-of-line bblocks.
13475 2006-08-02 Zoltan Varga <vargaz@gmail.com>
13477 * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
13479 2006-08-01 Zoltan Varga <vargaz@gmail.com>
13481 * 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>.
13483 2006-07-13 Miguel de Icaza <miguel@novell.com>
13485 * mini.c (mono_method_to_ir): Obtain the original method in the
13486 CIL stream and use this to perform validation.
13490 2006-07-19 Zoltan Varga <vargaz@gmail.com>
13492 * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
13493 (mono_arch_call_opcode): Ditto.
13495 * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
13498 * mini.c (mono_patch_info_dup_mp): New helper function.
13500 * aot-compiler.c (compile_method): Fix some of the memory allocated during
13501 compilation. Fixes #78827.
13503 2006-07-18 Kornel Pal <kornelpal@gmail.com>
13505 * declsec.c: Use original security informations for
13506 MONO_WRAPPER_MANAGED_TO_MANAGED.
13508 2006-07-15 Jonathan Chambers <joncham@gmail.com>
13510 * mini.c: Allow Com Interop methods/classes and
13511 don't verify COM wrapper calls
13514 2006-07-13 Zoltan Varga <vargaz@gmail.com>
13516 * inssel-long32.brg: Fix long->i4 checked conversion.
13518 * exceptions.cs: Add a test for the above.
13520 2006-07-08 Zoltan Varga <vargaz@gmail.com>
13522 * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
13524 * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown
13527 * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
13530 2006-07-03 Zoltan Varga <vargaz@gmail.com>
13532 * mini.c: Fix solaris/x86 exception handling.
13534 * Makefile.am: Get rid of $(ICU_LIBS).
13536 2006-07-02 Zoltan Varga <vargaz@gmail.com>
13538 * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
13539 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
13540 (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
13542 * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
13544 * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
13545 this function causes a SIGSEGV.
13547 2006-06-22 Zoltan Varga <vargaz@gmail.com>
13549 * mini.c: Remove unused solaris/x86 includes.
13551 2006-06-21 Zoltan Varga <vargaz@gmail.com>
13553 * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
13555 2006-06-20 Jb Evain <jbevain@gmail.com>
13557 * cpu-g4.md: fix max length of start_handler instruction.
13559 2006-06-20 Massimiliano Mantione <massi@ximian.com>
13560 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
13562 2006-06-16 Massimiliano Mantione <massi@ximian.com>
13563 * ssa.c: Fixed bug 78653 for SSA based deadce.
13564 * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
13565 MonoInst.flags, used in SSA based deadce.
13566 * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
13567 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
13569 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
13571 * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
13572 it can end up using non executable memory on ppc64 systems
13573 running ppc32 userspace (fix from Johannes Berg).
13575 2006-06-14 Dick Porter <dick@ximian.com>
13577 * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
13580 2006-06-13 Massimiliano Mantione <massi@ximian.com>
13581 * mini.c: Made so that inline is locally disabled if it would
13582 trigger a .cctor, because too many apps depend on this behavior
13583 (which seems to be also the one of the MS CLR).
13585 2006-06-13 Zoltan Varga <vargaz@gmail.com>
13587 * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
13588 No idea why this worked before.
13590 * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
13591 which branch to outer exception clauses since they could skip the
13592 inner finally clauses. Fixes #78633.
13594 * exceptions.cs: Add a test for the above.
13596 * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
13599 * iltests.il: Add a test for the above.
13601 2006-06-12 Zoltan Varga <vargaz@gmail.com>
13603 * mini.c (remove_block_if_useless): Do not remove the bblock immediately
13604 after the end of a try bblock, to prevent asserts in mini_method_compile ().
13606 * iltests.il: Add a test for the above.
13608 2006-06-10 Zoltan Varga <vargaz@gmail.com>
13610 * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
13612 * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
13613 methods as instrinsics.
13615 2006-06-09 Wade Berrier <wberrier@novell.com>
13617 * Makefile.am: Fix sources list for svn rename so that make dist succeeds
13618 (simple-cee-ops.h ssapre-mini-ops.h)
13620 2006-06-09 Neale Ferguson <neale@sinenomine.net>
13622 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
13623 * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
13625 * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
13626 * cpu-s390x.md: Fix max. length values for a couple of instructions.
13628 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
13630 * mini-exceptions.c: Minor fix for building mono in Visual Studio.
13632 2006-06-08 Massimiliano Mantione <massi@ximian.com>
13634 * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
13635 * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
13636 * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
13637 * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
13638 * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
13639 of opcodes, so that bug 78549 should not happen again.
13640 * ssapre.c: Updated to use the renamed files.
13642 2006-06-08 Zoltan Varga <vargaz@gmail.com>
13644 * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move
13645 in OP_ATOMIC_EXCHANGE_I4.
13647 2006-06-07 Wade Berrier <wberrier@novell.com>
13649 * tramp-s390.c: Fix s390 build (add missing pointer declarations
13650 in mono_debugger_create_notification_function)
13652 2006-06-06 Zoltan Varga <vargaz@gmail.com>
13654 * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
13656 * mini.c (type_from_stack_type): Disable some changes which do not
13659 * driver.c: Reenable opts.
13661 * mini.h (MonoStackSlot): New structure to keep track of the verification state
13662 of the evaluation stack.
13664 * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
13665 evaluation stack trace at entry to the bblock.
13667 * mini.c (merge_stacks): New function to perform verification of stack merges.
13668 Turned off by default.
13670 * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
13673 2006-06-06 Massimiliano Mantione <massi@ximian.com>
13675 * local-propagation.c: Fixed bug 78549.
13677 2006-06-04 Zoltan Varga <vargaz@gmail.com>
13679 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
13681 2006-06-02 Miguel de Icaza <miguel@novell.com>
13683 * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
13684 tramp-arm.c, tramp-ia64.c
13685 (mono_debugger_create_notification_function): Update signature to
13686 new signature and use new protocol for creating the notification
13689 Should fix the build.
13691 2006-06-02 Geoff Norton <gnorton@customerdna.com>
13693 * exceptions-ppc.c (mono_jit_walk_stack)
13694 (ves_icall_get_frame_info): Fix the build
13696 2006-06-02 Zoltan Varga <vargaz@gmail.com>
13698 * mini.c (mono_set_defaults): Fix the handling of -O=-all.
13700 2006-05-31 Raja R Harinath <rharinath@novell.com>
13702 * il2tests.2.il: New file for generics CIL tests. Add test for
13704 * Makefile.am: Update.
13707 * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
13710 2006-05-30 Massimiliano Mantione <massi@ximian.com>
13712 * aliasing.c: Fixed bug 78311.
13714 2006-05-29 Martin Baulig <martin@ximian.com>
13716 * mini-exceptions.c (mono_find_jit_info): When computing the
13717 native offset, check whether we're actually inside the method's
13718 code; call mono_debug_print_stack_frame() to format the frame.
13719 (ves_icall_System_Exception_get_trace): Call
13720 mono_debug_print_stack_frame() to format the stack frame.
13721 (ves_icall_get_trace): Update to the new debugging API.
13722 (mono_jit_walk_stack_from_ctx): Likewise.
13723 (ves_icall_get_frame_info): Likewise.
13725 * mini.c (get_method_from_ip): Use the new debugging API.
13726 (mono_print_method_from_ip): Likewise.
13729 (mono_jit_walk_stack): Use the new debugging API.
13730 (ves_icall_get_frame_info): Likewise.
13732 2006-05-27 Zoltan Varga <vargaz@gmail.com>
13734 * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
13736 2006-05-25 Massimiliano Mantione <massi@ximian.com>
13738 * mini.c: Added "limitator" to inline for debugging.
13740 2006-05-24 Martin Baulig <martin@ximian.com>
13742 * debug-debugger.c (mono_debugger_init): Create a private,
13743 malloc()-based code manager for the notification function and
13744 intentionally leak it on exit. This fixes the crash-on-exit race
13748 (mono_debugger_create_notification_function): Added
13749 `MonoCodeManager *' argument.
13752 (mono_debugger_create_notification_function): Added
13753 `MonoCodeManager *' argument.
13755 2006-05-23 Massimiliano Mantione <massi@ximian.com>
13757 * aliasing.c: Fixed 64 bit issue.
13758 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
13759 default since all known bugs are fixed (one more time!).
13761 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
13763 * mini.c: write barrier support.
13765 2006-05-23 Martin Baulig <martin@ximian.com>
13767 * debug-debugger.c: Revert Paolo's change. Add comment and #error
13768 check at the top of the file.
13770 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
13772 * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
13773 reverting changes without reason and without changelog entries.
13775 2006-05-18 Zoltan Varga <vargaz@gmail.com>
13777 * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
13778 to a few opcodes. Fixes #78439.
13780 * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
13781 consistency with other archs.
13783 * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
13785 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
13787 * debug-debugger.c: fix the build.
13789 2006-05-17 Martin Baulig <martin@ximian.com>
13792 (debugger_thread_vtable): Moved here from ../metadata/threads.c.
13793 (debugger_init_threads): Formerly known as mono_debugger_init_threads().
13794 (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
13795 (debugger_attach): Call GC_mono_debugger_add_all_threads().
13797 2006-05-11 Zoltan Varga <vargaz@gmail.com>
13799 * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
13801 2006-05-10 Zoltan Varga <vargaz@gmail.com>
13803 * mini-x86.c (mono_arch_instrument_epilog): Fix handling of
13804 MONO_TYPE_GENERICINST.
13806 * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of
13807 MONO_TYPE_GENERICINST.
13809 2006-05-09 Zoltan Varga <vargaz@gmail.com>
13811 * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
13814 2006-05-08 Zoltan Varga <vargaz@gmail.com>
13816 * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
13818 (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
13820 2006-05-06 Zoltan Varga <vargaz@gmail.com>
13822 * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
13823 mono_trace_cleanup ().
13825 * iltests.il: Fix problem with the newly added test.
13827 * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
13828 due to register constraints, free up the previous hreg. Fixes #78314.
13830 * iltests.il: Add new test for #78314.
13832 * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
13833 Interlocked.Add. Fixes #78312.
13835 * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
13837 2006-05-05 Zoltan Varga <vargaz@gmail.com>
13839 * inssel.brg (mini_emit_virtual_call): Fix a warning.
13841 2006-05-05 Martin Baulig <martin@ximian.com>
13843 * debug-mini.c (mono_debug_open_block): New method.
13846 (mono_arch_output_basic_block): Call mono_debug_open_block() at
13847 the beginning of each basic block.
13850 (mono_arch_output_basic_block): Call mono_debug_open_block() at
13851 the beginning of each basic block.
13853 2006-05-04 Massimiliano Mantione <massi@ximian.com>
13855 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
13856 default until I understand why they break the build on amd64.
13858 2006-05-04 Zoltan Varga <vargaz@gmail.com>
13860 * mini.c (mini_cleanup): Call mono_cleanup ().
13862 * mini.c (UNVERIFIED): New macro to make it easier to track down verification
13865 2006-05-04 Massimiliano Mantione <massi@ximian.com>
13867 * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
13868 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
13869 default since all known bugs are fixed, and I cannot reproduce bug
13870 77944... I'm asking Matt Hargett to test again after this commit.
13872 2006-04-28 Massimiliano Mantione <massi@ximian.com>
13874 * mini-codegen.c: Fixed typo that thrashed inline.
13876 2006-04-28 Zoltan Varga <vargaz@gmail.com>
13878 * dominators.c (compute_dominators): Avoid using a worklist since
13879 it is not correct in some cases. Instead, iterate over all bblocks as
13880 in the original paper. Fixes --compile-all -O=all System.Xml.dll.
13882 2006-04-28 Miguel de Icaza <miguel@novell.com>
13884 * mini.c (mono_jit_compile_method_inner): Use
13885 mono_prepare_exception_from_error that resets the value
13888 2006-04-27 Miguel de Icaza <miguel@novell.com>
13890 * mini.c: Move the mini_loader_error_to_exception to metadata.
13892 2006-04-27 Massimiliano Mantione <massi@ximian.com>
13894 * aliasing.c: Fixed bug 78210.
13896 2006-04-27 Massimiliano Mantione <massi@ximian.com>
13898 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
13899 default until all their problems (or the ones they trigger) are fixed.
13901 2006-04-26 Zoltan Varga <vargaz@gmail.com>
13903 * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
13905 * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
13906 as loaded only after resolving patches since that could invoke the same method.
13908 * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
13910 * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
13913 * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
13916 * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
13919 * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
13920 made from AOT code through the PLT table.
13922 * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
13923 holding the plt offset when a call is made to the aot plt trampoline.
13925 2006-04-25 Zoltan Varga <vargaz@gmail.com>
13927 * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the
13930 * Makefile.am (common_sources): Fix build breakage.
13932 * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
13933 calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
13934 intra-assembly calls if possible.
13936 * tramp-*.c: Add new functions for patching/nullifying PLT entries.
13938 * mini-trampolines.c: Handle PLT entries.
13940 * mini.c: Avoid creating a GOT var for calls.
13942 * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
13943 from mscorlib code.
13945 * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
13946 from mscorlib code.
13948 * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
13951 * mini.h: Bump AOT file format version.
13953 * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
13956 2006-04-25 Martin Baulig <martin@ximian.com>
13958 * driver.c: Disable copyprop, consprop and inline when running
13959 inside the debugger.
13961 2006-04-25 Martin Baulig <martin@ximian.com>
13963 * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
13964 with `get_current_thread' and added `detach'.
13965 (MonoDebuggerMetadataInfo): Added `thread_size',
13966 `thread_tid_offset', `thread_stack_ptr_offset' and
13967 `thread_end_stack_offset'.
13969 2006-04-25 Zoltan Varga <vargaz@gmail.com>
13971 * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and
13974 * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
13975 ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
13977 * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
13979 * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
13981 * aot.c: Add support for ADJUSTED_IID.
13983 2006-04-24 Zoltan Varga <vargaz@gmail.com>
13985 * aot.c (emit_method_order): Don't align method_order_end.
13987 * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
13988 the interface ID changes.
13990 2006-04-21 Dick Porter <dick@ximian.com>
13992 * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
13993 cleaning up a thread. Fixes the new part of bug 77470.
13995 2006-04-20 Geoff Norton <gnorton@customerdna.com>
13997 * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
13998 to managed wrapper.
14000 2006-04-19 Zoltan Varga <vargaz@gmail.com>
14002 * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
14004 * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
14005 SIGSEGV. Fixes #78072.
14007 * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
14008 unregister our SIGABRT handler.
14010 2006-04-19 Massimiliano Mantione <massi@ximian.com>
14012 * mini.c: Disabled inline where it can alter the call stack in a
14013 way visible from managed code.
14014 * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
14017 2006-04-16 Zoltan Varga <vargaz@gmail.com>
14019 * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
14020 on other platforms. Fixes #78089.
14022 2006-04-13 Martin Baulig <martin@ximian.com>
14024 * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
14025 determine whether we're inside the debugger.
14028 (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
14030 2006-04-12 Zoltan Varga <vargaz@gmail.com>
14032 * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
14033 handler clauses. Fixes #78024.
14035 * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
14036 in the CALL_MEMBASE opcodes. Fixes #78088.
14037 (mono_arch_get_vcall_slot_addr): Ditto.
14039 2006-04-10 Martin Baulig <martin@ximian.com>
14041 * debug-debugger.c: The thread handling code has now been moved
14042 into ../metadata/threads.c.
14044 2006-04-10 Zoltan Varga <vargaz@gmail.com>
14046 * driver.c (mono_main): Fix --with-gc=none build.
14048 * mini-codegen.c (mono_spillvar_offset): Improve alignment.
14049 (mono_spillvar_offset_float): Ditto.
14050 (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
14051 hreg, not when its !global, since on ia64, there is a third category: stacked
14054 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
14056 * mini.c: set MonoInst->klass for load field address and a few other
14059 2006-04-10 Zoltan Varga <vargaz@gmail.com>
14061 * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
14063 2006-04-07 Zoltan Varga <vargaz@gmail.com>
14065 * dominators.c (compute_dominators): Fix yet another bug which surfaced after
14066 the branch opt changes.
14068 2006-04-06 Dick Porter <dick@ximian.com>
14070 * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
14072 * wapihandles.c (mini_wapi_seminfo):
14073 * driver.c (mono_main): Add semaphore info option
14075 2006-04-05 Zoltan Varga <vargaz@gmail.com>
14077 * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
14078 branch optimization changes. Fixes #78009.
14080 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
14082 * mini.c: ignore accessibility of methods in managed->native wrappers.
14084 2006-04-04 Zoltan Varga <vargaz@gmail.com>
14086 * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
14088 * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
14090 2006-04-03 Zoltan Varga <vargaz@gmail.com>
14092 * mini.c: Modify the branch optimizations to preserve the invariant that
14093 the entries inside the in_bb and out_bb arrays are unique.
14094 (mono_unlink_bblock): Avoid creation of new arrays.
14096 2006-04-02 Zoltan Varga <vargaz@gmail.com>
14098 * mini.c (mono_unlink_bblock): Fix regression caused by previous
14101 2006-04-01 Zoltan Varga <vargaz@gmail.com>
14103 * mini.c (optimize_branches): Remove the "optimizations" in
14104 the cbranch1/cbranch2 -> branch cases which were causing several
14105 problems in the past. Fixes #77986.
14107 2006-03-31 Chris Toshok <toshok@ximian.com>
14109 * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
14110 default optimizations :(
14112 2006-03-31 Zoltan Varga <vargaz@gmail.com>
14114 * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
14117 2006-03-31 Massimiliano Mantione <massi@ximian.com>
14119 * local-propagation.c: Added comments to structs and removed
14120 "Mono" prefixes from local tree mover types.
14122 2006-03-30 Zoltan Varga <vargaz@gmail.com>
14124 * Makefile.am (arch_sources): Define this for each architecture so
14125 libmono_la_SOURCES is defined in one place.
14127 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
14129 * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
14132 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
14134 * driver.c: print the GC name supplied by configure.
14136 2006-03-29 Massimiliano Mantione <massi@ximian.com>
14138 * local-propagation.c: Added tree mover, and moved here all the
14139 local propagation code from mini.c
14140 * mini.c: Added support for treeprop, and moved all the local
14141 propagation code to local-propagation.c
14142 * mini.h: Added support for treeprop
14143 * driver.c: Added support for treeprop, enabled consprop, copyprop,
14144 treeprop, inline and deadce by default
14145 * Makefile.am: Added local-propagation.c
14147 2006-03-25 Zoltan Varga <vargaz@gmail.com>
14149 * exceptions-sparc.c: Applied patch from David S. Miller <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
14151 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
14153 * debug-debugger.c: make it compile without the Boehm GC.
14155 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
14157 * mini.c: fixed issue with mismatch when an icall is registered
14158 with multiple names but same address.
14160 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
14162 * declsec.c, mini-exceptions.c: use write barrier to set reference
14163 fields of managed objects.
14165 2006-03-19 Zoltan Varga <vargaz@gmail.com>
14167 * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
14168 (can_access_internals): Fix a warning.
14170 * mini.c (print_method_from_ip): Rename this to
14171 mono_print_method_from_ip so it gets exported.
14173 * trace.c: Deal with strings inside StringBuilder's containing garbage
14174 and fix memory leaks. Fixes #77848.
14176 2006-03-19 Zoltan Varga <vargaz@gmail.com>
14178 * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
14181 2006-03-16 Neale Ferguson <neale@sinenomine.net>
14183 * mini-s390.c: Remove OP_X86_TEST_NULL.
14185 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
14187 * mini.c: use the correct GetHashCode() for the moving collector.
14189 2006-03-16 Massimiliano Mantione <massi@ximian.com>
14191 * liveness.c: Regalloc spill cost tuning.
14193 2006-03-15 Neale Ferguson <neale@sinenomine.net>
14195 * mini-s390x.h: Correct S390_LONG macro.
14197 * mini-s390x.c: Cleanup unused code.
14199 2006-03-15 Zoltan Varga <vargaz@gmail.com>
14201 * jit-icalls.h: New file.
14203 * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
14204 icalls and include that instead of including jit-icalls.c.
14206 * mini-ppc.c (mono_arch_output_basic_block): Remove references to
14209 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
14211 * mini.c: when checking for member accessibility, also check for
14212 friend assemblies and for explicit interface implementations.
14214 2006-03-14 Zoltan Varga <vargaz@gmail.com>
14216 * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
14218 * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
14220 * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
14221 common cases are done first.
14223 * mini-ops.h: Only define platform specific opcodes on the given platform.
14225 * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
14228 2006-03-14 Martin Baulig <martin@ximian.com>
14230 Revert Paolo's change from r57348:
14232 * mini.h: don't use gboolean for bitfields.
14233 * mini.c: verifier changes for fields and methods accessibility.
14235 2006-03-13 Neale Ferguson <neale@sinenomine.net>
14237 * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
14239 * mini-s390x.c: Fix conv_r_un.
14241 * cpu-s390, cpu-s390x.md: Fix lengths.
14243 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
14245 * mini.c: nested types have access to all the nesting
14246 levels, not just the enclosing types.
14248 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
14250 * mini.c: added a few more verification checks.
14252 2006-03-12 Zoltan Varga <vargaz@gmail.com>
14254 * liveness.c: Merge optimizations from the linear-il branch.
14256 2006-03-11 Zoltan Varga <vargaz@gmail.com>
14258 * mini-ia64.c (emit_call): Add a comment.
14260 * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
14262 * tramp-ia64.c: Fix some warnings.
14264 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
14266 * mini.h: don't use gboolean for bitfields.
14267 * mini.c: verifier changes for fields and methods accessibility.
14269 2006-03-11 Zoltan Varga <vargaz@gmail.com>
14271 * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
14272 lazy icall wrapper changes.
14274 * dominators.c: Replace all the dominator algorithms with faster
14275 ones from the linear-il branch.
14277 * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
14280 * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
14281 common cases are done first.
14283 * mini-amd64.c: Fix some warnings.
14285 * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
14288 * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
14291 * mini.h: Add a missing prototype.
14293 2006-03-10 Zoltan Varga <vargaz@gmail.com>
14295 * mini.c: Compile icall wrappers lazily.
14297 * mini-codegen.c: Use printf instead of g_print since its much faster.
14299 * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
14302 * mini.c (optimize_branches): Cache the negative result from
14303 remove_block_if_useless ().
14305 * mini.c (optimize_branches): Avoid restarting the iteration after each change.
14306 Also fix some bblock linking issues.
14308 * helpers.c (mono_disassemble_code): Reduce the size of the temporary
14311 * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
14313 * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
14314 accessed fields first, for better cache behavior.
14316 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
14318 * mini.c: speedup IList<T> array accesses.
14320 2006-03-09 Zoltan Varga <vargaz@gmail.com>
14322 * mini.c (mono_method_to_ir): Handle large methods overflowing the
14323 inline_costs counter. Fixes #77190.
14325 2006-03-06 Zoltan Varga <vargaz@gmail.com>
14327 * mini-exceptions.c: Call mono_trace_is_enabled () before printing
14328 trace messages. Fixes #77706.
14330 2006-03-04 Martin Baulig <martin@ximian.com>
14332 * tramp-amd64.c, tramp-x86.c
14333 (mono_debugger_create_notification_function): Use
14334 mono_global_codeman_reserve() to allocate a buffer at runtime and
14337 * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
14339 * debug-debugger.c (mono_debugger_init): Dynamically allocate the
14340 notification function at runtime and then call `initialize' in the
14341 `MONO_DEBUGGER__debugger_info' vtable.
14343 2006-03-04 Zoltan Varga <vargaz@gmail.com>
14345 * iltests.il: Fix a visibility problem.
14347 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
14349 * driver.c, mini.c: add hooks for the counters API.
14351 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
14353 * driver.c: show disabled options.
14355 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
14357 * linear-scan.c: always use cost-driven selection.
14359 2006-02-28 Raja R Harinath <rharinath@novell.com>
14361 * jit-icalls.c (helper_compile_generic_method): Revert change from
14364 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
14366 * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
14368 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
14370 * inssel.brg: style fixes, mostly to force the updated monoburg
14371 to run for people using svn.
14373 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
14375 * mini.c: match monoburg changes.
14377 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
14379 * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
14380 ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
14381 declaration in the header file.
14383 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
14385 * helpers.c: reduce relocations and mem usage.
14387 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
14389 * mini.h, mini-codegen.c: disable logging features if
14390 requested by configure.
14392 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
14394 * mini.c: tiny verifier changes.
14396 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
14398 * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
14399 cpu-pentium.md: stack alignment changes for osx/x86,
14400 partially from Geoff Norton <gnorton@customerdna.com>.
14402 2006-02-24 Raja R Harinath <harinath@gmail.com>
14404 * jit-icalls.c (helper_compile_generic_method): Update to changes
14405 in metadata/class.c.
14407 2006-02-24 Zoltan Varga <vargaz@gmail.com>
14409 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
14411 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
14412 interface calls with large offsets.
14414 2006-02-23 Raja R Harinath <rharinath@novell.com>
14416 * jit-icalls.c (helper_compile_generic_method): Document the
14417 special-case we depend on so that we can inflate the method twice
14418 with the same context with no bad side-effects.
14420 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
14422 * mini-x86.c, mini-amd64.c: fix for case when xen support
14425 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
14427 * mini-x86.c, mini-amd64.c: generate code to access tls items
14428 in a faster way for Xen systems.
14430 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
14432 * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
14433 updates and compilation fixes for the OSX/x86 port, mostly from
14434 Geoff Norton <gnorton@customerdna.com>.
14436 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
14438 * inssel.brg: faster interface call implementation
14439 to sync with the interface_offsets MonoVTable changes.
14441 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
14443 * mini.c: more verification checks.
14445 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
14447 * mini.c: added a few more verification checks.
14449 2006-02-17 Neale Ferguson <neale@sinenomine.net>
14451 * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
14452 facility on the processor and use it if available.
14454 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
14456 * driver.c, aot.c, mini.c: throw exception if the IL code is
14457 invalid or unverifiable.
14459 2006-02-17 Raja R Harinath <rharinath@novell.com>
14461 * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
14464 2006-02-16 Zoltan Varga <vargaz@gmail.com>
14466 * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
14468 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
14470 * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
14471 mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
14472 handling of instantiated generic valuetypes.
14474 2006-02-11 Zoltan Varga <vargaz@gmail.com>
14476 * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of
14477 MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
14480 * generics.2.cs: Revert the nullable reftypes tests.
14482 2006-02-10 Zoltan Varga <vargaz@gmail.com>
14484 * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
14485 using __builtin_frame_address (1) as it doesn't work in the presence
14486 of optimizations. Hopefully fixes #77273.
14488 * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
14489 -> generics.cs change as it doesn't work with some automake versions.
14491 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
14493 * mini.c: handle systems that sue a different way to
14494 retrieve the stack address of the current thread.
14496 2006-02-09 Zoltan Varga <vargaz@gmail.com>
14498 * Makefile.am generics.2.cs: Rename this to generics.cs and handle
14499 it specially in the makefile.
14501 * generics.2.cs: Add tests for nullable reference types.
14503 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
14505 * mini.c: always handle the case when mono_jit_init()
14506 is called in a thread different from the main thread,
14507 confusing libgc (bug #77309).
14509 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
14511 * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
14513 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
14515 * mini.c: change optimize_branches () to use a single loop
14516 and introduce a new optimization to simplify some range checks.
14518 2006-02-03 Martin Baulig <martin@ximian.com>
14520 * debug-debugger.c (debugger_thread_manager_thread_created): Removed
14521 and merged with debugger_thread_manager_add_thread().
14522 (mono_debugger_main): Call debugger_thread_manager_add_thread() to
14523 inform the debugger about the main thread.
14525 2006-02-03 Zoltan Varga <vargaz@gmail.com>
14527 * basic.cs: Add test for div.un/rem.un constant folding.
14529 2006-02-03 Neale Ferguson <neale@sinenomine.net>
14531 * cpu-s390x.md: correct int_xor_imm length
14533 2006-02-03 Zoltan Varga <vargaz@gmail.com>
14535 * generics.2.cs: New test for #77442.
14537 * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
14540 2006-02-02 Martin Baulig <martin@ximian.com>
14542 * tramp-x86.c, tramp-amd64.c: It's now safe to #include
14543 <mono/metadata/mono-debug-debugger.h>
14545 * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
14547 2006-02-02 Martin Baulig <martin@ximian.com>
14549 * debug-debugger.h: New header file for debug-debugger.c.
14551 * debug-debugger.c: Big API cleanup; don't run the managed Main()
14552 function is a separate thread anymore; add support for attaching.
14554 2006-02-01 Zoltan Varga <vargaz@gmail.com>
14556 * tramp-x86.c: Fix a warning.
14558 2006-01-31 Zoltan Varga <vargaz@gmail.com>
14560 * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
14561 on very large methods.
14563 * aot.c (load_patch_info): Fix a warning.
14565 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
14567 * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
14568 mini-ops.h: alu membase optimizations.
14570 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
14572 * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
14573 to speedup StringBuilder.
14575 2006-01-27 Zoltan Varga <vargaz@gmail.com>
14577 * dominators.c (mono_compute_natural_loops): Fix detection of
14578 loop body start blocks.
14580 * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
14582 2006-01-26 Zoltan Varga <vargaz@gmail.com>
14584 * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
14587 2006-01-25 Massimiliano Mantione <massi@ximian.com>
14589 * aliasing.c: Fixed aliasing issue on 64 bit archs.
14591 2006-01-25 Martin Baulig <martin@ximian.com>
14593 * debug-debugger.c: Moved the `MonoDebuggerManager' and
14594 `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
14595 started to cleanup this file a little bit.
14597 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
14599 * mini.c: optimize a codepath frequently happening in generics code.
14601 2006-01-23 Martin Baulig <martin@ximian.com>
14603 * Makefile.am: Only compile debug-debugger.c on supported platforms.
14605 * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
14606 functions directly.
14608 * driver.c: debug-debugger.c is only available if
14609 `MONO_DEBUGGER_SUPPORTED' is defined.
14611 2006-01-23 Martin Baulig <martin@ximian.com>
14613 * debug-debugger.c: Only enable this on platforms where the Mono
14614 Debugger is working (x86 and x86_64).
14616 2006-01-21 Martin Baulig <martin@ximian.com>
14618 The Mono Debugger is now using the normal `mono' instead of the
14619 `mono-debugger-mini-wrapper' when executing managed code.
14621 * debug-debugger.c: New file; previously known as
14622 debugger/wrapper/wrapper.c.
14624 * debug-mini.c (mono_init_debugger): Removed.
14626 * driver.c (mono_main): Added new `--inside-mdb' command line
14627 argument which is used when running inside the debugger.
14629 2006-01-20 Zoltan Varga <vargaz@gmail.com>
14631 * liveness.c (mono_analyze_liveness): Remove some unused data
14634 2006-01-17 Zoltan Varga <vargaz@gmail.com>
14636 * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
14638 2006-01-16 Zoltan Varga <vargaz@gmail.com>
14640 * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
14641 depends on implementation details of monobitset.
14643 * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
14646 2006-01-15 Zoltan Varga <vargaz@gmail.com>
14648 * liveness.c: Update after monobitset changes.
14650 2006-01-14 Zoltan Varga <vargaz@gmail.com>
14652 * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
14654 2006-01-11 Neale Ferguson <neale@sinenomine.net>
14656 * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
14658 * mini-s390x.c: Remove warning messages.
14660 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
14662 * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
14664 2006-01-10 Zoltan Varga <vargaz@gmail.com>
14666 * generics.2.cs: Add ldelem/stelem_any test.
14668 2006-01-10 Neale Ferguson <neale@sinenomine.net>
14670 * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
14672 2006-01-07 Zoltan Varga <vargaz@gmail.com>
14674 * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
14676 2006-01-06 Zoltan Varga <vargaz@gmail.com>
14678 * generics.2.cs: Reenable vtype tests.
14680 * inssel-x86.brg: Remove an icorrect valuetype rule.
14682 2006-01-06 Neale Ferguson <neale@sinenomine.net>
14684 * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
14685 initial support for OP_ABS.
14687 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14689 * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
14691 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14693 * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int
14694 conversion and implement LADD/LSUB.
14696 * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
14699 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14701 * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
14703 * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
14706 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14708 * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when
14709 localloc is encountered. Fixes crash in test-183.cs when using gmcs
14710 (stack walk problem).
14712 2006-01-04 Zoltan Varga <vargaz@gmail.com>
14714 * aot.c (mono_aot_load_method): Fix a warning.
14716 2006-01-03 Neale Ferguson <neale@sinenomine.net>
14718 * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
14720 2006-01-03 Zoltan Varga <vargaz@gmail.com>
14722 * iltests.il: Add test for #77148.
14724 * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
14727 2006-01-03 Neale Ferguson <neale@sinenomine.net>
14729 * mini-s390x.c, inssel-s390x.brg: Remove debug statements
14731 2006-01-03 Neale Ferguson <neale@sinenomine.net>
14733 * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
14734 cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
14736 * basic-long.cs: Add lconv-to-r4/r8 tests.
14738 2006-01-03 Zoltan Varga <vargaz@gmail.com>
14740 * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
14742 * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
14743 here as on other archs.
14745 2005-12-29 Neale Ferguson <neale@sinenomine.net>
14747 * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
14749 2005-12-29 Neale Ferguson <neale@sinenomine.net>
14751 * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
14753 * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
14755 * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
14756 instrument_prolog; Add memory_barrier instruction.
14758 2005-12-26 Zoltan Varga <vargaz@gmail.com>
14760 * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
14762 2005-12-23 Zoltan Varga <vargaz@gmail.com>
14764 * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
14766 * aliasing.c inssel.brg: Fix warnings.
14768 * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
14769 could skip initialization of some parts of memory.
14771 * mini.c mini-ia64.c: Fix warnings.
14773 * inssel-sparc.brg: Add an implementation of lneg which actually works.
14775 2005-12-22 Zoltan Varga <vargaz@gmail.com>
14777 * aliasing.c (mono_build_aliasing_information): Add a workaround for
14778 a crash seen on sparc.
14780 * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
14782 * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
14784 2005-12-21 Neale Ferguson <neale@sinenomine.net>
14786 * mini-ops.h: Add s390_backchain instruction
14788 * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
14790 * cpu-s390.md: Add s390_backchain instruction
14792 * mini-s390.c: Significant ABI changes
14794 * mini-s390.h: Cater for zero length structures
14796 2005-12-20 Neale Ferguson <neale@sinenomine.net>
14798 * mini-s390.c: ABI fixes
14800 * inssel-s390.brg: Remove debug statements
14802 * cpu-s390.md: Fix length of ATOMIC_xx operations
14804 2005-12-19 Zoltan Varga <vargaz@gmail.com>
14806 * basic-float.cs: Add float<->long conversion tests.
14808 2005-12-16 Neale Ferguson <neale@sinenomine.net>
14810 * mini-s390.c: Fix LOCALLOC processing.
14812 * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
14814 2005-12-15 Zoltan Varga <vargaz@gmail.com>
14816 * iltests.il: Add tests for some opcodes not covered by the other
14819 2005-12-15 Neale Ferguson <neale@sinenomine.net>
14821 * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct
14822 register loading for Tail processing; Correct trace output.
14824 * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
14826 * cpu-s390.md: Correct size of jmp instruction.
14828 2005-12-13 Neale Ferguson <neale@sinenomine.net>
14830 * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
14832 2005-12-13 Neale Ferguson <neale@sinenomine.net>
14834 * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
14835 Bring s390 up to current level.
14837 2005-12-12 Zltan Varga <vargaz@gmail.com>
14839 * generics.2.cs: Disable the newly added tests as they do not work yet.
14841 * generics.2.cs: Add valuetype tests.
14843 2005-12-09 Zoltan Varga <vargaz@gmail.com>
14845 * basic-long.cs: Add i4->u8 test.
14847 * objects.cs: Add tests for JIT intrinsic.
14849 * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
14850 optimizations lost by a mistake.
14852 2005-12-07 Zoltan Varga <vargaz@gmail.com>
14854 * basic-long.cs: Remove a test moved to objects.cs.
14856 * arrays.cs: Add more array tests.
14858 2005-12-06 Zoltan Varga <vargaz@gmail.com>
14860 * arrays.cs: Add new tests for multi-dimensional arrays.
14862 2005-12-06 Raja R Harinath <rharinath@novell.com>
14864 * Makefile.am (test_sources2): Add generics.2.cs.
14865 (EXTRA_DIST): Add test_sources2.
14867 2005-12-05 Ben Maurer <bmaurer@ximian.com>
14869 Support for boxing and unboxing nullable types as well as the
14870 isinst operation on nullables, per the CLI ammendment.
14872 * inssel.brg (CEE_ISINST): Special case for nullable
14874 * mini.c (handle_unbox_nullable): new method
14875 (handle_box): Special case for nullable types
14876 (mono_method_to_ir): Call handle_unbox_nullable in correct
14879 * generics.2.cs: New test suite
14881 * Makefile.am: Support for regression tests with generics.
14883 2005-12-03 Zoltan Varga <vargaz@gmail.com>
14885 * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
14886 allocated to registers. Fixes #76800.
14888 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
14890 * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
14892 2005-11-30 Zoltan Varga <vargaz@gmail.com>
14894 * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot
14897 2005-11-29 Zoltan Varga <vargaz@gmail.com>
14899 * objects.cs basic-calls.cs: Move a test depending on valuetypes to
14902 * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
14904 * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
14905 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
14907 * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
14908 single precision before storing to a single precision location.
14910 2005-11-28 Raja R Harinath <rharinath@novell.com>
14912 * Makefile.am (ILASM): Use profile-dependent location of ilasm.
14914 2005-11-27 Zoltan Varga <vargaz@gmail.com>
14916 * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
14919 * basic.cs: Remove test_0_byte_compares test which was moved to
14920 objects.cs a long time ago.
14922 2005-11-22 Massimiliano Mantione <massi@ximian.com>
14924 * aliasing.c: Fixed aliasing issue on 64 bit archs.
14926 2005-11-20 Zoltan Varga <vargaz@gmail.com>
14928 * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
14929 handlers are called.
14931 * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
14934 * mini-ia64.c: Add support for the throw->branch exception
14937 * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
14939 2005-11-18 Massimiliano Mantione <massi@ximian.com>
14941 * mini.c: Enabled "fastpath" deadce :-)
14943 2005-11-18 Massimiliano Mantione <massi@ximian.com>
14945 * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
14946 alias analysis pass to support it.
14947 * mini.h: Likewise.
14949 * liveness.c: Likewise (liveness computation can use aliasing
14950 information to be more accurate).
14951 * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
14952 moreover made so that "--compile-all" uses the given optimization
14953 flags and not the default ones.
14954 * aliasing.c: Alias analysis (new file).
14955 * aliasing.h: Likewise.
14956 * Makefile.am: added "aliasing.c" and "aliasing.h".
14958 2005-11-17 Zoltan Varga <vargaz@gmail.com>
14960 * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
14963 2005-11-13 Zoltan Varga <vargaz@gmail.com>
14965 * mini-exceptions.c (mono_handle_exception_internal): Remove the
14966 fp >= end_of_stack exit condition, as it is not needed, and it might
14967 become true for fp eliminated frames.
14969 2005-11-11 Zoltan Varga <vargaz@gmail.com>
14971 * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
14974 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
14976 * mini-arm.c: fixed alignment of doubles/longs to match
14977 the C ABI (bug #76635).
14979 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
14981 * aot.c: fix compilation with --enable-minimal=aot.
14983 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
14985 * mini-arm.c: fixed compatibility with the new
14986 floating point emulator package for compares.
14988 2005-11-03 Atsushi Enomoto <atsushi@ximian.com?
14990 * mini.c : reverted sig->pinvoke changes (r51396-51397).
14992 2005-11-01 Zoltan Varga <vargaz@freemail.hu>
14994 * mini-exceptions.c (print_stack_frame): Output to stderr.
14995 (mono_handle_native_sigsegv): Ditto.
14997 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
14999 * mini-amd64.c (mono_arch_output_basic_block): Remove unused
15000 OP_LCONV_TO_OVF_I implementation.
15002 * mini-amd64.c: Add support for the throw->branch exception
15005 * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
15006 when the catch clause catches a more general exception, i.e. Object.
15008 2005-10-30 Zoltan Varga <vargaz@gmail.com>
15010 * cpu-ia64.md: Remove unused opcodes.
15012 * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
15013 specific defines for architectures defining USE_SIGACTION.
15015 * mini-ia64.c: Fix some warnings.
15017 * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
15018 version seemed to skip a frame.
15020 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
15022 * mini.c: Clean up the usage of sig->pinvoke flag. Now
15023 only calls which are made to native code use this flag.
15025 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
15027 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
15028 varargs methods as well.
15030 * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
15031 which have save_lmf set. Reorganize methods prologs a bit.
15033 * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
15034 debugger to the proper place.
15036 2005-10-29 Martin Baulig <martin@ximian.com>
15038 * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
15039 when running inside the debugger until the debugger has support
15042 2005-10-26 Zoltan Varga <vargaz@gmail.com>
15044 * mini.h: Fix a warning.
15046 2005-10-24 Miguel de Icaza <miguel@novell.com>
15048 * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
15049 we expose publicly, this returns the string.
15051 2005-10-22 Zoltan Varga <vargaz@freemail.hu>
15053 * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
15054 with fp elimination.
15056 2005-10-21 Zoltan Varga <vargaz@gmail.com>
15058 * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
15059 native stacktrace using the glibc 'backtrace' function if available.
15061 2005-10-20 Zoltan Varga <vargaz@gmail.com>
15063 * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
15065 * mini-exceptions.c (mono_handle_native_sigsegv): New function to
15066 handle SIGSEGVs received while in native code.
15068 * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
15069 code, call mono_handle_native_sigsegv which will abort the runtime
15070 after printing some diagnostics, instead of converting it into a
15071 confusing NullReferenceException.
15073 2005-10-18 Zoltan Varga <vargaz@gmail.com>
15075 * cpu-pentium.md: Remove unused opcodes.
15077 2005-10-18 Zoltan Varga <vargaz@freemail.hu>
15079 * mini-amd64.h (MonoLMF): Add rsp field.
15081 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
15084 2005-10-17 Zoltan Varga <vargaz@gmail.com>
15086 * mini-codegen.c (get_register_spilling): Fix some warnings.
15088 2005-10-16 Zoltan Varga <vargaz@freemail.hu>
15090 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
15091 elimination during exception handling. Enable fp elimination by
15094 * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
15097 2005-10-16 Martin Baulig <martin@ximian.com>
15099 * mini-exceptions.c
15100 (mono_debugger_run_finally): New public method for the debugger.
15102 2005-10-10 Zoltan Varga <vargaz@gmail.com>
15104 * debug-mini.c (mono_debug_init_method): Fix warning.
15106 * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
15107 the 'exname' parameter const to fix some warnings.
15109 2005-10-09 Zoltan Varga <vargaz@freemail.hu>
15111 * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
15112 introduced by the previous patch.
15114 2005-10-08 Zoltan Varga <vargaz@gmail.com>
15116 * basic-float.cs: Add test for precision of float arithmetic.
15118 * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
15119 when loading/storing single values from/to memory.
15121 * mini.c (mono_jit_compile_method_with_opt): Create the function
15122 pointers in the correct domain.
15124 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
15126 * mini-exceptions.c (mono_handle_exception_internal): Fix bug
15127 introduced by previous patch.
15129 * mini-exceptions.c (mono_handle_exception_internal): Handle the case
15130 when out_filter_idx is NULL.
15132 * mini-exceptions.c: Don't run filter clauses twice during exception
15133 handling. Fixes #75755.
15135 2005-10-07 Zoltan Varga <vargaz@gmail.com>
15137 * aot.c: Add support for ldflda wrappers.
15139 * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
15142 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
15144 * mini.c, mini.h: do not consider exception handlers blocks when
15145 setting up interface variables.
15147 2005-10-04 Zoltan Varga <vargaz@freemail.hu>
15149 * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
15151 2005-10-03 Zoltan Varga <vargaz@gmail.com>
15153 * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
15154 causes a regression.
15156 * mini.c (mini_thread_cleanup): Fix reading of freed memory.
15158 2005-10-02 Zoltan Varga <vargaz@freemail.hu>
15160 * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
15161 of the OP_P definitions.
15163 * TODO: Add a proposal for dealing with the CEE/OP mess.
15165 * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm
15166 optimizations from the x86 port.
15168 * cpu-amd64.md: Ditto.
15170 * basic.cs basic-long.cs: Add tests.
15172 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
15174 * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
15175 Patrik Torstensson's implementation of my exception-handling
15176 optimization idea, when the exception object is not used
15179 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
15181 * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
15182 of the mul_imm optimizations from the old jit.
15184 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
15186 * mini.c, liveness.c: patch by Patrik Torstensson and
15187 Zoltan Varga to improve performance in methods with
15190 2005-09-30 Zoltan Varga <vargaz@gmail.com>
15192 * driver.c: Remove 'Globalization' entry from --version.
15194 2005-09-28 Zoltan Varga <vargaz@gmail.com>
15196 * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
15197 there is a profiler interested in JIT events.
15199 * aot.c: Load profile files produced by the AOT profiling module, and
15200 reorder methods based on the profiling info. Add a 'method_order' table
15201 to the AOT file to make mono_aot_find_jit_info work with the reordered
15204 * mini.h: Bump AOT file version info.
15206 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
15208 * mini-arm.h: work around what looks like a gcc bug when optimizations
15211 2005-09-28 Raja R Harinath <rharinath@novell.com>
15213 * Makefile.am (AM_CFLAGS): Don't use += to append inside
15214 conditionals. Use ...
15215 (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
15217 2005-09-27 Zoltan Varga <vargaz@freemail.hu>
15219 * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
15220 to determine the amount of memory to copy when passing valuetypes.
15222 * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
15223 4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
15225 2005-09-27 Zoltan Varga <vargaz@gmail.com>
15227 * mini.h mini.c aot.c: Add infrastructure to collect pagefault
15228 information about aot.
15230 2005-09-27 Ben Maurer <bmaurer@ximian.com>
15232 * *.c: Replace the use of {Enter,Leave}CriticalSection with
15233 macros. This will allow a deadlock debugger to easily be plugged
15236 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
15238 * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
15240 2005-09-27 Raja R Harinath <rharinath@novell.com>
15242 * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
15243 (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
15244 (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
15245 ($(arch_built)) [CROSS_COMPILING]: Error out.
15247 2005-09-26 Zoltan Varga <vargaz@gmail.com>
15249 * aot.c: Add support for the no_special_static flag for classes.
15251 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
15253 * Reapply reverted patches.
15255 * *: Revert r50174 as well.
15257 * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
15259 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
15261 * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
15263 2005-09-23 Miguel de Icaza <miguel@novell.com>
15265 * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
15266 part of the SIG_HANDLER_SIGNATURE.
15268 2005-09-23 Zoltan Varga <vargaz@gmail.com>
15270 * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
15273 * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention
15274 introduced by previous patch.
15276 2005-09-21 Zoltan Varga <vargaz@gmail.com>
15278 * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
15279 saved registers too.
15281 * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based
15282 upon the information returned by get_call_info ().
15284 * mini-x86.c (add_float): Fix stack size calculation.
15285 (mono_arch_call_opcode): Rewrite this so it works based up the
15286 information returned by get_call_info ().
15287 (mono_arch_get_this_vret_args): Ditto.
15289 2005-09-21 Zoltan Varga <vargaz@freemail.hu>
15291 * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
15292 in cinfo to determine the registers which need to be used.
15294 2005-09-20 Miguel de Icaza <miguel@novell.com>
15296 * driver.c (mono_main): Add --server and --desktop flags.
15298 2005-09-16 Zoltan Varga <vargaz@gmail.com>
15300 * mini-ia64.h: Make register masks 64 bit. Don't treat argument
15301 registers as global registers.
15303 * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no
15304 longer needed with the new register allocator.
15306 * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
15308 * cpu-ia64.md: Remove unused opcodes.
15310 * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
15312 2005-09-16 Zoltan Varga <vargaz@freemail.hu>
15314 * cpu-amd64.md: Remove unused opcodes.
15316 * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
15317 needed with the new register allocator.
15319 * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
15322 2005-09-16 Raja R Harinath <rharinath@novell.com>
15324 * Makefile.am (check-local): Don't invoke semdel-wrapper.
15326 2005-09-16 Martin Baulig <martin@ximian.com>
15328 * exceptions-amd64.c
15329 (throw_exception): Don't call mono_debugger_throw_exception() if
15330 we're a rethrow - see the FIXME in the code.
15332 2005-09-15 Geoff Norton <gnorton@customerdna.com>
15334 * mini.c (mono_init_exceptions): This only works on some architectures.
15336 2005-09-15 Zoltan Varga <vargaz@gmail.com>
15338 * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
15341 * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
15343 * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
15344 now in mini-exceptions.c.
15346 2005-09-15 Zoltan Varga <vargaz@freemail.hu>
15348 * mini-amd64.h mini-am64.c: Remove the altstack support code which is
15349 now in mini-exceptions.c.
15351 2005-09-15 Zoltan Varga <vargaz@gmail.com>
15353 * exceptions-x86.c: Applied patch from Patrik Torstensson
15354 <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
15356 * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
15357 code into mini-exceptions.c. Add some assertions to it.
15359 2005-09-12 Zoltan Varga <vargaz@gmail.com>
15361 * aot.c (emit_section_change): Applied patch from "The Software Team"
15362 (<software@solmersa.com>). Fix as errors on windows.
15364 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
15366 * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
15367 method info into the LMF.
15369 2005-09-11 Zoltan Varga <vargaz@gmail.com>
15371 * mini-ia64.c: Add proper unwind info for method epilogs.
15373 * exceptions-ia64.c: Add some code to help debugging.
15375 * mini-ia64.c mini-ia64.h: Add sigaltstack support.
15377 * mini-exceptions.c: Fix warning.
15379 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
15381 * mini.c: Really fix build.
15383 * mini-x86.c mini-amd64.c: Fix build.
15385 2005-09-11 Zoltan Varga <vargaz@gmail.com>
15387 * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
15389 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
15390 some Interlocked methods as intrinsics.
15392 * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
15393 for Thread methods as well.
15395 * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
15397 * inssel.brg: Add rule for OP_MEMORY_BARRIER.
15399 * mini-ia64.c mini-x86.c mini-amd64.c
15400 cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of
15403 * mini.c (mono_init_exceptions): Fix build breakage.
15405 2005-09-10 Zoltan Varga <vargaz@gmail.com>
15407 * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
15408 of instructions. Use the new ia64_unw_op macros for emitting unwind
15411 * mini.c (mono_init_exceptions): Initialize exception handling
15412 related trampolines at startup.
15414 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
15416 * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
15418 2005-09-09 Zoltan Varga <vargaz@gmail.com>
15420 * mini.c: Handle type loading errors gracefully during compilation and
15421 throw the appropriate exception.
15423 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
15425 * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
15426 for the mono binary.
15428 2005-09-09 Martin Baulig <martin@ximian.com>
15430 * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
15433 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
15435 * mini-arm.h: use emulation for conv.r.un for the release.
15437 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
15439 * mini-arm.c, objects.cs: more fixes and tests for them.
15441 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
15443 * mini-arm.c: align structures to at least 4 bytes to be able
15444 to keep our current optimized memcpy.
15446 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
15448 * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
15450 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15452 * mini.c: ignore SIGPIPE.
15454 2005-09-04 Zoltan Varga <vargaz@gmail.com>
15456 * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
15458 * mini-ia64.h mini-ia64.c: Add some minor optimizations.
15460 2005-09-02 Zoltan Varga <vargaz@gmail.com>
15462 * mini.h: Add prototype for mono_allocate_stack_slots_full.
15464 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
15466 * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
15467 exception handling support.
15468 * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
15469 patch by Brian Koropoff <briank@marakicorp.com>).
15471 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
15473 * mini.c: revert another 'optimization' which breaks when
15474 items on the eval stack need to be saved at a basic block end
15477 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
15479 * jit-icalls.c: for arrays, ensure we always provide
15482 2005-08-30 Zoltan Varga <vargaz@gmail.com>
15484 * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
15486 * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
15488 2005-08-29 Zoltan Varga <vargaz@gmail.com>
15490 * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
15491 arguments in their original register.
15493 2005-08-28 Zoltan Varga <vargaz@gmail.com>
15495 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
15498 * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
15499 when ssapre is enabled.
15501 * inssel-long.brg: Fix bug in previous patch.
15503 * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize
15504 multiplication by a constant.
15506 2005-08-27 Zoltan Varga <vargaz@gmail.com>
15508 * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
15511 * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
15514 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
15516 * inssel-arm.brg: apply changes tested by Brian Koropoff
15517 <briank@marakicorp.com>.
15519 2005-08-25 Zoltan Varga <vargaz@gmail.com>
15521 * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
15523 2005-08-24 Zoltan Varga <vargaz@gmail.com>
15525 * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
15526 to the same register if dreg is just a base register.
15527 (print_ins): Improve printing of membase opcodes.
15529 * inssel-x86.brg: Add optimized ldind(reg) rules.
15531 * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
15533 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
15535 * mini.c: when running under valgrind, set the stack bottom for
15536 the GC at the actual approximate stack for the app (fixes running
15537 mono with valgrind).
15539 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
15541 * mini.c: do no break at the first valuetype to init found
15542 (fixes bug #75791).
15544 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
15546 * cpu-arm.md, mini-arm.c: more fixes and LMF support.
15548 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
15550 * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
15552 2005-08-23 Zoltan Varga <vargaz@freemail.hu>
15554 * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
15556 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
15558 * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
15560 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
15563 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
15566 * mini.c (optimize_branches): Don't quit after 1000 iterations on large
15569 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
15571 * tramp-arm.c: allocate less memory for the trampoline and fix typo.
15573 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
15575 * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
15576 in the tail recursion optimization.
15578 * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as
15579 debug info into the assembly file.
15581 * iltests.il: Add test for filter regions.
15583 * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
15584 initial stack of filter regions. Fixes #75755.
15586 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
15588 * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
15589 stack requirements.
15591 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
15593 * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
15594 the check for an already compiled method on non-ia64 platforms.
15595 (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
15598 * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
15600 * inssel-x86.brg: Add some optimized call rules.
15602 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
15604 * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
15607 * mini.h mini-trampolines.c: Pass the trampoline argument to
15608 mono_arch_patch_delegate_trampoline.
15610 * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
15612 * mini-trampolines.c: Fix build.
15614 * mini-amd64.h: Add delegate trampolines.
15616 * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
15618 * inssel-amd64.brg: Add optimized call rules.
15620 * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
15622 * inssel-ia64.brg: Add optimized ldind(reg) rules.
15624 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
15626 * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
15629 * mini-ia64.c: Remove LMF fixmes.
15631 * mini-ia64.h: Remove most fields from LMF.
15633 * inssel-ia64.brg (stmt): Fix unaligned access errors.
15635 * mini-trampolines.c: Add support for IA64 function descriptors.
15637 * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
15638 for IA64 function descriptors.
15640 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
15642 * tramp-arm.c: patch the vtable for virtual calls. Added
15643 support code to register/unregister the LMF.
15644 * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
15647 2005-08-19 Dick Porter <dick@ximian.com>
15649 * mini.c: Use a gsize to store the thread ID, so it can hold a 64
15650 bit value if needed.
15652 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
15654 * mini.c (mini_get_method): Move handling of wrapper data here.
15656 * mini.c (mono_method_to_ir): Add support for dynamic methods.
15658 * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
15661 * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so
15662 bblock->code does not remain empty.
15664 2005-08-17 Zoltan Varga <vargaz@freemail.hu>
15666 * arrays.cs: Add regression test for #75832.
15668 * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
15669 rules. Fixes #75832.
15671 * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
15672 instruction scheduling.
15674 2005-08-12 Zoltan Varga <vargaz@freemail.hu>
15676 * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
15678 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
15680 * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
15682 * mini-codegen.c: Fix VC build.
15684 * cpu-pentium.md: Increase length of atomic_exhange_i4.
15686 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15688 * mini.h: fix signature for mono_register_opcode_emulation.
15690 2005-08-09 Zoltan Varga <vargaz@freemail.hu>
15692 * mini.c: Get rid of most of the helper_sig_... constants using
15693 mono_create_icall_signature ().
15695 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
15697 * jit-icalls.c (helper_ldstr): New helper function.
15699 * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
15701 * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
15702 throw, load the string using a helper call instead of creating a string object.
15704 * aot.c: Update after LDSTR changes.
15706 * mini.h: Bump AOT file version.
15708 * aot.c: Save class size info into the AOT file. Print more statistics during
15711 * mini.h: Bump AOT file version.
15713 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
15714 ordering of disasm cases. Fixes #74957.
15716 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
15718 * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
15719 jit-icalls.c, mini-codegen.c, Makefile.am: changes in
15720 the generic code needed for the ARM port.
15722 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
15724 * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
15725 inssel-arm.brg: more ARM features and fixes.
15727 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
15729 * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
15730 ARM port work in progress.
15732 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
15734 * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
15736 * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
15738 * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
15740 * inssel.brg (mini_emit_memset): Add support for unaligned access.
15742 * *-ia64.*: Ongoing IA64 work.
15744 * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
15746 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
15748 * TODO: Remove out-of-data todo stuff.
15750 * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
15753 * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
15755 * mini.h: Bump corlib version.
15757 2005-07-27 Martin Baulig <martin@ximian.com>
15760 (create_copy_ins): Added `const unsigned char *ip' argument; set
15761 `copy->cil_code' from it.
15763 2005-07-27 Martin Baulig <martin@ximian.com>
15765 * mini-exceptions.c (mono_handle_exception): Don't call
15766 mono_debugger_handle_exception() for filters.
15768 2005-07-27 Zoltan Varga <vargaz@freemail.hu>
15770 * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
15773 2005-07-26 Martin Baulig <martin@ximian.com>
15775 Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
15777 * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
15778 helper_compile_generic_method() if the method is actually virtual
15781 2005-07-26 Martin Baulig <martin@ximian.com>
15784 (trampoline_code): Renamed to `mono_trampoline_code' and made it
15785 public; this is now accessed directly by the debugger.
15786 (mono_generic_trampoline_code): Removed.
15789 (mono_debug_init_method): Also add interncalls and wrappers.
15791 2005-07-23 Zoltan Varga <vargaz@freemail.hu>
15793 * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
15795 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
15797 * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
15799 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
15801 * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
15803 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
15805 * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
15806 getting TLS offsets on AMD64 too.
15808 2005-07-20 Kornel Pal <kornelpal@hotmail.com>
15810 * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
15812 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
15814 * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
15815 inssel-arm.brg, mini-arm.h: ARM port work in progress.
15817 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
15819 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
15821 * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
15824 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call
15825 mono_sparc_is_virtual_call ().
15827 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
15829 * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
15830 trampoline parameters.
15832 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
15834 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
15835 to mono_arch_get_vcall_slot_addr.
15837 * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
15840 * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
15842 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
15844 * mini-ia64.h mini-ia64.c: Finish pinvoke support.
15846 2005-07-19 Martin Baulig <martin@ximian.com>
15848 * exceptions-amd64.c (throw_exception): Call
15849 mono_debugger_throw_exception() here like we're doing it on i386.
15851 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
15853 * mini-ia64.c: Add optimized TLS access support.
15855 2005-07-18 Zoltan Varga <vargaz@freemail.hu>
15857 * mini-exceptions.c: Ongoing IA64 work.
15859 * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
15861 * mini.c: Use the default optimization set when embedding. Fixes
15864 2005-07-11 Zoltan Varga <vargaz@freemail.hu>
15866 * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts
15867 of trampolines to a separate file.
15869 * mini-trampolines.c: New file.
15871 * mini.h tramp-x86.c: Move arch independent parts of trampolines to a
15874 * tramp-x86.c: Reorganize the trampoline code to be similar to the
15877 * mini-codegen.c: Fix cygwin build.
15879 2005-07-10 Zoltan Varga <vargaz@freemail.hu>
15881 * mini.c: Add some minor changes needed by the IA64 port.
15883 * *-ia64.*: Ongoing IA64 work.
15885 2005-07-09 Zoltan Varga <vargaz@freemail.hu>
15887 * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split
15888 trampolines into arch-independent and arch-dependent parts.
15890 * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
15892 2005-07-08 Zoltan Varga <vargaz@freemail.hu>
15894 * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
15896 * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
15897 the xp-regalloc-branch for amd64.
15899 * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
15900 xp-regalloc-branch for x86.
15902 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
15904 * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
15906 2005-07-06 Martin Baulig <martin@ximian.com>
15909 (mono_jit_compile_method_inner): Call mono_get_inflated_method().
15910 (mono_jit_runtime_invoke): Likewise.
15912 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
15914 * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
15917 * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
15918 without loading their metadata. Reorganize the file format so exception handling+
15919 debug info is kept separate from normal method info. Create MonoJitInfo
15920 structures for methods lazily.
15922 * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
15924 (x86_class_init_trampoline): Patch AOT class init trampolines too.
15926 * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
15928 * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
15931 * mini.h: Bump AOT file version.
15933 2005-07-04 Zoltan Varga <vargaz@freemail.hu>
15935 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
15937 2005-07-01 Raja R Harinath <rharinath@novell.com>
15939 * Makefile.am (check-local): Call semdel-wrapper.
15941 2005-06-29 Zoltan Varga <vargaz@freemail.hu>
15943 * mini-x86.c: Revert the last change as it seems to break the build..
15945 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
15947 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
15949 * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
15951 2005-06-27 Ben Maurer <bmaurer@ximian.com>
15953 * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
15954 outside of the macro, so strange stuff doesn't happen with gcc4
15955 (NEW_AOTCONST_TOKEN): Likewise.
15957 2005-06-28 Martin Baulig <martin@ximian.com>
15959 * mini.c (mini_class_is_system_array): New static method; use this
15960 instead of `klass->parent == mono_defaults.array_class' everywhere
15961 since this also works for the new generic array class.
15963 2005-06-26 Ben Maurer <bmaurer@ximian.com>
15965 * inssel.brg: Remove warnings.
15967 2005-06-24 Zoltan Varga <vargaz@freemail.hu>
15969 * mini-ia64.c: Ongoing IA64 work.
15971 * basic-float.cs: Add float->i1 conversion test.
15973 * iltests.il: Add conv.u4 test.
15975 2005-06-23 Zoltan Varga <vargaz@freemail.hu>
15977 * inssel-long.brg: Fix bug caused by last change.
15979 2005-06-23 Geoff Norton <gnorton@customerdna.com>
15981 * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other
15982 BSDs. Allows the x86 JIT to work on OSX86
15984 2005-06-22 Zoltan Varga <vargaz@freemail.hu>
15986 * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
15989 * mini-ia64.c: Ongoing IA64 work.
15991 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
15993 * mini-ia64.c: Ongoing IA64 work.
15995 * driver.c: Clean up jit_code_hash as well when using --regression.
15997 * inssel-long.brg: Fix long->i4/u4 conversion rules.
15999 * basic-long.cs: Add tests for long->u4 conversion.
16001 2005-06-18 Ben Maurer <bmaurer@ximian.com>
16003 * mini.c: Take mono_get_domainvar out of macros. This makes sure
16004 that we do not depend on undefined C behavior: the order stuff
16005 gets evaluated within an expression. Fixes mono when compiled on
16008 2005-06-18 Zoltan Varga <vargaz@freemail.hu>
16010 * *-ia64.*: Ongoing IA64 work.
16012 * aot.c: Lower memory usage while loading AOT methods.
16014 * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
16016 * mini.h: Bump AOT file format version.
16018 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
16020 * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
16022 2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
16024 * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
16025 not on callee assembly). Fixed some comments.
16027 2005-06-16 Zoltan Varga <vargaz@freemail.hu>
16029 * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
16030 it gets proper disassembly.
16031 (emit_method_info): Remove some dead code.
16033 * mini.c (mini_method_compile): Allways allocate the GOT var in
16034 mono_method_to_ir for emulating opcodes.
16036 2005-06-13 Zoltan Varga <vargaz@freemail.hu>
16038 * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
16039 before freeing the code memory. Fixes #74990.
16041 * objects.cs: Add regression test for #74992.
16043 * liveness.c: Extend live ranges of arguments to the beginning of the
16044 method. Fixes #74992.
16046 * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
16047 so it points into the faulting instruction.
16049 2005-06-12 Zoltan Varga <vargaz@freemail.hu>
16051 * jit-icalls.c (mono_imul_ovf): Add exception handling.
16053 * *-ia64.*: Ongoing IA64 work.
16055 * mini.c (mini_init): Fix signature of mono_delegate_ctor.
16057 2005-06-11 Zoltan Varga <vargaz@freemail.hu>
16059 * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
16061 * *-ia64.*: Ongoing IA64 work.
16063 2005-06-10 Zoltan Varga <vargaz@freemail.hu>
16065 * basic-long.cs: Add tests for add/sub.ovf.
16067 * basic.cs: Add tests for sub.ovf.
16069 * *-ia64.*: Ongoing IA64 work.
16071 2005-06-09 Zoltan Varga <vargaz@freemail.hu>
16073 * *-ia64.*: Ongoing IA64 work.
16075 * basic.cs: Add conv.ovf.i4.un test.
16077 2005-06-09 Massimiliano Mantione <massi@ximian.com>
16079 * mini.c: (remove_block_if_useless) Fixed bug 75061.
16081 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16083 * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
16085 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
16087 * *-ia64.*: Ongoing IA64 work.
16089 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16092 * mini.c: added the ability to toggle trace on/off using SIGUSR2.
16094 2005-06-04 Zoltan Varga <vargaz@freemail.hu>
16096 * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
16098 2005-06-03 Zoltan Varga <vargaz@freemail.hu>
16100 * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
16102 * mini-amd64.c (amd64_patch): Add an assert to check that the destination
16103 of a call is callable by a near call.
16105 2005-05-31 Zoltan Varga <vargaz@freemail.hu>
16107 * mini-ia64.c: Ongoing IA64 work.
16109 2005-05-29 Zoltan Varga <vargaz@freemail.hu>
16111 * genmdesc.c: Make the generated array non-static.
16113 * inssel-long.brg: Fix LSHR_IMM rule.
16115 * *-ia64.*: Ongoing IA64 work.
16117 * *-ia64.*: Ongoing IA64 work.
16119 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
16121 * *-ia64.*: Ongoing IA64 work.
16123 * *-ia64.*: Ongoing IA64 work.
16125 * mini-ia64.c: Ongoing IA64 work.
16127 * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
16129 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
16131 * objects.cs basic-calls.cs: Move some tests to objects.cs.
16133 * objects.cs basic-long.cs: Move some tests to objects.cs.
16135 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
16137 * *-ia64.*: Ongoing IA64 work.
16139 * iltests.il: Add a new test.
16141 * mini.c (mono_method_to_ir): Initialize valuetypes when created using
16142 newobj. Fixes #75042.
16144 2005-05-22 Zoltan Varga <vargaz@freemail.hu>
16146 * *-ia64.*: Ongoing IA64 work.
16148 * *-ia64.*: Ongoing IA64 work.
16150 * *-ia64.*: Ongoing IA64 work.
16152 * basic.cs objects.cs: Move tests accessing static variables as well.
16154 * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
16156 2005-05-21 Zoltan Varga <vargaz@freemail.hu>
16158 * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
16160 * driver.c: Always print failed tests.
16162 * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
16165 * *ia64*: Ongoing IA64 work.
16167 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
16169 * basic.cs: Add tests for add.ovf. Fix warnings.
16171 2005-05-18 Miguel de Icaza <miguel@novell.com>
16173 * driver.c (mono_main): Avoid crash if no argument is passed to
16174 --break; Do not use g_error, but f_printf. And fix all other
16175 ocurrences of the same crash.
16177 2005-05-17 Zoltan Varga <vargaz@freemail.hu>
16179 * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
16180 and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
16183 2005-05-14 Zoltan Varga <vargaz@freemail.hu>
16185 * *-ia64.*: Add beginnings of IA64 backend.
16187 * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.
16189 2005-05-13 Zoltan Varga <vargaz@freemail.hu>
16191 * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
16194 * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
16196 * mini-amd64.c: Fix a warning.
16198 2005-05-10 Zoltan Varga <vargaz@freemail.hu>
16200 * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
16201 in float_neg. Fixes #74897.
16203 * mini-amd64.c (emit_call): Fix another near call bug.
16205 2005-05-06 Sebastien Pouliot <sebastien@ximian.com>
16207 * declsec.c: Keep the appdomain information in the structure. Added a
16208 missing "return FALSE" for Unmanaged if FullTrust is set (or else the
16209 value gets overwritten).
16210 * declsec.h: Set the default MonoArray for the the stack to 6. Added
16211 an MonoAppDomain member to MonoSecurityFrame.
16212 * mini-exceptions.c: Do not use a glist to keep GC allocated objects
16213 used in the stack walk. Now use a MonoArray which grow (double) when
16216 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
16218 * mini.c: Re-enabled runtime cleanup, since running threads should
16219 now properly stop when exiting.
16221 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
16223 * mini-codegen.c: New file contaning the arch-independent local
16224 register allocator. Not used by any architectures yet.
16226 * mini.h linear-scan.c: Merge some changes from the
16227 mini-xp-local-regalloc branch.
16229 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
16231 * mini-amd64.c (emit_call): Fix calls to native functions when the
16232 runtime is compiled as a shared library. Fixes #74756.
16234 * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
16235 on a literal field. Fixes #74751.
16237 2005-04-25 Raja R Harinath <rharinath@novell.com>
16239 * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
16241 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
16243 * objects.cs: Add missing null casting test.
16245 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
16247 * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
16248 in wrapper methods. Also rename 'address' variable to 'offset'.
16250 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
16252 * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
16255 * Makefile.am (MCS): Use -unsafe instead of --unsafe.
16257 * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
16260 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
16262 * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
16264 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
16266 * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
16267 just the last bytes.
16269 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
16271 * aot.c (mono_compile_assembly): Fix warning.
16273 * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
16274 by the _MSC_VER stuff.
16276 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
16278 * inssel-long.brg: Fix #74588.
16280 * cpu-amd64.md: Fix #74591.
16282 * iltests.il: Add new regression tests.
16284 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
16286 * trace.c (mono_trace_enter_method): Print enums as an int, not as a
16289 2005-04-11 Zoltan Varga <vargaz@freemail.hu>
16291 * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
16293 * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches
16294 from Bill Middleton <flashdict@gmail.com>.
16296 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
16298 * arrays.cs: Add new regression test. Fix warnings.
16300 2005-04-09 Zoltan Varga <vargaz@freemail.hu>
16302 * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
16303 and leakage in CKFINITE.
16305 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
16306 this to a null op since it is called on amd64 too.
16308 * exceptions-amd64.c (get_throw_trampoline): Align stack.
16310 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
16311 body since this is not used on amd64.
16313 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
16315 * mini-amd64.c: Remove obsolete fixmes.
16317 * mini.c (print_method_from_ip): Fix debugging support.
16319 2005-2-1 Massimiliano Mantione <massi@ximian.com>
16321 * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
16322 so that expressions that don't give much gain are not reduced.
16323 * ssapre.h: Likewise.
16325 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
16327 * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
16329 * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
16331 * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
16333 2005-04-01 Zoltan Varga <vargaz@freemail.hu>
16335 * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
16337 * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
16339 2005-03-31 Zoltan Varga <vargaz@freemail.hu>
16341 * mini-x86.c: If sigaltstack support is enabled, perform win32 style
16344 * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
16346 * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
16348 * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
16350 * mini-x86.h mini-x86.c exceptions-x86.c: Add support for
16351 MONO_ARCH_USE_SIGACTION. Fixes #74252.
16353 * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
16355 * mini-x86.c: Fix up stack overflow handling.
16357 * exceptions.cs: Add new regression test.
16359 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
16361 * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
16362 mono_jit_thread_attach.
16364 * mini.c (mono_method_to_ir): Verify called method is not abstract.
16366 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
16368 * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
16369 avoid calling constructors using callvirt.
16371 * inssel.brg: Fix #74073.
16373 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
16375 * aot.c, mini.h: Added mono-compiler.h header to allow/ease
16376 compilation with non-GCC compilers.
16377 * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
16378 possible using VS.NET. Adapted from the work of J Lothian (for VC6).
16380 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
16382 * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
16383 klass->interface_offsets (will likely fix bug#74073).
16385 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
16387 * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
16389 2005-03-28 Zoltan Varga <vargaz@freemail.hu>
16391 * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
16392 to amd64_div_reg_size ().
16394 * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
16396 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
16398 * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
16400 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
16402 * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
16404 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
16406 * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
16408 * mini.c (mono_precompile_assembly): Load and precompile referenced
16409 assemblies as well. Fixes #74015.
16411 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
16413 * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
16415 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
16417 * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
16418 a lot of checks and (anyway) permissions cannot work until corlib is
16421 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
16423 * mini-ppc.c: fixed ABI issue on sysv/ppc.
16425 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
16427 * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
16428 calls (fixes bug#72824).
16430 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
16432 * mini.c: fix tail recursion elimination (see test in bug#73936).
16434 2005-03-21 Zoltan Varga <vargaz@freemail.hu>
16436 * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
16437 some fp functions in sse2 mode.
16439 2005-03-20 Zoltan Varga <vargaz@freemail.hu>
16441 * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
16443 2005-03-19 Zoltan Varga <vargaz@freemail.hu>
16445 * mini.h mini.c: Add mono_get_jit_tls_key ().
16447 * mini-x86.c: Enable fast TLS support on windows.
16449 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
16451 * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
16452 * mini.c: Check for p/invoke method when generating code. If a
16453 p/invoke method, or it's class, isn't decorated with [Suppress
16454 UnmanagedCodeSecurity] then generate code to call System.Security.
16455 UnmanagedDemand (only if the security manager is active).
16457 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
16459 * tramp-amd64.c (create_specific_trampoline): Revert parts of the
16460 last change as it seems to cause strange crashes.
16462 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
16464 * *.c: handle unsafe function pointers where needed.
16466 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
16468 * mini.c (mono_jit_free_method): Remove the fixme too.
16470 2005-03-15 Miguel de Icaza <miguel@novell.com>
16472 * mini.c: As discussed, make the code actually free the delegate
16473 thunk now, to enable the debugging of delegate problems, use
16474 MONO_DEBUG=1 when running Mono.
16476 This takes also care of parts of the leaks as seen by Joe.
16478 2005-03-15 Zoltan Varga <vargaz@freemail.hu>
16480 * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable
16481 thread_tls_offset calculation.
16483 2005-03-14 Sebastien Pouliot <sebastien@ximian.com>
16485 * declsec.c: Reworked linkdemand checks for icall. The previous code
16486 was using the declaration code (untrusted) and didn't work as expected
16487 with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
16490 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
16492 * iltests.il: Add new localloc test.
16494 * mini-amd64.c: Handle large stack allocations the same way as on
16495 windows if stack overflow handling is working.
16497 * mini-amd64.c: Allocate the signal stack using mmap.
16499 * mini.c (sigsegv_signal_handler): Fix reading of context.
16501 * mini-exceptions.c: Fix up stack overflow handling.
16503 * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
16505 * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
16507 * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
16509 * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
16511 * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
16512 tramp_init functions as they are no longer needed.
16514 2005-03-12 Zoltan Varga <vargaz@freemail.hu>
16516 * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
16518 * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
16520 * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
16522 * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
16525 * mini-ops.h: Add OP_LMUL_IMM.
16527 * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
16528 long mul/div opcodes as intrinsic.
16530 * mini-amd64.c (emit_call): Handle the case when the callee might be
16533 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
16535 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
16538 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
16540 * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
16542 2005-03-09 Ben Maurer <bmaurer@ximian.com>
16544 * mini.c (mono_codegen): Don't leak here, to help people running
16547 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
16549 * mini-amd64.c (mono_arch_output_basic_block): Fix int->float
16550 conversions in sse2 mode.
16552 * basic-float.cs: Add regression test.
16554 * mini-amd64.c: Reenable sse2.
16556 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
16558 * mini-amd64.c: Disable sse2 until some regressions are fixed.
16560 2005-03-07 Joerg Rosenkranz <joergr@voelcker.com>
16562 * driver.c: Copyright text should include 2005.
16564 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
16566 * cpu-amd64.md (load_membase): Fix more max lengths.
16568 2005-03-06 Zoltan Varga <vargaz@freemail.hu>
16570 * cpu-amd64.md (load_membase): Fix max length.
16572 * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
16574 * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
16576 * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
16577 support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
16579 * basic-float.cs: Add rounding regression test.
16581 * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
16583 2005-03-04 Neale Ferguson <NealeFerguson@earthlink.net>
16585 * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
16586 structures in registers for pinvoke wrappers.
16588 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
16590 * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
16592 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
16594 * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
16595 wrapper to mono_jit_thread_attach.
16597 * mini.c (mini_jit_thread_attach): New jit icall.
16599 * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in
16600 native->managed wrappers.
16602 * exceptions.cs: Add new regression test.
16604 * mini.c (optimize_branches): Check regions in the cbranch to throw
16605 block case as well. Fixes #73242.
16607 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
16609 * mini.c: thread safety fixes.
16611 2005-02-27 Zoltan Varga <vargaz@freemail.hu>
16613 * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
16614 patching stuff, since delegates use jump trampolines so there is
16617 * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in
16620 * tramp-amd64.c: Fix build.
16622 * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
16623 it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
16625 * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
16626 Rename this to mono_arch....
16627 (mono_amd64_get_delegate_method_ptr_addr): Ditto.
16629 * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
16631 * mini-amd64.c (emit_call): If both the caller and the callee is
16632 guaranteed to have 32 bit addresses, emit a normal call.
16634 * tramp-amd64.c: Adapt to changes in mini-amd64.c.
16636 * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines.
16637 * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
16638 method_ptr inside delegates.
16640 2005-02-26 Zoltan Varga <vargaz@freemail.hu>
16642 * mini.c (mono_jit_free_method): Free the method info even if the native code is
16643 invalidated. Fixes #73001.
16645 * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
16647 * mini-x86.c: Only use stdcall for pinvokes on windows.
16649 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
16651 * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
16652 * mini-x86.c: remove unreliable __thread var offset detection,
16653 use the correct accessors and enable by default.
16655 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
16657 * mini.c (mono_jit_free_method): Fix memory leak.
16659 2005-02-22 Zoltan Varga <vargaz@freemail.hu>
16661 * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW.
16663 2005-02-21 Zoltan Varga <vargaz@freemail.hu>
16665 * cpu-amd64.md: Fix lengths of atomic opcodes.
16667 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
16669 * driver.c: try to not imply using ICU is any good.
16671 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
16673 * mini-amd64.c (mono_arch_get_inst_for_method): Implement more
16674 functions as inline ops.
16676 * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
16677 some Interlocked functions as inline ops.
16679 * mini.c (move_basic_block_to_end): Fix bug in last patch.
16681 * mini.h (MonoBasicBlock): Reorganize fields a bit.
16683 * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
16685 * mini.c: Add support for OP_NOT_TAKEN.
16687 * mini-amd64.h mini-amd64.c: Add support for passing/returning small
16688 structures in registers for pinvoke wrappers.
16690 * mini-amd64.c: Fix warnings.
16692 2005-02-19 Zoltan Varga <vargaz@freemail.hu>
16694 * mini.h (MonoCompile): Add 'ret_var_is_local' field.
16696 * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
16698 * mini.c (NEW_RETLOADA): If the ret variable is a local, use its
16699 address instead of loading the address from it.
16701 * mini-x86.c: Add support for returning small structs in registers
16702 on Win32. Fixes part of #70864.
16704 2005-02-18 Zoltan Varga <vargaz@freemail.hu>
16706 * trace.c (get_token): Improve error checking.
16708 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
16710 * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
16712 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
16714 * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
16715 it can be reused for MonoClass.
16716 * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
16719 2005-02-15 Sebastien Pouliot <sebastien@ximian.com>
16721 * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code
16722 instead of a MonoReflectionMethod. The method information wasn't used
16723 when displaying SecurityException details (but will be now).
16725 2005-02-15 Atsushi Enomoto <atsushi@ximian.com>
16727 * Makefile.am : windows build fix.
16729 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
16731 * iltests.il: Add new regression test.
16733 * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
16736 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
16738 * mini.c: Moved linkdemand check into helper function check_linkdemand
16739 to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP,
16742 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
16744 * declsec.c: Added statistics counter for different kinds of
16746 * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
16747 (and commented) declaration.
16748 * mini.c: Added statistics counter for security Demand code
16749 generation. Added display of security statistics.
16751 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
16753 * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
16754 Fix compilation errors under gcc-2.95.
16756 2005-02-12 Ben Maurer <bmaurer@ximian.com>
16758 * mini.c, driver.c: Use the new jit trampoline hashtable
16760 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
16762 * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
16764 2005-02-11 Martin Baulig <martin@ximian.com>
16766 * debug-mini.c (mono_debug_close_method): Free the line number array.
16768 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
16770 * aot.c: Break up large methods into smaller ones. Share GOT slots for
16773 * mini.h: Bump AOT file format version.
16775 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
16777 * declsec.c: Added LinkDemand support and it's special cases for ECMA,
16779 * declsec.h: Added macros to get/set lazyly initialized security
16780 informations about assemblies. Added new enum for different type of
16781 possible LinkDemand violation. Added function to check LinkDemands.
16782 * mini.h: Added a field to MonoCompile to hold any security violation
16783 detected when JITting a method (so it can be thrown later).
16784 * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL
16785 and CEE_CALLVIRT. Added code to throw exception at the end of
16786 mini_method_compile (note: the exception is unhandled right now).
16788 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
16790 * mini.c, jit-icalls.c: use the managed implementation of
16791 memset for initobj and memset, to avoid managed <-> unmanaged
16794 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
16796 * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
16797 optimization if it would need a GOT var.
16799 * basic.cs: Add tests for constant propagation and switch statements.
16801 * ssa.c: Fix out-of-range constant propagation and switch statements.
16803 2005-02-09 <vargaz@freemail.hu>
16805 * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
16807 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
16809 * cpu-amd64.md (load_membase): Fix max length of load_membase.
16811 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
16813 * mini.c: update to new signature of mono_class_get_allocation_ftn().
16815 2005-02-06 Neale Ferguson <NealeFerguson@earthlink.net>
16817 * cpu-s390.md, mini-s390.c: Correct bug with register usage on certain
16818 arithmetic operations.
16820 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
16822 * mini-ppc.c: add a workaround for broken user code that
16823 DllImports vararg functions with non-vararg signatures.
16825 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
16827 * mini.c (mono_jit_compile_method_inner): Add detection and a
16828 meaningfull error message for assemblies written in Managed C++.
16830 * tramp-amd64.c mini-amd64.h: Add support for
16831 create_trampoline_from_token ().
16833 * aot.c mini-x86.c abcremoval.c: Applied patch from
16834 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
16836 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
16838 * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline
16839 which takes a MonoImage/token as parameter instead of a MonoMethod.
16841 * aot.c: Use the new trampoline for initializing vtables.
16843 * aot.c: Add support for ldfld/stfld_remote wrappers.
16845 * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
16846 rules for compare <MEM>, IMM.
16848 * mini.h (MONO_AOT_FILE_VERSION): Bump it.
16850 * aot.c: Handle inherited finalizers correctly.
16852 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
16854 * inssel.brg (stmt): Add a missing _setup_... ().
16856 * aot.c: Save some parts of the class state to the AOT file and use it
16857 to recompute that state when a class is initialized.
16859 * mini.c: Install AOT hooks into the runtime.
16861 * mini.h: Bump AOT file format version.
16863 * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
16866 * iltests.il: Add new test.
16868 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
16870 * mini.c: fix typo.
16872 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
16874 * mini.c: setup the statistical profiler in the thread attach
16875 callback to cope with the new single thread code.
16877 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
16879 * mini-ppc.c: ensure we have enough room for the profiler
16880 calls (fixed bug#72084).
16882 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
16884 * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding
16887 2005-2-1 Massimiliano Mantione <massi@ximian.com>
16889 * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
16891 2005-2-1 Massimiliano Mantione <massi@ximian.com>
16893 * ssapre.c: Fixed an issue with down safety (this allows IronPython
16894 to succesfully execute parrotbench).
16895 * ssapre.h: Likewise.
16897 2005-2-1 Massimiliano Mantione <massi@ximian.com>
16899 * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
16900 variable for stores to method arguments (fixes a SSAPRE issue).
16902 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
16904 * mini.c: handle value types in dup, fixes gen-112.cs.
16906 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
16908 * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
16909 sequence for calls in dynamic methods to avoid thunks.
16911 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
16913 * mini.c: correctly remove dynamic methods from the hashtable.
16915 2005-1-20 Massimiliano Mantione <massi@ximian.com>
16917 * driver.c: Disabled SSAPRE until fix the bug that appears
16918 in IronPython's parrotbench.
16920 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
16922 * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
16924 * mini.c (mono_method_to_ir): Revert the previous change.
16926 * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
16927 when AOT compiling.
16929 * tramp-x86.c (x86_magic_trampoline): Avoid calls to
16930 mono_jit_info_table_find () etc. when running under valgrind.
16932 * inssel.brg: Fix warnings.
16934 * mini-exceptions.c: Fix warnings.
16936 2005-01-31 Martin Baulig <martin@ximian.com>
16938 * driver.c (compile_all_methods_thread_main): Don't try to compile
16939 generic methods or anything which has type parameters.
16941 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
16943 * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
16945 * TestDriver.cs: Add --verbose flags.
16947 * graph.c ssa.c: Fix 64 bit warnings.
16949 * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c
16950 trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
16951 Fix 64 bit warnings.
16953 * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
16954 variable not spotted by gcc.
16956 * mini-amd64.c inssel-amd64.brg: Applied patch from
16957 Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of
16958 X86_COMPARE_MEMBASE opcodes.
16960 * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
16962 2005-01-29 Ben Maurer <bmaurer@ximian.com>
16964 * *: MonoMethod->signature might be NULL now. You *MUST* use
16965 mono_method_signature.
16967 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
16969 * driver.c (compile_all_methods_thread_main): Compile the methods
16970 without invoking cctors.
16972 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
16974 * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
16975 * basic-calls.cs: test for the above.
16977 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
16979 * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after
16980 MonoJitInfo changes.
16982 2005-01-27 Zoltan Varga <vargaz@freemail.hu>
16984 * mini-exceptions.c (mono_handle_exception): Compute the stack trace
16985 eagerly if it contains dynamic methods.
16987 * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
16989 * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
16990 trace, it is now computed by an icall from trace_ips.
16992 * mini-exceptions.c: Fix a warning.
16994 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
16996 * mini-exceptions.c: don't bother getting stack trace info if
16997 it's not going to be used.
16999 2005-01-27 Raja R Harinath <rharinath@novell.com>
17001 * Makefile.am (common_sources): Add ssapre-cee-ops.h and
17004 2005-01-26 Zoltan Varga <vargaz@freemail.hu>
17006 * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
17008 * aot.c: Avoid calling mono_method_get_header () if not needed.
17010 * mini.h: Bump AOT file format version.
17012 * mini.c (mono_emit_native_call): Allocate a GOT var here.
17014 * mini.c (mono_print_tree): Print more info for calls.
17016 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
17018 * declsec.h: Remove warning by adding missing include for marshal.h
17020 2005-01-26 Martin Baulig <martin@ximian.com>
17022 * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
17025 2005-01-25 Zoltan Varga <vargaz@freemail.hu>
17027 * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
17030 * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
17032 * aot.c (mono_compile_assembly): Fix a warning.
17034 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
17036 * declsec.c: Look for security attributes on the original MonoMethod
17037 (and not the wrapped one). This fix permissions on icalls.
17039 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
17041 * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
17043 * mini.c (mono_allocate_stack_slots): Add a fixme.
17045 * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
17047 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
17049 * inssel.brg: optimize casts of sealed types (more
17050 optimizations waiting for fixes in remoting).
17052 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
17054 * inssel.brg (stmt): Add another dummy rule.
17056 * driver.c: Fix warnings.
17058 * driver.c (mono_main): If running under valgrind, instruct glib to use
17059 the system allocation functions so valgrind can track the memory
17060 allocated by the g_... functions.
17062 * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
17064 * mini-ops.h: Add OP_DUMMY_STORE opcode.
17066 * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
17068 * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
17069 variables in try regions.
17071 * mini.c (mini_method_compile): Don't disable optimizations on large
17072 methods when AOT compiling.
17074 * mini.c (mono_allocate_stack_slots): New arch independent method to
17075 allocate stack slots. Not yet used.
17077 2005-01-22 Ben Maurer <bmaurer@ximian.com>
17079 * debug-mini.c (mono_debug_close_method): Plug some leaks.
17081 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
17083 * mini-ppc.c: make the branch info relative as the code
17084 buffer can be reallocated.
17086 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
17088 * aot.c: Allow decoding of the new MONO_PATCH_INFO_DECLSEC.
17089 * driver.c: Removed the AOT/security restriction. Now initialize the
17090 security manager (in metadata) if --security is used.
17091 * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
17092 rather than the pointer to declarative security, when AOT is used.
17094 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
17096 * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
17097 basic blocks, reduced intrinsic exception throwing code size.
17099 2005-01-22 Miguel de Icaza <miguel@ximian.com>
17101 * driver.c (mini_usage): Reorder the usage screen.
17103 2005-01-21 Zoltan Varga <vargaz@freemail.hu>
17105 * mini.c (mono_resolve_patch_target): Fix warning.
17107 2005-01-20 Zoltan Varga <vargaz@freemail.hu>
17109 * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
17112 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
17114 * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
17115 breaks the amd64 build.
17117 * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem
17118 register allocation. Fixes #71454.
17120 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
17122 * arrays.cs: Add new regression test.
17124 2005-1-20 Massimiliano Mantione <massi@ximian.com>
17126 * ssapre.c: Turned usage of snprintf to GString.
17127 * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
17128 (I left it on by mistake in my previous commit).
17130 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
17132 * mini.c, cfold.c, basic-calls.cs: preserve side effects
17133 on cond branch optimization (fixes bug# 71515).
17135 2005-1-20 Massimiliano Mantione <massi@ximian.com>
17137 * abcremoval.c: Fixed bug 71062.
17138 * abcremoval.h: Likewise.
17140 2005-1-20 Massimiliano Mantione <massi@ximian.com>
17142 * mini.c: Added a new functionality to optimize_branches, the removal
17143 of useless basic blocks, and fixed some problem in the removal of
17144 critical edges; some utility functions added for both purposes.
17145 * ssapre.c: Added complex expression support, and fixed bug 70637.
17146 * ssapre.h: Likewise.
17147 * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
17149 * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
17150 * driver.c: Re-enabled SSAPRE.
17152 2005-01-19 Martin Baulig <martin@ximian.com>
17154 * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
17155 the result of mono_get_method_constrained().
17157 2005-01-18 Neale Ferguson <NealeFerguson@earthlink.net>
17159 * exceptions-s390.c tramp-s390.c: Allocate code using the global code
17162 2005-01-18 Geoff Norton <gnorton@customerdna.com>
17164 * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
17165 be detected. Fixes #59296.
17167 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
17169 * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
17170 which can happen. Fixes #71361.
17172 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
17174 * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
17177 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
17179 * mini.c (mono_create_jump_trampoline): Revert last change as it causes
17180 appdomain-unload.exe to fail.
17182 * mini.c: Fix some memory leaks.
17184 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
17186 * inssel.brg: handle the new size of rank, idepth, max_interface_id.
17187 Fixed bug and sped up some codepaths.
17189 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
17191 * mini.c: Fix some memory leaks.
17193 * exceptions.cs basic-long.cs: Add test for checked ulong->int
17196 * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
17198 * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
17201 * iltests.il: Add regression test for #71320.
17203 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
17205 * mini.c (mono_codegen): Fix installation of profiler hooks.
17207 * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
17209 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
17211 * mini.h, mini.c, cfold.c: optimize access to enum
17212 readonly fields, too. Eval conditional branches if possible
17213 to perform unreachable code removal in more cases.
17215 2005-01-15 Zoltan Varga <vargaz@freemail.hu>
17217 * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
17219 * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
17222 * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
17223 WinXP DEP. Fixes #71244.
17225 2005-01-14 Zoltan Varga <vargaz@freemail.hu>
17227 * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
17229 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
17231 * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
17233 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
17235 * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo
17238 * mini.h: Bump AOT version.
17240 * mini.h (MonoCompile): Change exvar to a hash table.
17242 * mini.c: Allocate a separate exvar for each handler block.
17244 * mini.c: Get rid of the computation of filter_lengths, its not needed.
17246 * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
17247 ex var with the pending exception and only throw if the two are equal.
17250 * exceptions.cs: Add tests for rethrow and nested catch clauses.
17252 * mini-x86.c: Fix warnings.
17254 * Makefile.am (common_sources): Move mini-exceptions.c here as it is
17255 used by all the ports now.
17257 * aot.c: Add write-symbols and save-temps options.
17259 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
17261 * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
17263 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
17265 * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx
17268 * tramp-s390.c: Check vtable slot belongs to the domain.
17270 * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
17271 as per other platforms.
17273 * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
17275 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
17277 * driver.c: we don't run the Main() code in a subthread anymore.
17279 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
17281 * mini.c: added experimental rtc support in the statistical
17282 profiler: if the user has the permission, more accurate statistics
17283 are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
17284 The MONO_RTC value must be restricted to what the linux rtc allows:
17285 power of two from 64 to 8192 Hz.
17287 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
17289 * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
17291 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
17293 * mini-ppc.c: better icache flush for smp.
17295 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
17297 * mini-amd64.c (emit_move_return_value): Fix memory leak.
17299 * mini-x86.c (get_call_info): Add the get_call_info () code from the
17300 amd64 port, not yet used.
17302 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
17304 * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
17307 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
17309 * driver.c: Added --security option to activate the security manager.
17310 Right now this will allow code generation for declarative demands and
17311 is disabled when AOT is specified.
17312 * mini.c: Add code generation for declarative security demands.
17313 * mini.h: Add mono_use_security_manager as an extern gboolean.
17315 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
17317 * aot.c (mono_compile_assembly): Speed up compilation a bit by
17318 emitting more dense assembly code.
17320 * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
17321 exception throwing stuff.
17323 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
17325 * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
17328 * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
17329 left in by mistake.
17331 * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is
17334 * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
17336 * tramp-*.c: Only patch vtable slots if the object is in the current
17337 domain. Fixes appdomain-unload.exe.
17339 * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
17341 * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
17344 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
17346 * mini.c (reverse_branch_op): New helper function.
17348 * mini.c (optimize_branches): Run the new optimization only on
17349 platforms which support it. Also reverse all kinds of branches.
17351 * mini.h (MonoBasicBlock): Add 'out_of_line' field.
17353 * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
17356 * mini.c (optimize_branches): Reverse not-equals branches if the false
17357 bblock is a throw. This happens a lot of time with argument checking in
17360 * mini.c (mono_codegen): Add support for placing basic blocks after
17361 the function epilogue.
17363 * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
17366 2005-01-05 Miguel de Icaza <miguel@ximian.com>
17368 * mini.c (setup_stat_profiler): Only set this up if the platform
17369 supports ITIMER_PROF.
17371 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
17373 * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
17376 * inssel.brg: Fix a warning.
17378 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
17380 * mini.c: added support for statistical profiler
17381 (run with: --profile=default:stat).
17383 2005-01-04 Zoltan Varga <vargaz@freemail.hu>
17385 * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
17387 * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
17389 * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes
17390 related to global registers from the amd64 port.
17392 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
17394 * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
17396 * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
17397 with global registers.
17398 (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
17400 * aot.c (emit_method_code): Fix the 'method emitted as' messages.
17402 2004-12-31 Zoltan Varga <vargaz@freemail.hu>
17404 * debug-mini.c (encode_value): Fix off-by-one.
17406 * aot.c (encode_value): Likewise.
17408 * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
17410 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
17412 * mini.c linear-scan.c: Add a workaround for the mcs crash when using
17415 * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
17417 * aot.c (emit_method_info): Increase size of temp buffer.
17419 * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in
17422 2004-12-28 Zoltan Varga <vargaz@freemail.hu>
17424 * aot.c (emit_method_info): Fix build.
17426 * aot.c: Further rework of the AOT file format to reduce the size of
17427 the method info data.
17429 * mini.h: Bump AOT file format version.
17431 2004-12-27 Martin Baulig <martin@ximian.com>
17433 * mini.c (mini_get_method): New static method; call
17434 mono_get_method_full() and mono_get_inflated_method().
17435 (mono_method_to_ir): Use mini_get_method() instead of
17436 mono_get_method_full().
17438 2004-12-26 Patrik Torstensson <patrik.torstensson@gmail.com>
17440 * mini-x86.c (atomic ops): fixed bug interlocked bug #70784.
17442 2004-12-25 Zoltan Varga <vargaz@freemail.hu>
17444 * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
17446 * inssel-amd64.brg: Add some optimization rules.
17448 2004-12-24 Ben Maurer <bmaurer@ximian.com>
17450 * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
17451 standard not GC'd stuff is fine.
17453 2004-12-24 Zoltan Varga <vargaz@freemail.hu>
17455 * aot.c: Rework the AOT file format to get rid of most of the global
17456 symbols. This reduces the size of the mscorlib.dll.so by 1MB.
17458 * mini.h: Bump AOT file format version.
17460 2004-12-23 Zoltan Varga <vargaz@freemail.hu>
17462 * mini.h: Bump AOT file format version.
17464 * aot.c (mono_aot_is_got_entry): New function to determine if an
17465 address is inside a GOT.
17467 * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
17469 * cpu-pentium.md: Increase the maximum size of some instructions which
17470 might involve a got access.
17472 * mini.c (get_method_from_ip): Another debug helper function.
17474 * mini.c: Call mono_get_got_var () in a couple places. Handle the case
17475 when got var accesses are created during the decompose phase.
17477 * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
17479 * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
17480 argument mini_compile_method and to MonoCompile, and use this to
17481 determine whenever a given method is compiled for AOT. This allows the
17482 other methods compiled during AOT compilation to be free of AOT stuff,
17483 so the backends does not need to add special support for them by
17484 creating a fake GOT etc.
17486 * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
17489 2004-12-21 Ben Maurer <bmaurer@ximian.com>
17491 * mini.c (mono_method_to_ir): It turns out that some of the
17492 x-appdomain wrappers are lax with types, so just ignore this for
17495 * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
17496 at the vtable->klass. If it is non-shared code we can just use the
17499 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
17501 * mini-ppc.c: access MonoDomain from tls, too.
17503 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
17505 * declsec.c: Removed unused variable (and related warning ;-)
17507 2004-12-21 Ben Maurer <bmaurer@ximian.com>
17509 * iltests.il: New test for LDELEMA on an array of ref types.
17511 * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
17512 all ldelema's on reftypes.
17513 (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
17514 it was the wrong place to put it.
17516 * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
17517 register to pop to make this cleaner, at the request of Paolo.
17519 2004-12-20 Ben Maurer <bmaurer@ximian.com>
17521 * mini-ops.h (OP_GETHASHCODE): New op.
17523 * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
17525 * mini.c (mini_get_inst_for_method): Create the intrinsic hash
17528 For a microbenchmark, this reduces the cost of Hashtable.get_Item
17531 * mini-x86.c (mono_arch_output_basic_block): Rather than
17539 The first is 3 bytes while the second is 1. This saves 36 kb on
17540 mscorlib, quite a big saving. When bootstraping mcs, I was able to
17541 see a small boost because of icache locality.
17543 * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
17545 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
17547 * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
17548 started code sharing with the generic code.
17550 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
17552 * mini-ppc.c, cpu-g4.md: added code for direct access to
17555 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
17557 * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
17558 mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
17561 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
17563 * declsec.c|h: Added functions to cache the declarative stack modifiers
17564 in MonoJitInfo and to create a security frame from a MonoJitInfo
17566 * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
17567 created. Register internal calls for System.Security.SecurityFrame::
17568 _GetSecurityFrame and _GetSecurityStack.
17569 * mini.h: Added definition for new icalls (in mini-exceptions.c) and
17570 the definitions for the new stack walk/callback mechanism.
17571 * mini-exceptions.c: Added internal call GetSecurityFrame (to get the
17572 first security frame for LinkDemands and InheritanceDemands) and
17573 GetSecurityStack for Demands. Both use the new mono_walk_stack code
17575 * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
17576 walk initialization (lupus).
17578 2004-12-20 Ben Maurer <bmaurer@ximian.com>
17580 * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
17582 (handle_loaded_temps): Do not create a temporary variable for
17583 things that we know are temps. They will never be modified.
17584 (mono_spill_call): Set MONO_INST_IS_TEMP
17585 (mono_emulate_opcode): ditto
17587 (mono_method_to_ir.CEE_DUP): ditto
17589 2004-12-19 Ben Maurer <bmaurer@ximian.com>
17591 * mini.c (type_to_eval_stack_type): Make this handle the void type
17592 (mono_emit_call_args): set the call->type with type_to_eval_stack_type
17593 (emit_tree): use ip_in_bb to special case some common idioms
17594 Update all callers to pass in the IP.
17595 (mono_method_to_ir): Make CEE_CALL* do the above as well.
17597 This gives us a nice 2% speedup in mcs bootstrap.
17599 * mini-x86.c (peephole_pass): Peephole pass to make
17608 * mini.c (ip_in_bb): new method.
17609 (mono_method_to_ir): use this method rather than doing the hash
17612 * linear-scan.c (mono_linear_scan): When expiring actives, you
17613 don't need to keep around variables that expire on this
17614 instruction. This makes it so that:
17617 store (ebx add (ebx, 1))
17621 2004-12-19 Zoltan Varga <vargaz@freemail.hu>
17623 * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc
17624 combination to avoid doing two copies. Fix up problems with previous
17627 * mini.c: Fix 64 bit warnings.
17629 * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
17631 2004-12-17 Zoltan Varga <vargaz@freemail.hu>
17633 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
17634 changes from the x86 code.
17636 * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
17638 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
17640 * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
17641 throwing code to reduce its size, unify the AOT and non-aot code and
17642 get rid of relocations in the AOT case.
17644 * mini-x86.h mini.c exceptions-x86.c
17645 (mono_arch_get_throw_corlib_exception): New arch specific function to
17646 raise corlib exceptions which doesn't require relocations in the
17649 * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
17651 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
17653 * mini.c (mono_emit_method_call): Only allocate the got var when it is
17656 * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
17659 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
17661 * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
17662 with add function when used from Inc/dec atomic
17663 functions. Re-enabled optimization on x86.
17664 * mini-ops.h: renamed atomic_add functions to
17665 allow _add to match the Interlocked::Add and
17666 _add_next to match Interlocked::Inc/Dec.
17668 2004-12-15 Massimiliano Mantione <massi@ximian.com>
17670 * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
17671 linking of BBs to the end BB, and enabled SSAPRE also with
17672 consprop and copyprop (which was prevented by that bug).
17674 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
17676 * mini-x86.c: disabling the Interlocked optimizing code.
17678 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
17680 * aot.c (load_aot_module): Move reading of got_addr after the AOT
17681 file version check.
17683 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
17685 * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm
17686 interlocked optimization due lack of support on x86, rewrote
17687 exchange to take into account that base may be in eax.
17689 xsp works again; activated Interlocked optimizing code.
17691 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
17693 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
17695 2004-12-13 Zoltan Varga <vargaz@freemail.hu>
17697 * mini-ops.h: Add new opcodes.
17699 * mini.h: Add new patch types. Add got_var to MonoCompile.
17701 * mini.h mini-x86.c mini-amd64.c aot.c: Rename
17702 mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
17703 make it work with all kinds of patchable code.
17705 * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
17706 address of the GOT, and referencing entries in the GOT.
17708 * mini.c: Add code to load the GOT address if needed by an opcode.
17710 * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position
17711 independent AOT code on the x86 using an elf-style Global Offset Table.
17713 2004-12-14 Raja R Harinath <rharinath@novell.com>
17715 * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
17717 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17719 * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
17722 2004-12-13 Patrik Torstensson <patrik.torstensson@gmail.com>
17724 * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
17725 of Interlocked:Increment/Decrement/Add as inline ops.
17726 (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
17728 2004-12-12 Geoff Norton <gnorton@customerdna.com>
17730 * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
17731 * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
17733 2004-12-12 Duncan Mak <duncan@ximian.com>
17735 * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
17736 again. `patch_info->table_size' is no longer valid after Zoltan's
17739 2004-12-12 Martin Baulig <martin@ximian.com>
17741 * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
17742 if we are the "real" method, ie. not an inlined method inside it.
17744 2004-12-11 Ben Maurer <bmaurer@ximian.com>
17746 * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
17747 before we look in the special fields table. This fixes
17748 ../tests/thread-static-init.cs.
17750 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17752 * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
17753 for Array get_Rank and get_Length. Fixes bug #70465.
17755 2004-12-11 Zoltan Varga <vargaz@freemail.hu>
17757 * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
17758 separate structure to reduce the size of MonoJumpInfo.
17760 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
17762 * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
17764 2004-12-10 Patrik Torstensson <patrik.torstensson@gmail.com>
17766 * mini.c (mini_get_inst_for_method): Changed to allow ports
17767 to return a MonoInst instead of opcode
17768 (renamed mini_get_opcode_for_method to better reflect the new functionality)
17770 * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method):
17771 Allow ports to return a created MonoInst instead of op-code, will enable
17773 (renamed mini_get_opcode_for_method to better reflected the functionality)
17775 2004-12-09 Zoltan Varga <vargaz@freemail.hu>
17777 * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
17779 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
17781 * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
17784 2004-12-08 Martin Baulig <martin@ximian.com>
17786 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
17787 if we're a CEE_CONSTRAINED call. Fixes gen-118.cs.
17789 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
17791 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
17794 * exceptions.cs: Disable some tests which depend on properties of x86 fp
17797 2004-12-08 Raja R Harinath <rharinath@novell.com>
17799 * Makefile.am (CLEANFILES): Add *.exe, *.dll.
17801 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
17803 * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
17804 bug introduced by the previous patch.
17806 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
17808 * mini-ppc.c, objectc.cs: handle large structs passed by value
17809 (fixes bug #69972).
17811 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
17813 * mini-ppc.c: OP_ARGLIST implementation from
17814 Geoff Norton <gnorton@customerdna.com>.
17816 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
17818 * inssel-x86.brg, inssel-ppc.brg: fix reference to register
17819 in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
17821 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
17823 * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
17825 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17827 * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
17830 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
17832 * mini-sparc.c: Zero out localled-ed memory.
17834 * iltests.il: Add tests for zeroing out localloc-ed memory.
17836 2004-12-04 Martin Baulig <martin@ximian.com>
17838 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
17839 mono_method_get_signature_full().
17841 2004-12-03 Massimiliano Mantione <massi@ximian.com>
17843 * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
17844 and some utility functions (always for SSAPRE), integrated SSAPRE.
17845 * mini.h: Likewise.
17846 * driver.c: Added ssapre option.
17847 * ssa.c: Small fix on OP_ARG handling.
17848 * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
17849 * Makefile.am: Likewise.
17851 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
17853 * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
17854 now in the xp code.
17856 * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
17859 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17861 * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
17863 * cpu-s390.md : Increase instruction length of oparglist.
17865 * mini-s390.c : Implement vararg and TYPEDEBYREF support.
17867 2004-11-30 Martin Baulig <martin@ximian.com>
17869 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
17870 virtual generic methods. We call a special helper_compile_generic_method()
17871 icall to retrieve the method from the vtable, inflate and compile
17872 it and then do a CEE_CALLI. Thanks a lot to Paolo for this idea.
17874 * jit-icalls.c (helper_compile_generic_method): New JIT icall.
17876 2004-11-30 Zoltan Varga <vargaz@freemail.hu>
17878 * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
17880 2004-11-29 Zoltan Varga <vargaz@freemail.hu>
17882 * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
17885 2004-11-27 Ben Maurer <bmaurer@ximian.com>
17887 * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
17888 platforms with PIC aot.
17890 2004-11-28 Martin Baulig <martin@ximian.com>
17892 * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
17895 2004-11-28 Martin Baulig <martin@ximian.com>
17897 * mini-x86.c (mono_arch_call_opcode): Use the original type, not
17898 the result of mono_type_get_underlying_type() to check whether
17901 2004-11-26 Martin Baulig <martin@ximian.com>
17904 (mono_method_to_ir): Use `!method->signature->has_type_parameters'
17907 2004-11-26 Zoltan Varga <vargaz@freemail.hu>
17909 * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
17910 the same way as the other arguments so they won't get clobbered.
17912 * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual
17913 calls through R11 since it is clobbered by the trampoline code.
17915 2004-11-26 Raja R Harinath <rharinath@novell.com>
17917 * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
17918 pick up in-tree mscorlib.dll.
17920 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
17922 * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
17924 * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to
17925 runtime data/code are now stored in a table similar to the GOT in ELF.
17926 This allows the code itself to be position independent.
17928 * aot.c: Fix loading of referenced assemblies after the lazy assembly
17931 * aot.c: Attach ELF type (object/function) directives to all global
17934 * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
17936 * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
17938 * mini-amd64.h: Turn on PIC AOT code.
17940 * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
17941 returning the offset within an OP_AOTCONST instruction where the GOT
17942 offset needs to be added.
17944 * mini.h: Bump AOT file format version.
17946 2004-11-25 Martin Baulig <martin@ximian.com>
17948 * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
17949 uninflated generic methods.
17951 2004-11-25 Martin Baulig <martin@ximian.com>
17953 * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
17955 2004-11-24 Martin Baulig <martin@ximian.com>
17957 * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
17958 original klass (this only applies for generic instances).
17960 2004-11-24 Martin Baulig <martin@ximian.com>
17962 * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
17963 `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
17966 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
17968 * mini.c (mono_method_to_ir): Disable inlining for methods containing
17969 localloc. Fixes #69678.
17971 * iltests.il (test_0_localloc_inline): Add regression test for #69678.
17973 2004-11-23 Zoltan Varga <vargaz@freemail.hu>
17975 * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
17976 used SSE registers on pinvoke calls. Fixes #69774.
17978 2004-11-23 Geoff Norton <gnorton@customerdna.com>
17980 * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
17981 vt->inst_vtype->data.klass. This fixes generic structs and bug #69766
17983 2004-11-23 Raja R Harinath <rharinath@novell.com>
17985 * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
17986 Refer directly to the mcs/ tree.
17988 2004-11-19 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17990 * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
17991 Check if a trampoline for a synchronized method is required.
17993 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
17995 * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
17996 with localloc if needed. Throe arithmetric exception in
17997 div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
17998 Adapted from a patch by Geoff Norton <gnorton@customerdna.com>.
18000 2004-11-19 Geoff Norton <gnorton@customerdna.com>
18002 * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
18003 types before switching on type. Fixes #69622.
18005 2004-11-19 Raja R Harinath <rharinath@novell.com>
18007 * Makefile.am (check-local): New. Integrate into 'make check'.
18008 (MCS,RUNTIME): Define using in-tree mono and mcs.
18010 (%.exe): Use $(ILASM).
18012 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
18014 * mini-ppc.c: adjust initial prolog size (bug #69691).
18016 2004-11-18 Zoltan Varga <vargaz@freemail.hu>
18018 * cpu-pentium.md (localloc): Increase max instruction len. Fixes
18021 2004-11-17 Raja R Harinath <rharinath@novell.com>
18023 * Makefile.am (clean-local): Rename from 'clean'.
18025 2004-11-15 Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18027 * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
18028 to mono_arch_is_int_overflow.
18029 * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
18032 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
18034 * declsec.c|h: New files to support declarative security attributes.
18035 Added function to check if a method has (applicable) security.
18036 * mini.c|h: Add check for declarative security attributes in
18037 mono_method_check_inlining.
18038 * Makefile.am: Added declsec.c and declsec.h to the build.
18040 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
18042 * mini.c, mini.h: update to keep dynamic code info per-domain.
18044 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
18046 * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
18047 (mini_init): Get rid of it from here too.
18049 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
18051 * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
18052 implemented OP_RETHROW (patch by Geoff Norton
18053 <gnorton@customerdna.com>).
18055 2004-11-10 Geoff Norton <gnorton@customerdna.com>
18057 * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
18058 between appdomains. Fixes appdomain-unload on PPC.
18060 2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
18062 * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18063 mini-exceptions.c: handle the new wrapper types.
18064 * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
18065 token value as a MonoClass* when compiling a wrapper.
18066 mono_jit_create_remoting_trampoline now takes an additional
18067 MonoRemotingTarget parameter.
18069 2004-11-10 Martin Baulig <martin@localhost>
18071 * mini.c (mono_method_to_ir): Use `generic_container->context'
18072 rather than creating a new one.
18074 2004-11-09 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18076 * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
18078 * inssel-390.md, mini-s390.c: Correct register allocation for globals.
18080 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
18082 * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
18083 the experimental aot cache stuff.
18085 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
18087 * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18088 mini-exceptions.c: update to exception clause structure changes.
18090 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
18092 * exceptions-x86.c (throw_exception): Fix warnings.
18094 * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support
18097 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
18099 * exceptions-sparc.c (get_throw_exception): Really fix this.
18101 2004-11-07 Ben Maurer <bmaurer@ximian.com>
18103 * tramp-*.c: we no longer support icalls without wrappers, so
18104 a bit of code can be removed here
18106 2004-11-07 Zoltan Varga <vargaz@freemail.hu>
18108 * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
18111 * cpu-sparc.md: Add op_rethrow.
18113 * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
18115 * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
18117 * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
18118 * mini-ops.h: Add OP_RETHROW.
18120 * mini.c inssel.brg: Distinguish between THROW and RETHROW.
18122 * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
18124 2004-11-05 Geoff Norton <gnorton@customerdna.com>
18126 * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
18127 Makes the output much easier to read
18129 2004-11-05 Ben Maurer <bmaurer@ximian.com>
18131 * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
18132 prevents another huge leak when compiling with ssa. Secondly, the
18133 performance of doing this rather than freeing the lists is much
18134 better. GList does a lock every time you allocate a list link,
18135 so that it can use a memory pool. So, it is better to just use
18136 a memory pool of our own.
18138 * ssa.c, linear-scan.c: replace g_list_remove_link with
18139 g_list_delete. The remove one does not free the GList, so we were
18140 leaking memory. On -O=all --compile-all with corlib, this cut down
18141 3 MB of allocations.
18143 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
18145 * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
18147 * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
18149 * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
18150 into a new function mono_create_jit_trampoline ().
18152 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
18154 * trace.c (get_spec): Allow tracing of classes without a namespace.
18156 2004-11-02 Sebastien Pouliot <sebastien@ximian.com>
18158 * mini.c: Fix pointer overwrite in mini_method_compile.
18160 2004-11-2 Geoff Norton <gnorton@customerdna.com>
18162 * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
18163 The darwin ABI needs some special handling for 1 and 2 byte structs
18164 Lets use lbz/lhz instead of lwz everywhere.
18165 * mini-ppc.c (calculate_sizes): The Darwin ABI needs from special handling
18166 for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
18167 Use stb/sth for the former, and put the latter always on stack instead of in
18168 argument registers.
18170 2004-10-30 Zoltan Varga <vargaz@freemail.hu>
18172 * trace.c (is_filenamechar): Add '_'.
18174 2004-10-29 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18176 * mini-s390.c: Fix prolog length to allow for large trace requirements.
18178 * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
18180 2004-10-29 Zoltan Varga <vargaz@freemail.hu>
18182 * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
18183 depends on libmonogc. Fixes #68805.
18185 2004-10-26 Miguel de Icaza <miguel@ximian.com>
18187 * mini.c (mono_jit_free_method): Provide extra information for
18188 this error. Currently this leaks, but will be turned into a
18189 developer option in the future.
18191 2004-10-26 Zoltan Varga <vargaz@freemail.hu>
18193 * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
18195 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
18197 * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte
18198 boundary. Fixes reading of PATCH_INFO_R4 and R8.
18199 (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
18201 2004-10-24 Zoltan Varga <vargaz@freemail.hu>
18203 * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
18204 trampolines for AOT code.
18206 2004-10-22 <vargaz@freemail.hu>
18208 * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
18209 constructed types. Fixes #68136.
18211 2004-10-21 Martin Baulig <martin@ximian.com>
18213 * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
18214 if it returns true, unwind the stack to the call instruction.
18216 2004-10-21 <vargaz@freemail.hu>
18218 * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
18220 * mini.h: Bump AOT version number.
18222 * objects.cs: Add another test for unbox trampolines.
18224 * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for
18227 2004-10-20 <vargaz@freemail.hu>
18229 * driver.c: Add SHARED to the set of optimizations tested.
18231 * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
18233 * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
18234 used by CEE_NEWARR.
18236 * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
18238 2004-10-20 Martin Baulig <martin@ximian.com>
18240 * mini-exceptions.c (mono_handle_exception): Call
18241 mono_debugger_handle_exception() to tell the debugger about
18242 catch/finally clauses.
18244 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
18246 * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
18248 * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
18251 2004-10-15 Geoff Norton <gnorton@customerdna.com>
18253 * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
18254 methods as their native size, fixed bug #57543, #57545.
18255 * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
18256 This saves a temporary register and mullw call down into 1 (minor perf
18257 increase for cases like sum = sum * 5; This use to translate into:
18260 It now translates to
18263 2004-10-15 Zoltan Varga <vargaz@freemail.hu>
18265 * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
18268 2004-10-11 Martin Baulig <martin@ximian.com>
18270 * mini.c (mono_method_to_ir): If we're a generic method, get the
18271 MonoGenericContainer from our MonoMethodNormal and create a
18272 MonoGenericContext from it.
18274 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
18276 * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
18278 * basic-long.cs: Add test for checked i8->i2 cast.
18280 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
18282 * inssel-ppc.brg: added a couple of speedup rules.
18284 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
18286 * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
18287 to speed up rebuilds.
18289 2004-10-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18291 * mini-s390.c: Minor fix to OP_OR_IMM.
18293 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
18295 * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
18296 better. Fixes appdomain-unload.exe on sparc.
18298 2004-10-02 Massimiliano Mantione <massi@ximian.com>
18300 * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
18301 simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
18304 2004-10-02 Zoltan Varga <vargaz@freemail.hu>
18306 * jit-icalls.c: Handle a nonexisting trunc function more correctly.
18308 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
18310 * mini.c: Always generate a field read/write wrapper for members
18311 of the class MarshalByRefObject since the actual instance could
18314 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
18316 * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
18318 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
18320 * driver.c mini.h trace.c: Move the setting of the main assembly into
18321 a separate function called mono_trace_set_assembly () and call it after
18322 actually loading the main assembly. Fixes #66872.
18324 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
18326 * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
18327 using the code manager.
18329 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
18331 * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
18333 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
18335 * cpu-amd64.md: Fix bug in previous patch.
18337 * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
18340 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
18342 * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18343 mini-exceptions.c: updates for changed stack walk interface.
18345 2004-09-21 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18347 * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
18349 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
18351 * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
18353 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
18355 * driver.c (mini_regression_list): Do not call mono_assembly_close
18356 since assemblies can't be unloaded.
18358 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
18360 * cpu-amd64.md: Fix more instruction lengths.
18362 * cpu-amd64.md: Fix lengths of some instructions.
18364 2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
18366 * inssel.brg: Make the array ldelema check aot friendly.
18368 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
18370 * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
18372 * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
18374 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
18376 * mini-x86.c: Fix build.
18378 * mini-sparc.c mini-x86.c mini-amd64.c: Use the new
18379 mono_type_get_underlying_type () helper function to simplify code.
18381 2004-09-09 Martin Baulig <martin@ximian.com>
18383 * mini-amd64.c: Don't access `type->data.klass' directly, call
18384 mono_class_from_mono_type() instead since the type may be a
18387 2004-09-09 Martin Baulig <martin@ximian.com>
18389 * mini-amd64.c (get_call_info): Fix support for generic instances.
18390 (add_valuetype): Use mono_class_from_mono_type() to get the class
18391 since we can be a generic instance.
18393 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
18395 * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
18397 2004-09-07 Ben Maurer <bmaurer@users.sourceforge.net>
18399 * liveness.c: reset spill costs on each scan: bug 62107
18401 2004-09-07 Bernie Solomon <bernard@ugsolutions.com>
18403 * exceptions-sparc.c (mono_arch_find_jit_info): remove
18404 unnecessary line that doesn't compile
18406 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
18408 * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
18409 trampolines, make them call an error function so people can fix their
18412 2004-09-06 Martin Baulig <martin@ximian.com>
18414 * mini.c (mono_method_to_ir): When initializing locals, handle a
18415 generic instances like a valuetype if it's a valuetype and like a
18416 class if it's a class.
18418 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
18420 * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
18421 stack. Fixes #64674.
18423 * exceptions.cs: Add test for unwinding of call arguments.
18425 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
18427 * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
18428 OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
18429 set the carry/borrow flag). The sparc and s390 implementations
18430 can now use optimized versions (and simplify the code). ppc bugfixes.
18432 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
18434 * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
18436 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
18438 * inssel-amd64.brg: Remove leftover 32 bit rule.
18440 * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
18442 2004-09-04 Zoltan Varga <vargaz@freemail.hu>
18444 * mini-exceptions.c (mono_find_jit_info): Refactor common code from
18445 mono_arch_find_jit_info functions into a new function. Fix a memory
18448 * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
18451 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
18453 * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
18456 * exceptions.cs: Add array size tests.
18458 * mini.c: Allocate a separate icall wrapper for each arity of
18459 mono_array_new_va. Fixes #59509.
18461 * exceptions.cs: Add testcase for 64578.
18463 * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
18465 * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
18467 2004-09-02 Martin Baulig <martin@ximian.com>
18469 * mini.c (mono_method_to_ir): When initializing the locals, call
18470 handle_initobj() on the generic instance itself, not its
18473 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
18475 * mini.h (MonoJitDynamicMethodInfo): New structure, extension of
18476 MonoJitInfo for dynamic methods.
18478 * mini.c: Rename trampoline_hash_mutex to jit_mutex.
18480 * mini.c: Add support for freeing JIT data for dynamic methods.
18482 2004-09-01 Martin Baulig <martin@ximian.com>
18484 * mini-x86.c (is_regsize_var): Added support for generic
18486 (mono_arch_emit_prolog): Make this compile again, use
18487 `x86_push_imm_template (code)'.
18489 2004-08-30 Ben Maurer <bmaurer@users.sourceforge.net>
18491 * mini-x86.c: make all push_imm instructions that get
18492 patched always emit the long form
18494 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
18496 * mini.c (mono_create_jump_trampoline): Store the jump trampolines
18497 in a per-domain hash.
18499 * mini-amd64.c (merge_argument_class_from_type): Handle generic
18502 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
18504 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
18507 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
18510 * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
18511 Beginnings of SSE2 support.
18513 * exceptions.cs: Add more tests for checked int<->uint casts.
18515 2004-08-28 Martin Baulig <martin@ximian.com>
18517 * mini-x86.c (mono_arch_instrument_epilog): Added support for
18521 (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
18522 Handle generic instances recursively.
18524 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
18526 * iltests.il: test for conv.u8 on a constant
18528 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
18530 * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
18531 LCONV_x4 (shrun_32 (membase)).
18533 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
18535 * inssel-x86.brg: c&p rules for push/setret of long
18537 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
18539 * inssel-x86.brg: c&p rules for compare (base, regvar) and
18540 compare (regvar, base)
18542 * inssel-x86.brg: more burg love
18544 * inssel.brg: more cleanup
18546 * inssel-x86.brg, inssel-long32.brg: burg cleanup.
18548 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
18550 * basic-long.cs, basic-calls.cs: new tests for optimization.
18552 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
18554 * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
18557 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
18559 * mini-amd64.c (read_tls_offset_from_method): Add another case.
18561 2004-08-25 Bernie Solomon <bernard@ugsolutions.com>
18563 * inssel.brg (mini_emit_memcpy): use
18564 NO_UNALIGNED_ACCESS to disable memcpy optimization
18566 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
18568 * mini-amd64.c: Handle generic types in various places.
18570 * mini.c (mono_method_to_ir): Handle generic types in init locals.
18572 2004-08-24 Zoltan Varga <vargaz@freemail.hu>
18574 * mini.c (handle_box): Fix warning.
18576 * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
18578 * mini-amd64.h: Enable the emit_state optimization.
18580 * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
18582 * mini-amd64.c: Add some new 64 bit peephole opts.
18584 * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
18586 * cpu-amd64.md: sreg1 of div instructions must be %rax.
18588 * mini-amd64.c: Register allocator fixes.
18590 * mini.c: Add an optimization to emit_state to avoid allocation of new
18591 registers on some platforms.
18593 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
18595 * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
18597 * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
18598 allocation. Fixes #63085.
18600 * basic-long.cs: Add new regression test.
18602 * mini-amd64.c: Register allocator improvements.
18604 2004-08-21 Zoltan Varga <vargaz@freemail.hu>
18606 * mini-amd64.c (read_tls_offset_from_method): Add another code
18609 * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
18610 instruction sequence for nullifying class init trampolines.
18612 * objects.cs: Add new regalloc test.
18614 * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
18616 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
18618 * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
18620 * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
18623 * driver.c: Fix profiling after TLS changes.
18625 * driver.c (mono_main): Set mono_stats.enabled if needed.
18627 * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
18630 2004-08-20 Ben Maurer <bmaurer@users.sourceforge.net>
18632 * mini-x86.c: use a 1 op rather than a 2 op tls access
18633 instruction -> faster.
18635 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
18637 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
18640 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
18642 * exceptions-sparc.c (throw_exception): fix typo
18644 2004-08-19 Ben Maurer <bmaurer@users.sourceforge.net>
18646 * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
18647 set tree->dreg correctly with tls. Allow any
18648 register to be used.
18650 * mini-x86.c (read_tls_offset_from_method): add new code
18651 generation pattern seen with GCC.
18654 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
18656 * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
18657 exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18658 exceptions-sparc.c: fix some performance issues in exception
18659 handling and setting of the stack trace for exceptions that were
18662 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
18664 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
18667 * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible
18670 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
18672 This patch inlines tls access, when possible.
18674 * mini.h: new arch functions for TLS intrinsics.
18675 All platforms updated with a stub.
18677 * mini.c: use the new intrinsics
18679 * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
18680 arch specific intrinsic for tls variables
18682 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
18684 * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
18687 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
18689 * mini.c: thread local allocation
18691 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
18693 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
18695 * Makefile.am: Link against the static version of libmonogc.
18697 * Makefile.am: Link the static versions of the convenience libraries
18698 into the mono executable.
18700 * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
18702 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
18704 * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
18705 on integer overflow.
18707 * mini-amd64.c: Reorganize function call code.
18709 * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
18711 2004-08-14 Ben Maurer <bmaurer@ximian.com>
18713 * inssel-x86.brg: use xor eax,eax.
18715 * basic.cs: new tests
18717 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
18719 * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
18720 in exception throwing code.
18722 2004-08-14 Ben Maurer <bmaurer@ximian.com>
18724 * inssel-x86.brg: use xor esi,esi.
18726 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
18728 * driver.c (mono_main): Call mono_trace_parse_options earlier so it
18729 can trace methods compiled during mini_init () too.
18731 * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle
18734 2004-08-14 Ben Maurer <bmaurer@ximian.com>
18736 * Makefile.am: static link on x86 (r=zoltan)
18738 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
18740 * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
18741 code since it causes some programs to fail.
18743 2004-08-12 Zoltan Varga <vargaz@freemail.hu>
18745 * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
18747 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
18749 * mini.c: ovfops_op_map - add STACK_OBJ case for
18751 * basic.cs: add test_0_pin_string as test
18754 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
18756 * Makefile.am: build C# if srcdir != builddir
18758 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
18760 * dominators.c, mini.h, mini-x86.c: fix loop alignment with
18761 fall-through blocks.
18763 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
18765 * driver.c: enable loop by default again and include abcrem in -O=all.
18767 2004-08-08 Zoltan Varga <vargaz@freemail.hu>
18769 * iltests.il: Add some localloc tests.
18771 * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
18773 * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly.
18776 * inssel-amd64.brg: Add some optimizations.
18778 * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
18781 * Makefile.am: Statically link mono against libmono on AMD64.
18783 * mini-amd64.c inssel-amd64.brg: Optimizations.
18785 2004-08-07 Zoltan Varga <vargaz@freemail.hu>
18787 * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
18789 * tramp-amd64.c: Patch calling code in trampolines.
18791 2004-08-06 Zoltan Varga <vargaz@freemail.hu>
18793 * mini-amd64.c: pinvoke struct passing fixes.
18795 2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
18797 * mini-sparc.c: redo change, make mono_arch_cpu_init call
18798 mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
18800 2004-08-05 Duncan Mak <duncan@ximian.com>
18802 * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
18805 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
18807 * mini-amd64.c (emit_move_return_value): Move return value for normal
18810 2004-08-05 Martin Baulig <martin@ximian.com>
18812 * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
18813 `type->type'; just modify `type' itself when dealing with enums
18814 and generic instances.
18815 (check_call_signature): Make `simple_type' a `MonoType *'.
18817 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
18819 * mini.c: Use OP_PADD to add offsets to addresses.
18821 * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
18823 2004-08-04 Bernie Solomon <bernard@ugsolutions.com>
18825 * mini-sparc.c (mono_arch_emit_epilog): fix check
18826 for folding last op into restore instruction
18828 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
18830 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
18831 helper methods using the code manager.
18833 * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
18835 * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
18837 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18839 * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
18840 cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
18842 * mini-s390.c: fix tail processing
18844 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
18846 * mini-ppc.c: mul.ovf.un exception name fix.
18848 2004-08-03 Martin Baulig <martin@ximian.com>
18850 * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
18851 instances; before jumping to `handle_enum', also modify `ptype'.
18853 2004-08-02 Bernie Solomon <bernard@ugsolutions.com>
18855 * cpu-sparc.md: fcall maximal length too small.
18857 2004-08-02 Zoltan Varga <vargaz@freemail.hu>
18859 * mini-amd64.c mini.h: Add initial support for passing/returning
18860 structures to/from pinvoked methods.
18862 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
18864 * mini-ppc.c: reg allocator fix.
18866 2004-07-31 Zoltan Varga <vargaz@freemail.hu>
18868 * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
18870 * inssel.brg: Optimize memset on 64 bit machines.
18872 * mini-amd64.c: Fix some vararg cases.
18874 2004-07-30 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18876 * mini-s390.c: Corrected macro in emit_float_to_int
18878 * s390-abi.cs: Tests to exercise the s390 ABI
18880 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
18882 * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
18885 * basic.cs: Add a test for add.ovf.un.
18887 2004-07-30 Bernie Solomon <bernard@ugsolutions.com>
18889 * mini-sparc.c: add case for OP_IDIV_UN
18891 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
18893 * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
18895 * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
18897 2004-07-30 Ben Maurer <bmaurer@ximian.com>
18899 * basic.cs: regression tests.
18901 * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
18904 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
18906 * basic.cs: Add a new test.
18908 * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling
18909 and AOT. Various fixes and optimizations.
18911 * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
18913 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
18915 * mini-ppc.c: make sure temp regs are not used for global reg
18918 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
18920 * cpu-sparc.md: conv_i8 fix for 64bits
18922 * mini-sparc.c: add cases for OP_IXXX codes for 64bits
18924 2004-07-29 Ben Maurer <bmaurer@ximian.com>
18926 * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
18927 add opcode for cmp BYTE PTR [eax], imm.
18929 * inssel.brg: Make memcpy and memset takes bases.
18931 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
18933 * *-amd64.*: More AMD64 work.
18935 2004-07-28 Ben Maurer <bmaurer@ximian.com>
18937 * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
18938 add a compare-not-equal opcode.
18940 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
18942 * mini.c: Use mono_init_from_assembly instead of mono_init.
18944 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
18946 * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
18948 * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
18950 * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
18952 * inssel.brg: 64 bit fixes.
18954 * mini.h (MonoCallInst): Add some AMD64 specific data.
18956 * mini.h: Add some OP_P opcodes.
18958 2004-07-28 Ben Maurer <bmaurer@ximian.com>
18960 * basic.cs: tests for 61797 and 61740
18962 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
18964 * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
18965 numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
18967 2004-07-24 Zoltan Varga <vargaz@freemail.hu>
18969 * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
18971 * *-amd64*.*: Ongoing AMD64 work.
18973 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
18975 * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
18977 * *-amd64*: Ongoing AMD64 work.
18979 * mini-arch.h: Add AMD64 support.
18981 * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
18983 * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
18985 * mini-ops.h: Add new opcodes.
18987 * Makefile.am: Add AMD64 support.
18989 * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
18990 rules into the inssel-long*.brg files.
18992 * *-amd64.*: Add beginnings of AMD64 backend.
18994 2004-07-22 Ben Maurer <bmaurer@ximian.com>
18996 * mini.c (print_dfn): commenting out the code that prints
18997 the cil. With -O=deadce, this makes -v -v crash.
18999 * cpu-pentium.md: make checkthis have a length of 2
19001 2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
19003 * mini-sparc.h: fix implementations of __builtin
19004 functions for Sun compiler for V9.
19006 2004-07-16 Ben Maurer <bmaurer@ximain.com>
19008 * mini.c: use the new stelem.ref wrapper
19009 * exceptions.cs, arrays.cs: new stelem.ref tests
19011 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19013 * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
19014 new XSP should work with these changes).
19016 2004-07-14 Ben Maurer <bmaurer@ximain.com>
19018 * inssel-{long32,x86,}.brg: trivial optimizations.
19020 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
19022 * mini.c: load value when emitting box operation in
19025 2004-07-12 Ben Maurer <bmaurer@ximian.com>
19027 * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
19028 is one byte shorter than cmp DWORD PTR [eax], 0.
19030 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
19032 * inssel-ppc.brg: arguments on the stack are always
19033 relative to the stack pointer (spotted by Neale Ferguson).
19035 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19037 * exceptions-x86.c: delay appending the method name to the trace until
19038 after mono_jit_info_table_find is called, as this gets the real
19041 2004-07-09 Ben Maurer <bmaurer@ximian.com>
19043 * aot.c: register roots
19045 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
19047 * aot.c : I could just use PLATFORM_WIN32 flag.
19049 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
19051 * aot.c : Reverting the previous fix. This time it broke linux build.
19053 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
19055 * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
19057 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
19059 * mini.c (handle_stack_args): Remove some more debugging code.
19061 * mini.c (handle_stack_args): Remove debug output left in by mistake.
19063 * driver.c mini.h aot.c: Allow additional options to be specified with
19064 --aot and pass them to mono_compile_assembly.
19066 * aot.c: Add experimental code to AOT compile all loaded assemblies
19067 on demand and save the code into a cache in the filesystem.
19069 * aot.c: Add support for more wrapper methods.
19071 * mini.c (handle_stack_args): Handle some corner cases. Fixes
19074 * cpu-*.md: Remove removed opcodes.
19076 * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
19077 CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
19078 related icalls to marshal.c.
19080 2004-07-06 Zoltan Varga <vargaz@freemail.hu>
19082 * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
19084 * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
19086 * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
19088 2004-07-06 Ben Maurer <bmaurer@ximian.com>
19089 * liveness.c: If liveness is recomputated we need to reset the information
19090 for each variable. This way, if the liveness range has been narrowed
19091 by optimizations that happened after the last computation, we can return
19094 For example, if you have
19099 // Tons of code that does not affect i
19105 i = 0 is dead code and will be removed by SSA. However, when
19106 linear scan gets to the code, i will still appear to be live
19107 throughout the entire block. This prevents good register allocation.
19109 2004-07-06 Martin Baulig <martin@ximian.com>
19111 * debug-mini.c (mono_debug_init_method): Allow
19112 MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
19113 (mono_debug_add_icall_wrapper): New method.
19115 * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
19117 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
19119 * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
19122 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
19124 * aot.c (mono_aot_load_method): Fix loading of debug info.
19126 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
19128 * aot.c: Add logging support.
19130 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
19132 * mini.h: Add prototype for mono_print_method_from_ip.
19134 * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
19136 * inssel.brg: 64 bit fixes.
19138 * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to
19141 * Makefile.am: Add SPARC64 support.
19143 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
19145 * aot.c: Fix alignment problems on 32 bit platforms.
19147 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
19149 * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
19152 * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
19155 * mini.h: Bump AOT file version. Some 64 bit fixes.
19157 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
19159 * inssel-sparc.brg: Add new rule to avoid register moves.
19161 * inssel.brg: Add ldind_to_load_membase helper function.
19163 2004-06-30 Ben Maurer <bmaurer@ximian.com>
19165 * mini.c: OffsetToStringData intrinsic.
19167 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
19169 * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
19171 * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
19174 * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
19175 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
19177 * mini.c: reinstated mono_compile_get_interface_var()
19178 on x86, too, since the change breaks the Gtk# build there as well.
19180 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19182 * driver.c: remove loop from the default optimizations: it seems to
19183 interact badly with some of the other options (see bug #60613).
19185 2004-06-25 Zoltan Varga <vargaz@freemail.hu>
19187 * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
19188 (fld@informatik.uni-bremen.de): Add Solaris x86 support.
19190 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
19192 * mini-ppc.c, cpu-g4.md: small updates to be able to compile
19193 vararg-using methods.
19195 2004-06-21 Martin Baulig <martin@ximian.com>
19197 * mini/mini-exceptions.c
19198 (mono_handle_exception): Added `gpointer original_ip' argument.
19199 After calling mono_unhandled_exception(), call
19200 mono_debugger_unhandled_exception() and if that returns true,
19201 restore the context and return.
19203 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
19205 * mini-ppc.c: prefer the use of relative branches so
19206 they won't need to be patched in aot code (patch from Patrick Beard).
19208 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
19210 * aot.c: patch from Patrick Beard to make the output assembly
19211 more correct for the MacOSX assembler. Small tweak to
19212 generate sane images on Linux/PPC, too.
19214 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19216 * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
19217 case until bug #59509 is fixed (shows up in #60332).
19219 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19221 * mini.c: make sure the needed wrappers are compiled, too, with
19224 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
19226 * driver.c: remove NPTL reference in --version output.
19228 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19230 * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
19231 generate valid assembly for the Mach-O assembler.
19233 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
19235 * driver.c: don't include abcrem in the all optimization specifier
19236 since it slows down jit compilation too much for now.
19238 2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
19240 * mini.c: use BIGMUL only if both operands have the same signage.
19241 * iltests.il: Test for bug 60056. (errors related to signage in
19246 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
19248 * mini.c, aot.c: memory leak fixes.
19250 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
19252 * inssel-long32.brg: implemented a few missing ulong cast opcodes.
19254 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
19256 * Makefile.am: remove the -static hack completely, it links in
19257 statically glib as well.
19259 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
19261 * iltests.il, mini.c: fixed bug#59580 in branch optimization.
19262 * exceptions.cs: make it compile with new mcs/csc.
19264 2004-06-03 Massimiliano Mantione <massi@ximian.com>
19265 * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
19266 and added relevant test case.
19268 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
19270 * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
19271 regressions in gtk-sharp.
19273 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
19275 * exceptions.cs: New regression tests.
19277 * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
19279 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
19281 * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
19283 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
19285 * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
19287 * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
19289 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
19291 * mini.c (mono_jit_runtime_invoke): Init class in this
19292 method instead of trusting mono_jit_compile_method to
19293 do the work (because wrappers can be in object class)
19295 2004-05-27 Zoltan Varga <vargaz@freemail.hu>
19297 * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
19299 * basic-long.cs: New regression test.
19301 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
19303 * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
19304 and div/rem checks.
19306 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
19308 * Makefile.am: fix miguel's change to build mono statically against
19309 libmono (track build dependencies).
19311 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
19313 * cfold.c: Some glib versions do not have G_MININT32.
19315 2004-05-26 Massimiliano Mantione <massi@ximian.com>
19317 * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
19318 with precision of tan, atan, sin and cos, and implemented related
19319 regressions tests (fixes bug 54467, but one new problem appeared and
19322 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
19324 * cfold.c (FOLD_BINOPZ): Avoid division by zero.
19326 * exceptions.cs: Add test for constant folding && division by zero.
19328 * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
19329 since driver.c is in libmono too, so the optimization was useless.
19331 * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
19332 variable to driver.c so the compiler can emit more efficient code to
19335 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19337 * Makefile.am: don't distribute generated inssel.[ch] files.
19339 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
19341 * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
19342 into the default appdomain. Fixes #58707.
19344 * jit-icalls.c: Remove the broken approximation for truncl, doing
19345 no conversion is better.
19347 * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
19350 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
19352 * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
19353 of the mcrxr instruction which is not available on some processors
19354 even if it's documented to be. Implement add and sub overflow correctly
19355 (still not complete for long unsigned). Speed up icalls a bit.
19357 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
19359 * mini.c (mono_jit_compile_method_with_opt): Make sure that
19360 we run .cctor in the current domain instead of target_domain.
19362 Fixes bug #58558, .cctor not being called in -O=shared.
19364 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19366 * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
19368 2004-05-24 Ben Maurer <bmaurer@users.sourceforge.net>
19370 * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
19371 which can be done with an imm8, do it that way.
19372 (mono_arch_output_basic_block): ditto for a jmp
19373 (mono_arch_emit_prolog): Computate maximum offset of a label.
19375 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
19377 * mini-x86.c (mono_arch_local_regalloc): the reg allocator
19378 now tries to allocate prefered physical reg's for virtual
19379 regs. This reduces the number of emited spills/loads with
19380 20-30% on our core assemblies.
19382 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19384 * jit-icalls.c: truncl() is not needed and trunc() is
19385 the correct thing to do anyway (bug #58287).
19387 2004-05-24 Zoltan Varga <vargaz@freemail.hu>
19389 * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
19392 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
19394 * driver.c: enable loop optimizations by default.
19396 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
19398 * mini-x86.c: fix calc of max loop size when aligning loops start.
19400 2004-05-23 Zoltan Varga <vargaz@freemail.hu>
19402 * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
19405 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
19407 * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
19410 * basic-long.cs: Add tests for add/subtract of immediates with carry.
19412 * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
19414 * mini.c (inline_method): Allways inline some wrappers even if the cost
19415 is too large. Fixes #58785.
19417 * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
19419 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
19421 * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
19422 (crichton@gimp.org). Beginning of support for sparc/linux.
19424 * mini-sparc.c: Optimize retrieval of LMF address.
19426 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
19428 * exceptions-ppc.c: handle alloca in methods with clauses.
19430 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
19432 * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
19434 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
19436 * mini.c: Delegate most of the abort signal work to
19437 mono_thread_request_interruption, which also handles Stop and Suspend
19440 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
19442 * mini.c mini.h: Allow inlining of icall wrappers if the backend
19443 supports the save/restore lmf opcodes.
19445 2004-05-19 Zoltan Varga <vargaz@freemail.hu>
19447 * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
19448 by gcc-3.4 as well.
19450 * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
19452 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
19454 * mini.h mini.c (mini_method_compile): Only run abc removal pass on
19455 methods which contain array accesses.
19457 * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
19458 boundaries. Fixes #58537.
19460 * iltests.il: Add regression test for #58537.
19462 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
19464 * mini-x86.c (mono_arch_local_regalloc): Last part of
19465 fix for bug #58633 (releasing register to early).
19467 2004-05-18 Miguel de Icaza <miguel@ximian.com>
19469 * basic-long.cs: Add new regression test.
19471 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
19473 * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
19474 register too early on the chain.
19476 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
19478 * mini.c (create_helper_signature): Use a helper function to reduce
19479 the code which needs to be written. Also set the calling convention of
19480 icalls on windows. Fixes #57840.
19482 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
19484 * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
19485 exceptions-ppc.c: added helper function to get the instruction address
19486 from a signal handler context.
19488 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
19490 * helpers.c: use g_get_tmp_dir. Invokes happyness
19493 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
19495 * helpers.c: Add new env variable to pass args to objdump.
19496 Specifically for those of us who love -Mintel. r=miguel, gonzalo.
19498 2004-05-17 Radek Doulik <rodo@ximian.com>
19500 * Makefile.am (common_sources): added abcremoval.h so it get
19501 disted and daily mono packages on go-mono.com will build again
19503 2004-05-17 Massimiliano Mantione <massi@ximian.com>
19505 * abcremoval.c: Fixed coding style, added copyright header.
19507 * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
19509 * mini.h: Added prototype for abc removal main function.
19511 * build_relations_propagation_table.pl: Added copyright header.
19513 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
19515 * basic-long.cs: reg test for complex ceq_long bug.
19517 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
19519 * mini-x86.c (mono_arch_local_regalloc): Correctly free
19520 reg in long and clob case (bug #58343). Fixed/added comments.
19522 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
19524 * mini.c (mono_jit_runtime_invoke): Follow new convention
19525 of calling the invoke method with an function pointer.
19527 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
19529 * ChangeLog: Fix author of memory leak patch.
19531 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
19533 * Makefile.am: fix make dist as well...
19536 2004-05-14 Massimiliano Mantione <massi@ximian.com>
19538 * cfold.c: Made so that conversions from pointer to int4 are no-ops
19539 on archs where pointers are 4 bytes long.
19541 * Makefile.am: Added abcremoval.c source file.
19543 * abcremoval.c: Added abcremoval.c.
19545 * abcremoval.h: Added abcremoval.h.
19547 * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
19549 * inssel.brg: Enabled bounds check removal.
19551 * mini.c: Added support for abcrem optimization.
19553 * mini.h: Added abcrem optimization label.
19555 * driver.c: Added support for abcrem optimization.
19557 * propagated_relations_table.def: Added propagated_relations_table.def.
19559 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
19561 * mini.c, cfold.c: fix style.
19563 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19565 * mini.c: handle issue with the low-level implementation of
19566 some long opcodes (bug #54209).
19568 2004-05-13 Ben Maurer <bmaurer@users.sourceforge.net>
19570 * basic.cs: test for my new cmov stuff.
19572 2004-05-13 Patrik Torstensson
19574 * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
19575 opt and added peephole documentation.
19577 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
19579 * tramp-ppc.c: rewrote the generic trampoline code.
19581 2004-05-11 Patrik Torstensson
19583 * mini-x86.c: optimize long shl/shr asm code (one less branch)
19585 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
19587 * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
19589 * mini.h mini.c dominators.c: Applied patch from Derek Woo
19590 (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
19592 * mini.c: Add new icalls for AsAny marshalling.
19594 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
19596 * tramp-ppc.c, mini-ppc.c: more cleanups.
19598 2004-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19600 * mini.c: no warnings.
19602 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19604 * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
19606 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
19608 * mini.c: In the thread abort signal handler, if the thread is in the
19609 process of being stoped, don't throw the Abort exception, just stop the
19612 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
19614 * tramp-ppc.c: removed old code.
19616 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19618 * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
19619 do some simple speed optimizations on ppc.
19621 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
19623 * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
19624 and large offsets in load/store.
19626 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
19628 * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
19629 it causes regressions.
19631 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
19633 * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
19636 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19638 * jit-icalls.c: remove warnings.
19639 * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
19640 speedups for unsafe code.
19642 2004-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
19644 * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
19646 2004-05-06 Zoltan Varga <vargaz@freemail.hu>
19648 * basic-calls.cs: Add new regression test.
19650 * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
19653 * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
19655 * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
19658 2004-05-06 Patrik Torstensson
19660 * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
19661 long reg allocation in any reg (not only eax:edx) and implemented
19662 long shl/shr ops in asm instead of helpers.
19664 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
19666 * mini-sparc.h: Fix warnings.
19668 * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
19671 * mini-exceptions.c (mono_handle_exception): Call the filter in a
19672 separate statement for clarity.
19674 * mini-sparc.c: Update status.
19676 2004-05-04 Zoltan Varga <vargaz@freemail.hu>
19678 * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
19681 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19683 * inssel-ppc.brg: another small pre-release workaround:
19684 we don't do overflow detection for long_sub_un.
19686 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19688 * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
19689 (also works around a weird ppc bug: 57957).
19691 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
19693 * tramp-ppc.c: trampoline fixes.
19695 Fri Apr 30 15:54:26 EDT 2004 Paolo Molaro <lupus@ximian.com>
19697 * mini-ppc.c: fixed typos.
19699 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19701 * mini-ppc.c, exceptions-ppc.c: more code saves registers
19702 at the top of the stack. Fixed typos. Use a frame registers
19703 for all the methods with exception clauses.
19705 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
19707 * exceptions-ppc.c: restore fp registers.
19709 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
19711 * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
19712 order from the stack top (moved the stack room to save the
19713 return value for trace after the param area). Fixed corruption
19714 in restoring registers on unwind.
19716 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
19718 * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
19720 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19722 * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
19723 and prolog/epilog for methods that use it. Allow
19724 enough param area room for varargs methods. Fix miguel's
19725 breakage in exception handling.
19727 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19729 * Makefile.am: run genmdesc only on current arch.
19731 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19733 * exceptions-x86.c:
19734 * mini-x86.h: fix the build on windows.
19736 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
19738 * 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.
19740 * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
19742 * mini-exceptions.c: New file.
19744 * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
19745 Move some parts of the x86 exception handling code to an
19746 arch-independent file so it can be shared with other ports.
19748 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
19750 * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
19752 2004-04-26 David Waite <mass@akuma.org>
19754 * driver.c: remove comma from end of enumeration declaration
19756 2004-04-26 Jackson Harper <jackson@ximian.com>
19758 * driver.c: parse config file before loading first assembly. This
19759 allows the user gac to be enabled/disabled.
19761 2004-04-23 Miguel de Icaza <miguel@ximian.com>
19763 * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
19764 simpler mechanism: we do not care what is encoded initially
19765 (branch absolute or relative), we care about the code and its
19766 target. I kept the old code for reference for now.
19768 The new code tries first to determine if the jump is anywhere in
19769 the -/+32 absolute meg range, if it succeeds, it encodes using the
19770 absolute branch; If not, it tried to find something in the
19771 relative range, if not, it uses the handle_thunk code.
19773 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
19775 * exceptions-ppc.c: use the correct ip register on macosx.
19777 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
19779 * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
19781 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
19783 * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
19784 Raise exception on integer divide by zero by hand since the hw
19785 doesn't support it. Handle NaNs in FP compares.
19787 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
19789 * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
19790 code reducing duplication between the platforms and enabled
19791 signal exception handling (on linux for now).
19793 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
19795 * exceptions-ppc.c: more macosx support.
19797 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19799 * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
19801 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
19803 * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
19805 2004-04-19 Ben Maurer <bmaurer@users.sourceforge.net>
19807 * iltests.il: more tests.
19809 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
19811 * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
19814 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
19816 * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
19818 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
19820 * liveness.c: Mark variables as volatile in all basic blocks reachable
19821 from exception clauses.
19823 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
19825 * exceptions.cs (test_0_rethow_stacktrace): Make this work with
19828 2004-04-18 Ben Maurer <bmaurer@users.sourceforge.net>
19830 * iltests.il, basic.cs: more tests for regalloc.
19832 2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
19834 * iltests.il: Some tests for register allocation modifications
19837 2004-04-16 Zoltan Varga <vargaz@freemail.hu>
19839 * exceptions.cs: Add regression test for bug #56782.
19841 * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
19842 original stack trace if an exception is rethrown. Fixes #56782. Oh,
19843 the beauty of fixing the same thing in 5 different files...
19845 2004-04-15 Zoltan Varga <vargaz@freemail.hu>
19847 * mini.c (mono_method_to_ir): Do not compute coverage for inlined
19850 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
19852 * mini.c: Add support for STRWLPARRAY marshalling convention.
19854 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
19856 * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
19857 to init the context to setup the regs pointer).
19859 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
19861 * exceptions-ppc.c: more exceptions work.
19863 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19865 * mini.c: avoid reusing the same MonoInst on multiple trees: this is
19868 2004-04-13 Miguel de Icaza <miguel@ximian.com>
19870 * inssel-x86.brg (reg): Add new rules for add, sub and mul that
19871 can use the memory directly.
19873 * cpu-pentium.md: Update documentation from a post from Zoltan.
19875 add x86_add_membase, x86_sub_membase, x86_mul_membase
19877 2004-04-13 Miguel de Icaza <miguel@ximian.com>
19879 * mini-ppc.c: Remove unused definitions FLOAT_REGS and
19880 GENERAL_REGS they were also hardcoded for all PPC ports.
19882 (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
19884 Remove hard-coded limit for floating point registers, use
19885 PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
19887 Notice that in MacOS X calling conventions you can fit a lot more
19888 floating point values in registers, so I should update the PInvoke
19889 test to excercise the passing of floating point values on the
19890 stack (currently broken).
19892 2004-04-06 Miguel de Icaza <miguel@ximian.com>
19894 * tramp-ppc.c (create_trampoline_code): Added
19895 JUMP_TRAMPOLINE_SIZE.
19896 (ppc_magic_trampoline): Follow the pattern from
19897 x86_magic_trampoline: if code is set to zero, return.
19898 (create_trampoline_code): Always pass MonoMethod to the jump
19899 trampoline, before it was passing a null.
19900 (mono_arch_create_jump_trampoline): Implement the jump stub, could
19901 share the code with mono_arch_create_jit_trampoline.
19903 * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
19905 (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
19908 * cpu-g4.md: Added length for jmp instruction, the worst case
19909 scenario is 92 bytes (4 mandatory bytes, potential 19 registers
19912 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
19914 * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
19916 2004-04-07 Zoltan Varga <vargaz@freemail.hu>
19918 * mini.c: Only set bblock->real_offset when adding a new bblock, and
19919 before each IL instruction.
19921 * mini.c (CEE_BOX): Fix warnings.
19923 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19925 * mini.c: removed a few unused vars and extra whitespace.
19927 2004-04-05 Ben Maurer <bmaurer@users.sourceforge.net>
19929 * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
19931 (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
19933 (OP_GETCHR): use the above
19934 (CEE_LDELEMA): use the above.
19936 * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
19937 version of the generic impl.
19938 (MONO_EMIT_BOUNDS_CHECK_IMM): the same
19939 (CEE_LDELEMA): use the above.
19941 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
19943 * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
19946 * iltests.il: Added new regression test for #56317.
19948 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
19950 * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
19951 under NetBSD. Fixes #56450.
19953 * liveness.c (update_gen_kill_set): Fix previous patch.
19955 2004-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19957 * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
19959 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
19961 * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
19962 ldsfld and ldsflda.
19964 * inssel-sparc.brg: Add more optimizations.
19966 * mini-sparc.c: Replace multiply/divide with shifts if possible.
19968 2004-04-01 Martin Baulig <martin@ximian.com>
19970 * mini.c (handle_box): New static function; moved the
19971 implementation of CEE_BOX here.
19972 (mono_method_to_ir): Added `constrained_call' variable.
19973 (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
19974 (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
19975 mono_method_get_constrained() to get the method.
19977 2004-04-01 Martin Baulig <martin@ximian.com>
19979 * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
19980 (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
19981 (mono_method_to_ir): We don't need these macros anymore since
19982 mono_class_get_full() already takes care of it.
19984 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19986 * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
19987 use @function (as doesn't accept #function here) and check the return
19988 value of system and stop if fails.
19990 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19992 * mini.c: set the timeout to 2s when calling mono_domain_finalize.
19994 2004-03-31 Zoltan Varga <vargaz@freemail.hu>
19996 * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
19998 * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
20000 * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
20003 * basic-long.cs: Add test for negation of Int64.MinValue.
20005 2004-03-30 Zoltan Varga <vargaz@freemail.hu>
20007 * mini-sparc.c: Update status.
20009 * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
20011 * exceptions-sparc.c: Fix return value in filters.
20013 * inssel-sparc.brg: Fix register allocation in some rules.
20015 2004-03-28 Martin Baulig <martin@ximian.com>
20017 * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
20020 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
20022 * mini-x86.c (mono_arch_patch_code): Fix warnings.
20024 * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if
20025 dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
20026 remove unused conv_u4 opcode.
20028 * mini-x86.c: Remove valgrind workaround since it slows down things
20029 even when mono is not run under valgrind.
20031 2004-03-26 Zoltan Varga <vargaz@freemail.hu>
20033 * mini-sparc.c: Update status.
20035 * inssel-sparc.brg: Add some optimizations.
20037 * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
20038 future delay slot filling. Add support for varargs, tail calls and JMP.
20040 * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of
20041 CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
20043 * inssel.brg: Fix register allocation in OP_ARGLIST.
20045 * inssel.brg: Fix warnings.
20047 2004-03-25 Martin Baulig <martin@ximian.com>
20049 * mini.c (inflate_generic_field): Removed.
20050 (mini_get_method): Removed, use mono_get_method_full(),
20051 (mini_get_class): Removed, use mono_class_get_full().
20052 (mono_method_to_ir): Pass our generic context to
20053 mono_field_from_token().
20055 2004-03-25 Martin Baulig <martin@ximian.com>
20057 * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
20058 of a `MonoMethod *'.
20059 (mini_get_method): Take a `MonoGenericContext *' instead
20060 of a `MonoMethod *'.
20061 (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
20062 a new local variable called `generic_context' which holds the
20063 current `MonoGenericContext *'; use it to lookup things.
20065 2004-03-24 Martin Baulig <martin@ximian.com>
20067 * mini.c (mini_get_class): New static method; if we're inside a
20068 generic instance, inflate the class if neccessary.
20069 (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
20071 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
20073 * iltests.il: New regression test for #55976.
20075 * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
20078 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
20080 * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
20083 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
20085 * liveness.c: Consider SSA stores as well as loads when making vars
20088 * exceptions.cs: New regression tests for register allocation.
20090 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
20092 * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
20093 * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
20094 domain lock only to protect puntual access to data structures.
20095 Added access lock for sighash, jit_icall_hash_name,
20096 jit_icall_hash_addr and domain->code_mp.
20098 2004-03-20 Zoltan Varga <vargaz@freemail.hu>
20100 * driver.c: Print SIGSEGV handling method.
20102 * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
20104 * mini.c (setup_jit_tls_data): Handle case when this is called
20105 multiple times for a thread.
20107 * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx
20108 is different from fbxx_un. Fixes #54303. Also use constants instead of
20109 magic numbers in a lot of places.
20111 2004-03-19 Zoltan Varga <vargaz@freemail.hu>
20113 * exceptions.cs: Fix cctor test when --regression is used.
20115 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
20117 * mini-ppc.c, exceptions-ppc.c: basic exceptions support
20120 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
20122 * inssel-ppc.brg: fixed register assignments for some rules.
20124 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
20126 * exceptions.cs: Add test for exceptions in static constructors.
20128 * mini.c (mono_jit_compile_method_with_out): Move the calling of
20129 static constructors outside the domain lock. Fixes #55720.
20131 2004-03-17 Martin Baulig <martin@ximian.com>
20133 * mini.c (get_generic_field_inst): Removed, this'll never happen.
20134 (inflate_generic_field): Take the `MonoMethod *' instead of the
20135 `MonoClass *' and added support for generic method.
20136 (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
20137 have a `field->parent->gen_params', only inflate the field if it's
20138 an open constructed type.
20140 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
20142 * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
20143 exception object instead of the preconstructed ones.
20145 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20147 * mini.c: reverted changed to sigsegv_signal_handler commited
20148 accidentally in the previous patch.
20150 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20153 (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
20154 running --aot with an old assembly.
20156 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
20158 * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
20161 * mini-sparc.c: Add support for v9 branches with prediction.
20163 2004-03-15 Bernie Solomon <bernard@ugsolutions.com>
20165 * mini.c (mini_init): #warning is GNUC only
20167 * mini-sparc.h: implement __builtin_frame_address
20168 and __builtin_return_address for Sun C compiler
20170 2004-03-15 Zoltan Varga <vargaz@freemail.hu>
20172 * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
20174 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
20176 * basic-calls.cs: Add test for unaligned byref long argument passing.
20178 * mini-ops.h: Add sparcv9 compare and branch instructions.
20180 * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
20181 v9 instructions if we have a v9 cpu.
20183 * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
20184 registers for global allocation.
20186 * exceptions-sparc.c: Fixes.
20188 2004-03-11 Zoltan Varga <vargaz@freemail.hu>
20190 * liveness.c (mono_analyze_liveness): Optimized version.
20192 * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
20194 * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
20197 * basic-float.cs basic-calls.cs: New regression tests.
20199 2004-03-10 Zoltan Varga <vargaz@freemail.hu>
20201 * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
20202 sigaltstack implementation.
20204 * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
20206 * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
20207 stuff if SIGSEGV_ON_ALTSTACK is not defined.
20209 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
20211 * mini.c: Fix warnings.
20213 * mini.c (mono_resolve_patch_target): New function which contains the
20214 arch independent part of the patching process.
20216 * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
20217 patching code to a separate function.
20219 2004-03-09 Bernie Solomon <bernard@ugsolutions.com>
20221 * mini.c (add_signal_handler): ifdef out on Windows
20223 2004-03-08 Zoltan Varga <vargaz@freemail.hu>
20225 * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c
20226 cpu-sparc.md: Add exception handling support + other fixes.
20228 * driver.c: Print --help output to stdout. Fixes #55261. Also fix
20229 typed GC detection in --version.
20231 * basic.cs exceptions.cs: New regression tests.
20233 * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
20234 the arch specific code can store data during a compilation.
20236 * mini-ops.h: Add OP_SETFRET.
20238 * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
20239 function, register a separate icall for each arity, so the icalls can
20242 * mini.c (mono_print_tree): Print negative offsets in a more readable
20245 * mini.c: Make signal handling work on sparc.
20247 * mini.c (mini_init): Add emulation for lconv_to_r8_un.
20249 * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
20251 * jit-icalls.c: Emulate truncl by aintl on solaris.
20253 * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
20255 2004-03-05 Zoltan Varga <vargaz@freemail.hu>
20257 * mini.c (mini_init): fconv_to_ovf can raise exceptions.
20259 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
20261 * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
20262 a MarshalByRef type, inline a method that performs the check, taking into
20263 account that the object can be a proxy. Also implemented tow new opcodes:
20264 CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
20265 * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and
20266 OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
20268 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
20270 * mini-ppc.c: if a relative branch displacement is too big
20271 but it points to and area reachable with an absolute branch,
20274 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
20276 * mini.c: optimize small copies in cpblk.
20278 2004-03-01 Zoltan Varga <vargaz@freemail.hu>
20280 * basic-calls.cs basic-float.cs: New regression tests.
20282 * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at
20283 negative offsets from %fp. Implement localloc. Fix local register
20284 allocation. Fix the case when the this argument needs to be saved to
20285 the stack. Implement some missing opcodes.
20287 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
20289 * mini.c (mini_method_compile): Reenable global regalloc in methods
20290 with exception handlers.
20292 * linear-scan.c (mono_varlist_sort): Fix warning.
20294 * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
20296 * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
20299 * liveness.c: Make all variables uses in exception clauses volatile, to
20300 prevent them from being allocated to registers. Fixes #42136.
20302 2004-02-25 Zoltan Varga <vargaz@freemail.hu>
20304 * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
20305 causes regressions.
20307 * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
20308 argument to mono_arch_regalloc_cost.
20310 * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs
20313 2004-02-24 Zoltan Varga <vargaz@freemail.hu>
20315 * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c:
20316 Make the cost of allocating a variable to a register arch dependent.
20318 * basic-calls.cs: Fix compilation of tests.
20320 * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
20321 helper function to cut back on the number of #ifdefs needed.
20323 * mini-ppc.c: Fix compilation.
20325 * basic-calls.cs: New regression tests.
20327 * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
20329 * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
20330 of l0 since that is callee saved.
20332 * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
20335 * mini-sparc.c: Ongoing work + flag virtual calls with a special kind
20336 of delay instruction.
20338 * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
20340 * mini.h (MonoCallInst): Add 'virtual' flag.
20342 * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
20344 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
20346 * *.cs: New regression tests.
20348 * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc
20351 * mini.c (mono_runtime_install_handlers): Fix build.
20353 * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
20354 'signal_stack_size' members.
20356 * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an
20357 alternate signal stack.
20359 * exceptions-x86.c: Add stack overflow handling.
20361 * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing
20362 functions to arch independent code.
20364 * mini.c (mono_print_tree): Print more detailed info for load_membase
20367 2004-02-23 Martin Baulig <martin@ximian.com>
20369 * mini.c (mini_get_method): Set `gmethod->generic_inst'.
20371 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
20373 * mini-x86.c: fixed reg allocation for div/rem.
20375 2004-02-22 Miguel de Icaza <miguel@ximian.com>
20377 * driver.c (mono_main): Report some configuratio options on --version.
20379 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
20381 * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
20382 low in the address space. Correctly flush memory in thunks where we
20383 output native code.
20385 2004-02-20 Martin Baulig <martin@ximian.com>
20387 * mini.c (mini_get_method): New static method; inflate all generic
20388 methods and methods in open generic instances.
20389 (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
20390 (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
20392 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
20394 * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
20396 * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
20398 2004-02-19 Bernie Solomon <bernard@ugsolutions.com>
20400 * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
20402 * mini-sparc.c (flushi mono_arch_output_basic_block): make
20403 it compile using Sun's compiler.
20405 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
20407 * 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.
20409 * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
20411 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
20413 * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
20415 * mini-ppc.c: handle calls outside of the allowed range with thunks
20416 allocated using the code manager.
20417 * tramp-ppc.c: use the code manager to hold generated native code.
20418 Fixed the magic trampoline to just patch vtable entries.
20420 2004-02-17 Zoltan Varga <vargaz@freemail.hu>
20422 * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
20425 2004-02-16 Zoltan Varga <vargaz@freemail.hu>
20427 * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
20430 * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
20431 if we have a working __thread implementation.
20433 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove
20434 OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
20436 2004-02-15 Zoltan Varga <vargaz@freemail.hu>
20438 * mini-x86.c: Fix compilation under gcc 2.
20440 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
20442 * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
20443 contains a call to the wrapped function.
20445 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add
20446 OP_<CALL>_IMM opcodes, and use them under X86.
20448 * mini.c (mono_jit_find_compiled_method): Fix warning.
20450 * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
20452 * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
20454 * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
20455 functionality to mini.c.
20457 * mini.c (mono_create_jump_trampoline): New function to create a jump
20458 trampoline. Return a compiled method instead of a trampoline if it
20459 exists. Add a cache for jump trampolines.
20461 * mini.c (mono_jit_find_compiled_method): New function to return a
20462 compiled method if it exists.
20464 * mini-x86.c: Call mono_create_jump_trampoline instead of
20465 mono_arch_create_jit_trampoline.
20467 * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
20468 a jump trampoline. Fixes #52092.
20470 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
20472 * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
20473 which is not up-to-date. Add check_corlib_version () instead.
20475 * mini.c (mini_init): Call mono_thread_attach () so embedders do not
20478 * mini.c (mono_runtime_install_handlers): Remove check for valgrind
20479 since newer valgrind versions do not need it.
20481 * mini.c (mono_jit_compile_method_with_opt): New helper function to
20482 compile a method with a given set of optimizations.
20484 * mini.c: Compile icall wrappers on-demand instead of at startup.
20486 * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
20487 wrapper for an icall.
20489 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
20491 * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
20494 * iltests.il: Add test for non-empty stack before switch instruction.
20496 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
20498 * mini.c: Add support for new stringbuilder marshalling conventions.
20500 * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
20502 2004-02-01 Martin Baulig <martin@ximian.com>
20504 * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
20505 in `ginst->mtype_argv'.
20507 2004-01-31 Miguel de Icaza <miguel@ximian.com>
20509 * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
20510 facilitate grepping.
20512 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
20514 * mini.c: fixed buglet in initobj generic implementation for references.
20516 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
20518 * Makefile.am: make the version script conditional.
20519 * jit-icalls.c: handle missing truncl().
20521 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
20523 * exceptions.cs: Add more tests for double->int conversion.
20525 * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
20526 we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
20528 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
20530 * driver.c: make --verbose --version emit an error
20531 if the loaded corlib doesn't match the runtime version.
20533 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
20535 * mini-ppc.h: export ppc_patch().
20536 * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
20537 * tramp-ppc.c: call convention fixes: Linux/PPC support should be
20538 on par or better than on MacOSX.
20540 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
20542 * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
20543 mono_lookup_pinvoke_call.
20545 * mini-x86.c: Under windows, the default pinvoke calling convention is
20546 stdcall. Fixes #52834.
20548 * mini.c (optimize_branches): Add an upper bound to the number of
20549 iterations to prevent infinite loops on strange loops. Fixes #53003.
20551 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
20553 * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
20554 and ISINST. Fixes #52093.
20556 * objects.cs (test_0_vector_array_cast): New tests.
20558 2004-01-15 Zoltan Varga <vargaz@freemail.hu>
20560 * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
20561 checking in Array.Set ().
20563 * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
20566 * object.cs (test_0_multi_array_cast): New regression test.
20568 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
20570 * exceptions-ppc.c: fix build on Linux/PPC.
20572 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
20574 * tramp-x86.c (x86_magic_trampoline): Disable code patching when
20575 running under valgrind.
20576 (x86_magic_trampoline): Fix build bustage.
20578 * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
20579 negative values as well. This is needed for the encoding of the line number
20580 info, since sometimes the line numbers are not in increasing order.
20582 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
20584 * cpu-pentium.md (localloc): Increase the size of the localloc
20585 instruction since it is a loop under Win32.
20587 * debug-mini.c (record_line_number): Get rid of unneccesary memory
20590 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
20592 * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c
20593 tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from
20594 Max Horn (max@quendi.de). Fix file names in comments.
20596 2004-01-03 Zoltan Varga <vargaz@freemail.hu>
20598 * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
20599 avoid stack overflow.
20600 (replace_usage): Avoid uninitialized variable warnings.
20602 * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
20603 and taking the address of valuetype variables.
20605 2004-01-03 Patrik Torstensson
20607 * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
20608 for other purposes than FP later on.
20610 2004-01-02 Zoltan Varga <vargaz@freemail.hu>
20612 * mini.c (mono_method_to_ir): Prevent register allocation for arguments
20615 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
20617 * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
20619 2003-12-30 Patrik Torstensson <p@rxc.se>
20621 * mini-x86.h: Decreased number of availiable fp regs.
20622 Solves corner cases with FP spilling.
20624 2003-12-23 Patrik Torstensson <p@rxc.se>
20626 * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
20627 for floating point stack tracking / spilling on x86.
20630 * basic-float.cs: added float mul overflow test.
20632 2003-12-23 Zoltan Varga <vargaz@freemail.hu>
20634 * mini.c (mono_method_to_ir): Add workaround for bug #51126.
20636 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
20638 * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
20639 supports for cond branches that overflow the immediate
20640 overflow offset. mcs can compile simple programs.
20642 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
20644 * exceptions-ppc.c: exception handling support wip:
20645 finally handlers get run on exception.
20647 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
20649 * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while
20652 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
20654 * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
20655 initial support for stack walking and unwinding.
20657 2003-12-18 Zoltan Varga <vargaz@freemail.hu>
20659 * driver.c (mono_main): Make corlib-out-of-sync message more
20660 descriptive. Also remove verify_corlib call.
20662 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
20664 * mini.c: make CEE_NEWARR calls and other emulated opcodes
20665 not overlap with other call's arguments, too.
20667 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
20669 * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c:
20670 move to arch-specific code the choice of arch-specific
20671 intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
20672 * mini.c: ensure emulation calls will not interleave
20675 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
20677 * tramp-ppc.c, basic-calls.cs: rework trampolines so that
20678 the magic trampoline stack frame is dropped before executing
20681 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
20683 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
20684 and integer to fp conversions. Added support for overflowing
20685 arguments on the stack. Reserve a couple more registers as temps.
20686 Added support for aot compilation (as output still needs to be
20689 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
20691 * mini-ppc.c, basic-long.cs: fix jumps to known labels.
20692 Don't overwrite return register in some corner cases.
20694 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
20696 * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
20697 static constructors when AOT compiling.
20699 * driver.c (mono_main): Call mono_check_corlib_version.
20701 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
20703 * cpu-g4.md, basic.cs: fixed div target register.
20705 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
20707 * mini-ppc.c, basic.cs: shl_imm fix with test.
20709 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
20711 * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing
20712 structures by value. Misc fixes.
20713 * objects.cs: more tests.
20715 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
20717 * mini-ppc.c: lconv.ovf.i implemented.
20719 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20722 (mini_init): don't error out if someone already called g_thread_init.
20724 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
20726 * exceptions-x86.c, exceptions-ppc.c: allow the exception object
20727 to be any type per the spec. Fix abnormal memory usage when
20728 the same object is repeatedly thrown.
20730 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
20732 * mini.c: check for overruns in IL code.
20734 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
20736 * TODO: Add/remove some todo entries.
20738 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
20740 * driver.c (mono_main): Call mono_verify_corlib.
20742 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
20744 * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy.
20745 This has been moved to mini.c
20746 * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
20747 type being casted is marshalbyref it could be a proxy, so instead of
20748 emitting the type check code, emit a call to a runtime method that will
20749 perform the check by calling CanCastTo if needed.
20751 2003-12-06 Zoltan Varga <vargaz@freemail.hu>
20753 * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
20754 methods with large stack frames under Win32.
20756 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
20758 * Makefile.am: Distribute regression tests.
20760 * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
20761 at the end instead of inserting each variable into the sorted list.
20763 * linear-scan.c (mono_varlist_sort): New helper function.
20765 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
20767 * mini.c: ensure arguments and locals are within bounds.
20769 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
20771 * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and
20774 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
20776 * mini.c (mono_cprop_copy_values): Fix crash.
20778 * aot.c: Set verbosity back to 0.
20780 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
20782 * regalloc.c: complete memory leak fix by Laurent Morichetti
20785 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
20787 * driver.c (main_thread_handler): Revert the previous patch.
20789 * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
20792 * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
20793 memory from the memory pool.
20795 * driver.c (main_thread_handler): Turn on all optimizations when
20798 * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
20799 an array for better performance.
20801 * regalloc.c (mono_regstate_assign): Fix memory leak.
20803 * debug-mini.c (mono_debug_serialize_debug_info): New function to
20804 serialize the debug info.
20806 * debug-mini.c (mono_debug_add_aot_method): New function to load the
20807 debug info from the serialized representation.
20809 * aot.c: Save debug info into the generated file and load it when
20812 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
20814 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
20816 * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
20817 More FP-related fixes.
20819 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
20821 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
20822 and register allocation buglet. Hello world now runs.
20824 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
20826 * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
20827 * tramp-ppc.c: fixed class init trampoline.
20828 * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
20830 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
20832 * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
20833 mini.c: more ppc changes/fixes.
20835 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
20837 * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
20838 Also optimize the case when the arguments are the same in the caller
20841 * iltests.il: Add tests for tail calls with valuetype arguments.
20843 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
20845 * mini-ppc.c: fixes for struct return type.
20847 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
20849 * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move
20850 mono_spillvar_offset() to arch-specific code.
20852 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
20854 * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
20856 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
20858 * exceptions-x86.c: Fix stack space leaks.
20860 * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
20861 registers from the lmf if the method has save_lmf set.
20863 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
20865 * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
20866 of icall wrappers into InvokeInDomain, since these are now per-domain.
20868 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
20870 * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
20871 make some opcode emulation and intrinsic ops enabled/disabled
20872 according to the architecture. More fixes.
20874 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
20876 * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
20878 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
20880 * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
20881 arch-specific handling for 'this' and struct return type to
20882 arch-specific code.
20884 2003-11-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20886 * aot.c: prevent divide by zero error when reporting (it happened with
20887 Accessibility.dll).
20889 2003-11-25 Zoltan Varga <vargaz@freemail.hu>
20891 * mini.h (inst_switch): Remove unused macro.
20893 2003-11-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20896 (load_aot_module): free 'info->methods' and 'info' properly. No more
20897 "free(): invalid pointer blah" messages when you have an old aot
20900 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
20902 * jit-icalls.c, mini.c: Added support for context static fields.
20904 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
20906 * mini.c (mono_method_blittable): Methods which set LastError are not
20907 blittable either. Fixes #51108.
20909 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
20911 * mini.c: flush icache.
20912 * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
20914 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
20916 * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
20918 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
20920 * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
20923 * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with
20926 * inssel.brg (CEE_MKREFANY): Fix AOT case.
20928 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
20930 * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div
20931 instruction when the result is discarded.
20933 * iltests.il (test_0_div_regalloc): New regression test.
20935 * arrays.cs: Fix compilation error.
20937 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
20939 * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
20940 float rules to inssel-x86.brg: sane architectures with FP registers
20941 don't need to implement these rules.
20943 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
20945 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
20947 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
20949 * mini.h, inssel-long32.brg: fixed endianess issues in int64
20950 implementation of 32 bit systems.
20952 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
20954 * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
20955 (Jeroen Zwartepoorte).
20957 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
20959 * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
20960 the caller and the callee matches.
20962 * mini.c (mono_method_to_ir): Add comment.
20964 * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
20965 signbit is missing on some platforms.
20967 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
20969 * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
20971 * mini.c (setup_jit_tls_data): Call the new function.
20973 * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
20975 * mini-x86.c: Add experimental support for fast access to the lmf
20976 structure under NPTL/Linux 2.6.x.
20978 2003-11-06 Martin Baulig <martin@ximian.com>
20980 * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
20981 `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
20984 2003-11-02 Martin Baulig <martin@ximian.com>
20986 * mini.c (inflate_generic_field): New static method.
20987 (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
20988 generic instance and the field is declared in a generic type, call
20989 inflate_generic_field() to inflate it. Fixes gen-28.cs.
20991 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
20993 * mini.h mini.c (mono_method_same_domain): New function to return
20994 whenever the caller and the callee are in the same domain.
20996 * tramp-x86.c (x86_magic_trampoline): Use the new function.
20998 2003-10-30 Martin Baulig <martin@ximian.com>
21000 * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
21001 similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
21003 (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
21004 MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS().
21006 2003-10-29 Zoltan Varga <vargaz@freemail.hu>
21008 * mini.c mini-ops.h inssel.brg: Implement undeniable exception
21011 * mini.c (sigusr1_signal_handler): Move creation of the thread abort
21012 object here, so it is in the correct appdomain etc.
21014 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
21016 * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
21018 (mono_method_to_ir): Avoid freeing the type created returned from
21019 mono_type_create_from_typespec, since it is put into an internal cache
21020 by the function. Fixes pointer.exe.
21022 * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal
21023 trampolines for icalls and pinvokes as well. Fixes #33569.
21025 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
21027 * mini.c: Update after appdomain changes.
21029 * mini.c (mono_jit_compile_method_inner): Allways compile native
21030 method wrappers in the root domain, since there can only be one
21031 instance of them, whose address is stored in method->info.
21033 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
21035 * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
21036 environment variable. Instead detect automatically whenever running
21037 under valgrind using the magic macro RUNNING_ON_VALGRIND from
21040 2003-10-16 Miguel de Icaza <miguel@ximian.com>
21042 * trace.c, trace.h: New files that implement the new trace option
21045 * driver.c: Document new --trace options.
21047 * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
21050 - if (mono_jit_trace_calls)
21051 + if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
21053 * mini.h: prototypes.
21055 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
21057 * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
21059 * mini.c inssel.brg: Implement typedefbyref opcodes.
21061 * mini.c (mono_jit_compile_method): Remove unused local variable.
21063 * mini.c (mono_jit_compile_method_inner): Ditto.
21065 2003-10-12 Zoltan Varga <vargaz@freemail.hu>
21067 * tramp-x86.c (x86_class_init_trampoline): Fix build.
21069 * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
21071 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
21073 * mini.c (mono_no_aot): Remove unused global variable.
21075 * mini.c: Thread safety fixes.
21077 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
21079 * mini.c (mono_create_class_init_trampoline): Add a lock around
21080 class_init_hash_addr.
21082 * arrays.cs (test_0_newarr_emulation): Add new regression test for
21085 * mini.c: Decompose the NEWARR instruction before decomposing its
21086 arguments. Fixes #30073.
21088 2003-10-08 Zoltan Varga <vargaz@freemail.hu>
21090 * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
21093 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
21095 * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
21097 * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
21099 * driver.c: Add support for compiling icall wrappers to --compile.
21101 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
21103 * inssel.brg: The empty value in class->interface_offsets is -1, not
21106 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
21108 * objects.cs: New test for 'is' operator on an array of interfaces.
21110 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
21112 * tramp-ppc.c: update trampoline code to support jumps
21113 and class initialization.
21115 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
21117 * mini.c (mono_jit_compile_method): Fix reading of freed memory.
21119 * inssel.brg (OP_UNBOXCAST): Fix #46027.
21121 * inssel.brg (OP_UNBOX): Remove unused rule.
21123 * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
21124 region instead of one for each method. Fixes #47813.
21126 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
21128 * exceptions.cs (test_0_nested_finally): New regression test for
21129 nested exception handlers.
21131 * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
21133 * mini.c (mono_method_to_ir): Avoid inlining tail calls.
21135 * mini.c (mono_method_to_ir): Fix tail recursion in the presence of
21138 * mini.c (mono_method_check_inlining): Make the inlining limit
21139 configurable by an environment variable.
21141 * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
21143 * mini.h: Bump AOT file version.
21145 * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a
21146 token, store the image along with the token, since the token might not
21147 refer to the same image as the method containing the relocation,
21148 because of inlining.
21150 2003-09-27 Zoltan Varga <vargaz@freemail.hu>
21152 * mini.c (mono_precompile_assemblies): New function to compile
21153 all methods in all loaded assemblies.
21155 * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
21157 * regalloc.h regalloc.c (MonoRegState): Change the type of
21158 iassign and fassign to int*, since they can contain large negative
21159 values if the register is spilled. Also added some comments. Fixes
21162 * exceptions-x86.c (seh_handler): Fix handling of system exceptions
21163 under Win32. Fixes #42964.
21165 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
21167 * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
21169 * aot.c: Added support for AOT compiling methods which contain calls
21170 to wrappers. Currently, only remoting-invoke-with-check wrappers are
21173 * driver.c (compile_all_methods): Run the compilation in a thread
21174 managed by mono. Fixes #44023.
21176 * mini.c (mono_codegen): Print full method name in verbose output.
21178 * mini-x86.c (mono_arch_patch_code): Fix warning.
21180 * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
21181 jumps, since the method we are jumping to might be domain-specific.
21183 * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
21185 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
21187 * inssel.brg: string chars are unsigned.
21189 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
21191 * TODO: New todo item.
21193 * tramp-x86.c (x86_class_init_trampoline): New trampoline function
21194 which calls mono_runtime_class_init and patches the call site to
21195 avoid further calls.
21196 (mono_arch_create_class_init_trampoline): New arch specific function
21197 to create a class init trampoline.
21198 (create_trampoline_code): Generalized so it can create
21199 class init trampolines as well.
21201 * mini.c (helper_sig_class_init_trampoline): New helper variable.
21202 (mono_create_class_init_trampoline): New function to create and cache
21203 class init trampolines.
21204 (mono_find_class_init_trampoline_by_addr): New function to lookup the
21205 vtable given the address of a class init trampoline. Used by the
21207 (mono_codegen): Generate a call to a trampoline instead of
21208 mono_runtime_class_init in LDSFLD[A].
21209 (mono_codegen): Add relocations for the new trampoline.
21211 * mini.h mini-x86.c aot.c: Added a new relocation type:
21212 MONO_PATCH_INFO_CLASS_INIT.
21214 * mini.h: Bump AOT version number.
21216 * aot.c: Create a copy of the loaded code instead of using the original
21217 so methods which call each other will be close in memory, improving
21220 * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
21221 patch since it breaks the regression tests.
21223 * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
21224 for the register saving instruction sequence since the
21225 frame_state_for function in glibc 2.3.2 don't seem to detect it.
21227 2003-09-14 Zoltan Varga <vargaz@freemail.hu>
21229 * TODO: Fix todo item && remove another.
21231 2003-09-12 Zoltan Varga <vargaz@freemail.hu>
21233 * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
21236 * aot.c: Moved the check for MONO_LASTAOT into the initialization
21237 function of the module.
21239 * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
21240 turning on/off the usage of AOT code. Got rid of mono_no_aot and the
21241 --no-aot command line option.
21243 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
21245 * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
21246 by Bernie Solomon (bernard@ugsolutions.com).
21248 * inssel.brg: Refactor the interface offset table related code into
21249 its separate functions and add support for the AOT case.
21251 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
21253 * aot.c (mono_aot_get_method_inner): Fix memory leak.
21255 * aot.c: Added mono_aot_verbose variable and made all debugging
21256 output depend on the value of this variable.
21258 * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
21259 method_label and info_label.
21261 * mini.h mini-x86.c aot.c: Added a new relocation type
21262 MONO_PATCH_INFO_IID for klass->interface_id.
21264 * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
21265 the MonoJitInfo structure.
21267 * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
21268 a non-root appdomain in shared mode.
21270 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
21272 * aot.c: make aot loader less verbose. Remove free of unused variable.
21274 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
21276 * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
21278 * .cvsignore: Added *.dll.
21280 * mini.c (mono_print_tree_nl): New function callable while debugging.
21282 * mini.c (mono_print_code): Export this.
21284 * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
21287 2003-09-05 Zoltan Varga <vargaz@freemail.hu>
21289 * mini.h (MonoCompile): Added 'jit_info' field.
21291 * mini.c (mini_method_compile): Save the generated MonoJitInfo into
21292 the cfg structure, since it is needed by the AOT compiler.
21294 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
21296 * aot.c: A major rewrite. Changes include:
21297 - save exception tables for methods which have them.
21298 - cache failed lookups in aot_get_method () to avoid the (slow) calls
21299 to g_module_symbol.
21300 - reworked the file format so it is now much smaller and needs
21301 fewer relocation entries.
21303 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
21305 * aot.c (load_aot_module): Fix build bustage on platforms without
21308 2003-09-04 Martin Baulig <martin@ximian.com>
21310 * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
21312 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
21314 * TODO: Some new optimization ideas.
21316 * aot.c: Move AOT module loading logic here from mono_assembly_open.
21318 * aot.c: Save the optimization flags used to compile the code into
21321 * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
21322 support emitting domain specific code.
21324 * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is
21325 no longer domain neutral. It can be made domain neutral by compiling
21326 with --optimize=shared.
21328 * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
21329 between appdomains.
21331 * driver.c mini.h mini.c: New --no-aot debugging option which disables
21332 loading of AOT code.
21334 * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
21336 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
21337 if there is no domain neutrality information.
21339 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
21341 * aot.c (mono_compile_assembly): Emit a symbol containing the file
21342 format version into the generated library.
21344 * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
21345 callee method into the caller since one of them could be shared.
21347 * mini.h mini-x86.c aot.c: Added two new relocations so throwing
21348 system exceptions from AOT code now works.
21350 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling
21351 method if it is domain neutral and the callee is not.
21353 * graph.c (cfg_emit_one_loop_level): Fix warning.
21355 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
21357 * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
21360 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
21362 * mini.c (mini_init): Call mono_marshal_init () explicitly since it
21363 is needed by code which is executed before mono_runtime_init ().
21364 Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
21366 * mini.c (mono_thread_abort): Fix warning.
21367 (mono_jit_compile_method): Call static constructor in the AOT case too.
21369 * aot.c (mono_compile_assembly): Fix warning.
21371 2003-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21373 * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
21375 2003-08-28 Zoltan Varga <vargaz@freemail.hu>
21377 * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
21379 * cpu-pentium.md: Fix the length of call opcodes so they include the
21380 ESP restoring instruction. Fixes #47968.
21382 2003-08-28 Martin Baulig <martin@ximian.com>
21384 * mini-x86.c (mono_arch_call_opcode): Added support for
21385 MONO_TYPE_GENERICINST.
21387 * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.
21389 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
21391 * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
21392 a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
21394 * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
21397 2003-08-26 Martin Baulig <martin@ximian.com>
21399 * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
21400 when reporting an error, set this to the actual error location.
21401 (mono_method_to_ir): Report the correct error location if
21402 get_basic_blocks() returned an error.
21404 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
21406 * mini.c (mono_type_blittable): OBJECT is not blittable.
21407 (mono_method_blittable): Methods which have marshalling descriptors
21408 are not blittable either. Fixes #47842.
21410 2003-08-22 Zoltan Varga <vargaz@freemail.hu>
21412 * driver.c mini.c: Use an environment variable instead of a global
21413 variable. Also fix the build.
21415 * mini.c (mini_init): Call g_thread_init () to make glib thread-safe.
21416 Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
21419 * driver.c mini.c: Added --with-valgrind option to turn off some
21420 code which prevents mono from running under valgrind.
21422 * mini.c (mono_emit_call_args): Fixed warning.
21424 * mini.c (mono_emulate_opcode): Fixed warning.
21426 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21428 * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
21429 * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
21430 regalloc.c, regalloc.h: specify available registers in arch-specific
21431 code and support floats in the regallocator (patch by Laurent Morichetti
21434 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
21436 * mini.c: mono_thread_current() can be called only after
21437 mono_runtime_init(): rearrange code to not call it early on.
21439 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
21441 * mini.c: allocate jump tables in the code mempools.
21443 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21445 * mini.c, mini.h: make sure per-thread data allocated by the jit is
21448 2003-08-10 Miguel de Icaza <miguel@ximian.com>
21450 * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
21451 12 to 16. This fixes bug #47453.
21454 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
21456 * mini-ppc.c: fixed indexed load and unsigned compares.
21458 2003-08-06 Lluis Sanchez Gual <lluis@ximian.com>
21460 * mini.c: reenabled installation of handler for
21461 thread abort signal.
21463 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21465 * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
21466 by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
21467 until it's fixed and actually useful.
21469 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
21471 * inssel-long32.brg: couple more opcodes implemented.
21473 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
21475 * mini-sparc.c: Even more opcodes implemeted.
21477 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
21479 * mini-sparc.c: More opcodes implemented.
21481 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
21483 * mini-sparc.c: More opcodes implemented.
21485 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
21487 * inssel-sparc.brg: Add some needed rules. Direct
21489 * Makefile.am: Use inssel-sparc.brg
21490 * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
21491 an assert happy for now.
21493 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
21495 * mini-sparc.c: Fixed compile errors.
21496 * exceptions-sparc.c: Same. We now produce a mono binary
21497 on sparc-linux. Yea.
21499 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
21501 * mini-sparc.c: Renamed registers. Also some macro cleanups.
21502 * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
21503 They compile, but do not work.
21505 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21507 * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
21508 mini-sparc.h, tramp-sparc.c: Beginning of sparc support
21509 from Mark Crichton <crichton@gimp.org> and Christopher Taylor
21512 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21514 * mini.c: more opcodes implemented and better support for generics.
21516 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
21518 * cpu-g4.md, cpu-pentium.md: updates for new instructions.
21519 * mini.c, mini.h: first cut at generics support: some new instructions
21520 added and changed the behaviour of some of the existing ones.
21522 2003-07-21 Miguel de Icaza <miguel@ximian.com>
21524 * mini.c: Removed definition of metadata_shared mutex here.
21526 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
21528 * mini-x86.c: make vararg calls work for instance methods.
21530 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
21532 * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
21533 returns the arguments in a separte list, now.
21535 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
21537 * aot.c, mini.c: updates for array type representation changes.
21539 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
21541 * mini.c: register function to perform jit shutdown.
21543 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21545 * mini.c: use a faster allocator if possible.
21547 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
21549 * aot.c: some cleanups and portability changes.
21551 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
21553 * mini.c: use faster allocation for CEE_BOX if possible.
21555 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
21557 * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
21558 Moved inlined mempcy code to its own function so that is can be
21559 reused. Added an inline memset function as well (optimized initobj).
21560 * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
21562 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
21564 * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
21566 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
21568 * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
21569 arch code can setup the cpu for CLR execution, if needed.
21570 We use it on x86 to set the precision of FP operations.
21572 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
21574 * mini.c: disable some optimizations if we can guess they'll cost too
21575 much for a given method.
21577 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
21579 * mini.h mini.c: Rework last patch based on suggestions by Paolo.
21581 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
21582 * mini.h mini.c mini-x86.c: Added instruction level coverage
21583 info collection support.
21585 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21587 * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
21588 is now implemented in the profiling API. Get rid of a couple of
21589 unnecessary global variables.
21591 2003-06-15 Nick Drochak <ndrochak@gol.com>
21593 * basic-long.cs: tests for negative values for bigmul, and unsigned.
21594 * cpu-g4.md: add op_bigmul and op_bigmul_un
21595 * cpu_pentium.md: add op_bigmul_un
21596 * inssel-long32.brg: add rule for unsigned bigmul
21597 * mini-ops.h: define OP_BIGMUL_UN
21598 * mini-x86.c: THE BUG: handle (un)signed properly
21599 * mini.c: choose unsigned opcode if needed.
21600 This set of patches fixes bug #44291
21602 2003-06-13 Dietmar Maurer <dietmar@ximian.com>
21604 * mini.c (optimize_branches): improved to handle all kinds of
21605 conditional branches.
21607 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
21609 * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
21610 don't raise exceptions.
21612 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
21614 * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
21615 to arch-specific files.
21617 2003-06-09 Martin Baulig <martin@ximian.com>
21619 * Makefile.am (libs): Added $(LIBGC_LIBS).
21621 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
21623 * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
21624 and OP_ATAN (fixes bug#44293).
21626 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
21628 * Makefile.am, mini-x86.c: rename cpu description array to
21629 pentium_desc, since some compilers define the 'pentium' preprocessor
21632 2003-05-28 Dietmar Maurer <dietmar@ximian.com>
21634 * mini.c (mini_select_instructions): add explicit branch if the
21635 following block is not the false target of a conditional branch -
21636 we need this with any optimization that reorder or remove bblocks
21638 * mini.c (optimize_branches): bug fixes
21640 2003-06-06 Dietmar Maurer <dietmar@ximian.com>
21642 * mini.c (mono_method_to_ir): inline static readonly fields
21644 * ssa.c (fold_tree): start cfold support for long (very simple
21647 * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
21649 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
21651 * inssel.brg: fixed memcpy (bug #44219).
21653 2003-06-05 Dick Porter <dick@ximian.com>
21655 * driver.c: Set the glib log levels to not abort if g_message
21658 g_set_prgname() has to happen before mini_init() so that the
21659 process handle gets the info.
21661 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21663 * driver.c: add intrins to the default optimizations to get wider
21666 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
21668 * mini.h: some large basic blocks will overflow a 16-bit
21669 integers for symbolic registers.
21671 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
21673 * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
21674 (mono_arch_output_basic_block): fix bug 43499
21676 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
21678 * mini.c: kill duplicated definition of mono_debug_format.
21680 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
21682 * mini-x86.c, arrays.cs: fixed register allocation bug.
21684 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
21686 * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
21688 * mini.c (mini_get_opcode_for_method): inline IEEERemainder
21690 2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21693 (print_method_from_ip): also print source location information if
21696 2003-06-02 Dietmar Maurer <dietmar@ximian.com>
21698 * mini.c (mono_find_block_region): bug fix in region code
21699 (mini_method_compile): enable removing unreachable code again, but
21700 only in methods without exception clauses.
21702 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
21704 * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
21705 Implemented arglist opcode and handling of TypedReference type.
21706 Fixed x86 call convention when a structure is returned.
21707 Minimal support for calling static vararg methods.
21709 2003-05-30 Dietmar Maurer <dietmar@ximian.com>
21711 * mini.c (mini_method_compile): always remove unreachable code,
21712 because the code in them may be inconsistent (access to dead
21713 variables for example).
21715 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
21717 * driver.c, debug-mini.c: warning fixes.
21719 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
21721 * Makefile.am, jit.h, mini.h: install header for embedding mono.
21723 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
21725 * mini.c: thread-static fields are registered in mono_class_vtable(),
21726 so ensure the function is called before checking for them.
21728 2003-05-27 Dietmar Maurer <dietmar@ximian.com>
21730 * mini.c (optimize_branches): fix for bug 43586
21732 * jit-icalls.c (mono_llmult_ovf): added an additional check for
21733 overflow (fixes Bug #43639)
21735 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21737 * mini.c, objects.cs: allow the use of stobj for primitive types.
21739 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21741 * mini.c: be less strict about argument checking until we support
21742 running the verifier.
21744 2003-05-27 Nick Drochak <ndrochak@gol.com>
21746 * basic-long.cs: tests for (ulong)int * (ulong)int also
21747 * mini.c: use the same trick for (ulong)int * (ulong)int
21749 2003-05-27 Nick Drochak <ndrochak@gol.com>
21751 * basic-long.cs: add regression test for (long)int * (long)int
21752 * cpu-pentium.md: add op_bigmul specification
21753 * inssel-long32.brg: add OP_BIGMUL rule
21754 * mini-ops.h: add OP_BIGMUL
21755 * mini-x86.c: register allocator: handle case where src1 needs to be
21757 * mini.c: substitute special BIGMUL opcode in the tree for
21758 (long)int * (long)int
21760 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
21762 * jit-icalls.c: call the type ctor on field access if needed.
21764 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
21766 * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
21767 to a method (including results of ldelema, bug#43207).
21769 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
21771 * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
21772 colors to show exception handler blocks.
21774 * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
21775 (fix for pinvoke7.cs).
21777 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21779 * mini.h, mini.c: ensure correct initialization order for types that
21780 require it. Prepare for lazy compilation of jit icall wrappers.
21781 Provide a name for opcode emulation to reduce unneeded mallocing.
21783 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
21785 * mini-x86.c: better register restoring code and profiling
21786 support for tail calls.
21788 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21790 * mini.h, driver.c: prepare for leaf methods optimization.
21792 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
21794 * mini.c: get targets of branches before converting a method.
21796 2003-05-23 Dietmar Maurer <dietmar@ximian.com>
21798 * mini.c (optimize_branches): added some experimental code (disbaled)
21800 2003-05-22 Dietmar Maurer <dietmar@ximian.com>
21802 * mini.c (optimize_branches): fix branch to branch optimization
21804 * exceptions-x86.c (mono_arch_handle_exception): bug fix.
21806 * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
21808 * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
21810 * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
21813 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
21815 * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
21816 enable use of interface variables again.
21818 * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
21819 I1 to registers because there is no simply way to sign extend 8bit
21820 quantities in caller saved registers on x86.
21822 * inssel-float.brg: set costs of some rules to 2 so
21823 that monobure always select the arch. specific ones if supplied,
21824 regardless of the order we pass the files to monoburg.
21826 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
21828 * mini.c, mini-x86.c: since the magic trampoline for jumps
21829 can't patch the code directly, we do it as soon as the
21830 method gets compiled.
21832 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
21834 * mini-x86.c, mini.h: introduce a new patching method
21835 to support CEE_JMP and tail calls.
21836 * mini.c: obey tail.call. Don't precompile methods target
21838 * tramp-x86.c: new trampoline code to handle methods
21839 reached through a jump.
21841 2003-05-20 Dietmar Maurer <dietmar@ximian.com>
21843 * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
21844 bit values to registers
21846 2003-05-19 Dietmar Maurer <dietmar@ximian.com>
21848 * mini.c (mono_compile_get_interface_var): share interface
21849 variables if possible.
21851 2003-05-16 Martin Baulig <martin@ximian.com>
21853 * debug-mini.c (mono_init_debugger): New function to initialize
21854 the debugger. This is not in the debugger since it needs to
21855 access some of mini's internals.
21857 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
21859 * mini.c (mono_method_to_ir): inlining fixes/cleanups
21861 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
21863 * mini.c, mini-opts.h, inssel.brg: inline small memcpy
21864 for value type handling.
21866 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
21868 * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
21869 (mono_method_check_inlining): enable inlining of all kinds of wrappers
21871 2003-05-15 Lluis Sanchez Gual <lluis@ideary.com>
21873 * mini.c: fixed little bug in CEE_NEWOBJ case when calling
21874 the constructor through a proxy.
21876 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
21878 * jit-icalls.c, inssel.brg: fixes to array element address
21881 2003-05-15 Dietmar Maurer <dietmar@ximian.com>
21883 * mini-x86.c (is_regsize_var): allocate pointer to registers
21885 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
21887 * driver.c: fixed typo, added intrins to the set of optimizations
21888 tested with regressions.
21890 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
21892 * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
21893 * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
21896 2003-05-14 Dietmar Maurer <dietmar@ximian.com>
21898 * inssel.brg: remove some common pop instructions without side effects
21900 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
21902 * inssel-x86.brg: fixed thinko in int to double conversions.
21904 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
21906 * mini.c, jit-icalls.c: added runtime thread-static variable support.
21908 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
21910 * inssel-long32.brg: two more missing instructions.
21912 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
21914 * mini.c (mono_emit_call_args): set the cil_code for all arguments
21915 if not already set.
21917 2003-05-12 Zoltan Varga <vargaz@freemail.hu>
21919 * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
21922 * basic-float.cs: Added tests for negative zero.
21924 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
21926 * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
21927 a couple of missing operations for long casts, with test cases.
21929 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21931 * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
21933 2003-05-09 Dietmar Maurer <dietmar@ximian.com>
21935 * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
21936 code size estimation.
21938 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
21940 * mini.c (mono_jit_create_remoting_trampoline): make it work with
21941 abstract methods (fix bug 42542)
21943 * aot.c: add ability to handle array types
21945 2003-05-08 Zoltan Varga <vargaz@freemail.hu>
21947 * mini.c: Call the _specific versions of the object allocation
21948 functions if possible.
21950 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
21952 * driver.c: call setlocale ().
21954 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
21956 * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
21959 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
21961 * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
21963 * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
21964 wrappers (fix bug 42122)
21966 2003-05-04 Martin Baulig <martin@ximian.com>
21968 * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
21970 * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
21971 s/mini_set_defaults/mono_set_defaults/g.
21973 2003-05-04 Martin Baulig <martin@ximian.com>
21975 * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
21977 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21979 * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
21980 (reported by Don Roberts).
21982 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
21984 * mini.c: temporarily work around two bugs for this release.
21986 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21988 * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
21989 that contains -export-dynamic and it makes using the ld script
21991 * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
21993 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
21995 * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
21998 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
22000 * mini.c: make sure leave calls all the needed finally blocks,
22001 even when the target jumps out of multiple exception clauses.
22003 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
22005 * ldscript, Makefile.am: add linker script to reduce the number of
22006 exported symbols (should also fix the issues with libwine defining
22007 some of the same symbols in io-layer).
22009 2003-05-01 Zoltan Varga <vargaz@freemail.hu>
22011 * driver.c (mini_main): Avoid assertion when no file name is given on
22014 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
22016 * driver.c: added --version/-V command line option.
22017 Added the inline optimization in the regression tests.
22019 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
22021 * mini.c, basic-calls.cs: when inlining, save arguments to locals according
22022 to the type in the method signature (fixes bug#42134).
22024 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
22026 * mini.c: when inlining, check this is not null only when needed (bug #42135).
22028 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
22030 * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
22032 2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22034 * driver.c: fixed bug #42100.
22036 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
22038 * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
22040 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
22042 * mini.c: moved most of the code required to do inlining to its own
22043 function so it can be reused. Inline also ctors if appropriate.
22045 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
22047 * Makefile.am: Link with -export-dynamic so shared libs loaded by
22048 the runtime can call mono API functions.
22050 2003-04-27 Martin Baulig <martin@ximian.com>
22052 * debug-mini.c (mono_debug_init_method): Added
22053 `guint32 breakpoint_id' argument; if the method has a breakpoint,
22054 send a notification to the debugger.
22056 * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
22057 running in the Mono Debugger, just pass the breakpoint number to
22058 mono_debug_init_method().
22060 * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
22062 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
22064 * mini.c: allow some more unsafe compares.
22066 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
22068 * mini-x86.c, Makefile.am: make distcheck works (partially from
22069 a patch by Richard Lee <r.h.lee@attbi.com>).
22070 * regset.c, regset.h: removed, they are unused.
22072 2003-04-25 Dick Porter <dick@ximian.com>
22074 * driver.c: Usage reports the name as 'mono' not 'mini'
22075 * exceptions-x86.c: Build and run on freebsd
22077 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
22079 * Makefile.am: install the program with the 'mono' name and
22080 the library as libmono instead of mini and libmini.
22082 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
22084 * driver.c: provide the APIs for the embedding interface of the old jit.
22086 2003-04-23 Dietmar Maurer <dietmar@ximian.com>
22088 * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
22090 2003-04-23 Martin Baulig <martin@ximian.com>
22092 * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
22094 * driver.c: Added `--debug' command line argument to enable
22097 2003-04-23 Martin Baulig <martin@ximian.com>
22099 * debug.[ch]: Removed. The code is now in
22100 ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
22102 * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
22105 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
22107 * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
22109 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22112 (mini_cleanup): moved mono_runtime_cleanup call after the call to
22113 mono_domain_finalize.
22114 (mini_method_compile): use mono_method_profile* if the the option is
22117 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
22119 * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
22120 methods with their wrapper.
22122 * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
22123 methods with their wrapper.
22125 * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
22128 * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
22131 * mini.c (mono_method_check_inlining): Avoid inlining synchronized
22134 2003-04-17 Dietmar Maurer <dietmar@ximian.com>
22136 * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
22138 2003-04-16 Dietmar Maurer <dietmar@ximian.com>
22140 * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
22141 of the mempool. This is slightly faster and uses less memory
22143 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
22145 * mini.c: avoid O(n) allocation for variables.
22147 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
22149 * mini.c: handle items on the stack after inlining methods.
22151 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
22153 * mini.c: make the method->opcode optimization dependent
22154 on MONO_OPT_INSTRINS and do it lazily.
22156 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
22158 * driver.c: print overall results at the end of regression run.
22160 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
22162 * inssel.brg: don't overwrite symbolic registers.
22164 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
22166 * inssel-x86.brg: fix conversion from long to float.
22168 2003-04-11 Dietmar Maurer <dietmar@ximian.com>
22170 * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
22172 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
22174 * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
22176 * driver.c: Added --print-vtable option as in the old JIT.
22178 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
22180 * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
22182 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
22184 * inssel.brg, basic.cs: fixed checked conversions to byte and short.
22186 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
22188 * mini.c regalloc.c regalloc.h: Fix memory leak.
22190 2003-04-09 Dietmar Maurer <dietmar@ximian.com>
22192 * aot.c (mono_aot_get_method): register all used strings
22194 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
22196 * mini.c: always intern strings references with ldstr at compile time.
22198 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
22200 * Makefile.am: add BUILT_SOURCES.
22202 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
22204 * driver.c: give a better error message when the assembly to execute
22205 doesn't have an entry point.
22207 2003-04-07 Dietmar Maurer <dietmar@ximian.com>
22209 * Makefile.am: added hack for automake
22211 * mono/mini/mini.c (mono_save_args): always copy arguments to keep
22214 * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
22216 22003-04-07 Martin Baulig <martin@ximian.com>
22218 * Makefile.am: Added Makefile.am.
22220 * debugger-main.c: Removed, this is now in the debugger where it
22223 * mini.pc.in: Call this package `mini' for the moment.