1 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
3 * exceptions-x86.c: hopefully last change to fix the windows build.
4 This one courtesy of Jonathan Chambers.
6 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
8 * debugger-agent.c: remove unused function.
10 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
12 * debugger-agent.c: add #ifdefs for a few header files.
13 * mini-x86.h: disable the soft debugger in windows.
14 Step 1 of 2 to make this compile on windows with gcc.
16 2009-11-02 Zoltan Varga <vargaz@gmail.com>
18 * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Comment this out for now
19 as it breaks the build.
21 2009-07-01 Zoltan Varga <vargaz@gmail.com>
23 Merge the soft debugger branch.
25 * debugger-agent.h debugger-agent.c: New files containing the soft
28 * method-to-ir.c (mono_method_to_ir): Generate OP_SEQ_POINT opcodes
29 at the appropriate locations.
31 * mini-<ARCH>.c (mono_arch_output_basic_block): Handle OP_SEQ_POINT
34 * mini-<ARCH>.c: Add new arch-specific functions to set/clear breakpoints,
35 enable/disable single stepping.
37 * exceptions-<ARCH>.c (mono_arch_find_jit_info_ext): New stack unwinding api
38 which returns all information in a StackFrameInfo structure, and can handle the
39 LMF frames added by the debugger.
41 * mini-<ARCH>.h (MonoLMFExt): New structure containing additional information
44 * mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): New stack
45 walker function which works on a specific thread and passes a StackFrameInfo
46 structure to its callback.
48 * mini.c (mini_init): Initialize the debugger agent.
50 * aot-compiler.c aot-runtime.c: Add soft-debug support.
52 * mini-ops.h: Add OP_SEQ_POINT opcode.
54 * driver.c (mono_main): Add new '--debugger-agent' option for passing
55 arguments to the debugger agent.
57 2009-11-02 Zoltan Varga <vargaz@gmail.com>
59 * mini.c (mini_method_compile): Disable llvm for methods with an lmf here to
62 * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOCALLOC.
64 * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Implement this for x86.
66 * mini.c (mini_init): Avoid using the IMT trampoline in the LLVM case.
68 * mini-trampolines.c (mono_llvm_vcall_trampoline): Add a static rgctx trampoline
70 (mono_create_llvm_imt_trampoline): New function to create a trampoline which
71 sets the IMT argument and makes a virtual call.
73 * mini-llvm.c: Enable interface calls using the llvm imt trampoline.
75 2009-11-01 Zoltan Varga <vargaz@gmail.com>
77 * Makefile.am (llvm_sources): Enable the llvm option since it no longer breaks
80 2009-10-30 Zoltan Varga <vargaz@gmail.com>
82 * mini.c (mini_cleanup): Call profiler shutdown before shutting down the
83 runtime. Fixes #551228.
85 2009-10-29 Zoltan Varga <vargaz@gmail.com>
87 * mini-x86.c (mono_arch_output_basic_block): Fix % 1. Fixes #550970.
89 * basic.cs: Add a test.
91 * method-to-ir.c (mono_method_to_ir): Use EMIT_NEW_LOAD_MEMBASE_TYPE to
92 load vtypes instead if OP_LOADV_MEMBASE in the implementation of
93 CONSTRAINED. Fixes #550964.
95 * generics.cs: Add a test.
97 2009-10-28 Mark Probst <mark.probst@gmail.com>
99 * mini-posix.c (add_signal_handler): Use
100 mono_gc_get_suspend_signal() instead of GC_get_suspend_signal().
102 2009-10-28 Jerry Maine <crashfourit@gmail.com>
104 Contributed under the terms of the MIT/X11 license by
105 Jerry Maine <crashfourit@gail.com>.
107 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
108 sse4a for simd intrinsics.
110 * mini-amd64.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
111 sse4a for simd intrinsics.
113 2009-10-27 Zoltan Varga <vargaz@gmail.com>
115 * ir-emit.h method-to-ir.c: Change a few _IMM macros to assign to inst_imm
116 instead of inst_p1 which is not the same on ILP32 platforms.
118 2009-10-24 Zoltan Varga <vargaz@gmail.com>
120 * mini-ppc.c (mono_arch_emit_prolog): Load the current got address,
121 not the mscorlib one before calling mono_get_lmf_addr.
123 * tramp-ppc.c (mono_arch_create_trampoline_code_full): Fix the storing
124 of the ip to the LMF.
126 * method-to-ir.c (mono_method_to_ir): Fix the handling of the
127 immediate in the op->op_imm optimization.
129 * mini-ppc.c: Add a 'vtregs' field to ArgInfo to make the code easier to
130 understand. VTypes now work, but are not abi compliant, as they are
131 split into 4 byte parts instead of 8.
132 (emit_memcpy): Fix the unrolled case to work on the PS3.
134 * mini-ppc.c (get_delegate_invoke_impl): Fix this for the PS3.
136 * aot-compiler.c (mono_compile_assembly): Make the autoreg option
137 the default when static linking.
139 * mini-ppc.c (mono_arch_emit_prolog): Fix handling of I8 arguments.
141 * aot-compiler.c: Add an autoreg option to automatically register
142 statically linked aot modules using ELF .ctors.
144 * genmdesc.pl: Add __ppc64__ to allowed defines.
146 2009-10-25 Zoltan Varga <vargaz@gmail.com>
148 * mini-posix.c (add_signal_handler): Delay the GC suspend signal while
149 executing a SIGSEGV handler on an altstack, since libgc can't handle that.
151 2009-10-24 Mark Probst <mark.probst@gmail.com>
153 * exceptions-x86.c (mono_arch_find_jit_info): Fix build.
155 2009-10-24 Zoltan Varga <vargaz@gmail.com>
157 * mini-exceptions.c (mini_jit_info_table_find): Add an 'out_domain' argument
158 which will contain the domain where the method was found.
160 * exceptions-<ARCH>.c mini-exceptions.c: Update callers of
161 mini_jit_info_table_find ().
163 * aot-compiler.c (xdebug_end_emit): Remove so stray debug code.
165 * branch-opts.c (mono_if_conversion): Avoid running deadce if it is disabled.
167 2009-10-22 Zoltan Varga <vargaz@gmail.com>
169 * mini-x86.c (mono_arch_emit_prolog): Disable aot for methods with save_lmf
170 set, its not supported yet.
172 2009-10-22 Zoltan Varga <vargaz@gmail.com>
174 * aot-runtime.c (mono_aot_get_method): Avoid asserting if a array generic
175 iface wrapper is not found.
176 (mono_aot_get_method): Ditto for GetGenericValueImpl.
178 2009-10-21 Zoltan Varga <vargaz@gmail.com>
180 * aot-runtime.c (mono_aot_get_method): Fix support for the IList<T> wrappers,
181 which have a different name.
183 * aot-runtime.c (mono_aot_get_method): Special case the array generic iface
184 wrappers and Array.GetGenericValueImpl ().
186 * aot-compiler.c: Avoid emitting some wrappers which are not needed anymore
187 because of the change above.
189 * generics.cs: Add a test for full aot + generic array ifaces.
191 2009-10-19 Sebastien Pouliot <sebastien@ximian.com>
193 * aot-compiler.c (emit_plt): Remove duplicate 'debug_sym' variable
194 that hides the previous one.
196 2009-10-18 Zoltan Varga <vargaz@gmail.com>
198 * aot-compiler.c (can_marshal_struct): Allow some System.dll structs to be
199 marshalled. Fixes #541623.
201 2009-10-16 Zoltan Varga <vargaz@gmail.com>
203 * aot-compiler.c (emit_extra_methods): Remove some asserts which are not needed.
205 2009-10-15 Zoltan Varga <vargaz@gmail.com>
207 * mini.c (mono_op_imm_to_op): Handle OP_AND/OR/XOR_IMM.
209 2009-10-14 Massimiliano Mantione <massi@ximian.com>
211 * mini-posix.c (sigprof_signal_handler):
212 Implemented support for building stat call chans in different ways.
214 2009-10-14 Massimiliano Mantione <massi@ximian.com>
216 * mini-exceptions.c (mono_find_jit_info):
217 Also check that a jit info has been found (fixes a profiler crash).
219 2009-10-14 Massimiliano Mantione <massi@ximian.com>
221 * mini.c (mono_codegen):
222 Call mono_profiler_code_buffer_new with correct code address.
224 2009-10-14 Zoltan Varga <vargaz@gmail.com>
226 * driver.c (mono_main): Change the date in the copyright.
228 2009-10-14 Mark Probst <mark.probst@gmail.com>
230 * method-to-ir.c (mono_method_to_ir): Don't use a managed array
231 allocator in shared generic code for open classes, because we
232 can't get those classes' vtables. We need to make managed
233 allocators not depend on the vtable at compile-time to solve this.
235 2009-10-13 Martin Baulig <martin@ximian.com>
237 * debug-mini.c (mono_debugger_trampoline_compiled): Add
238 `const guint8 *trampoline' argument; send both the old and the new
241 2009-09-30 Zoltan Varga <vargaz@gmail.com>
243 * aot-compiler.c (add_wrappers): Add a runtime invoke wrapper which is used by
244 mono_runtime_capture_context () without calling mono_runtime_invoke ().
245 (can_marshal_struct): Skip structures with auto layout.
247 * tramp-arm.c (GEN_TRAMP_SIZE): Increase this by 4.
249 2009-10-02 Zoltan Varga <vargaz@gmail.com>
251 * mini-sparc.c (mono_arch_emit_setret): Emit long return values using OP_LMOVE.
252 (mono_arch_create_vars): Instead of allocating a stack slot by hand, allocate
253 a variable to hold the stack slot used by the int<->float conversion opcodes.
255 * mini-sparc.c (mono_arch_build_imt_thunk): Implement support for fail_tramp.
257 2009-10-04 Zoltan Varga <vargaz@gmail.com>
259 * aot-compiler.c (add_generic_class): Only add GetGenericValueImpl wrappers
262 2009-10-06 Zoltan Varga <vargaz@gmail.com>
264 * aot-compiler.c (add_generic_class): Add an instance of GenericComparer<T> for
265 each instance of Comparer<T>.
267 * generics.cs: Add a new test.
269 2009-10-09 Zoltan Varga <vargaz@gmail.com>
271 * driver.c (parse_debug_options): Add a 'gdb' option.
273 * mini.c (mini_parse_debug_options): Add a 'gdb' option.
275 * image-writer.c: Add support for emitting the image into a memory buffer.
277 * dwarfwriter.c: Add support for sharing one IL file between multiple images.
279 * aot-compiler.c: Add support for registering debug info with GDB using the
280 new JIT debugging interface in GDB 7.0. It can be turned on by setting
281 MONO_XDEBUG to 'gdb'.
283 2009-10-10 Zoltan Varga <vargaz@gmail.com>
285 * aot-compiler.c (mono_save_trampoline_xdebug_info): Implement this for the
288 2009-10-11 Zoltan Varga <vargaz@gmail.com>
290 * aot-compiler.c (mono_save_xdebug_info): Emit a symbol for the method which
291 can be used to set breakpoints in gdb.
293 * image-writer.c (bin_writer_emit_writeout): Add support for setting the text
294 segment to an absolute address.
296 2009-10-13 Mark Probst <mark.probst@gmail.com>
298 * method-to-ir.c: Use the managed array allocator method if
301 2009-10-13 Bill Holmes <billholmes54@gmail.com>
303 * aot-compiler.c : Fix the MSVC builds
305 Code is contributed under MIT/X11 license.
307 2009-10-13 Zoltan Varga <vargaz@gmail.com>
309 * aot-compiler.c (mono_save_xdebug_info): Group methods into groups of 10 to
310 avoid registering 1 symbol file per method with gdb.
312 2009-09-29 Zoltan Varga <vargaz@gmail.com>
314 * mini-sparc.c: Fix the handling of enums with base type long.
316 * mini-sparc.c (mono_arch_output_basic_block): Fix IREM_UN_IMM.
318 * mini-sparc.c (mono_arch_allocate_vars): Use mono_class_from_mono_type ()
319 instead of using type->data.klass as the later doesn't work with generics.
321 2009-09-25 Mark Probst <mark.probst@gmail.com>
323 * method-to-ir.c, mini.h, mini-alpha.c, mini-amd64.c, mini-arm.c,
324 mini-hppa.c, mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c,
325 mini-s390x.c, mini-sparc.c, mini-x86.c: Thread.get_CurrentThread
326 works differently now and we don't handle it in the JIT anymore.
328 * mini.c, mini-exceptions.c, mini-posix.c, debug-debugger.c,
329 debug-mini.c, tramp-amd64.c, tramp-x86.c: Changes resulting from
330 the Thread class split.
332 2009-09-25 Zoltan Varga <vargaz@gmail.com>
334 * driver.c: Don't run tests with the obsolete treeprop optimization.
336 * mini-sparc.c (mono_arch_create_vars): Make the component vars of a long ret
337 variable volatile. Fixes #541577.
339 * basic-calls.cs: Add a new test.
341 * basic-long.cs: Remove tests which are now in basic-calls.cs.
343 2009-09-24 Zoltan Varga <vargaz@gmail.com>
345 * dwarfwriter.c (emit_debug_info_end): Disable this as it doesn't seem to
346 work/required with recent iphone sdk versions.
348 * aot-compiler.c (add_wrappers): Generate PtrToStructure wrappers for more
351 * decompose.c (mono_decompose_vtype_opts): Avoid reading uninitialized memory
352 in the VCALL decomposition code.
354 2009-09-22 Zoltan Varga <vargaz@gmail.com>
356 * mini-ia64.c (mono_arch_output_basic_block): Fix ISHR/ISHR_IMM.
358 * basic.cs: Add a test.
360 * mini-ia64.c (mono_arch_build_imt_thunk): Implement support the virtual
363 * mini-exceptions.c (mini_jit_info_table_find): New helper function which
364 searches all the domains of the current thread.
366 * exceptions-<ARCH>.c: Use it. Fixes #539394.
368 2009-09-21 Zoltan Varga <vargaz@gmail.com>
370 * exceptions-arm.c (mono_arm_throw_exception): Set ctx->ebp to fp instead of sp
371 so catching exceptions thrown in the same method works. Fixes exception17.exe.
373 * tramp-arm.c (mono_arch_create_trampoline_code_full): Store NULL into lmf->method
374 for non-jit trampolines.
376 * mini.c (mono_jit_runtime_invoke): Allow string ctors with dyn runtime invoke.
378 * aot-compiler.c (add_wrappers): Ditto.
380 * mini-arm.c: Implement support for passing vtypes and floats, and increase
381 the size of the param area used by dyn_call to 6 which covers the majority of
384 * mini.c aot-compiler.c: Allow dyn_call for string methods except ctors.
386 * mini-arm.c: Implement support for passing/receiving
387 longs and receiving floats in the dyn_call code.
389 * mini-amd64.c: Implement support for receiving vtypes in registers in
392 * mini.c mini-amd64.c: Implement partial support for passing vtypes in
395 2009-09-20 Zoltan Varga <vargaz@gmail.com>
397 * mini-arm.c (get_call_info): Return more precise information in
399 (dyn_call_supported): Use the information in CallInfo.
401 * mini-arm.c: Enable support for returning vtypes in the dyn_call code.
403 * mini.c mini-amd64.c: Enable support for returning vtypes in the dyn_call
406 * mini-arm.c: Update after the dyn_call api changes.
408 * mini.c (mini_create_jit_domain_info): Register a destructor function
409 for the runtime_invoke_hash.
411 * mini-amd64.c (mono_arch_get_dyn_call_args): Rename this to
412 'mono_arch_dyn_call_start'. Pass the pointer to the return value buffer to
414 (mono_arch_get_dyn_call_ret): Rename this to 'mono_arch_dyn_call_finish'.
415 (dyn_call_supported): Simplify this by using get_call_info ().
416 (mono_arch_dyn_call_free): New destructor function.
418 * generics.cs: Remove a printf.
420 * method-to-ir.c (mono_method_to_ir): Allocate some param area for DYN_CALL.
422 * mini-arm.c: Add support for enum return values and passing a few arguments
425 * mini.c (mono_jit_runtime_invoke): Add support for enum return values to
428 * mini-amd64.c (mono_arch_get_dyn_call_ret): Ditto.
430 * aot-compiler.c (add_wrappers): Add a few restrictions for the use of
431 the dynamic invoke wrappers.
433 * mini-arm.c: Implement OP_DYN_CALL for arm.
435 * aot-compiler.c (add_wrappers): Avoid aot-ing runtime invoke wrappers
436 supported by the dynamic runtime invoke wrapper.
438 * aot-compiler.c aot-runtime.c: Add support for encoding the dynamic
439 runtime invoke wrapper.
441 * mini.c (mono_jit_runtime_invoke): Use the dynamic runtime invoke wrappers
442 if possible when running with full-aot.
444 * mini-ops.h: Add OP_DYN_CALL opcode.
446 * mini-amd64.c method-to-ir.c: Add infrastructure for making method calls
447 with dynamic arguments lists similar to libffi.
449 2009-09-19 Zoltan Varga <vargaz@gmail.com>
451 * method-to-ir.c: Fix the previous change on 64 bit platforms.
453 * method-to-ir.c: Applied patch from Rodrigo Kumpera. Allow an i8 argument
456 * iltests.il.in: Add a new test.
458 2009-09-18 Zoltan Varga <vargaz@gmail.com>
460 * aot-compiler.c (add_generic_instances): Add more instances of
461 GenericEqualityComparer.
463 2009-09-18 Rodrigo Kumpera <rkumpera@novell.com>
465 * mini.c: Add asserts for mono_class_vtable calls that are not meant to fail.
467 2009-09-18 Rodrigo Kumpera <rkumpera@novell.com>
469 * method-to-ir.c: Handle failures from mono_class_vtable. Added some
470 comments on some functions that now can fail.
472 2009-09-17 Andrew Jorgensen <ajorgensen@novell.com>
474 * Makefile.am: Add Info.plist to EXTRA_DIST
476 2009-09-16 Zoltan Varga <vargaz@gmail.com>
478 * method-to-ir.c (mono_method_to_ir): Allow AOT for CEE_LDTOKEN in
479 static synchronized wrappers. Fixes #539500.
481 2009-09-14 Rodrigo Kumpera <rkumpera@novell.com>
483 * jit-icalls.c (mono_class_static_field_address): handle vtable failure
486 2009-09-16 Zoltan Varga <vargaz@gmail.com>
488 * mini-exceptions.c (mono_handle_exception_internal): Store the computed
489 lmf before calling filter clauses as well. Fixes #539550.
491 * exceptions.cs: Add a test.
493 2009-09-14 Zoltan Varga <vargaz@gmail.com>
495 * aot-compiler.c (add_generic_class): Add instances of
496 Array.GetGenericValueImpl as well.
498 * Makefile.am (fullaotcheck): Copy and aot more assemblies so linq
501 * generics.cs: Add a fullaot linq test.
503 2009-09-10 Zoltan Varga <vargaz@gmail.com>
505 * aot-compiler.c (arch_emit_static_rgctx_trampoline): Don't clobber argument
508 2009-09-10 Bill Holmes <billholmes54@gmail.com>
510 * mini-trampolines.c (mono_delegate_trampoline) : Call
511 mono_cominterop_get_invoke if the delegate target object
514 Code is contributed under MIT/X11 license.
516 2009-09-09 Sebastien Pouliot <sebastien@ximian.com>
518 * method-to-ir.c: For CoreCLR throw a SecurityException if an
519 internal call is defined outside platform code. Reduce code
520 duplication with existing [Method|Field]AccessException
522 2009-09-08 Rodrigo Kumpera <rkumpera@novell.com>
524 * mini-x86.c (mono_arch_emit_call): Don't reduce stack usage by 4
525 if the return value is a small struct passed on regs.
527 2009-09-09 Zoltan Varga <vargaz@gmail.com>
529 * cpu-arm.md mini-arm.c: Remove unused opcodes.
531 * mini-codegen.c: Enable the cpu description validation for arm.
533 2009-09-08 Zoltan Varga <vargaz@gmail.com>
535 * basic-calls.cs: Move the test_0_float_load_and_store_with_big_offset ()
536 test which depends on structs to objects.cs.
538 * basic-calls.cs: Remove calls to Console.WriteLine and throws, since those
539 require object model related stuff working.
541 * cpu-x86.md mini-x86.c: Remove more unused opcodes.
543 * mini-ops.h: Fix OP_BIGMUL instruction descriptions.
545 * mini-codegen.c (mono_local_regalloc): Validate the cpu description
546 against the instruction metadata in mini-ops.h. amd64 only for now.
548 * mini-ops.h: Fix some instruction descriptions.
550 * mini-ops.h mini-x86.c mini-amd64.c cpu-<ARCH>.md: Remove some
553 2009-09-06 Zoltan Varga <vargaz@gmail.com>
555 * exceptions.cs: Add a new test.
557 2009-09-05 Rodrigo Kumpera <rkumpera@novell.com>
559 * mini-x86.c (needs_stack_frame): OSX requires full frames to keep proper alignment.
561 2009-09-06 Zoltan Varga <vargaz@gmail.com>
563 * mini-llvm.c (mono_llvm_emit_method): Add a few more missing casts,
564 skip empty phi opcodes.
566 * mini-llvm.c (mono_llvm_emit_method): Handle unsigned volatile variables
567 correctly by zero extending after loads. Skip methods containing calls
568 to the monitor enter/exit trampolines.
570 * tramp-x86.c (mono_arch_create_trampoline_code): Align the stack
571 when calling mono_thread_force_interruption_checkpoint ().
573 * mini.c (mini_method_compile): Disable llvm when AOT compiling.
575 * tramp-amd64.c (mono_arch_patch_callsite): Add support for 32 bit ->
577 (mono_arch_nullify_class_init_trampoline): Read 'buf' instead of 'code'.
579 * mini-llvm.c (mono_llvm_emit_method): Add a few missing conversions so a
582 2009-09-04 Zoltan Varga <vargaz@gmail.com>
584 * mini.c (mini_init): Set callbacks.get_runtime_build_info ().
586 2009-09-03 Zoltan Varga <vargaz@gmail.com>
588 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass the start
590 mono_breakpoint_clean_code () when using LLVM as the prologues generated by
591 LLVM might be very short.
593 * mini-x86.c (mono_arch_output_basic_block): Maintain stack alignment
596 * exceptions-x86.c: Rewrite the throw trampolines so they maintain stack
599 2009-09-03 Zoltan Varga <vargaz@gmail.com>
601 * mini-amd64.c (mono_arch_get_vcall_slot): Pass the start of the method to
602 mono_breakpoint_clean_code () when using LLVM as the prologues generated by
603 LLVM might be very short.
605 2009-09-01 Zoltan Varga <vargaz@gmail.com>
607 * exceptions-x86.c (throw_exception): Fix the previous change by substracting
608 the alignment for the value of sp.
610 2009-09-01 Geoff Norton <gnorton@novell.com>
612 * mini.c (mono_get_lmf_addr): Fix jit_thread_attach for native to
613 managed wrappers in full aot.
615 2009-08-31 Zoltan Varga <vargaz@gmail.com>
617 * exceptions-x86.c (get_throw_exception): Align the stack on osx.
619 2009-08-28 Zoltan Varga <vargaz@gmail.com>
621 * mini-llvm-cpp.cpp mini-llvm.c: Update to latest llvm api.
623 2009-08-25 Zoltan Varga <vargaz@gmail.com>
625 * aot-compiler.c (emit_exception_debug_info): Emit ei->flags too.
627 * aot-runtime.c (decode_exception_debug_info): Decode ei->flags from the
630 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
632 * aot-runtime.c aot-compiler.c: Emit exception causes fully so we don't
633 depend on the info MonoMethodHeader which could be missing in IL stripped
636 2009-08-25 Zoltan Varga <vargaz@gmail.com>
638 * mini-arm.c (add_general): Fix the passing of 64 bit values on darwin, where
639 they are only 4 byte aligned.
641 2009-08-21 Zoltan Varga <vargaz@gmail.com>
643 * mini-arm.c (mono_arch_allocate_vars): Use FP as the frame pointer as
644 was done previously, since using SP causes too many problems.
646 * exceptions-arm.c: Fix the handling of sp/fp so unwinding through
647 frames without a frame pointer works.
649 * mini-arm.c (mono_arch_get_global_int_regs): Avoid using V5 as a
650 global register in methods with calls, since the calls can go through
651 a static rgctx trampoline which doesn't save it.
653 2009-08-19 Zoltan Varga <vargaz@gmail.com>
655 * mini-arm.c (mono_arch_context_get_int_reg): Handle SP as well.
657 2009-08-18 Zoltan Varga <vargaz@gmail.com>
659 * aot-compiler.c (add_generic_instances): Fix the net 1.1 build.
661 2009-08-18 Christian Hergert <chris@dronelabs.com>
663 * method-to-ir.c: Fix warnings for uninitialized variables.
665 2009-08-18 Christian Hergert <chris@dronelabs.com>
668 * aot-compiler.c: Fix printf warnings.
670 2009-08-18 Zoltan Varga <vargaz@gmail.com>
672 * aot-compiler.c (add_generic_instances): Add string[] wrapper methods.
673 Add GetGenericValueImpl<string>.
675 * aot-compiler.c (add_generic_instances): Add instances of
676 GenericEqualityComparer<T> for primitive types. Only emit the array
677 wrappers into the mscorlib image.
679 2009-08-15 Zoltan Varga <vargaz@gmail.com>
681 * aot-runtime.c (load_method): Rename 'aot_module' -> 'amodule'. Allocate
682 the methods_loaded array using amodule->info->nmethods.
684 * mini.h (MonoAotFileInfo): Add an 'nmethods' field.
685 (MONO_AOT_FILE_VERSION): Bump this.
687 * aot-compiler.c: Emit more generic instances allowing some parts of linq
690 * aot-runtime.c (mono_aot_get_unwind_info): Handle the case when the
691 MonoJitInfo doesn't belong to its methods aot image.
693 2009-08-14 Zoltan Varga <vargaz@gmail.com>
695 * mini-arm.c (mono_arch_allocate_vars): Use SP as the default frame reg.
697 * mini-arm.c: Fix warnings.
699 * mini-arm.c (mono_arm_emit_load_imm): Only emit a movt if needed.
701 * mini-arm.c (mono_arm_emit_load_imm): Use movt/movw if the cpu
704 2009-08-12 Zoltan Varga <vargaz@gmail.com>
706 * aot-compiler.c (arch_emit_imt_thunk): Rework the arm code to
709 * mini-trampolines.c (mono_magic_trampoline): Allocate a local to
710 hold the trampoline argument, so its initial value is available during
713 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
718 * exceptions-s390x.c:
721 * exceptions-sparc.c:
722 * exceptions-alpha.c:
724 * mini-trampolines.c:
726 * exceptions-s390.c: add and use #define's instead of sizeof()
727 for MonoJitInfo and MonoJitInfoTable.
729 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
734 * tramp-x86.c: use a #define instead of sizeof() for a few
735 structures that use a zero-length array.
737 2009-08-07 Rodrigo Kumpera <rkumpera@novell.com>
739 * method-to-ir.c (mono_method_to_ir/CEE_CONSTRAINED_): Handle the
740 case when the method is dynamic. Fixes #529238.
742 2009-08-06 Zoltan Varga <vargaz@gmail.com>
744 * mini.c (mono_jit_compile_method_inner): Throw an exception instead
745 of asserting when a method is JIT compiled in full-aot mode.
747 2009-08-03 Jerry Maine <crashfourit@gmail.com>
749 Contributed under the terms of the MIT/X11 license by
750 Jerry Maine <crashfourit@gail.com>.
752 * fixed wrong dates in changelog.
754 2009-08-03 Jerry Maine <crashfourit@gmail.com>
756 Contributed under the terms of the MIT/X11 license by
757 Jerry Maine <crashfourit@gail.com>.
759 * basic-simd.cs: added test for packed double square root.
760 * cpu-amd64.md: added opcode info for packed double square root.
761 * cpu-x86.md: added opcode info for packed double square root.
762 * mini-ops.h: added IR opcode for packed double square root.
763 * mini-x86.c: added IR to native translation code for packed double square root.
764 * mini-amd64.c: removed todo for packed double square root.
765 * simd-intrinsics.c: added method to IR opcode converstion for
766 packed double square root.
768 2009-08-03 Jerry Maine <crashfourit@gmail.com>
770 Contributed under the terms of the MIT/X11 license by
771 Jerry Maine <crashfourit@gail.com>.
773 * mini-amd64.c: Added a change to help tell the difference as
774 to what perpose the xmm register is being used--mainly to help
776 * mini-amd64.h: Changed callee regs to use 15 out of 16
777 (one used for special cases) xmm registers for both fp
778 and simd ops. Added define to turn on new feature in the regalloc
779 that allows fp and simd ops to share the xmm regs happily.
780 * codegen.c: Added code to detect for which perpose an xmm reg is
781 being used (fp or simd) and to translate back and forth to the
782 correct logical reg bank (fp or simd) for 'spill load's.
784 2009-08-03 Jerry Maine <crashfourit@gmail.com>
786 Contributed under the terms of the MIT/X11 license by
787 Jerry Maine <crashfourit@gail.com>.
789 * basic-simd.cs: Added tests for stressing the regalloc when running with
790 16 simd regs and when simd and fp ops share the same reg bank.
792 2009-08-01 Mark Probst <mark.probst@gmail.com>
794 * method-to-ir.c (mini_emit_stobj): If we call mono_value_copy()
795 in shared generic code, we might have to look up the class in the
796 RGCTX. If we use the class directly, compute its GC descriptor.
798 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
800 * mini.c (mono_jit_runtime_invoke): Fix a warning.
802 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
804 * mini.c (mono_jit_runtime_invoke): Initialize the class and
805 check for errors. Fixed the case when the class with the Main
808 2009-07-31 Jerry Maine <crashfourit@gmail.com>
810 Contributed under the terms of the MIT/X11 license by
811 Jerry Maine <crashfourit@gail.com>.
813 * cpu-amd64.md: Fixed simple bug in machine discrition file.
815 2009-07-31 Zoltan Varga <vargaz@gmail.com>
817 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_IREM_UN_IMM.
819 2009-08-30 Rodrigo Kumpera <rkumpera@novell.com>
821 * method-to-ir.c: Fix naming of stelem and ldelem.
823 2009-07-30 Zoltan Varga <vargaz@gmail.com>
825 * driver.c (main_thread_handler): Check that the assembly loaded
826 matches the filename when doing AOT.
828 2009-07-30 Mark Probst <mark.probst@gmail.com>
830 * mini.c: get_ip_from_sigctx installer has been removed, so don't
833 * mini-x86.h, mini-amd64.h, mini-ppc.h: UCONTEXT macros moved (to
834 utils/mono-sigcontext.h).
836 * exceptions-amd64.c: Use the UCONTEXT_GREGS macro instead of an
839 2009-07-29 Massimiliano Mantione <massi@ximian.com>
841 * mini.c (mono_codegen):
842 Call profiler hook to keep track of method code buffers.
844 2009-07-27 Mark Probst <mark.probst@gmail.com>
846 * method-to-ir.c: Invoke write barriers for the
847 Interlocked.(Compare)Exchange JIT intrinsics.
849 2009-07-26 Raja R Harinath <harinath@hurrynot.org>
851 * Makefile.am (version.h): Fix issues when built out of tree.
852 Remove some redundant 'grep's piped through 'sed's.
854 Fri Jul 24 17:28:37 CEST 2009 Steven Munroe <munroesj@us.ibm.com>
856 This patch is contributed under the terms of the MIT/X11 license
858 * mini-ppc.c (mono_arch_output_basic_block):
859 (OP_STOREI1_MEMBASE_REG): Handle 32-bit offsets combining addis
860 for bits 32-47 with signed load/store diplacements for bits
861 48-63. Use prefered base/offset order for indexed form.
862 (OP_STOREI2_MEMBASE_REG, OP_STORE_MEMBASE_REG): Same.
863 (OP_LOAD_MEMBASE, OP_LOADI4_MEMBASE, OP_LOADU4_MEMBASE,
864 OP_LOADI1_MEMBASE, OP_LOADU1_MEMBASE, OP_LOADU2_MEMBASE,
865 OP_LOADI2_MEMBASE): Same.
866 (OP_STORER8_MEMBASE_REG, OP_LOADR8_MEMBASE,
867 OP_STORER4_MEMBASE_REG, OP_LOADR4_MEMBASE): Same.
868 (OP_STOREI1_MEMINDEX): Use prefered base/offset order for
870 (OP_STOREI2_MEMINDEX, OP_STORE_MEMINDEX): Same.
871 (OP_LOAD_MEMINDEX, OP_LOADI4_MEMINDEX, OP_LOADU4_MEMINDEX,
872 OP_LOADU2_MEMINDEX, OP_LOADI2_MEMINDEX, OP_LOADU1_MEMINDEX,
873 OP_LOADI1_MEMINDEX): Same
874 (OP_LOADR4_MEMINDEX, OP_LOADR8_MEMINDEX, OP_STORER4_MEMINDEX,
875 OP_STORER8_MEMINDEX): Same
876 (OP_JMP): Use addis/addi sequence for int cfg->stack_usage
878 (mono_arch_emit_prolog): Handle 32-bit offsets combining addis
879 for bits 32-47 with signed load/store diplacements for bits
880 48-63. Use prefered base/offset order for indexed form.
882 Fri Jul 24 16:57:12 CEST 2009 Steven Munroe <munroesj@us.ibm.com>
884 This patch is contributed under the terms of the MIT/X11 license
886 * mini-ppc.c: Define PPC_MOVE_FPR_GPR and PPC_ISA_64.
887 (mono_arch_get_vcall_slot): Fx pointer to int cast warning.
888 (mono_arch_decompose_opts): Make OP_ICONV_TO_R4 and
889 OP_ICONV_TO_R8 decompose conditional on !PPC_ISA_64.
890 (mono_arch_output_basic_block) [OP_JMP]: Use ppc_load32 for
891 cfg->stack_usage to avoid size warnings.
892 (mono_arch_output_basic_block) [__mono_ppc64__]: Replace
893 store/load sequence with mffgpr if PPC_MOVE_FPR_GPR is true.
894 (mono_arch_output_basic_block) [!__mono_ppc64__]: For
895 OP_ICONV_TO_R4 or OP_ICONV_TO_R8 and PPC_ISA_64 use fcfid
897 (mono_arch_emit_prolog): Move mono_emit_unwind_op_def_cfa
898 after code varible is initialized.
899 Add g_assert ppc_is_imm16 for ainfo->offset. Handle
900 ainfo->size == 8 when ainfo->offset !ppc_is_imm16.
901 (mono_arch_emit_epilog):
902 Move Use ppc_load32 for cfg->stack_usage to avoid size
905 2009-07-24 Mark Probst <mark.probst@gmail.com>
907 * method-to-ir.c: The write barrier doesn't do the store anymore,
908 so we have always to emit it. Also, emit the wbarrier after the
911 2009-07-24 Zoltan Varga <vargaz@gmail.com>
913 * mini-arm.c (mono_arch_get_delegate_invoke_impls): Add a trampoline
914 for argument count 3 too.
916 2009-07-23 Zoltan Varga <vargaz@gmail.com>
918 * mini.c (mono_jit_compile_method_with_opt): Add an 'ex' argument to let
919 the caller handle the exceptions.
920 (mono_jit_runtime_invoke): Handle exceptions thrown while compiling the
921 method. Fixes #524498.
923 2009-07-22 Geoff Norton <gnorton@novell.com>
925 * mini-exceptions.c: Fix build on ia64.
927 2009-07-22 Mark Probst <mark.probst@gmail.com>
929 * mini-exceptions.c (ves_icall_get_frame_info): Use write
932 2009-07-21 Zoltan Varga <vargaz@gmail.com>
934 * mini-arm.c (mono_arch_emit_prolog): Fix thread attaching in aot
937 2009-07-20 Zoltan Varga <vargaz@gmail.com>
939 * basic-simd.cs (Main): Pass args to the test driver.
941 2009-07-20 Geoff Norton <gnorton@novell.com>
943 * mini-x86.h: Fix the x86 version guards to use Apple's
944 properly defined macros.
946 2009-07-20 Geoff Norton <gnorton@novell.com>
948 * mini-x86.c: Fix --trace on darwin-x86 and other systems which require
951 2009-07-20 Zoltan Varga <vargaz@gmail.com>
953 * mini.c (mono_jit_runtime_invoke): Speed this up by adding a hash to
954 MonoJitDomainInfo which maps MonoMethod's to a structure containing all
955 the information which is needed for invokes, so only one locking+hash table
958 * aot-compiler.c: Add a 'tool-prefix' option to be used when cross-compiling.
960 * aot-compiler.c (add_generic_instances): Emit instances of
961 GenericComparer<T> for primitive types.
963 2009-07-19 Rodrigo Kumpera <rkumpera@novell.com>
965 * mini-posix.c: Fix linux build.
967 2009-07-19 Geoff Norton <gnorton@novell.com>
969 * mini.h: Add prototypes for mono_runtime_syscall_fork and
970 mono_gdb_render_native_backtraces
971 * mini-darwin.c: Apple's syscall(SYS_fork) is very weird on x86,
972 so we implement the sane semantics to the runtime here
973 (mono_gdb_render_native_backtraces). Apple also uses an ancient gdb
974 so we need to call it differently (mono_gdb_render_native_backtraces)
975 * mini-posix.c: Move the old semantics from mini.c to the prototypes
976 here for default implementations.
977 * mini.c: Refactor mono_handle_native_sigsegv so that we can properly
978 support Apple's weird syscall (SYS_fork) implementation and not busy
979 loop in abort() on native crashes on OSX anymore.
981 2009-07-18 Zoltan Varga <vargaz@gmail.com>
983 * aot-runtime.c (load_method): Change the handling of the
984 MONO_LASTAOT env variable so MONO_LASTAOT=0 means that no aot methods
987 * mini.c (mono_patch_info_equal): Really fix the handling of RGCTX_FETCH.
989 2009-07-17 Zoltan Varga <vargaz@gmail.com>
991 * mini.c (mono_patch_info_equal): Revert the last change for now as it
992 seems to break the aot tests.
994 * mini.c (mono_patch_info_equal): Fix the handling of
995 MONO_PATCH_INFO_RGCTX_FETCH.
997 2009-07-16 Zoltan Varga <vargaz@gmail.com>
999 * unwind.c: Use TARGET_AMD64 instead of __x86_64__.
1001 * mini.c (mono_patch_info_hash): Fix the handling of
1002 MONO_PATCH_INFO_INTERNAL_METHOD.
1003 (mono_patch_info_equal): Ditto.
1005 2009-07-16 Zoltan Varga <vargaz@gmail.com>
1007 * mini-llvm.c (mono_llvm_emit_method): Use module instead of ctx->module
1010 * mini-llvm.c: Add some infrastructure for AOT support.
1012 2009-07-15 Zoltan Varga <vargaz@gmail.com>
1014 * mini-llvm-cpp.c: Update to the latest llvm api.
1016 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Set the EnablePrettyStackTrace
1017 option to false to prevent llvm from installing signal handlers which
1020 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
1023 * cpu-amd64.md: Revert previous change as those instructions
1024 take 2 separate arguments. Remember to read the arch docs more
1025 carefully next time.
1027 2009-07-15 Zoltan Varga <vargaz@gmail.com>
1029 * mini-llvm-cpp.cpp (mono_llvm_build_alloca): Update to latest llvm api.
1031 Wed Jul 15 17:20:27 CEST 2009 Paolo Molaro <lupus@ximian.com>
1033 * mini-ppc.c: exploit multiple load/store units if available (rest of
1034 the change from Steven Munroe (<munroesj@us.ibm.com>) first patch at
1035 http://bugzilla.novell.com/show_bug.cgi?id=487846).
1037 Wed Jul 15 16:24:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
1039 * mini-ppc.c: integrate most of Steven Munroe (<munroesj@us.ibm.com>)
1040 first patch at http://bugzilla.novell.com/show_bug.cgi?id=487846.
1042 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
1044 * cpu-x86.md: Fix missing clobbering from trancendental simd
1047 * cpu-amd64.md: Same.
1049 2009-07-14 Jerry Maine <crashfourit@gmail.com>
1051 Contributed under the terms of the MIT/X11 license by
1052 Jerry Maine <crashfourit@gail.com>.
1054 * basic-simd.cs: Added tests for single and doulble indexers.
1056 * cpu-amd64.md: Added simd opcode information.
1058 * mini-amd64.c: Added IR to native simd generation code.
1059 Added simd register names and function that returns them.
1061 * mini-amd64.h: Added marcos to turn on simd code compilation in
1062 amd64. Added max simd register count marco. Added caller/callee
1063 register mask marcos. Added marcos to use simd register bank.
1065 * mini.h: Added helper marco for shufling dwords and simple
1068 2009-07-14 Zoltan Varga <vargaz@gmail.com>
1070 * mini-llvm-cpp.cpp: Update to latest llvm SVN api.
1072 * Makefile.am (mono_LDADD): Pass LLVM_LDFLAGS to the linked.
1074 * unwind.c (mono_unwind_get_ops_from_fde): Make this return
1075 the length of the native code as well.
1077 * basic-simd.cs: Add a test for #521662.
1079 Mon Jul 13 17:58:50 CEST 2009 Paolo Molaro <lupus@ximian.com>
1081 * mini-ppc.c: fixed bug introduced by Steven's TLS changes.
1083 2009-07-13 Mark Probst <mark.probst@gmail.com>
1085 * mini.c: Register function for getting the IP from a signal
1086 context with metadata.
1088 2009-07-13 Zoltan Varga <vargaz@gmail.com>
1090 * method-to-ir.c (mono_method_to_ir): When calling a gshared method,
1091 call a generic class init trampoline if needed. Fixes #519336.
1093 * generics.cs: Add a test.
1095 2009-07-09 Mark Probst <mark.probst@gmail.com>
1097 * method-to-ir.c: When doing a call which might be remote from
1098 shared generic code to other shared code with open type arguments,
1099 get the remoting invoke wrapper from the RGCTX and do an indirect
1102 2009-07-03 Zoltan Varga <vargaz@gmail.com>
1104 * mini-trampolines.c (get_unbox_trampoline): Add an rgctx trampoline
1105 after the unbox trampoline in the full-aot case.
1107 2009-07-02 jonas echterhoff <jonas@unity3d.com>
1109 * mini.c: Move initialization of jit_mutex before debugger initialization
1114 * Info.plist: added Info.plist and link flag to enable the mono executable
1115 to access other processes. Requires codesigning of the executable to work.
1117 * mdb-debug-info32-darwin.s: The same as mdb-debug-info32.s, changed to
1122 2009-06-30 Zoltan Varga <vargaz@gmail.com>
1124 * driver.c (mini_regression): Handle loading errors. Fixes #508869.
1126 2009-06-29 Zoltan Varga <vargaz@gmail.com>
1128 * mini-exceptions.c (get_generic_context_from_stack_frame): Fix the case
1129 when the generic instance is an instantiation of a subclass of the
1130 methods class. Fixes #517166.
1132 2009-06-26 Zoltan Varga <vargaz@gmail.com>
1134 * mini-amd64.c (mono_arch_emit_prolog): Fix thread attaching in AOTed
1137 * mini.c (mono_jit_thread_attach): Allow domain to be NULL for calls from
1140 * CMakeLists.txt: Add minimal support for installation.
1142 2009-06-25 Zoltan Varga <vargaz@gmail.com>
1144 * aot-compiler.c (emit_and_reloc_code): Factor out the code to
1145 determine whenever a method is directly callable to a separate function.
1147 * mini-<ARCH>.c tramp-<ARCH>.c: Remove needless casts and add new
1148 needed ones as a result of the previous change.
1150 * mini-<ARCH>.c tramp-<ARCH>.c: Use mgreg_t* as the
1151 type of register arrays.
1153 * mini-trampolines.c tramp-<ARCH>.c aot-runtime.c: Use mgreg_t* as the
1154 type of register arrays.
1156 2009-06-24 Jerry Maine <crashfourit@gmail.com>
1158 Contributed under the terms of the MIT/X11 license by
1159 Jerry Maine <crashfourit@gail.com>.
1161 * mini-amd64.c: Added code to convert simd IR to native amd64 sse.
1163 2009-06-24 Zoltan Varga <vargaz@gmail.com>
1165 * aot-compiler.c (emit_plt): Define debug labels for most plt entries.
1167 2009-06-24 Neale Ferguson <neale@sinenomine.net>
1169 * mini-s390x.c: Correct LCONV_TO_Ix and ICONV_TO_Ix routines. Fix leave_method
1170 dump of structure return value. Fix some formatting.
1171 * cpu-s390x.md: Fix lengths of instruction sequences.
1172 * mini-s390.c: Minor formatting changes.
1174 2009-06-24 Zoltan Varga <vargaz@gmail.com>
1176 * mini-x86.h: Applied patch from Romain Tartiere (romain@blogreen.org).
1177 Use sigaction on freebsd as well.
1179 2009-06-23 Zoltan Varga <vargaz@gmail.com>
1181 * mini.h: Don't define MONO_ARCH_HAVE_TLS_GET to 0, as some code
1184 * mini.c (mini_init): Revert a change which breaks cross-compilation.
1186 2009-06-22 Mark Probst <mark.probst@gmail.com>
1188 * mini-ppc.c, cpu-ppc.md: Enable TLS on Darwin/G4.
1190 2009-06-22 Mark Probst <mark.probst@gmail.com>
1192 * mini.c, mini.h: Tell the runtime whether we support MONO_TLS.
1194 2009-06-20 Martin Baulig <martin@ximian.com>
1197 (MonoDebuggerThreadFlags): New enum typedef.
1198 (MonoDebuggerThreadInfo): Added `guint32 thread_flags'.
1199 (mono_debugger_thread_created): Added `gpointer func' argument;
1200 initialize the new `thread_flags' field.
1202 2009-06-18 Martin Baulig <martin@ximian.com>
1204 * debug-debugger.h (MonoDebuggerRuntimeFlags): New enum typedef.
1205 (MonoDebuggerInfo): Renamed the `dummy' field info `runtime_info'.
1208 (mini_debugger_set_attach_ok): New function; sets the attach-ok
1209 flag in `MONO_DEBUGGER__info.runtime_info'.
1212 (mono_main): Call mini_debugger_set_attach_ok() if generics
1213 sharing is disabled.
1215 2009-06-22 Zoltan Varga <vargaz@gmail.com>
1217 * aot-compiler.c (add_wrappers): Fix a warning.
1219 * mini-ppc.c tramp-ppc.c exceptions-ppc.c aot-compiler.c: Update after
1220 the ppc load/store macro changes.
1222 2009-06-21 Zoltan Varga <vargaz@gmail.com>
1224 * tramp-ppc.c (mono_arch_patch_plt_entry): Implement this.
1226 * aot-compiler.c (mono_compile_assembly): Sanitize the plt symbol too,
1227 not just the got symbol.
1229 * mini-ppc.c aot-compiler.c unwind.c: Implement generation of unwind info
1232 * aot-compiler.c unwind.c: Add infrastructure for unwind support on
1235 * aot-compiler.c: Remove some fixmes.
1237 * driver.c (mono_main): Print a helpful message when cross-compiling.
1239 * mini.c (mini_init): Disable signal handlers when cross-compiling.
1241 * method-to-ir.c (initialize_array_data): Do the optimization if the
1242 target byte order is little endian, instead of the host byte order.
1244 * aot-compiler.c: Emit sizes for most symbols, only emit runtime-invoke
1245 wrappers into the mscorlib image, Emit a unique plt symbol for each
1246 image, emit symbols for plt entries.
1248 * image-writer.c (img_writer_emit_symbol_size): New function to emit
1251 2009-06-20 Zoltan Varga <vargaz@gmail.com>
1253 * aot-compiler.c (add_wrappers): Avoid calling
1254 mono_marshal_get_type_info () since it can assert for some types.
1256 * method-to-ir.c (mono_method_to_ir): Disable aot when some forms of
1257 ldtoken are used inside wrappers.
1259 * helpers.c: Add support for prefixing tools with the arch name.
1261 * mini.h (OP_LOADR_MEMBASE): New opcodes to load/store pointer sized
1262 quantities when using ilp32.
1264 * mini-codegen.c: Use OP_LOADR_MEMBASE/OP_STORER_MEMBASE for loading/storing
1265 spill slots. Use sizeof(mgreg_t) for the spill slot size.
1267 * image-writer.c: Use .long on ilp32.
1269 * aot-compiler.c: Use 32 bit loads on ilp32.
1271 2009-06-19 Zoltan Varga <vargaz@gmail.com>
1273 * tramp-ppc.c (mono_arch_create_trampoline_code): Fix the ppc build.
1275 * mini-ops.h: Use TARGET_POWERPC define for consistency.
1277 * patch-info.h: Add 'MSCORLIB_GOT_ADDR' patch type.
1279 * aot-compiler.c aot-runtime.c: Put the mscorlib got address into the
1280 second got slot of every aot image.
1282 * aot-compiler.c aot-runtime.c mini-trampolines.c: Add support for
1283 aot on platforms with function pointers.
1285 * mini-ppc.h mini-ppp.c cpu-ppc.md exceptions-ppc.c tramp-ppc.c: Add
1286 support for aot/full aot on ppc/ppc64.
1288 * tramp-<ARCH>.c (mono_arch_patch_plt_entry): Add 'got' and 'regs'
1289 arguments which are needed on ppc.
1291 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Add 'regs'
1294 * mini-trampolines.c aot-runtime.c: Update after the above changes.
1296 * liveness.c (BITS_PER_CHUNK): Use MONO_BITSET_BITS_PER_CHUNK.
1298 * regalloc2.c (BITS_PER_CHUNK): Ditto.
1300 * aot-compiler.c (emit_got_info): Fix reading unused memory.
1302 * ir-emit.h (alloc_dreg): Add a 'return -1' to quiet some compilers.
1304 2009-06-17 Geoff Norton <gnorton@novell.com>
1306 * aot-compiler.c: Ensure we dont try to close a null dwarf writer.
1308 2009-06-17 Zoltan Varga <vargaz@gmail.com>
1310 * dwarfwriter.c (mono_dwarf_writer_create): Add an 'appending' parameter
1311 to control whenever the dwarf writer is in xdebug or aot mode.
1312 (emit_class_dwarf_info): Use a separate abbrev for structures without
1315 * aot-compiler.c: Pass the appending parameter to
1316 mono_dwarf_writer_create ().
1318 * branch-opts.c (mono_merge_basic_blocks): Fix the case when bbn
1319 falls through to its next bblock. Fixes #513931.
1321 * iltests.il: Add a test.
1323 * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Emit some line number
1324 infor even if emit_line is FALSE, as the apple linker seems to require it.
1326 * image-writer.c (asm_writer_emit_symbol_diff): Call get_label ().
1328 * dwarfwriter.c (emit_cie): Emit a separate symbol for the cie start, as
1332 2009-06-15 Zoltan Varga <vargaz@gmail.com>
1334 * exceptions-mips.c (mono_arch_get_throw_exception_by_name): Fix the
1337 2009-06-13 Zoltan Varga <vargaz@gmail.com>
1339 * mini.h (struct MonoBasicBlock): Add 'has_jump_table' and
1340 'has_call_handler' fields.
1342 * method-to-ir.c (mono_method_to_ir): Set them if needed.
1344 * branch-opts.c (mono_merge_basic_blocks): Avoid iterating through the
1345 first bblock if not needed. Fixes #512790.
1347 2009-06-11 Zoltan Varga <vargaz@gmail.com>
1349 * aot-compiler.c (mono_compile_assembly): Fix a warning.
1351 * aot-compiler.c (add_wrappers): Don't emit remoting-invoke-with-check
1354 * aot-runtime.c (mono_aot_get_method): Use the original method's code for
1355 remoting-invoke-with-check wrappers, which are not needed when running with
1356 full-aot, since it doesn't support remoting.
1358 2009-06-10 Zoltan Varga <vargaz@gmail.com>
1360 * aot-compiler.c (emit_got_info): Don't emit offsets for the plt got entries.
1362 * aot-compiler.c aot-runtime.c: Don't emit the first got offset in the
1363 method info, it is not used anymore.
1365 * mini.h: Bump AOT file format version.
1367 * aot-compiler.c (arch_emit_plt_entry): Make the arm plt entries one
1370 * aot-runtime.c (mono_aot_get_plt_info_offset): Update after the
1373 * tramp-arm.c (mono_arch_patch_plt_entry): Ditto.
1375 * mini.h: Bump AOT file format version.
1377 2009-06-10 Zoltan Varga <vargaz@gmail.com>
1379 * image-writer.c (asm_writer_emit_symbol_diff): Disable the
1380 TARGET_ASM_APPLE stuff for now, as it doesn't seem to work on the
1383 * mini-arm.c (mono_arch_output_basic_block): Fix the implementation
1384 of CKFINITE and FBGE for VFP.
1386 2009-06-09 Zoltan Varga <vargaz@gmail.com>
1388 * aot-compiler.c: Don't align code to 16 bytes on arm.
1390 * aot-compiler.c (emit_method_code): Emit the unbox trampolines right
1391 before the methods they belong to.
1393 * aot-runtime.c (mono_aot_plt_resolve): Avoid creating trampolines in
1394 the full-aot case if possible, since the trampoline will be called right
1397 * aot-compiler.c (mono_compile_assembly): Decrease the number of full aot
1398 trampolines to 1024 after the change above.
1400 * aot-compiler.c (arch_emit_specific_trampoline): Rework the arm
1401 trampoline to save 8 bytes per trampoline.
1403 * tramp-arm.c (mono_arch_create_trampoline_code_full): Update after the
1406 2009-06-08 Zoltan Varga <vargaz@gmail.com>
1408 * aot-compiler.c: Use acfg->temp_prefix instead of .L to prefix labels.
1410 2009-06-08 Martin Baulig <martin@ximian.com>
1413 (MonoDebuggerExceptionAction): Moved into debug-mini.h.
1414 (_mono_debugger_throw_exception): Don't make this static.
1415 (_mono_debugger_unhandled_exception): Likewise.
1416 (mono_debugger_handle_exception): Moved to mini-exceptions.c
1419 (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
1420 (_mono_debugger_throw_exception): Add function prototype.
1421 (_mono_debugger_unhandled_exception): Likewise.
1424 (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
1425 arg; return the first exception handler if the exception is caught
1426 and we're running inside the debugger.
1427 (mono_debugger_handle_exception): Moved here from debug-mini.c;
1428 improve exception handle inside runtime-invoke, check whether the
1429 exception is actually caught in the method being invoked and not
1430 by the runtime-invoke-wrapper.
1432 2009-06-08 Zoltan Varga <vargaz@gmail.com>
1434 * image-writer.c: Improve support for the osx assembler.
1436 * dwarfwriter.c: Avoid the usage of subsections if the assembler doesn't
1439 2009-06-08 Martin Baulig <martin@ximian.com>
1442 (MonoDebuggerExceptionAction): Moved into debug-mini.h.
1443 (_mono_debugger_throw_exception): Don't make this static.
1444 (_mono_debugger_unhandled_exception): Likewise.
1445 (mono_debugger_handle_exception): Moved to mini-exceptions.c
1448 (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
1449 (_mono_debugger_throw_exception): Add function prototype.
1450 (_mono_debugger_unhandled_exception): Likewise.
1453 (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
1454 arg; return the first exception handler if the exception is caught
1455 and we're running inside the debugger.
1456 (mono_debugger_handle_exception): Moved here from debug-mini.c;
1457 improve exception handle inside runtime-invoke, check whether the
1458 exception is actually caught in the method being invoked and not
1459 by the runtime-invoke-wrapper.
1461 2009-06-07 Zoltan Varga <vargaz@gmail.com>
1463 * image-writer.c (append_subsection): Don't align subsections of the
1464 debug_line section as a workaround.
1466 * dwarfwriter.c: Emit line number info in the AOT case as well.
1468 2009-06-06 Steven Munroe <munroesj@us.ibm.com>
1470 This patch is contributed under the terms of the MIT/X11 license
1472 * mini-ppc.c (mono_arch_emit_exceptions): Change assert to
1473 code_len <= code_size
1475 2009-06-06 Zoltan Varga <vargaz@gmail.com>
1477 * mini-mips.c (mips_emit_exc_by_name): Fix the mips build.
1479 2009-06-04 Zoltan Varga <vargaz@gmail.com>
1481 * aot-compiler.c aot-runtime.c: Delete references to static rgctx
1482 invoke wrappers, we now use trampolines instead.
1484 2009-06-04 Mark Probst <mark.probst@gmail.com>
1486 * mini-darwin.c: The exception thread must not be registered with
1489 2009-06-04 Mark Probst <mark.probst@gmail.com>
1491 * mini-gc.c: Disable the code because it makes SGen crash.
1493 2009-06-03 Zoltan Varga <vargaz@gmail.com>
1495 * aot-compiler.c (mono_compile_assembly): Handle file open errors gracefully
1496 instead of asserting.
1498 2009-05-31 Zoltan Varga <vargaz@gmail.com>
1500 * aot-compiler.c (mono_compile_assembly): Move the creation of the
1501 output file after the code has been compiled.
1503 2009-05-30 Zoltan Varga <vargaz@gmail.com>
1505 * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Fix 64 bit support.
1507 2009-05-31 Zoltan Varga <vargaz@gmail.com>
1509 * aot-compiler.c aot-runtime.c: Get rid of the shared/non-shared got
1510 entries distinction to simplify the code.
1512 * mini.h: Bump AOT file format version.
1514 2009-05-28 Zoltan Varga <vargaz@gmail.com>
1516 * objects.cs: Fix the signature of one of the tests.
1518 * mini.c (mini_create_ftnptr): New helper function, moved here from
1520 (mini_get_addr_from_ftnptr): Ditto.
1521 (mini_init): Install the new helpers.
1523 2009-05-28 Martin Baulig <martin@ximian.com>
1525 Correctly initialize the debugger when embedding Mono.
1527 * mdb-debug-info32.s, mdb-debug-info64.s: Add a global variable
1528 `MONO_DEBUGGER__using_debugger' to the `.mdb_debug_info' section;
1529 see documentation in mini_debug_running_inside_mdb().
1532 (mini_debug_running_inside_mdb): New function to check whether
1533 we're running inside mdb.
1535 * mini.c (mini_init): Call mini_debugger_init() if we're running
1536 inside the debugger.
1538 * driver.c (mono_main): Moved the call to mini_debugger_init()
1539 into mini_init() to make this work when embedding Mono.
1541 * debug-debugger.c (mini_debugger_init): Warn about duplicate
1542 calls to mini_debugger_init().
1544 * mini.h: Rename mono_debugger_init() -> mini_debugger_init(),
1545 mono_debugger_main() -> mini_debugger_main() and put them inside a
1546 `MONO_DEBUGGER_SUPPORTED' conditional.
1548 2009-05-26 Rodrigo Kumpera <rkumpera@novell.com>
1550 * mini-trampolines.c: Kill mono_find_delegate_trampoline_by_addr as
1551 this is no longer in use.
1554 2009-05-26 Zoltan Varga <vargaz@gmail.com>
1556 * mini-sparc.c (add_outarg_load): Fix the sparc build.
1558 * aot-compiler.c (emit_method_code): Always write out C style symbols for
1561 2009-05-27 Martin Baulig <martin@ximian.com>
1563 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
1565 * mini-x86.c (mono_arch_output_basic_block): Fix the precision of
1566 long_conv_to_r_un to 64 bits.
1568 * cpu-x86.md: Increase the instruction size due to the changes.
1570 * iltests.il.in: Add regression test.
1574 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
1576 * objects.cs: Move the previous test from basic.cs to here.
1578 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
1580 * basic.cs: Add regression test for #506915.
1582 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
1584 * method-to-ir.c (mono_method_to_ir): When doing the ldobj+stobj
1585 optimization we must check the bb of the first byte of stobj as
1586 it's the only one set in cil_offset_to_bb.
1590 2009-05-25 Zoltan Varga <vargaz@gmail.com>
1592 * image-writer.c: Fix pointer directive on ppc64.
1594 2009-05-24 Zoltan Varga <vargaz@gmail.com>
1596 * image-writer.c (asm_writer_emit_section_change): Avoid using
1597 .bss subsections on ppc too.
1599 2009-05-23 Zoltan Varga <vargaz@gmail.com>
1601 * image-writer.c: Fix the definition of TARGET_ASM_....
1603 * image-writer.c: Fix the emission of assembler directives in the last
1606 * mini-ppc.c (mono_arch_emit_exceptions): Increase the size of the
1607 exception throwing code to accomodate ppc64.
1609 * tramp-ppc.c (mono_arch_get_nullified_class_init_trampoline): Increase the
1610 size to work on ppc64 too.
1612 * mini-ppc.h (MonoCompileArch): Enable static rgctx trampolines on ppc64
1615 * image-writer.c: Clean up the #ifdef hell a bit by adding defines for
1616 the assembler dialect instead of using platform specific defines.
1618 2009-05-22 Geoff Norton <gnorton@novell.com>
1620 * mini-arm.c (get_call_info): If a structure is split between the stack
1621 and argument registers, we should not advance the stack pointer by the entire
1622 native size, but just by the amount that spilled.
1624 2009-05-22 Zoltan Varga <vargaz@gmail.com>
1626 * mini-arm.c (get_call_info): Handle structures with alignment requirements
1629 2009-05-21 Zoltan Varga <vargaz@gmail.com>
1631 * aot-compiler.c (emit_extra_methods): Encode direct runtime invoke
1634 * aot-compiler.c (add_extra_method): Fix up the collection of extra
1635 methods so wrapper don't get added twice.
1636 (add_generic_instances): Don't add methods of arrays.
1638 * generics.cs: Mark one test as !FULLAOT.
1640 2009-05-21 Rodrigo Kumpera <rkumpera@novell.com>
1642 * mini-x86.c (emit_move_return_value): Remove unused vars.
1644 2009-05-21 Rodrigo Kumpera <rkumpera@novell.com>
1646 * mini-x86.c (mono_arch_emit_call): The decompose code now supports
1647 decomposing 8 bytes structs into a LCALL.
1649 * mini-x86.c (emit_move_return_value): We no longer push the vtype
1650 pointer for where to store the returned regs.
1652 * decompose.c (mono_decompose_vtype_opts): Fix the comment to properly
1655 Fixes #471747, #471751 and #4734530 (in fact, it's a bunch of dups).
1657 2009-05-20 Miguel de Icaza <miguel@novell.com>
1659 * aot-runtime.c (mono_aot_init): Use g_getenv to work on systems
1662 2009-05-21 Zoltan Varga <vargaz@gmail.com>
1664 * aot-compiler.c (add_wrappers): Add StructureToPtr/PtrToStructure wrappers.
1666 * basic.cs: Move the test_2_cprop_bug () test to generics.cs as it involves
1669 2009-05-20 Rodrigo Kumpera <rkumpera@novell.com>
1671 * local-propagation.c (mono_local_cprop): Avoid local propagation
1672 across paired add/sub if the first instruction dest reg is it's
1673 source reg. For example:
1675 int_add_imm R12 <- R12 [1] clobbers: 1
1676 int_sub_imm R42 <- R12 [1] clobbers: 1
1678 The cprop pass would wrongly const prop + 1 to int_sub_imm which doesn't
1679 maintain the math identify.
1683 2009-05-20 Andreia Gaita <avidigal@novell.com>
1685 * Makefile.am: avoid going on the network just to get the revision,
1688 2009-05-19 Massimiliano Mantione <massi@ximian.com>
1690 Fixed estimate for short branches on amd64 (they were off mark, and
1691 enabling call prolog-epilog instrumentations caused assertions).
1692 * mini.h (struct MonoBasicBlock): added max_length field to hold the
1693 estimate for the maximum length of this basic block.
1695 - mono_arch_emit_prolog: compute max_length for each basic block
1696 (instead of max_offset), and inflate size estimate also for entry bb
1697 in case of code instrumentation.
1698 - mono_arch_output_basic_block: get rid of "cpos" (the current
1699 estimated "position" in the code), and always use "offset" instead,
1700 which is accurate; at the beginning of the function quickly recompute
1701 max_offset for all the remaining blocks, starting from the current
1702 cfg->code_len (which is correct, and not estimated) and using the
1703 estimated block lengths computed previously.
1705 2009-05-17 Zoltan Varga <vargaz@gmail.com>
1707 * exceptions-ppc.c: Remove the caching from the trampoline creation
1708 functions, it is already done in the caller.
1710 * mini-trampolines.c (mono_llvm_vcall_trampoline): Fix the llvm build.
1712 * mini-ppc.h mini-arm.h mini-x86.h mini-amd64.h: Add
1713 MONO_ARCH_GSHARED_SUPPORTED define.
1715 * mini.c (mini_init): Use the MONO_ARCH_GSHARED_SUPPORTED define.
1717 * mini-arm.c mini.c: Get rid of the unused mono_arch_fixup_jinfo ()
1720 2009-05-16 Zoltan Varga <vargaz@gmail.com>
1722 * jit-icalls.c (mono_helper_compile_generic_method): Get rid of the
1723 call to mono_marshal_get_rgctx_invoke ().
1725 * mini.c method-to-ir.c mini-trampolines.c: Get rid of the usage of
1726 mono_marshal_get_static_rgctx_invoke (), all platforms which support
1727 gshared use the static rgctx trampolines now.
1729 * mini.c (mini_init): Call mono_set_generic_sharing_supported () if the
1730 platform supports it.
1732 2009-05-15 Zoltan Varga <vargaz@gmail.com>
1734 * mini-arm.c (mono_arch_allocate_vars): Correctly save R5 when using AOT.
1736 * aot-compiler.c (emit_method_code): Avoid duplicate labels for methods.
1738 2009-05-15 Zoltan Varga <vargaz@gmail.com>
1740 * mini-ppc.c (mono_arch_emit_exceptions): Nullify the processed patches.
1742 * tramp-ppc.c (mono_arch_nullify_class_init_trampoline): Implement this
1745 2009-05-15 Massimiliano Mantione <massi@ximian.com>
1747 Made it possible for mono_arch_instrument_epilog to preserve
1748 argument registers, otherwise instrumenting the "epilogue" before
1749 a tail call would clobber them.
1750 * mini.h: Added "mono_arch_instrument_epilog_full" prototype, which
1751 if like mono_arch_instrument_epilog but with an additional parameter
1752 that states if argument registers must be preserved.
1753 * mini.c: implemented mono_arch_instrument_epilog as a call to
1754 mono_arch_instrument_epilog_full without asking to preserve argument
1755 registers (this makes the existing code work as usual).
1757 - mono_arch_instrument_epilog: add parameter to transform it into
1758 mono_arch_instrument_epilog_full, and preserve argument registers
1760 - mono_arch_output_basic_block, OP_TAILCALL case: call
1761 mono_arch_instrument_epilog_full.
1762 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
1763 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-x86.c:
1764 only transformed mono_arch_instrument_epilog into
1765 mono_arch_instrument_epilog_full.
1767 2009-05-15 Geoff Norton <gnorton@novell.com>
1769 * mini-darwin.c: This works on arm now.
1771 2009-05-14 Geoff Norton <gnorton@novell.com>
1773 * jit.h, driver.c: Allow full-aot to be decided programatically by the
1776 2009-05-15 Zoltan Varga <vargaz@gmail.com>
1778 * aot-compiler.c (emit_method_code): Skip a few more characters in the debug
1781 * mini-trampolines.c (mono_magic_trampoline): Handle static rgctx invoke
1782 wrappers during full aot mode correctly.
1784 * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle shared generic
1787 * aot-compiler.c (mono_aot_method_hash): Use our internal version of
1788 mono_metadata_type_hash ().
1790 2009-05-14 Massimiliano Mantione <massi@ximian.com>
1792 * mini.h, mini-codegen.c, mini-alpha.c, mini-amd64.c, mini-arm.c,
1793 mini-hppa.h, mini-hppa.c, mini-ia64.c, mini-mips.h, mini-mips.c,
1794 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-886.c:
1795 Removed MONO_INST_BRLABEL from the instruction flags, and the
1796 remaining code that used it, because we do not support branches inside
1797 basic blocks (and branch target labels) anymore.
1798 * Makefile.am: As part of the above cleanup, remove reference to
1799 BURG files which don't exist anymore.
1801 2009-05-14 Zoltan Varga <vargaz@gmail.com>
1803 * image-writer.c (asm_writer_emit_local_symbol): Make this a nop on
1806 * mini-mips.c mini-mips.h exceptions-mips.c: Transition the mips backend
1807 to use mono_arch_throw_corlib_exception.
1809 * mini-ppc.c mini-ppc.h exceptions-ppc.c: Use
1810 mono_arch_throw_corlib_exception for throwing corlib exceptions.
1812 * aot-runtime.c (decode_patch): Allocate the data for R4/R8 from the
1815 * mini.c (mono_patch_info_dup_mp): Copy the table of switch targets too.
1817 * aot-compiler.c: Emit a local symbol prefixed with the assembly name
1818 for the got to make debugging easier and to avoid confusing it with the
1821 * aot-compiler.c (emit_method_code): Emit a C style symbol for each
1822 method so a breakpoint can be set when using gdb.
1824 2009-05-13 Zoltan Varga <vargaz@gmail.com>
1826 * aot-compiler.c (mono_aot_method_hash): Implement this properly based
1827 on mono_method_get_imt_slot ().
1829 * aot-runtime.c (find_extra_method_in_amodule): Get rid of the
1830 num_decodes variables.
1832 * aot-compiler.c (mono_aot_method_hash): Revert part of the last
1833 change as it doesn't seem to work.
1835 * aot-compiler.c (mono_aot_method_hash): Improve the hashing of
1838 2009-05-12 Zoltan Varga <vargaz@gmail.com>
1840 * aot-compiler.c mini.c mini-amd64.h mini-arm.h: Kill
1841 MONO_ARCH_FULL_AOT_IMT_SUPPORTED define, both platforms now support imt.
1843 * mini.c (mini_init): Install mono_aot_get_imt_thunk as the IMT thunk
1844 builder when using full aot.
1846 * mini-amd64.c (mono_arch_build_imt_thunk): Don't handle the full-aot case
1847 here, it is already handled.
1849 * mini-arm.c (mono_arch_emit_imt_argument): Pass the dynamic imt arg
1852 * aot-compiler.c (arch_emit_imt_thunk): Implement this for ARM.
1854 * mini-arm.h: Enable IMT for full aot.
1856 * aot-compiler.c (mono_compile_assembly): Don't emit imt thunk if the
1857 arch doesn't support it.
1859 * mini.c (mini_init): Don't disable IMT for full aot if the
1860 architecture supports it.
1862 * mini.h (MonoAotTrampoline): New enum containing the different types
1863 of 'numerous' trampolines.
1864 (MONO_AOT_FILE_VERSION): Bump this.
1866 * aot-compiler.c aot-runtime.c: Unify the handling of specific and
1867 static rgctx trampolines. Add support for full-aot IMT thunks.
1869 * mini-amd64.h: Enable IMT for full aot.
1871 * TestDriver.cs: Add a CategoryAttribute class and an --exclude option
1872 to exclude tests belonging to a category.
1874 * generics.cs: Mark some tests with a !FULLAOT category.
1876 * Makefile.am (fullaotcheck): Run tests with --exclude !FULLAOT. Include
1879 2009-05-11 Zoltan Varga <vargaz@gmail.com>
1881 * aot-compiler.c (emit_and_reloc_code): Move the implementation of
1882 MONO_PATCH_INFO_GOT_OFFSET to a separate arch-specific function.
1883 (emit_plt): Fix a warning.
1885 2009-05-10 Zoltan Varga <vargaz@gmail.com>
1887 * aot-compiler.c aot-runtime.c: Fix the build by moving is_shared_got_patch
1888 back into aot-compiler.c to a place where the other functions shared by
1889 the runtime and aot compiler are.
1891 * aot-compiler.c aot-runtime.c: Emit the got addr using a separate symbol,
1892 as done previously, instead of in MonoAotFileInfo, since pointers might have
1893 alignment requirements.
1895 * mini.h: Bump AOT file format version.
1897 2009-05-10 Miguel de Icaza <miguel@novell.com>
1899 * aot-runtime.c (mono_aot_is_shared_got_patch): Move this routine
1900 that is used at runtime from the aot-compiler.c, this makes it
1901 work on setups that remove the AOT compiler from the output
1904 2009-05-09 Zoltan Varga <vargaz@gmail.com>
1906 * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Implement this for
1909 * mini-ppc.h: Enable static rgctx trampolines for ppc.
1911 * mini-<ARCH>.h: Kill the MONO_ARCH_ENABLE_EMIT_STATE_OPT define.
1913 * decompose.c (mono_decompose_long_opts): Move the ppc/sparc specific
1914 stuff to mono_arch_decompose_long_opts ().
1915 (mono_decompose_opcode): Remove some dead code.
1917 2009-05-08 Rodrigo Kumpera <rkumpera@novell.com>
1919 * method-to-ir.c (mono_method_to_ir): Fix boostrap of non amd64 builds
1920 cmethod can be null for quite a some reasons.
1922 2009-05-08 Rodrigo Kumpera <rkumpera@novell.com>
1924 * method-to-ir.c (mono_method_to_ir): Fix non amd64 builds.
1926 2009-05-08 Zoltan Varga <vargaz@gmail.com>
1928 * aot-compiler.c (arch_emit_got_access): Fix the aot-not-supported build.
1930 2009-05-08 Zoltan Varga <vargaz@gmail.com>
1932 * method-to-ir.c (mono_emit_call_args): Add a 'tail' flag argument.
1933 (mono_method_to_ir): Use MONO_ARCH_USE_OP_TAIL_CALL macro to determine
1934 whenever to make tail calls using OP_TAIL_CALL. Enable support for tail
1935 calls returning structures by addr on amd64.
1937 * mini-amd64.h (MONO_ARCH_USE_OP_TAIL_CALL): New arch-specific macro.
1939 * iltests.il.in: Restructure the tail call tests a bit.
1941 2009-05-07 Zoltan Varga <vargaz@gmail.com>
1943 * aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
1944 for virtual methods too.
1946 2009-05-06 Raja R Harinath <harinath@hurrynot.org>
1948 * method-to-ir.c (mono_method_to_ir): Revert change of 2009-05-02
1949 due to regression in verifying System.dll.
1951 2009-05-06 Zoltan Varga <vargaz@gmail.com>
1953 * debug-mini.c (mono_debugger_method_has_breakpoint): Allow breakpoints
1956 * dwarfwriter.c (emit_class_dwarf_info): Add support for generic
1959 * aot-compiler.c aot-runtime.c: Use our own hash function instead of
1960 g_str_hash () which can change.
1962 * driver.c (mini_regression): Disable optimizations not supported by
1963 the cpu. Fixes #500019.
1965 * aot-runtime.c (mono_aot_get_unwind_info): Fix the --enable-minimal=aot
1968 2009-05-06 Zoltan Varga <vargaz@gmail.com>
1970 * mini-llvm.c (mono_llvm_emit_method): Update the OP_TLS_GET implementation
1971 to the latest LLVM code.
1973 2009-05-05 Zoltan Varga <vargaz@gmail.com>
1975 * genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.
1977 2009-05-04 Zoltan Varga <vargaz@gmail.com>
1979 * mini-llvm.c (mono_llvm_emit_method): Implement TLS support on
1982 * aot-compiler.c (encode_patch_list): Simplify this considerably as we are
1983 no longer saving offsets, so just save the patch types along with the other
1985 * aot-runtime.c (load_patch_info): Update after the changes to
1986 encode_patch_list ().
1987 (decode_got_entry): Removed, merged into load_patch_info ().
1988 (is_shared_got_patch): Removed, call the same function from
1991 * mini.h: Bump aot file format version.
1993 * aot-compiler.c aot-runtime.c: Resurrect static linking support. Kill the
1994 half-finished no-dlsym code.
1996 * aot-runtime.c (load_method): Kill the old and bit-rotten use_loaded_code
1999 * mini-<ARCH>.h mini-trampolines.c aot-runtime.c: Kill the
2000 MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN define.
2002 2009-05-02 Zoltan Varga <vargaz@gmail.com>
2004 * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Increase the
2005 buffer length to work with AOT code.
2007 * method-to-ir.c (mono_method_to_ir): Handle loading errors in the
2008 ldfld/stfld opcodes.
2010 * exceptions-x86.c (mono_arch_get_throw_exception_by_name): Simplify this
2013 * mini-llvm.c mini-x86.c: Implement 32 bit and x86 support.
2015 * ssa.c (mono_ssa_compute): Don't skip I8 values when using LLVM.
2017 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Update to the latest
2020 * mini.c (mini_method_compile): Set the from_llvm flag in MonoJitInfo
2021 if needed. Don't decompose long operations when using llvm.
2023 2009-05-01 Zoltan Varga <vargaz@gmail.com>
2025 * aot-compiler.c aot-runtime.c: Use mono_pagesize () instead of the
2028 * aot-runtime.c (load_aot_module): Get rid of another mprotect call.
2030 2009-05-03 Martin Baulig <martin@ximian.com>
2032 * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
2033 mono_debugger_insert_method_breakpoint() since the class init
2034 handler we're inserting at the top of the method already gives us
2037 2009-04-30 Zoltan Varga <vargaz@gmail.com>
2039 * decompose.c (mono_decompose_long_opts): Move the implementation of LNEG
2040 to mono_arch_decompose_long_opts () for x86 and arm.
2042 2009-04-29 Zoltan Varga <vargaz@gmail.com>
2044 * mini-codegen.c (mono_regstate_alloc_int): Use __x86_64__ instead of
2047 2009-04-28 Zoltan Varga <vargaz@gmail.com>
2049 * *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in the
2052 2009-04-26 Zoltan Varga <vargaz@gmail.com>
2054 * aot-runtime.c (mono_aot_create_specific_trampoline): Add a stat for the
2055 number of trampolines used in full-aot mode.
2057 * aot-compiler.c: Add an ntrampolines option to set the number of
2058 trampolines emitted in full-aot mode.
2060 2009-04-27 Zoltan Varga <vargaz@gmail.com>
2062 * mini-llvm.c (mono_llvm_emit_method): Implement OP_CHECK_THIS using
2063 a volatile load. Get rid of get_tempname (), llvm assigns names
2066 * mini-llvm-cpp.cpp (mono_llvm_build_volatile_load): New instruction
2069 * mini-llvm.c (mono_llvm_emit_method): Don't call LLVMGetParam on
2072 * abcremoval.c (REPORT_ABC_REMOVAL): Don't output messages at verbose
2075 * mini-codegen.c (mono_local_regalloc): Prevent sreg1/dreg to be allocated
2076 to the same register as a fixed sreg2. Fixes #497271.
2078 * iltests.il.in: Add a new test.
2080 2009-04-26 Zoltan Varga <vargaz@gmail.com>
2082 * mini-amd64.c: Use moves instead of pushes for passing arguments on the
2083 stack, since pushes complicate exception handling.
2085 * exceptions-amd64.c (mono_arch_find_jit_info): Don't pop the arguments of
2086 the stack if they are passed using moves.
2088 * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
2090 * method-to-ir.c (mono_method_to_ir): Disable fast virtual generic methods
2093 * mini-llvm.c (mono_llvm_emit_method): Call jit icall wrappers, not the
2094 icalls themselves. Convert arguments of FCOMPARE. Convert the destination
2095 of FMOVE if it is an R4.
2097 2009-04-25 Zoltan Varga <vargaz@gmail.com>
2099 * mini-ops.h: Add OP_LLVM_OUTARG_VT opcode.
2101 * mini.h (LLVMCallInfo): New structure to store calling convention
2102 information for the LLVM back end similar to the CallInfo structures in
2105 * mini-amd64.c (mono_arch_get_llvm_call_info): New arch function to return
2106 call information in a format usable by LLVM.
2107 (mono_arch_emit_call): Move the LLVM handling code to mono_llvm_emit_call ().
2109 * method-to-ir.c (mono_emit_call_args): Emit calls using
2110 mono_llvm_emit_call () when compiling using LLVM.
2112 * mini-llvm.c: Implement support for passing/receiving valuetypes. Add
2113 comments to all functions. Fix memory leaks. Add a public init/cleanup
2116 * mini.c: Call the llvm init/cleanup functions in mini_init()/cleanup().
2118 * method-to-ir.c (handle_array_new): Disable llvm when calling the vararg
2119 mono_array_new_va () jit icall.
2121 Fri Apr 24 16:44:08 CEST 2009 Paolo Molaro <lupus@ximian.com>
2123 * Makefile.am, genmdesc.c, genmdesc.pl: tiny refactor to allow
2124 multiple machine description files to be specified.
2125 * mini-ops.h: fixes for cross-compilation.
2127 2009-04-22 Miguel de Icaza <miguel@novell.com>
2129 * aot-runtime.c (make_writable): Use mono_mprotect to simplify
2132 2009-04-22 Zoltan Varga <vargaz@gmail.com>
2134 * method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
2135 to prevent asserts in various passes. Fixes #497220.
2137 2009-04-21 Zoltan Varga <vargaz@gmail.com>
2139 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove
2142 * aot-compiler.c aot-runtime.c: Emit the unwind info into a separate
2143 table to avoid duplicates.
2145 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2147 * aot-compiler.c (emit_method_code): Avoid writing symbols if the nodebug
2150 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
2152 * mini.c (mini_method_verify): Fail fulltrust code if the exception
2153 is for method or field access.
2155 2009-04-20 Zoltan Varga <vargaz@gmail.com>
2157 * mini-llvm-cpp.cpp (mono_llvm_dump_value): New helper function to print
2160 * mini-llvm.c (mono_llvm_emit_method): Use it.
2162 * mini-llvm.c (type_to_llvm_type): Fix the mapping of enums.
2163 (mono_llvm_emit_method): Add support for CAS. Fix handling of CSET opcodes
2166 * mini-trampolines.c (mono_llvm_vcall_trampoline): Add support for
2167 synchronized methods.
2169 * mini.c (mini_method_compile): Disable LLVM for dynamic methods.
2171 * mini.c (mini_method_compile): Enable ABCREM when running with LLVM.
2173 * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOADI4_MEM/
2176 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add a MONO_LLVM env variable
2177 allowing some options to be set dynamically.
2179 2009-04-19 Zoltan Varga <vargaz@gmail.com>
2181 * mini-llvm.c (mono_llvm_emit_method): Handle compares followed by an
2182 unconditional branch.
2184 * mini.h (MonoTrampolineType): Add new trampoline type
2185 'MONO_TRAMPOLINE_LLVM_VCALL' which handles virtual calls made from LLVM
2188 * mini-trampolines.c (mono_llvm_vcall_trampoline): New C trampoline
2191 * mini-trampolines.c (mono_create_llvm_vcall_trampoline): New trampoline
2194 * mini.c (mini_init): Avoid using the common vtable trampoline when LLVM
2195 is enabled. Instead, use the llvm vcall trampoline.
2197 * mini-trampolines.c (mono_get_vcall_slot_addr): New helper function.
2199 * mini-trampolines.c tramp-amd64.c tramp-x86.c: Use it.
2201 * mini-<ARCH>.c: Get rid of the identical mono_arch_get_vcall_slot_addr ()
2204 * mini-<ARCH>.h mini-trampolines.c mini.c: Get rid of
2205 MONO_ARCH_COMMON_VTABLE_TRAMPOLINE, it is supported by all archs.
2207 * mini-ia64.c (mono_arch_lowering_pass): Null out the sregs of the
2208 OP_IA64_CSET opcode.
2210 * mini.c: Fix a warning.
2212 * mini-llvm.c (mono_llvm_emit_method): Convert arguments of SWITCH and
2213 THROW to the appropriate llvm type.
2215 2009-04-18 Zoltan Varga <vargaz@gmail.com>
2217 * mini.c (mini_method_compile): Add statistics for methods JITted
2220 2009-04-17 Zoltan Varga <vargaz@gmail.com>
2222 * method-to-ir.c: Fix the computation of ins_sreg_counts for ia64
2223 OP_IA64_CMP_<cond>_IMM opcodes.
2225 2009-04-17 Zoltan Varga <vargaz@gmail.com>
2227 * mini-llvm.c (emit_cond_system_exception): Implement throwing of
2230 * dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
2233 * mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
2236 2009-04-17 Atsushi Enomoto <atsushi@ximian.com>
2238 * mini-exceptions.c : add thread id to EXCEPTION trace message.
2240 2009-04-17 Zoltan Varga <vargaz@gmail.com>
2242 * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Fix AOT
2245 * tramp-x86.c (mono_arch_get_unbox_trampoline): Implement static
2246 rgctx invoke trampolines for x86.
2248 * mini-x86.c (mono_arch_output_basic_block): Add a few nops before
2249 indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
2250 (mono_arch_get_vcall_slot): Simplify this.
2252 2009-04-16 Zoltan Varga <vargaz@gmail.com>
2254 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Move the calls to
2255 mono_debug_add_delegate_trampoline () to get_delegate_invoke_impl ().
2257 2009-04-14 Zoltan Varga <vargaz@gmail.com>
2259 * aot-compiler.c tramp-arm.c mini-arm.c: Implement static rgctx
2260 trampolines for ARM. Add full-aot support for delegate invokes for ARM.
2262 * mini-trampolines.c (mono_magic_trampoline): Fix the build.
2264 * liveness.c (visit_bb): Remove a needless assert.
2266 2009-04-13 Zoltan Varga <vargaz@gmail.com>
2268 * mini-trampolines.c (mono_create_delegate_trampoline): Delegate the
2269 full aot support to the arch specific code.
2271 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Add full-aot support.
2273 * aot-compiler.c (emit_trampolines): Emit delegate invoke impl trampolines.
2275 * aot-compiler.c (emit_named_code): Rename this to 'emit_trampoline'.
2277 * mini-amd64.c (mono_arch_get_delegate_invoke_impls): New function to
2278 collect information about the delegate invoke impl trampolines.
2280 * mini.h (MonoAotTrampInfo): New structure collecting the information needed
2281 to save trampolines during full-aot mode.
2283 * mini-trampolines.c (mono_create_static_rgctx_trampoline): New trampoline
2284 creation function which returns a trampoline which sets the rgctx
2286 (mono_magic_trampoline): Use the rgctx trampoline instead of an rgctx
2287 wrapper if possible.
2288 (mono_delegate_trampoline): Ditto.
2290 * mini.c (mono_jit_runtime_invoke): Ditto.
2292 * tramp-amd64.c: Add an implemention of static rgctx trampolines for AMD64.
2294 * aot-compiler.c aot-runtime.c: Add support for static rgctx trampolines.
2296 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2298 2009-04-12 Zoltan Varga <vargaz@gmail.com>
2300 * mini-ia64.c (mono_arch_lowering_pass): Use NULLIFY_INS instead of
2301 just setting the opcode to OP_NOP.
2303 2009-04-11 Zoltan Varga <vargaz@gmail.com>
2305 * mini.c (mini_method_compile): Put the last change inside an
2306 #ifdef MONO_ARCH_HAVE_LIVERANGE_OPS.
2308 * mini.c (mini_method_compile): Disable sharing of stack slots/registers
2309 and extend live ranges to cover the whole method when using xdb.
2311 * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
2312 do it in the trampolines.
2314 * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
2317 * mini-trampolines.c (mono_delegate_trampoline): Ditto.
2319 * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
2320 call code in full-aot mode since IMT is disabled there.
2321 (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
2322 new JIT no longer has that restriction.
2324 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2326 * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
2327 a more compact format.
2328 (mono_aot_wrapper_name): New function to return a unique name for a
2329 wrapper method, also used by the AOT runtime.
2331 * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
2334 * aot-compiler.c (add_generic_class): Add the helper methods from T[]
2335 when a ICollection<T> etc is encountered.
2336 (add_generic_instances): Process method arguments/locals too.
2337 (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
2340 * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
2342 2009-04-10 Zoltan Varga <vargaz@gmail.com>
2344 * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
2346 * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
2348 * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
2349 representing the result of the decomposition. Nullify instructions
2350 instead of setting them to OP_NOP since nops can't have registers
2353 2009-04-09 Zoltan Varga <vargaz@gmail.com>
2355 * aot-compiler.c (mono_compile_assembly): Split this huge function into
2356 smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
2357 info. Strip 'mapping symbols' on ARM.
2359 * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
2361 * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
2362 this with the native genmdesc.
2364 2009-04-08 Bill Holmes <billholmes54@gmail.com>
2366 * aot-runtime.c: Fixing the MSVC build.
2368 Code is contributed under MIT/X11 license.
2370 2009-04-08 Zoltan Varga <vargaz@gmail.com>
2372 * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since
2373 JITted code depends on it.
2375 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
2377 * aot-compiler.c: Use new MonoGenericParam accessors.
2379 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
2381 Reduce memory usage and improve correctness wrt MonoGenericParam
2382 * aot-runtime.c (decode_klass_ref): Simplify generic parameter
2383 handing. Avoid allocating MonoGenericParams, but use the ones in
2384 the container itself.
2386 2009-04-07 Miguel de Icaza <miguel@novell.com>
2388 * tasklets.c: Return exceptions in the out argument.
2390 2009-04-08 Zoltan Varga <vargaz@gmail.com>
2392 * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
2393 opcode. Use pointer types in more places instead of casting them to
2396 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
2398 (mono_llvm_optimize_method): New helper function to optimize a method.
2400 * method-to-ir.c (mono_emit_widen_call_res): Extract the call result
2401 widening code so it could be called from more places.
2402 (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
2403 code paths in the call opcodes.
2405 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
2407 * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
2409 2009-04-06 Zoltan Varga <vargaz@gmail.com>
2411 * dwarfwriter.c: Use _ to separate class name
2412 components as gdb can't handle '.'. Represent reference variables
2415 * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
2417 * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
2419 * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
2421 * gc-test.cs: New file with GC stack marking tests.
2423 * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
2424 negative numbers for vfp.
2426 * basic-float.cs: Add a test.
2428 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
2430 * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
2432 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
2434 * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
2435 part of tasklet/continuation support.
2437 2009-04-05 Zoltan Varga <vargaz@gmail.com>
2439 * mini-llvm.c (mono_llvm_emit_method): Move the handling of
2440 amd64 opcodes inside an ifdef.
2442 * dwarfwriter.c: Emit inheritance information for classes, emit fields
2445 * dwarfwriter.c (emit_type): Emit the class info for classes.
2447 2009-04-04 Zoltan Varga <vargaz@gmail.com>
2449 * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
2451 * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
2453 * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
2455 * ssa.c (mono_ssa_compute): Fix some memory leaks.
2457 2009-04-03 Zoltan Varga <vargaz@gmail.com>
2459 * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
2461 * mini-llvm.c: Update comments.
2463 * mini.h (COMPILE_LLVM): New macro.
2465 * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
2467 * ssa.c (mono_ssa_compute): Ditto.
2469 * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
2470 the unwind ops from a DWARF FDE.
2472 * mini-llvm.c: Implement generation of unwind info for LLVM compiled
2473 methods by extracting the dwarf unwind ops from the unwind info generated
2476 * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
2479 * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
2482 2009-04-02 Zoltan Varga <vargaz@gmail.com>
2484 * Makefile.am (llvm_sources): Enable this.
2486 * mini.c (mini_method_compile): Add support for compiling with LLVM,
2487 failing back to the JIT if something cannot be handled.
2489 * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
2490 compiling with LLVM.
2492 * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
2493 compiling with LLVM.
2495 * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when
2496 compiling with LLVM.
2498 * mini-ops.h: Add a few opcodes needed by LLVM.
2500 * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
2503 * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
2506 * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
2508 * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
2510 2009-04-01 Mark Probst <mark.probst@gmail.com>
2512 * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
2513 ridiculously large methods.
2515 2009-03-31 Martin Baulig <martin@ximian.com>
2517 * debug-debugger.c (debugger_remove_breakpoint): Call
2518 mono_debugger_remove_class_init_callback ().
2520 2009-03-31 Zoltan Varga <vargaz@gmail.com>
2522 * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
2523 right before emitting code, not at the start.
2525 * mini.c (mono_postprocess_patches): Extract this into a separate function
2526 from mono_codegen ().
2528 * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
2529 byref types correctly.
2531 2009-03-30 Zoltan Varga <vargaz@gmail.com>
2533 * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
2536 2009-03-29 Zoltan Varga <vargaz@gmail.com>
2538 * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before
2539 indirect calls, this avoids problems where get_vcall_slot () would get
2540 confused by the native code for the instruction preceeding the call.
2541 (mono_arch_get_vcall_slot): Simplify this.
2542 (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
2544 * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
2545 register allocator now seems to depend on them instead of the data in
2548 * mini.c (mini_method_compile): Throw the correct type of exception if
2549 mono_method_get_header () fails because of a loading error.
2551 2009-03-28 Zoltan Varga <vargaz@gmail.com>
2553 * mini.c (mini_method_compile): Clear the loader error if the method
2554 header cannot be decoded.
2556 * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual
2557 interface methods on proxies correctly.
2559 * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
2560 this argument for vtype methods. Add precise liveness info for arguments.
2562 * mini-codegen.c (mono_print_ins_index): Print the vreg of the
2563 LIVERANGE_START/END opcodes.
2565 * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
2566 for arguments and values in registers.
2568 2009-03-27 Zoltan Varga <vargaz@gmail.com>
2570 * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
2571 return a valuetype. Fixes #487518.
2573 * iltests.il: Add a test.
2575 * aot-compiler.c: Use mono_thread_create () to create helper threads.
2577 * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
2578 closed over a null reference correctly.
2580 2009-03-26 Zoltan Varga <vargaz@gmail.com>
2582 * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
2584 2009-03-25 Mark Probst <mark.probst@gmail.com>
2586 * mini-codegen.c (mono_local_regalloc): Don't let sregs get
2587 allocated to the same registers as fixed sregs.
2589 2009-03-24 Mark Probst <mark.probst@gmail.com>
2591 * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
2594 * method-to-ir.c: Handle more cases for
2595 Interlocked.CompareExchange.
2597 * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
2598 mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
2599 ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
2601 2009-03-23 Zoltan Varga <vargaz@gmail.com>
2603 * aot-runtime.c (decode_method_ref): Fix a warning.
2605 * unwind.c (mono_unwind_frame): Ditto.
2607 2009-03-22 Zoltan Varga <vargaz@gmail.com>
2609 * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
2610 (mono_compile_assembly): Enable the binary writer for full-aot as well.
2612 * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
2613 fix the handling of large values in the ALU_PC_G0_NC relocation.
2615 2009-03-22 Zoltan Varga <vargaz@gmail.com>
2617 * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
2619 2009-03-22 Mark Probst <mark.probst@gmail.com>
2621 * method-to-ir.c (mono_spill_global_vars): Support for ternary
2624 2009-03-22 Mark Probst <mark.probst@gmail.com>
2626 * method-to-ir.c: MINI_OP3 needs a comma.
2628 * method-to-ir.c, mini.h, mini.c: Remove
2629 mono_init_op_sreg_counts ().
2631 2009-03-22 Zoltan Varga <vargaz@gmail.com>
2633 * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
2636 * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
2639 * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
2641 * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
2644 2009-03-21 Mark Probst <mark.probst@gmail.com>
2646 * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
2647 liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
2648 mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
2651 2009-03-20 Zoltan Varga <vargaz@gmail.com>
2653 * driver.c: Change location of gc_wrapper.h.
2655 * method-to-ir.c (mono_find_block_region): Handle try clauses nested
2656 inside finally clauses correctly. Fixes #485721.
2658 * mini.c (mono_find_spvar_for_region): This needs to handle try regions
2659 after the change above.
2661 * exceptions.cs: Add a test.
2663 2009-03-19 Zoltan Varga <vargaz@gmail.com>
2665 * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
2667 * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
2668 into cfg->used_int_regs, it is not needed with the dwarf unwinder.
2669 (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
2671 * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
2672 the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
2674 2009-03-19 Sebastien Pouliot <sebastien@ximian.com>
2676 * method-to-ir.c: Allow CoreCLR to throw FieldAccessException.
2677 Simplify logic for ensure_method_is_allowed_to_call_method.
2678 Handle wrappers on callers.
2680 2009-03-19 Zoltan Varga <vargaz@gmail.com>
2682 * Makefile.am (fullaotcheck): Don't run the generics tests, some of
2685 * basic-simd.cs: Fix the names of some test methods.
2687 2009-03-18 Geoff Norton <gnorton@novell.com>
2689 * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
2691 2009-03-18 Zoltan Varga <vargaz@gmail.com>
2693 * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
2695 2009-03-17 Jb Evain <jbevain@novell.com>
2697 * driver.c: remove now uneeded call to mono_gc_base_init before
2700 2009-03-17 Jb Evain <jbevain@novell.com>
2702 * dwarfwriter.c (token_handler): handle more cases.
2704 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
2706 * method-to-ir.c: Remove more dead code (that was required only
2707 because of method_is_safe). Fix compiler warnings.
2709 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
2711 * method-to-ir.c: Remove unneeded/useless method_is_safe
2712 http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
2714 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
2716 * mini.c (mini_method_compile): Print the method been compiled with
2717 verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
2718 for people not familiar with the runtime.
2720 2009-03-17 Zoltan Varga <vargaz@gmail.com>
2722 * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
2723 a managed object which is later put into a GList. Return its class instead.
2725 * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
2726 stack slots when using sgen.
2728 2009-03-16 Zoltan Varga <vargaz@gmail.com>
2730 * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
2732 2009-03-14 Zoltan Varga <vargaz@gmail.com>
2734 * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
2735 > so it works on the first vreg as well.
2737 2009-03-13 Zoltan Varga <vargaz@gmail.com>
2739 * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
2742 * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
2744 * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
2747 2009-03-12 Zoltan Varga <vargaz@gmail.com>
2749 * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
2750 native->IL offset mapping.
2752 2009-03-11 Zoltan Varga <vargaz@gmail.com>
2754 * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
2756 * basic.cs: Add a test.
2758 2009-03-11 Mark Probst <mark.probst@gmail.com>
2760 * mini-x86.c (mono_arch_output_basic_block): Use different
2761 registers in case the ones we want to overwrite are used by the
2762 other operand. Fixes regression in #480807.
2764 2009-03-10 Zoltan Varga <vargaz@gmail.com>
2766 * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
2768 * dwarfwriter.c (emit_line_number_info): The line number info for
2769 IL code was off by one. Fix that.
2771 * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
2774 2009-03-09 Mark Probst <mark.probst@gmail.com>
2776 Contributed under the terms of the MIT/X11 license by Steven
2777 Munroe <munroesj@us.ibm.com>.
2779 * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
2782 2009-03-08 Zoltan Varga <vargaz@gmail.com>
2784 * dwarfwriter.c (token_handler): Decode method references in non-wrappers
2787 2009-03-06 Zoltan Varga <vargaz@gmail.com>
2789 * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
2790 the delegate ctor handling code. Fixes #482638.
2792 * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
2795 * iltests.il.in: Add a test.
2797 * mini-darwin.c (mono_chain_signal): Remove this, it is already in
2800 2009-03-05 Mark Probst <mark.probst@gmail.com>
2802 * mini-trampolines.c (mono_create_jump_trampoline): If the method
2803 is shared generic code, return the trampoline, even if the method
2804 has already been compiled. Fixes #479763.
2806 * mini.c, mini.h: New function
2807 mono_jit_find_compiled_method_with_jit_info() which is the same as
2808 mono_jit_find_compiled_method() but also returns the jit info.
2810 2009-03-05 Mark Probst <mark.probst@gmail.com>
2812 * method-to-ir.c (mono_method_to_ir): Only force the vtable var
2813 for methods which actually have one. For all other methods, make
2814 sure the this argument var is live the whole method.
2816 * mini.c (mini_method_compile): Every shared method has a
2817 this/vtable/mrgctx info. Fixes #480807.
2819 2009-03-05 Mark Probst <mark.probst@gmail.com>
2821 * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
2822 generic/imt thunks where some entries branch through the vtable,
2823 while other entries branch directly.
2825 2009-03-05 Zoltan Varga <vargaz@gmail.com>
2827 * mini-darwin.c (mono_chain_signal): Define this to fix the build.
2829 * mini-windows.c: Ditto.
2831 * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
2834 2009-03-04 Zoltan Varga <vargaz@gmail.com>
2836 * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
2839 2009-03-04 Mark Probst <mark.probst@gmail.com>
2841 * method-to-ir.c: Don't inline methods that use JMP. Fixes
2844 2009-03-04 Mark Probst <mark.probst@gmail.com>
2846 * exceptions-x86.c: Include debug-mini.h - fixes build.
2848 2009-03-04 Martin Baulig <martin@ximian.com>
2850 * debug-mini.c: Clean up the exception API and add documentation.
2851 (mono_debugger_handle_exception): New public method; this is
2852 called when throwing an exception or encountering an unhandled one.
2853 (mono_debugger_call_exception_handler): Formerly known as
2854 mono_debugger_handle_exception(); this is used to tell the
2855 debugger that we're about to invoke an exception handler.
2857 2009-03-04 Martin Baulig <martin@ximian.com>
2859 * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
2860 ../metadata/mono-debug-debugger.c; save and reset exception state.
2862 2009-03-02 Martin Baulig <martin@ximian.com>
2864 * debug-mini.c: Moved the debugger exception handling here from
2865 ../metadata/mono-debug-debugger.c.
2868 (MonoDebuggerExceptionAction): New exception typedef.
2871 (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
2873 * exceptions-amd64.c
2874 (mono_amd64_throw_exception): Use the new debugger exception
2878 (mono_handle_exception_internal): Don't call
2879 mono_debugger_unhandled_exception() here.
2881 2009-03-03 Zoltan Varga <vargaz@gmail.com>
2883 * mini.c aot-compiler.c: Update after the changes to
2884 mono_marshal_get_runtime_invoke ().
2886 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot):
2887 Virtual generic methods might not have method->slot set, work around
2890 * generics.cs: Add a test.
2892 2009-03-02 Geoff Norton <gnorton@novell.com>
2895 * driver.c: Allow signal chaining of SIGFPE as well.
2897 2009-03-02 Zoltan Varga <vargaz@gmail.com>
2899 * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
2900 this since it now receives the method not its generic context in the
2903 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
2904 generic/imt thunks where some entries branch through the vtable, while
2905 other entries branch directly.
2907 * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
2909 * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call
2910 support for interface methods as well.
2912 * mini-trampolines.c: Add support for virtual generic methods in interfaces
2913 using the normal IMT thunks.
2915 generics.cs: Add new tests.
2917 * method-to-ir.c (mono_method_to_ir): Pass the method instead of
2918 the generic inst to the generic imt thunks. This fixes AOT support,
2919 improves consistency with the normal IMT thunks, and makes it easier to
2920 add support for interface generic virtual methods later.
2922 * mini-trampolines.c (mono_magic_trampoline): Ditto.
2924 2009-02-28 Zoltan Varga <vargaz@gmail.com>
2926 * driver.c (mono_set_signal_chaining): New public API function to enable
2927 signal chaining on POSIX platforms.
2929 * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland
2930 (si@lindenlab.com) to implement signal chaining. The original patch was
2931 contributed under the MIT X/11 license:
2932 https://bugzilla.novell.com/show_bug.cgi?id=318894
2934 2009-02-27 Zoltan Varga <vargaz@gmail.com>
2936 * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
2937 too until it can be made to run on amd64.
2939 2009-02-26 Zoltan Varga <vargaz@gmail.com>
2941 * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
2942 to get_generic_context_from_code () + get_call_info () if possible.
2944 2009-02-25 Zoltan Varga <vargaz@gmail.com>
2946 * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
2947 suspend-on-sigsegv functionality.
2949 * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
2950 to suspend when a native SIGSEGV is received. This is useful for debugging
2951 crashes which don't happen under gdb, since a live process contains more
2952 information than a core file.
2954 * mini-exceptions.c (mono_print_thread_dump): Use
2955 MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
2957 * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
2959 * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
2961 * basic-float.cs: Disable the tests which currently fail on amd64.
2963 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null
2964 value to mono_arch_patch_callsite () to fix crashes.
2966 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
2968 2009-02-23 Zoltan Varga <vargaz@gmail.com>
2970 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
2971 nop code by patching the call address to point to the nullified class init
2972 trampoline, as the former does not seem to be safe on SMP machines.
2974 2009-02-23 Mark Probst <mark.probst@gmail.com>
2976 * mini-ops.h: Fix the argument types for a few x86 opcodes where
2979 2009-02-23 Zoltan Varga <vargaz@gmail.com>
2981 * basic-float.cs basic-calls.cs: Fix warnings.
2983 2009-02-22 Mark Probst <mark.probst@gmail.com>
2985 * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
2986 correct frame pointer in the LMF. Should fix #478394.
2988 2009-02-22 Zoltan Varga <vargaz@gmail.com>
2990 * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
2992 * image-writer.c: Make the binary writer less verbose.
2994 2009-02-21 Zoltan Varga <vargaz@gmail.com>
2996 * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
2997 are called from runtime invoke wrappers.
2999 2009-02-20 Zoltan Varga <vargaz@gmail.com>
3001 * cpu-ppc.md (store_memindex): Increase the size of this.
3003 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
3005 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3007 * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
3009 * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
3012 Last fix for of #467201.
3015 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
3017 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3019 * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
3020 and long_conv_to_r8_2:
3022 Fixed part of #467201.
3024 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
3026 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3028 * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
3029 conversion to 32 bits.
3031 * cpu-x86.md: Increase the size of int_conv_to_r4.
3033 * basic-float.cs: Add a test for this.
3035 Fixed part of #467201.
3037 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
3039 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3041 * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
3042 conversion to 64 bits.
3044 * basic-float.cs: Add a test for this.
3046 Fixed part of #467201.
3048 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
3050 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3052 * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
3053 This behavior is compatible with MS.
3055 * iltest.il.in: Add a test for this.
3057 Fixed part of #467201.
3059 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
3061 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3063 * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
3064 change the precision of the value.
3066 * cpu-x86.md: Define len for float_conv_to_r4.
3068 * basic-float.cs: Add a test for this.
3070 Fixed part of #467201.
3072 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
3074 * mini.c: Adjust locking order to the new semantics where the loader lock
3077 2009-02-18 Rodrigo Kumpera <rkumpera@novell.com>
3086 * mini-trampolines.c:
3099 * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
3101 2009-02-18 Zoltan Varga <vargaz@gmail.com>
3103 * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
3106 2009-02-17 Zoltan Varga <vargaz@gmail.com>
3108 * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
3109 for cctors if needed.
3111 2009-02-17 Mark Probst <mark.probst@gmail.com>
3113 * mini-ppc.c: Fix build on Darwin.
3115 2009-02-17 Zoltan Varga <vargaz@gmail.com>
3117 * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
3118 version instead of 3 as valgrind doesn't like version 3.
3120 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3122 * aot-compiler.c (mono_aot_method_hash): New function to return a hash
3123 usable for hashing methods.
3124 (emit_extra_methods): Use the new hash to avoid putting every method in the
3127 * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
3129 * aot-runtime.c (can_method_ref_match_method): New function to quickly check
3130 whenever a method ref could match a method.
3132 * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
3135 * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded
3138 * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
3140 * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
3141 the encoding buffer.
3143 * method-to-ir.c (mono_method_check_inlining): Avoid calling
3144 mono_method_get_header () on inflated methods as an optimization.
3146 2009-02-16 Zoltan Varga <vargaz@gmail.com>
3148 * ssa.c (fold_ins): Fix another crash if the instruction following the
3149 switch was optimized away.
3151 2009-02-16 Mark Probst <mark.probst@gmail.com>
3153 Contributed under the terms of the MIT/X11 license by Steven
3154 Munroe <munroesj@us.ibm.com>.
3156 * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
3158 2009-02-16 Zoltan Varga <vargaz@gmail.com>
3160 * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
3161 around the mono_domain_alloc calls, it is now done by the functions
3164 * aot-compiler.c (compile_method): Only add wrappers referenced by
3165 the method if compiling with full AOT.
3166 (mono_compile_assembly): Error out if --aot=full is specified on
3167 a platform where it is not supported.
3169 * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
3172 * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
3175 * aot-runtime.c (load_named_code): Handle
3176 mono_arm_throw_exception_by_token.
3178 * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
3180 * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
3183 * Makefile.am (fullaotcheck): Exit if a test fails.
3185 * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
3187 (mono_compile_assembly): Handle the assembler failing.
3189 * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
3190 accepting subsections of .bss.
3192 * ssa.c (visit_inst): Fix a crash if the instruction following a switch
3195 * aot-compiler.c: Remove some unused includes.
3197 * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
3198 now in MonoImageWriter.
3200 * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
3201 code sequence which matches a non-virtual call. Fixes #472654.
3203 2009-02-15 Zoltan Varga <vargaz@gmail.com>
3205 * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
3208 * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
3209 use the image/dwarf writers directly.
3211 * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
3214 * aot-compiler.c (MonoAotCompile): Remove fields which are now in
3217 * image-writer.h: Fix some typos.
3219 * dwarfwriter.h dwarfwriter.c: New files.
3221 * aot-compiler.c: Extract the DWARF info writing functionality into a
3224 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
3225 argument to return unwind info.
3227 * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
3229 * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
3231 * aot-runtime.c (decode_method_ref): Add a case for
3232 MONO_AOT_METHODREF_WRAPPER_NAME.
3234 * mini.h: Add constants for the magic numbers used in encode_method_ref ()
3237 * aot-compiler.c (encode_method_ref): Use the new constants.
3239 * aot-runtime.c (decode_method_ref): Ditto.
3241 * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
3242 be compiled, not the icall itself.
3244 2009-02-14 Zoltan Varga <vargaz@gmail.com>
3246 * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
3247 using decode_method_ref ().
3249 * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
3250 convert it to an in32. Fixes #475859.
3252 * arrays.cs: Add a test.
3254 2009-02-12 Zoltan Varga <vargaz@gmail.com>
3256 * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in
3259 * basic-long.cs: Add a test.
3261 2009-02-12 Mark Probst <mark.probst@gmail.com>
3263 * mini-x86.c, mini-x86.h: Very simple frame pointer removal. We
3264 remove the frame pointer in leaf methods which don't receive any
3265 arguments, don't throw exceptions and don't do dynamic stack
3268 2009-02-12 Zoltan Varga <vargaz@gmail.com>
3270 * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
3271 the fail_tramp changes. Hopefully fixes #475132.
3273 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
3275 * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
3276 instead of mono_metadata_signature_dup_full.
3278 2009-02-12 Zoltan Varga <vargaz@gmail.com>
3280 * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
3281 for processing jump tables. Fixes #473787.
3283 2009-02-11 Mark Probst <mark.probst@gmail.com>
3285 * mini-generic-sharing.c: mini_method_get_context() just calls
3286 mono_method_get_context_general() now.
3288 * mini.c, mini.h: Moved get_object_generic_inst(),
3289 construct_object_context_for_method() and
3290 mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
3292 2009-02-11 Zoltan Varga <vargaz@gmail.com>
3294 * branch-opts.c (mono_if_conversion): Handle the case where the merged
3295 basic block fell through to its successor bblock without a branch. Fixes
3298 * iltests.il.in: Add a test.
3300 * aot-compiler.c (encode_method_ref): Encode methods of array types.
3301 (can_encode_patch): We can now handle arrays of generic parameters and
3304 * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
3306 * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
3307 the AOT file to avoid some #ifdefs in aot-runtime.c
3309 * mini.h: Bump AOT file format version.
3311 2009-02-10 Zoltan Varga <vargaz@gmail.com>
3313 * Makefile.am (fullaotcheck): Make this run the tests.
3315 * aot-compiler.c: Make the printing of skipped methods runtime configurable.
3317 2009-02-10 Mark Probst <mark.probst@gmail.com>
3319 * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
3320 individually. Fixes #473482.
3322 2009-02-10 Zoltan Varga <vargaz@gmail.com>
3324 * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
3326 2009-02-09 Jeffrey Stedfast <fejj@novell.com>
3328 * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
3329 (mono_compile_assembly): Hush compile warnings about
3330 uninitialized [tmp_]outfile_name variables in the !use_bin_writer
3333 2009-02-10 Zoltan Varga <vargaz@gmail.com>
3335 * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
3337 * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
3339 * aot-compiler.c: Fix arm support.
3341 * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
3342 img_writer_emit_unset_mode () function.
3344 * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
3345 (mono_unwind_get_dwarf_pc_reg): Ditto.
3347 * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
3348 Move almost all platform specific code to a set of arch_ functions,
3349 and document them to ease porting.
3351 * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
3353 * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
3355 * aot-compiler.c: Extract the image writing functionality into a separate
3356 module to reduce the size of this file.
3358 2009-02-09 Geoff Norton <gnorton@novell.com>
3360 * mini-s390.c: Fix the signature of emit_sig_cookie.
3362 2009-02-09 Zoltan Varga <vargaz@gmail.com>
3364 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
3366 * aot-runtime.c (is_shared_got_patch): Ditto.
3368 * aot-runtime.c (load_named_code): Cope with the fact that
3369 decode_got_entry () won't decode the patch fully if its corresponding got
3370 entry is already filled.
3372 * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full):
3374 (mono_arch_create_monitor_exit_trampoline_full): Ditto.
3376 * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
3377 as the moving pointer instead of 'buf' for consistency with the rest of the
3379 (mono_arch_create_monitor_exit_trampoline): Ditto.
3381 * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
3382 generic_class_init trampolines.
3383 (add_generic_class): Extract some code from add_generic_instances () into a
3384 separate function so it can be called from other places too.
3385 (compile_method): Call add_generic_class () for the classes of inflated methods
3386 referenced by the method.
3387 (can_encode_patch): Allow references to generic parameters.
3389 * aot-runtime.c: Add support the patches required by the new trampolines.
3391 * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
3394 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
3397 * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
3398 this from get_throw_pending_exception, make the signature full aot compatible.
3400 * Makefile.am (fullaotcheck): New target to run full-aot tests.
3402 * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
3404 * exceptions.cs: Add a test.
3406 2009-02-07 Zoltan Varga <vargaz@gmail.com>
3408 * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
3409 use the DWARF_DATA_ALIGN constant instead.
3411 * exception-<ARCH>.c: Update after the above change.
3413 * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
3416 * mini-arm.c: Enable the dwarf unwinder.
3418 * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
3419 instead of mono_class_setup_vtable ().
3421 2009-02-07 Zoltan Varga <vargaz@gmail.com>
3423 * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
3426 * mini-x86.h: Enable the dwarf unwinder.
3428 2009-02-06 Raja R Harinath <harinath@hurrynot.org>
3430 Fix mcs/tests/test-7.cs
3431 * mini-amd64.c (mono_arch_allocate_vars): Revert change from
3434 2009-02-06 Zoltan Varga <vargaz@gmail.com>
3436 * mini.c (print_jit_stats): Remove some unused statistics.
3438 2009-02-05 Zoltan Varga <vargaz@gmail.com>
3440 * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
3442 2009-02-05 Mark Probst <mark.probst@gmail.com>
3444 * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
3445 the method we get from mono_object_get_virtual_method() because
3446 that function does it properly, now.
3448 2009-02-05 Zoltan Varga <vargaz@gmail.com>
3450 * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
3451 opcodes. Fixes #472775.
3453 2009-02-05 Mark Probst <mark.probst@gmail.com>
3455 * mini-exceptions.c (ves_icall_get_frame_info): Account for the
3456 fact that mono_find_jit_info() sometimes returns the context
3457 corresponding to the jit info in new_ctx. Fixes #472600.
3459 2009-02-05 Zoltan Varga <vargaz@gmail.com>
3461 * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
3462 mini-s390.c: Use mono_class_enum_basetype () instead of accessing
3463 klass->enum_basetype directly.
3465 * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
3468 * unwind.c: Avoid 0 sized arrays.
3470 2009-02-04 Zoltan Varga <vargaz@gmail.com>
3472 * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
3473 size on systems with 64k pages. Fixes #471389.
3475 2009-02-04 Mark Probst <mark.probst@gmail.com>
3477 Contributed under the terms of the MIT/X11 license by Steven
3478 Munroe <munroesj@us.ibm.com>.
3480 * mini-ppc.c (mono_arch_output_basic_block): Generate better code
3481 for LOADI4_MEMBASE. Use addi instead of addic if it's not
3484 2009-02-04 Mark Probst <mark.probst@gmail.com>
3486 Contributed under the terms of the MIT/X11 license by Steven
3487 Munroe <munroesj@us.ibm.com>.
3489 * exceptions-ppc.c (mono_arch_get_restore_context): Code size
3492 * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
3493 The trampoline can be longer on PPC64.
3495 2009-02-04 Mark Probst <mark.probst@gmail.com>
3497 Contributed under the terms of the MIT/X11 license by Steven
3498 Munroe <munroesj@us.ibm.com>.
3500 * mini-ppc.c: Compiler warning fixes and trivial code
3503 2009-02-04 Zoltan Varga <vargaz@gmail.com>
3505 * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
3506 ins->dreg which could be a hardware register, not a vreg.
3508 * aot-compiler.c (emit_method_dwarf_info): Ditto.
3510 * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
3511 (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
3513 * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
3515 * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
3516 ->dreg, that is not the vreg we are looking for.
3518 * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
3520 * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
3523 * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
3526 2009-02-03 Zoltan Varga <vargaz@gmail.com>
3528 * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
3530 * aot-compiler.c (emit_line_number_info): Fix line number emission when
3533 * aot-compiler.c: Add xdebug support on x86.
3535 * unwind.c: Add x86 support.
3537 * aot-compiler.c (emit_exception_debug_info): Control the emission of
3538 unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
3540 * mini.c (mini_method_compile): Ditto.
3542 * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
3545 * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
3546 which mimic .push_section/.pop_section in GAS.
3548 * aot-compiler.c: Emit precise live range information for variables.
3550 * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
3552 * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
3553 the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
3556 * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
3557 the live ranges of variables.
3559 * mini.h (struct MonoMethodVar): Add two fields containing the live range
3560 of the variable in terms of native offsets.
3562 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
3564 * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
3566 2009-02-02 Mark Probst <mark.probst@gmail.com>
3568 Contributed under the terms of the MIT/X11 license by Steven
3569 Munroe <munroesj@us.ibm.com>.
3571 * exceptions-ppc.c (restore_regs_from_context): Correct operand
3572 order (offset then base reg) for ppc_load_multiple_regs.
3573 (emit_save_saved_regs) Correct operand order for
3574 ppc_store_multiple_regs.
3575 (mono_arch_get_call_filter): Correct operand order for
3576 ppc_load_multiple_regs.
3578 * mini-ppc.c (emit_memcpy): Fix operand order for
3579 ppc_load_reg_update and ppc_store_reg_update.
3580 (mono_arch_output_basic_block): Correct operand order for ppc_lha.
3581 (mono_arch_emit_epilog): Correct operand order for
3582 ppc_load_multiple_regs.
3584 * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
3585 order for ppc_store_multiple_regs and ppc_load_multiple_regs.
3587 2009-02-02 Mark Probst <mark.probst@gmail.com>
3589 * cpu-ppc64.md: Fixed storer4_memindex length.
3591 2009-02-02 Zoltan Varga <vargaz@gmail.com>
3593 * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
3596 * aot-compiler.c (emit_line_number_info): Optimize this.
3598 2009-02-01 Zoltan Varga <vargaz@gmail.com>
3600 * aot-compiler.c: Disassemble tokens in the IL disassembly.
3602 * aot-compiler.c: Add debug info for methods without debug info by
3603 emitting an IL file and having the line number info referencing that file.
3605 * aot-compiler.c: Optimize the size of the generated line number info.
3607 * aot-compiler.c: Emit line number info in xdebug mode.
3609 * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
3612 2009-01-31 Zoltan Varga <vargaz@gmail.com>
3614 * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
3616 * driver.c (mono_main): Enable debugging support automatically if XDEBUG
3619 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
3621 * basic-calls.cs: Test for the weird crash found on arm.
3623 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
3625 * cpu-arm.md: Increase the size of storer8_membase_reg and
3626 loadr8_membase_reg to 24 bytes to accomodate the extra add.
3628 * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
3629 OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
3630 reg to LR otherwise we'll be loading/storing from just the offset.
3632 2009-01-30 Miguel de Icaza <miguel@novell.com>
3634 Question: if we are storing gint32's inside the "*native_offset",
3635 should we change the signature to "gint32 *native_offset" to
3636 ensure that we do not have type definition problems?
3638 * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
3639 an int * as this is what the other function expects, causes
3640 problems with Freescale's compiler that defined int32_t to be a
3641 long and makes int incompatible
3643 2009-01-30 Miguel de Icaza <miguel@novell.com>
3645 * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
3646 filename conflict with bjam.
3648 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
3650 * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
3651 as it might use decomposed ops.
3653 2009-01-30 Zoltan Varga <vargaz@gmail.com>
3655 * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
3657 * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
3660 * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
3662 * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
3665 * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
3666 way registers are stored in MonoContext on arm.
3668 * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
3669 instead of locking so mono_get_cached_unwind_info () becomes signal safe.
3671 * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
3673 * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
3675 * mini.c (mini_init): Register mono_isfinite.
3677 * jit-icalls.c (mono_isfinite): New jit icall.
3679 * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
3681 * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
3682 set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
3685 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
3687 * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
3688 separate frame and stack pointers, so we must use FP to find the register
3690 The FP reg is retrieved from the MonoContext::regs array.
3692 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
3694 * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
3697 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
3699 * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
3700 return R4 and R8 when not running under softfloat.
3702 Fixes basic-calls.exe
3704 2009-01-30 Zoltan Varga <vargaz@gmail.com>
3706 * mini-arm.c: Implement some overflow opcodes.
3708 2009-01-29 Miguel de Icaza <miguel@novell.com>
3710 * ssa.c: handle another alloca.h
3712 * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
3713 PLATFORM_WIN32 for detecting if we have sigaction. Instead use
3714 MONO_ARCH_USE_SIGACTION.
3716 * aot-runtime.c, mini-exceptions.c: Replace platform define with
3719 * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
3721 * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
3722 PPC targets as sigaction does not exist on all platforms, define
3723 this on a per-platform basis.
3725 Instead of erroring out if the platform is not defined, include
3726 mini-ppc-os.h, and expect that the OS specific setting provides
3727 the required information.
3729 2009-01-30 Zoltan Varga <vargaz@gmail.com>
3731 * aot-compiler.c: Fix --enable-minimal=aot.
3733 2009-01-30 Zoltan Varga <vargaz@gmail.com>
3735 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
3738 2009-01-29 Zoltan Varga <vargaz@gmail.com>
3740 * exceptions-arm.c: Fix warnings.
3742 * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
3745 * mini-x86.c: Fix --enable-minimal=jit build.
3747 * mini.c: Really fix --enable-minimal=jit build.
3749 * mini.c (construct_object_context_for_method): Move this outside
3750 the DISABLE_JIT block to fix the --enable-minimal=jit build.
3752 "Backported" of r124984 from 2.0 branch.
3754 * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
3756 "Backport" of r124977 + r124978 from 2.0 branch.
3758 * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
3759 to avoid calling mono_exception_from_token () from the throw trampoline.
3760 (mono_arch_get_throw_exception_generic): call throw_exception_by_token
3761 for throwing corlib exceptions, this fixes full-aot support for corlib
3764 * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
3766 2009-01-29 Miguel de Icaza <miguel@novell.com>
3768 * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
3769 part of the changes to split the code in mini into operating
3770 system specific files.
3772 This patch was done by copying mini.c to the respective files to
3773 preserve SVN history.
3775 2009-01-29 Zoltan Varga <vargaz@gmail.com>
3777 * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
3779 2009-01-28 Zoltan Varga <vargaz@gmail.com>
3781 * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
3782 remoting-invoke-with-check wrappers of shared methods.
3784 * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
3786 2009-01-27 Mark Probst <mark.probst@gmail.com>
3788 * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
3789 optimization if the top of stack is the last instruction in the
3790 bblock. Otherwise it might have been used after its definition.
3793 2009-01-27 Zoltan Varga <vargaz@gmail.com>
3795 * mini-trampolines.c (mono_magic_trampoline): Print out the caller
3796 method as well when get_vcall_slot () fails to match a code sequence.
3798 * mini-arm.c: Fix the android build, which doesn't have
3801 2009-01-26 Zoltan Varga <vargaz@gmail.com>
3803 * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
3806 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
3808 * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
3810 2009-01-26 Zoltan Varga <vargaz@gmail.com>
3812 * mini.c (mini_method_compile): Save the unwind info generated by the JIT
3813 and put its id into jinfo->used_regs. This is only used on amd64,
3814 which is currently the only platform generating unwind info.
3816 * exceptions-amd64.c: Instead of unwinding based on a register mask, use
3817 the dwarf unwinder. This is required to correctly handle async exceptions
3818 like thread abort and stack overflows, which can happen while a method
3819 is in the middle of its prolog or epilog.
3821 * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
3822 the unwind info belonging to an AOTed method.
3824 * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
3825 into cfg->unwind_ops.
3827 * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
3829 * mini.c (mini_init): Call mono_unwind_init ().
3830 (mini_cleanup): Call mono_unwind_cleanup ().
3832 * unwind.c: Add functions for managing a set of unwind info entries, allowing
3833 unwind info to be shared between methods.
3835 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
3838 * exceptions-amd64.c (mono_arch_exceptions_init): Call
3839 get_throw_pending_exception () to avoid initialization races.
3841 * mini-exceptions.c (mono_exceptions_init): Call an arch specific
3842 mono_arch_exceptions_init () function.
3844 * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
3846 2009-01-25 Zoltan Varga <vargaz@gmail.com>
3848 * mini.c (mono_get_domain_intrinsic): New helper function.
3849 (mono_get_thread_intrinsic): Ditto.
3851 * mini-arm.c mini-ia64.c: Use the new helper functions.
3853 * method-to-ir.c (mono_method_to_ir): Fix the comment for
3854 the last constrained_call change, since it is needed in the non-AOT
3857 * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
3859 * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of
3860 mono_get_lmf_addr () on arm eabi linux.
3862 2009-01-24 Zoltan Varga <vargaz@gmail.com>
3864 * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
3865 code sequence which matches a non-virtual call.
3867 2009-01-23 Mark Probst <mark.probst@gmail.com>
3869 * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
3872 2009-01-23 Zoltan Varga <vargaz@gmail.com>
3874 * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
3875 runtime-invoke wrappers, since they are also shared based on signature.
3877 2009-01-22 Mark Probst <mark.probst@gmail.com>
3879 * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
3880 info from the (correct) context.
3882 2009-01-22 Zoltan Varga <vargaz@gmail.com>
3884 * unwind.c (mono_unwind_frame): Remove a stray g_free ().
3886 * unwind.c (mono_unwind_frame): New function to unwind through a frame
3887 using dwarf unwinding info. Not yet used.
3889 * mini.c (mini_init): When using xdebug, disable freeing of domains.
3891 2009-01-21 Mark Probst <mark.probst@gmail.com>
3893 * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
3896 * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
3897 special case and handle mono_arch_delegate_invoke_impl() returning
3898 function descriptors.
3900 * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
3901 trampolines return function descriptors, too.
3903 2009-01-21 Zoltan Varga <vargaz@gmail.com>
3905 * method-to-ir.c (handle_alloc): Avoid generic instances in the
3906 out_of_line optimization.
3908 2009-01-21 Martin Baulig <martin@ximian.com>
3911 (MonoCompile): Added `disable_deadce_vars' to disable removing
3915 (mini_method_compile): Set `cfg->disable_deadce_vars' when running
3916 inside the debugger.
3918 * liveness.c (mono_analyze_liveness): Don't remove any unused
3919 variables if `cfg->disable_deadce_vars' is set.
3921 2009-01-21 Mark Probst <mark.probst@gmail.com>
3923 * method-to-ir.c: Only apply exception constructor optimization if
3924 the the method actually belongs to an exception class. Fixes
3927 2009-01-21 Zoltan Varga <vargaz@gmail.com>
3929 * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
3930 change inside a #ifdef __mono_ppc64__.
3932 * aot-compiler.c (compile_method): Remove the previous limitation.
3934 * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
3935 on type variables in AOTed code.
3937 * aot-compiler.c (compile_method): Skip generic methods having type
3938 constraints on their generic parameters.
3940 * aot-compiler.c (compile_method): Check for methods which cannot be
3941 encoded inside RGCTX_FETCH patches as well.
3943 * mini-exceptions.c (mono_print_thread_dump): Fix the windows
3946 2009-01-20 Mark Probst <mark.probst@gmail.com>
3948 * method-to-ir.c: Force the vtable variable in shared generic code
3949 for the case that they might show up on a stack trace where they
3952 * mini-exceptions.c: Save and use generic sharing info as well as
3953 IP in stack traces to resolve shared generic instantiations.
3955 2009-01-20 Zoltan Varga <vargaz@gmail.com>
3957 * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
3958 added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
3960 2009-01-20 Mark Probst <mark.probst@gmail.com>
3962 * method-to-ir.c: Do generic sharing for array constructors.
3964 2009-01-20 Rodrigo Kumpera <rkumpera@novell.com>
3966 * mini-exceptions.c (mono_print_thread_dump): Add information
3967 about the thread state using wapi_current_thread_desc.
3969 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
3971 * basic-simd.cs: Tests for the new constructors.
3973 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
3975 * mini-ops.h: Added OP_EXPAND_*
3979 * mini-x86.c (mono_arch_output_basic_block): Same.
3981 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
3983 2009-01-19 Zoltan Varga <vargaz@gmail.com>
3985 * iltests.il.in: Add a test for #467385.
3987 2009-01-18 Rodrigo Kumpera <rkumpera@novell.com>
3989 * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
3990 thread been cleaned up is not the same currently in execution.
3992 Fixes appdomain-unload crashes on windows, osx and linux variants
3993 without the __thread keyword.
3995 2009-01-18 Zoltan Varga <vargaz@gmail.com>
3997 * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
3998 (koush@koushikdutta.com). Implement this for android.
4000 * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
4001 begins with a digit.
4003 * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
4004 mono_marshal_get_write_barrier ().
4006 2009-01-17 Rodrigo Kumpera <rkumpera@novell.com>
4008 * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
4009 of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
4010 that pass them on a register pair.
4012 This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
4013 test was crashing due to that.
4015 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
4017 * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
4018 trampoline code. Include ucontext.h only if available.
4020 2009-01-15 Mark Probst <mark.probst@gmail.com>
4022 * mini.c: mono_domain_lookup_shared_generic() takes an open method
4023 and doesn't check whether it's sharable, like it was before
4024 removing the shared generics hash. This brings IronPython
4025 performance back to what it was before that change.
4027 2009-01-14 Mark Probst <mark.probst@gmail.com>
4029 * method-to-ir.c: Handle delegate invocation optimization earlier,
4030 otherwise it would be handled (much more slowly) by the
4031 final/sealed optimization.
4033 2009-01-13 Zoltan Varga <vargaz@gmail.com>
4035 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
4036 domain is not set. Fixes #465864.
4038 2009-01-12 Mark Probst <mark.probst@gmail.com>
4040 * method-to-ir.c: Don't stop sharing of generic methods with catch
4041 clauses - we already handle those.
4043 2009-01-12 Mark Probst <mark.probst@gmail.com>
4045 * mini.c, mini.h: lookup_generic_method() is now
4046 mono_domain_lookup_shared_generic() and uses the jit_code_hash,
4047 making the shared_generics_hash obsolete.
4049 2009-01-12 Mark Probst <mark.probst@gmail.com>
4051 * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
4052 use the red zone. Make room on the stack first and then use it,
4053 not the other way around.
4055 2009-01-12 Zoltan Varga <vargaz@gmail.com>
4057 * mini.c (mini_init): Call mono_xdebug_init ().
4059 * aot-compiler.c (mono_xdebug_init): Make this non-static.
4061 2009-01-11 Zoltan Varga <vargaz@gmail.com>
4063 * TestDriver.cs: Add an --iter argument to run tests multiple times.
4065 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
4068 * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
4069 debug+unwind info for trampolines.
4071 * mini.c (mono_create_unwind_op): New helper function.
4073 * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
4075 2009-01-10 Zoltan Varga <vargaz@gmail.com>
4077 * aot-compiler.c: Fix the build.
4079 2009-01-09 Zoltan Varga <vargaz@gmail.com>
4081 * Makefile.am: Update dtrace-prelink.sh location.
4083 2009-01-08 Zoltan Varga <vargaz@gmail.com>
4085 * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr
4086 optimization. Fixes #464520.
4088 2009-01-07 Bill Holmes <billholmes54@gmail.com>
4090 * mini-amd64.c : Adding code to save/restore non-volatile registers
4093 * exceptions-amd64.c : Adding code to save/restore non-volatile
4094 registers on Winx64.
4096 Contributed under MIT/X11 license.
4098 2009-01-07 Zoltan Varga <vargaz@gmail.com>
4100 * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
4101 __GNUC_MINOR__ which can break when the major version changes.
4103 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
4105 * basic-simd.cs: Add tests for usage of the sizeof opcode.
4107 2009-01-07 Geoff Norton <gnorton@novell.com>
4109 * helpers.c: Allow mono -v -v -v to work on darwin.
4111 2009-01-05 Bill Holmes <billholmes54@gmail.com>
4113 * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
4116 Contributed under MIT/X11 license.
4118 2009-01-05 Zoltan Varga <vargaz@gmail.com>
4120 * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
4121 instead of directly accessing type->data.klass. Fixes #462016.
4122 (mono_allocate_stack_slots_full): Ditto.
4124 * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio
4125 <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
4127 * aot-compiler.c (emit_plt): Fix ARM build.
4129 2009-01-04 Zoltan Varga <vargaz@gmail.com>
4131 * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
4133 * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
4136 * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
4137 instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
4140 * iltests.il.in: Add a regression test.
4142 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
4144 * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
4146 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
4148 * basic-simd.cs: Add a regression test for #462457.
4150 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
4152 * mini-ops.h: Add a definition of XPHI.
4154 * mini.h (MONO_IS_PHI): Make is aware of simd instrincs.
4156 * ssa.c (op_phi_to_move): Handle XPHI.
4158 * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
4162 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
4164 * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
4166 2008-12-31 Geoff Norton <gnorton@novell.com>
4168 * mini-ppc.c: The prolog size allocated can be too small for darwin
4169 ppc32 under certain circumstances. Also fix a small logic bug.
4171 2008-12-29 Zoltan Varga <vargaz@gmail.com>
4173 * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
4174 while loading AOT methods.
4176 * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
4177 since only the former is nulled out after a successful cast. This prevents
4178 crashes with rethrown exceptions when using --debug=casts.
4180 2008-12-24 Mark Probst <mark.probst@gmail.com>
4182 * mini.h: New macro for checking whether a method is final,
4183 i.e. whether the method or its class is marked final.
4185 * method-to-ir.c: Use the new macro for all final-checks
4186 consistently. Fixes the crash in the System.ServiceModel tests.
4188 2008-12-23 Mark Probst <mark.probst@gmail.com>
4190 * mini-exceptions.c (get_exception_catch_class): Corrected another
4191 overly strict assertion.
4193 2008-12-23 Mark Probst <mark.probst@gmail.com>
4195 * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
4196 Clobbering it is not allowed because the caller might use it as
4197 the vtable register in the interface call.
4199 2008-12-19 Mark Probst <mark.probst@gmail.com>
4201 * mini-exceptions.c (get_exception_catch_class): Corrected an
4202 overly strict assertion.
4204 2008-12-18 Mark Mason <mmason@upwardaccess.com>
4206 * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
4208 * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
4210 * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
4212 * cpu-mips.md: correct lengths for certain long_ opcodes.
4214 * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
4216 * 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().
4218 2008-12-17 Mark Mason <mmason@upwardaccess.com>
4220 * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
4222 2008-12-17 Mark Mason <mmason@upwardaccess.com>
4224 * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
4226 2008-12-16 Rodrigo Kumpera <rkumpera@novell.com>
4228 * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
4231 2008-12-16 Mark Mason <mmason@upwardaccess.com>
4233 * 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
4235 * 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)
4237 2008-12-15 Mark Mason <mmason@upwardaccess.com>
4239 * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
4241 2008-12-14 Zoltan Varga <vargaz@gmail.com>
4243 * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
4244 gshared code. Fixes #458947.
4246 * generics.cs: Add a test.
4248 2008-12-12 Mark Mason <mmason@upwardaccess.com>
4250 * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4252 * mini-mips.c: first pass n32 code generation.
4254 * mini-mips.h: datatypes and defines for n32 support.
4256 * exceptions-mips.c: first pass n32 code generation.
4258 * tramp-mips.c: first pass n32 code generation.
4260 * cpu-mips.md: add long_ opcodes.
4262 2008-12-12 Mark Mason <mmason@upwardaccess.com>
4264 * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4266 * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4268 * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4270 * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4272 * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4274 * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4276 * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4278 * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4280 * helpers.c: for mips/n32, don't pass -mips32 to objdump
4282 2008-12-12 Zoltan Varga <vargaz@gmail.com>
4284 * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
4286 2008-12-12 Andres G. Aragoneses <aaragoneses@novell.com>
4288 * driver.c: Sync --help-trace with man page (EXPR,EXPR).
4290 2008-12-12 Mark Probst <mark.probst@gmail.com>
4292 * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
4293 descriptors for helper functions directly in front of the code.
4295 2008-12-11 Mark Probst <mark.probst@gmail.com>
4297 * method-to-ir.c: Removed an unnecessary assertion.
4299 2008-12-10 Zoltan Varga <vargaz@gmail.com>
4301 * method-to-ir.c: Merge SGEN changes from the old JIT.
4303 2008-12-10 Zoltan Varga <vargaz@gmail.com>
4305 * driver.c (compile_all_methods_thread_main): Handle failure of
4308 2008-12-10 Mark Probst <mark.probst@gmail.com>
4310 * mini-ppc.c: Merged with mini-ppc64.c.
4312 * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
4314 * Makefile.am: Use the same sources for PPC and PPC64.
4316 * mini-ppc64.c: Removed.
4318 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
4320 * branch-opts.c (remove_block_if_useless): Extract fall through detection
4321 code to mono_bb_is_fall_through.
4323 * branch-opts.c (mono_remove_critical_edges): Same.
4325 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
4327 * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
4328 expect that an OP_BR_REG will be there.
4330 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
4332 * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
4333 for the many branch ops. The original check miss OP_BR_REG.
4337 2008-12-09 Mark Mason <mmason@upwardaccess.com>
4339 * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
4341 2008-12-09 Zoltan Varga <vargaz@gmail.com>
4343 * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
4344 while holding the aot lock.
4346 2008-12-09 Mark Mason <mmason@upwardaccess.com>
4348 * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
4350 2008-12-09 Bill Holmes <billholmes54@gmail.com>
4352 * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws
4353 to release all runtime callable wrappers held by the runtime.
4355 Contributed under MIT/X11 license.
4357 2008-12-09 Bill Holmes <billholmes54@gmail.com>
4359 * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
4362 Contributed under MIT/X11 license.
4364 2008-12-09 Zoltan Varga <vargaz@gmail.com>
4366 * aot-runtime.c (decode_exception_debug_info): Acquire the domain
4367 lock when calling mono_domain_alloc (). Hopefully fixes #415608.
4369 2008-12-09 Mark Mason <mmason@upwardaccess.com>
4371 * cpu-mips.md: fix ckfinite length
4373 * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
4374 (mono_arch_lowering_pass): cleanup, rearrange for clarity
4375 (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
4377 2008-12-08 Mark Mason <mmason@upwardaccess.com>
4379 * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
4381 2008-12-08 Geoff Norton <gnorton@novell.com>
4383 * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
4384 size by 8 bytes as well.
4386 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4388 * basic-simd.cs: Fix method names for Vector16b.
4390 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4392 * basic-simd.cs: Fix method names for Vector16sb.
4394 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4396 * basic-simd.cs: Fix method names for Vector8us.
4398 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4400 * basic-simd.cs: Fix method names for Vector8s.
4402 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4404 * basic-simd.cs: Fix method names for Vector4ui.
4406 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4408 * basic-simd.cs: Fix method names for Vector2l.
4410 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4412 * basic-simd.cs: Fix method names for Vector2d.
4414 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4416 * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
4417 that are extension methods.
4419 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4421 * basic-simd.cs: Fix method names for Vector4f.
4423 2008-12-08 Zoltan Varga <vargaz@gmail.com>
4425 * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
4426 as such. Fixes #456669.
4428 2008-12-07 Mark Mason <mmason@upwardaccess.com>
4430 * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
4432 2008-12-07 Mark Mason <mmason@upwardaccess.com>
4434 * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
4435 (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
4436 (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
4437 (mips_adjust_stackframe): handle FP spills
4439 * mini-ops.h: add mips_mtc1_s2
4441 * cpu-mips.md: add mips_mtc1_s2
4443 2008-12-07 Zoltan Varga <vargaz@gmail.com>
4445 * unwind.c: New file, move the unwind info encoding functions here from
4446 aot-compiler.c, so they could be used at runtime too.
4448 2008-12-05 Mark Mason <mmason@upwardaccess.com>
4450 * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
4451 (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
4453 2008-12-05 Mark Mason <mmason@upwardaccess.com>
4455 * mini-mips.c: cleanup warnings
4456 (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
4457 (mips_adjust_stackframe): handle case of taking the address of stack locals
4459 2008-12-05 Zoltan Varga <vargaz@gmail.com>
4461 * aot-compiler.c: Implement a few functions missing from the asm writer.
4462 (emit_method_code): Only write symbols for methods when using the bin
4463 writer, since the assembler can't deal with the characters in our method
4466 * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
4468 * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
4471 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
4472 a bit to also restore %rax.
4474 2008-12-05 Mark Probst <mark.probst@gmail.com>
4476 * mini-ppc.c: Some simple merges from mini-ppc64.c.
4478 2008-12-05 Zoltan Varga <vargaz@gmail.com>
4480 * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
4483 2008-12-05 Mark Probst <mark.probst@gmail.com>
4485 * exceptions-ppc.c: Merged with exceptions-ppc64.c.
4487 * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
4488 MONO_ARCH_FRAME_ALIGNMENT. Struct for PPC64 function descriptors.
4490 * exceptions-ppc64.c: Removed.
4492 * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
4494 2008-12-05 Mark Probst <mark.probst@gmail.com>
4496 * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
4499 * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
4501 * tramp-ppc64.c: Removed.
4503 2008-12-05 Zoltan Varga <vargaz@gmail.com>
4505 * aot-compiler.c (add_generic_instances): Skip non-generic classes in
4508 2008-12-05 Mark Probst <mark.probst@gmail.com>
4510 * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
4512 * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
4513 mini-ppc.h instead of mini-ppc64.h.
4515 * mini-ppc64.h: Removed.
4517 2008-12-04 Mark Mason <mmason@upwardaccess.com>
4519 * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
4521 * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
4523 2008-12-05 Mark Probst <mark.probst@gmail.com>
4525 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
4526 Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
4529 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
4531 * basic-simd.cs: Tests for operator == and != on Vector8us and Vector16b.
4533 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
4535 * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
4537 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
4539 * basic-simd.cs: Tests for operator == and != on Vector4f.
4541 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
4543 * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
4545 * simd-intrinsics.c: Kill useless enum.
4547 2008-12-04 Mark Mason <mmason@upwardaccess.com>
4549 * cpu-mips.md: add long_conv_to_ovf_i4_2
4550 * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
4552 2008-12-04 Mark Mason <mmason@upwardaccess.com>
4554 * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
4556 * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
4558 2008-12-04 Mark Mason <mmason@upwardaccess.com>
4560 * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
4562 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
4564 * basic-simd.cs: Add tests for new methods.
4566 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
4568 * simd-intrinsics.c: Add support for operator == and !=
4571 * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
4573 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
4575 * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
4577 2008-12-04 Zoltan Varga <vargaz@gmail.com>
4579 * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
4581 * mini.c (mono_resolve_patch_target): Allow pinvoke methods in
4582 MONO_PATCH_INFO_ICALL_ADDR.
4584 * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
4586 * aot-compiler.c: Resurrect full-aot support.
4588 2008-12-04 Mark Mason <mmason@upwardaccess.com>
4590 * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
4592 2008-12-04 Mark Mason <mmason@upwardaccess.com>
4594 * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
4596 2008-12-03 Rodrigo Kumpera <rkumpera@novell.com>
4598 * basic-simd.cs: Fix tests to work under ppc.
4599 Remove tests for methods that will be removed.
4601 2008-12-03 Mark Probst <mark.probst@gmail.com>
4603 * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
4604 generic type (via a typedef or typeref) correctly.
4606 2008-12-03 Zoltan Varga <vargaz@gmail.com>
4608 * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
4609 diagnose an assertion failure.
4611 2008-12-02 Mark Probst <mark.probst@gmail.com>
4613 * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
4614 Fix trampoline size.
4616 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
4617 conversion opcodes are implemented natively instead via emulation.
4619 2008-12-01 Mark Mason <mmason@upwardaccess.com>
4621 * cpu-mips.md: remove mips_xori
4623 * mini-ops.h: remove mips_xori
4625 * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
4627 * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
4629 * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
4631 2008-12-01 Mark Mason <mmason@upwardaccess.com>
4633 * cpu-mips.md: fix instruction lengths.
4635 * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
4637 * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
4639 * mini-ops.h: fix slti / sltiu op profiles.
4641 2008-12-02 Martin Baulig <martin@ximian.com>
4643 * method-to-ir.c (mono_method_to_ir): Disable debugging
4644 information for the init locals block to make the debugger stop
4645 after all locals have been initalized.
4647 2008-12-02 Martin Baulig <martin@ximian.com>
4649 * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
4650 running inside the debugger.
4652 2008-12-01 Zoltan Varga <vargaz@gmail.com>
4654 * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
4657 * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the
4658 alu->alu imm optimization which only shows if deadce is disabled.
4660 * aot-compiler.c: Rename the function names for the binary and asm writers
4661 so they can coexist in the same process. Rework the xdebug code to use the
4662 asm writer. This avoids the need to call into the runtime to dump the
4663 debugging info. Add more debugging info for types.
4665 * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
4667 * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
4668 cpu description tables, they can't occur in cpu-<ARCH>.md.
4670 * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
4671 the stack in CEE_LDFLDA. Fixes #450542.
4673 * generics.cs: Add a new test.
4675 2008-12-01 Mark Mason <mmason@upwardaccess.com>
4677 * mini-ops.h: updated MIPS opcodes
4678 * mini-mips.c: decompose long opts
4679 * mini-mips.h: decompose long opts
4681 2008-11-29 Mark Mason <mmason@upwardaccess.com>
4683 * cpu-mips.md: fix length on int_rem_un
4684 * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
4686 2008-11-29 Zoltan Varga <vargaz@gmail.com>
4688 * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
4690 * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
4692 2008-11-29 Martin Baulig <martin@ximian.com>
4694 * mini-exceptions.c (mono_handle_native_sigsegv): Check
4695 mono_debug_using_mono_debugger() in addition to the
4696 `no_gdb_backtrace' flag in the `MonoDebugOptions'.
4698 2008-11-28 Mark Mason <mmason@upwardaccess.com>
4700 * mini-ops.h: updated more MIPS opcodes
4701 * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
4702 * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
4704 2008-11-28 Mark Probst <mark.probst@gmail.com>
4706 * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
4708 2008-11-28 Mark Mason <mmason@upwardaccess.com>
4710 * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
4711 * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
4712 * mini-ops.h: correct selected mips opcode entries
4714 2008-11-28 Mark Probst <mark.probst@gmail.com>
4716 * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
4719 2008-11-28 Mark Probst <mark.probst@gmail.com>
4721 * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
4723 2008-11-28 Mark Mason <mmason@upwardaccess.com>
4725 * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
4726 * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
4727 * mini-mips.h: disable IMT
4728 * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
4730 2008-11-28 Mark Probst <mark.probst@gmail.com>
4732 * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
4734 2008-11-28 Mark Probst <mark.probst@gmail.com>
4736 * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
4738 2008-11-28 Zoltan Varga <vargaz@gmail.com>
4740 * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
4743 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
4745 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
4746 for Set/GetVector aligned versions.
4748 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
4750 * basic-simd.cs: Add tests for Get/SetVector.
4752 2008-11-27 Mark Probst <mark.probst@gmail.com>
4754 * mini.c: Removed g_slist_append_mempool(). Now in
4757 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
4759 * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
4760 size properly and make the bounds check optional.
4762 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
4763 for SetVector and IsAligned.
4765 2008-11-27 Zoltan Varga <vargaz@gmail.com>
4767 * mini.c: Remove unused mono_normalize_opcodes () function.
4769 2008-11-26 Mark Probst <mark.probst@gmail.com>
4771 * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
4772 using the new atomic add ops now.
4774 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
4777 2008-11-26 Mark Probst <mark.probst@gmail.com>
4779 * mini-ppc64.c: Several fixes.
4781 2008-11-25 Mark Mason <mmason@upwardaccess.com>
4783 * cpu-mips.md: added jump_table
4784 * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.
4786 2008-11-25 Mark Mason <mmason@upwardaccess.com>
4788 * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
4790 2008-11-25 Mark Mason <mmason@upwardaccess.com>
4792 * mini-ops.h: corrected a handful of MIPS opcodes.
4794 2008-11-25 Mark Mason <mmason@upwardaccess.com>
4796 * aot-compiler.c: MIPS to use ELF writer
4798 2008-11-25 Mark Mason <mmason@upwardaccess.com>
4800 * mini-codegen.c: remove MIPS specific assert.
4802 2008-11-25 Mark Probst <mark.probst@gmail.com>
4804 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
4805 fixes. PPC64 now passes most of the runtime regressions.
4807 2008-11-24 Zoltan Varga <vargaz@gmail.com>
4809 * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
4810 volatile intervals a bit.
4812 2008-11-24 Mark Probst <mark.probst@gmail.com>
4814 * basic-long.cs: New test case.
4816 2008-11-23 Zoltan Varga <vargaz@gmail.com>
4818 * mini.c (mini_method_compile): Disable globalra for large methods for
4821 * regalloc2.c (order_moves): Add fp support.
4823 * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
4824 source bblock ends with an OP_BR_REG.
4826 * ratests.cs: Add a new test.
4828 2008-11-23 Mark Probst <mark.probst@gmail.com>
4830 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
4831 sharing. PPC64 now passes generics.exe.
4833 2008-11-23 Mark Probst <mark.probst@gmail.com>
4835 * mini-ppc64.c: Several fixes. PPC64 now runs iltests.exe.
4837 2008-11-23 Zoltan Varga <vargaz@gmail.com>
4839 * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
4840 memory when mono_jit_info_table_find () can't find the method in the
4843 * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
4846 * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
4849 2008-11-23 Mark Probst <mark.probst@gmail.com>
4851 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
4852 Several fixes. PPC64 now runs exceptions.exe and
4853 devirtualization.exe.
4855 2008-11-22 Mark Probst <mark.probst@gmail.com>
4857 * mini-ppc64.c, tramp-ppc64.c: Small fixes. PPC64 now runs
4858 arrays.exe and basic-math.exe.
4860 2008-11-22 Mark Probst <mark.probst@gmail.com>
4862 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
4863 cpu-ppc64.md: Several fixes. PPC64 now runs objects.exe.
4865 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
4867 * simd-intrinsics.c: Add support ArrayExtension intrinsics.
4869 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
4871 * method-to-ir.c: Move bounds checking macros to ir-emit.h
4873 * ir-emit.h: Move macros from method-to-ir.c to here.
4875 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
4877 * mini-ops.h: Correct the long simd ops to use LREG.
4879 2008-11-21 Zoltan Varga <vargaz@gmail.com>
4881 * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
4883 * mini-ops.h: Correct the dreg type of a few long opcodes.
4885 * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
4888 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
4890 * mini-ppc.c: remove negative stack references in epilog
4891 for platforms that don't support the red zone.
4893 2008-11-21 Mark Probst <mark.probst@gmail.com>
4895 * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
4896 point regs. Now PPC64 passes basic-calls.exe.
4898 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4900 * basic-simd.cs: Add tests for accessors of Vector2l.
4902 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4904 * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
4906 * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
4908 * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
4910 2008-11-21 Mark Probst <mark.probst@gmail.com>
4912 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes. Now
4913 PPC64 passes basic-long.exe.
4915 2008-11-20 Mark Probst <mark.probst@gmail.com>
4917 * decompose.c: Decompose carry and overflow add on PPC64 like on
4918 other 64 bit archs. Don't decompose sub at all on PPC64.
4920 * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
4921 Several fixes and new opcodes. Now PPC64 runs (but doesn't pass)
4924 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4926 * basic-simd.cs: Add tests for accessors of Vector2d.
4928 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4930 * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
4934 * mini-x86.c (mono_arch_output_basic_block): Same.
4936 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
4938 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4940 * basic-simd.cs: Add tests for accessors of Vector4f.
4942 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4944 * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
4948 * mini-x86.c (mono_arch_output_basic_block): Same.
4950 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
4952 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4954 * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
4956 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4958 * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
4962 * mini-x86.c (mono_arch_output_basic_block): Same.
4964 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
4966 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4968 * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
4970 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4972 * simd-intrinsics.c: Enable setters for Vector16sb.
4974 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
4976 * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
4980 * mini-x86.c (mono_arch_output_basic_block): Same.
4982 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
4984 2008-11-19 Rodrigo Kumpera <rkumpera@novell.com>
4986 * simd-intrinsics.c: Implement setter for Vector8us.
4988 2008-11-19 Zoltan Varga <vargaz@gmail.com>
4990 * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
4993 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
4995 * mini-ppc.c: remove references to the red zone in the prolog
4996 (for systems that don't support it).
4998 2008-11-19 Mark Probst <mark.probst@gmail.com>
5000 * cpu-ppc64.md: Fixed a few instruction lengths.
5002 * mini-ppc64.c: Don't emit SETLRET. PPC64 passes basic-float.exe,
5005 2008-11-19 Mark Probst <mark.probst@gmail.com>
5007 * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes. PPC64 passes
5010 2008-11-19 Zoltan Varga <vargaz@gmail.com>
5012 * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
5014 2008-11-18 Rodrigo Kumpera <rkumpera@novell.com>
5016 * mini-ops.h: Added OP_INSERT_I2.
5020 * mini-x86.c (mono_arch_output_basic_block): Same.
5022 * simd-intrinsics.c: Implement setter for Vector8s.
5024 * simd-methods.h: Add the names of get setters of Vector8s.
5026 2008-11-18 Zoltan Varga <vargaz@gmail.com>
5028 * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
5030 * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
5033 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
5035 2008-11-18 Mark Probst <mark.probst@gmail.com>
5037 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
5038 for PPC64. An empty program runs now.
5040 2008-11-18 Zoltan Varga <vargaz@gmail.com>
5042 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
5044 * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
5045 a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
5046 info for JITted code is emitted into a shared library, loadable into gdb.
5048 2008-11-18 Mark Probst <mark.probst@gmail.com>
5050 * Makefile.am: Changes to build PPC64.
5052 * mini-arch.h: Include mini-ppc64.h on PPC64.
5054 2008-11-18 Mark Probst <mark.probst@gmail.com>
5056 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
5057 in PPC code up to r119147.
5059 2008-11-18 Mark Probst <mark.probst@gmail.com>
5061 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
5062 cpu-ppc64.md: Changes for PPC64.
5064 Based on code submitted by andreas.faerber@web.de at
5065 https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
5068 2008-11-18 Mark Probst <mark.probst@gmail.com>
5070 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
5071 cpu-ppc64.md: Copied from the corresponding PPC files from
5074 2008-11-18 Scott Peterson <lunchtimemama@novell.com>
5076 * mini-ops.h: Added OP_ROUND.
5078 * cpu-x86.md: Added round.
5080 * mini-x86.c: Added support for intrinsicing Math.Round (double).
5082 * basic-math.cs: Added test_0_round to test rounding.
5084 Contributed under MIT/X11 license.
5086 2008-11-17 Bill Holmes <billholmes54@gmail.com>
5088 * aot-compiler.c : Fix the Winx64 build.
5090 Contributed under MIT/X11 license.
5092 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
5094 * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
5095 in OP_EXTRACT_R8 to avoid possible stack corruption.
5097 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
5099 * mini-ops.h: Added OP_EXTRACT_R8/I8.
5101 * cpu-x86.md: Added extract_r8.
5103 * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
5105 * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
5106 a couple of OP_EXTRACT_I4.
5108 * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
5110 * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
5112 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
5114 * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
5117 2008-11-17 Zoltan Varga <vargaz@gmail.com>
5119 * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
5120 trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
5122 * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
5123 are not needed any more.
5125 * mini.h: Remove the unused INS_LIST macros.
5127 * mini.c (mini_method_compile): Remove a disable globalra case which is no
5130 * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
5133 * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
5134 mono_alloc_ireg () instead.
5136 * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
5139 * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
5142 * aot-runtime.c (load_aot_module): Disable AOT when running under
5145 * mini-amd64.h: Change the monitor fastpath defines to check for
5146 !PLATFORM_WIN32 so they work on *bsd too.
5148 * mini.h mini.c mini-hhpa.c: Remove more unused code.
5150 * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
5152 * mini.h (MonoCompile): Remove new_ir flag.
5154 * regalloc.h regalloc.c: Remove unused code.
5156 * cpu-*.md: Remove more unused opcodes.
5158 * simple-cee-ops.h simple-mini-ops.h: Removed.
5160 * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
5162 2008-11-17 Zoltan Varga <vargaz@gmail.com>
5164 * aliasing.h: Removed.
5166 * *.c: Remove references to aliasing.h and inssel.h.
5168 * mini.c: Remove additional unused functions.
5170 * mini-ops.h cpu-*.md: Remove unused opcodes.
5172 2008-11-16 Zoltan Varga <vargaz@gmail.com>
5174 Remove the old JIT code.
5176 * inssel*.brg: Removed.
5178 * ssa.c abcremoval.c aliasing.c: Removed.
5180 * ssa2.c: Renamed to ssa.c.
5182 * abcremoval2.c: Renamed to abcremoval.c.
5184 * *.c: Removed all !cfg->new_ir code.
5186 * mini-<ARCH>.c: Removed mono_arch_call_opcode (),
5187 mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
5189 * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
5191 2008-11-16 Zoltan Varga <vargaz@gmail.com>
5193 * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
5194 to simplify the code and cut back on the number of global symbols in the AOT
5197 * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
5199 2008-11-15 Zoltan Varga <vargaz@gmail.com>
5201 * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
5202 with the got/got_info tables.
5204 * mini.h: Bump AOT file format version.
5206 * unwind.h: New file, contains definitions for stack unwinding.
5208 * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
5211 * aot-compiler.c: Generalize the emitting of unwind information to use the
5212 information in cfg->unwind_ops.
5214 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
5216 * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
5217 AOT method frames. Enable writing symbols for methods by default.
5219 2008-11-14 Rodrigo Kumpera <rkumpera@novell.com>
5221 * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
5222 and make it work with vectors of element sizes 1, 2 and 4.
5224 * simd-intrinsics.c: Enable getter for all vectors with element size
5227 * simd-methods.h: Add the names of other getters.
5229 * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
5235 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
5237 * mini-ppc.h: portability fix.
5239 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
5241 * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
5242 buggy and will overwrite it.
5244 2008-11-14 Zoltan Varga <vargaz@gmail.com>
5246 * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
5247 Use it to emit local symbols for all methods so AOTed methods show up with
5248 their full name in gdb/valgrind output.
5250 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
5252 * mini-ppc.c: portability fixes.
5254 2008-11-14 Zoltan Varga <vargaz@gmail.com>
5256 * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
5257 entries out of the if (!generic_shared...) code so it is always done.
5258 (mono_class_init_trampoline): Do the patching when running under valgrind
5259 too, newer versions of valgrind have no problems with it.
5261 2008-11-13 Zoltan Varga <vargaz@gmail.com>
5263 * aot-compiler.c (emit_writeout): Rework this to make it easier to add
5266 2008-11-13 Mark Probst <mark.probst@gmail.com>
5268 * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
5271 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
5273 * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui.
5275 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
5277 * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
5283 * simd-intrinsics.c: Same.
5285 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
5287 * simd-intrinsics.c: Enable constructor intrinsics for all types.
5289 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
5291 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
5292 to work with more Vector types.
5294 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
5296 * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
5297 store the elemens directly instead of using and intermediate.
5299 2008-11-13 Zoltan Varga <vargaz@gmail.com>
5301 * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
5303 * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
5304 to preserve %eax for aot plt trampolines.
5306 * aot-compiler.c (compile_method): Don't skip synchronized methods.
5307 (encode_method_ref): Flag synchronized methods so they won't go through
5310 * aot-compiler.c: Additional work to support AOTing synchronized methods/
5313 * cpu-ia64.md (jmp): Increase max length.
5315 2008-11-12 Zoltan Varga <vargaz@gmail.com>
5317 * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
5318 open generic classes.
5320 * aot-compiler.c: Enable the ELF writer on ELF platforms.
5322 * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
5323 box+brtrue optimization since it causes test failures on x86.
5325 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
5327 * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
5333 * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
5334 for simd ctor values.
5336 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
5337 instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
5339 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
5341 * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
5344 * simd-instrincs.c: Same.
5346 * basic-simd.cs: Same.
5348 2008-11-12 Zoltan Varga <vargaz@gmail.com>
5350 * ratests.cs: Add more tests.
5352 * regalloc2.c (add_spill_code): Handle more corner cases.
5354 2008-11-11 Zoltan Varga <vargaz@gmail.com>
5356 * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
5357 (update_liveness): Avoid holes in the liveness ranges of hregs if they are
5358 both the source an destination of an instruction.
5360 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
5362 * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
5363 wapihandles.c: more portability changes.
5365 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
5367 * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
5368 * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
5369 safe to execute in a signal handler and the kernel provides better
5370 the info in /proc/self/smaps. Avoid the assert on sigaction during
5373 2008-11-11 Zoltan Varga <vargaz@gmail.com>
5375 * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
5376 do the bblock linking hack if it is actually needed.
5378 * Makefile.am (patch-libtool): New helper target to patch libtool to speed
5381 * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
5382 crash problem is fixed.
5384 * branch-opts.c (mono_remove_critical_edges): Link up newly added
5387 * mini.c (mini_method_compile): Compute unreachable bblocks properly even
5389 (mini_method_compile): Set the starting value of next_vreg to
5390 MAX_IREGS + MAX_FREGS when using globalra.
5392 * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
5393 filter clauses with BB_EXCEPTION_HANDLER.
5395 * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
5397 2008-11-10 Mark Probst <mark.probst@gmail.com>
5399 * mini-x86.c (mono_arch_get_argument_info): Don't align argument
5400 space for stdcall. Fixes regressions on Win32.
5402 2008-11-10 Zoltan Varga <vargaz@gmail.com>
5404 * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
5406 (linear_scan): Remove an assert which doesn't seem to be needed.
5408 * local-propagation.c (mono_local_deadce): Avoid a call to
5409 MONO_DELETE_INS which would screw up the instruction linking.
5411 * mini.c (mono_decompose_op_imm): Make this work with globalra.
5413 * regalloc2.c: Upgrade to work the current JIT code.
5415 2008-11-09 Zoltan Varga <vargaz@gmail.com>
5417 * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
5420 * aot-runtime.c: Remove some dead code.
5422 * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
5424 (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
5426 * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
5427 trampolines using sscanf since atoi doesn't work on large unsigned values.
5429 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full):
5430 Initialize code_size.
5432 2008-11-08 Mark Probst <mark.probst@gmail.com>
5434 * method-to-ir.c (mini_emit_inst_for_method): Make
5435 Interlocked.CompareExchange work for Int arguments on 32 bit
5438 2008-11-07 Mark Probst <mark.probst@gmail.com>
5440 * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
5442 2008-11-06 Bill Holmes <billholmes54@gmail.com>
5444 * main.c Fix MSVC build.
5446 Contributed under MIT/X11 license.
5448 2008-11-06 Mark Probst <mark.probst@gmail.com>
5450 * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
5451 alignment larger than 8 bytes are aligned correctly, too.
5453 * mini.c: Honor the min_align field of MonoClass when laying out
5456 2008-11-06 Zoltan Varga <vargaz@gmail.com>
5458 * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
5460 * aot-compiler.c (emit_plt): Fix a warning.
5462 * aot-compiler.c: Implement ARM support in the binary writer.
5464 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
5466 * basic-simd.cs: Add test for getter with byref arg.
5467 Fix the naming of a few tests.
5468 Add missing checks to a test.
5470 2008-11-05 Zoltan Varga <vargaz@gmail.com>
5472 * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
5474 * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
5475 most of the full-aot support for monitor enter/exit trampolines.
5477 * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
5478 enter/exit trampoline creation functions.
5480 * Makefile.am: Fix the generation of buildver.h so it is not invoked during
5483 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
5485 * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
5486 incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
5487 implement the needed functionality without adding crap to the runtime.
5489 2008-11-05 Zoltan Varga <vargaz@gmail.com>
5491 * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
5494 * mini.c (mono_build_date): New global version holding the build date in
5497 * Makefile.am (buildver.c): Generate a file containing the build date.
5499 * main.c: Set the build date from the generated file.
5501 * mini.c (mono_get_runtime_build_info): New helper function returning build
5502 information in a string format.
5504 * driver.c (mono_main): Print the build date in --version.
5506 * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
5507 file when the bind-to-runtime-version option is used.
5509 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
5511 * simd-intrinsics.c: Fix bug when using getters and byref args.
5513 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
5515 * simd-methods.h: Rename prefetch methods.
5517 * simd-intrinsics.c: Same.
5519 2008-11-05 Mark Probst <mark.probst@gmail.com>
5521 * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
5524 2008-11-04 Zoltan Varga <vargaz@gmail.com>
5526 * aot-compiler.c: Use the bundled elf header files instead of depending on
5529 * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
5532 * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
5535 2008-11-04 Rodrigo Kumpera <rkumpera@novell.com>
5537 * cpu-x86.md: Add store nta ops.
5543 * mini.h: Add an enum for simd prefetch modes.
5545 * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
5546 of store. Use the changed code to support store nta.
5548 * simd-intrinsics.c: Add prefetch ops for all vector types.
5550 2008-11-04 Zoltan Varga <vargaz@gmail.com>
5552 * aot-compiler.c: Add an option for JIT compiling the methods by multiple
5555 * aot-compiler.c: Use statically allocated buffers for constructing symbol
5558 * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
5561 2008-11-04 Mark Probst <mark.probst@gmail.com>
5563 * mini-x86.c: Fixed commit.
5565 2008-11-04 Zoltan Varga <vargaz@gmail.com>
5567 * aot-compiler.c (emit_plt): Align the plt section only on x86.
5569 2008-11-04 Mark Probst <mark.probst@gmail.com>
5571 * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
5572 and MONITOR_EXIT, for the ASM fastpaths.
5574 * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
5577 * mini.c, patch-info.h: Signature and patch infos for
5578 Monitor.Enter/Exit trampolines.
5580 * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
5582 * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
5583 Monitor.Enter/Exit ASM fastpath for Linux.
5585 2008-11-04 Zoltan Varga <vargaz@gmail.com>
5587 * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
5589 * objects.cs: Add a new test.
5591 * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
5593 * aot-runtime.c (load_method): Run class initialization in the PLT case even
5594 if MONO_LOG_LEVEL is set.
5596 * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
5598 * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
5600 * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
5602 * aot-compiler.c: Change the relocation code to use virtual addresses instead
5603 of file offsets. Align the sections belonging to the data segment to
5606 2008-11-03 Zoltan Varga <vargaz@gmail.com>
5608 * aot-compiler.c: Simplify the elf writer by depending on the definitions in
5609 elf.h. Port it to amd64.
5611 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
5613 * driver.c: Enable SIMD by default.
5615 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
5617 * cpu-x86.md: Add prefetch op.
5623 * mini.h: Add an enum for simd prefetch modes.
5625 * simd-methods.h: Add prefetch function names.
5627 * simd-intrinsics.c: Add prefetch ops for all vector types.
5629 2008-11-03 Zoltan Varga <vargaz@gmail.com>
5631 * aot-compiler.c (emit_bytes): Speed this up a little.
5633 2008-11-02 Zoltan Varga <vargaz@gmail.com>
5635 * aot-compiler.c: Add JIT time etc. statistics.
5637 * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
5639 * mini.h (MonoCompile): Add 'got_offset' field.
5641 * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
5642 method_got_offsets array.
5644 * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
5647 * aot-compiler.c (compile_method): Add generic method instances referenced
5648 by the method to the list of methods to be compiled, this is required so if
5649 A<T> references B<T>, and another assembly references A<int>, then it will
5650 also get a copy of B<int>.
5652 * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
5653 when checking for monitor enter/exit.
5655 2008-10-30 Mark Probst <mark.probst@gmail.com>
5657 * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
5658 for Monitor.Enter and Monitor.Exit if enabled.
5660 * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
5663 2008-10-30 Zoltan Varga <vargaz@gmail.com>
5665 * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
5666 of an OP_MOVE. Fixes #440046.
5668 * basic-long.cs: Add a new test.
5670 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
5672 * mini.h: Add synchronization note for the managed counter-part.
5674 * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
5675 returns the simd caps of the current cpu.
5677 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
5679 * basic-simd.cs: Remove Console.WriteLine.
5681 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5683 * basic-simd.cs: New tests for Vector2ul.
5685 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5687 * simd-intrinsics.c: Add new vector type Vector2ul.
5689 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5691 * basic-simd.cs: New tests for Vector2l.
5693 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5695 * cpu-x86.md: Add long version of most packed int ops.
5701 * simd-intrinsics.c: Add new vector type Vector2l.
5703 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5705 * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
5707 * simd-methods.h: Remove SN_op_BitwiseXor.
5709 2008-10-28 Zoltan Varga <vargaz@gmail.com>
5711 * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
5714 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
5716 * basic-simd.cs: Test for Vector2d.
5718 * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
5721 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
5723 * cpu-x86.md: Add double version of all packed float ops.
5729 * simd-intrinsics.c: Add new vector type Vector2d.
5731 * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
5733 * simd-methods.h: Add Duplicate.
5735 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
5737 * basic-simd.cs: Test for packing with signed saturation.
5739 2008-10-28 Zoltan Varga <vargaz@gmail.com>
5741 * aot-compiler.c (add_generic_instances): Add all methods of generic instances
5742 found in the TYPESPEC table.
5744 2008-10-26 Zoltan Varga <vargaz@gmail.com>
5746 * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
5749 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
5751 * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
5752 instead of the RVA, since the RVA can be changed by tools like the cil
5755 * method-to-ir.c (mono_method_to_ir2): Ditto.
5757 * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
5758 (deserialize_variable): Ditto.
5760 2008-10-25 Martin Baulig <martin@ximian.com>
5762 * debug-mini.c (write_variable): Use
5763 `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
5765 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5767 * cpu-x86.md: Add unsigned variants of packd and packw.
5771 * mini-x86.h: Emit the right instruction for packd and packw.
5772 Add unsigned variants of packd and packw.
5774 * simd-intrinsics.c: Packd and packw were used in place of their
5775 unsigned variants. Change that.
5776 Add intrinsics for (Signed)PackWithSignedSaturation.
5778 * simd-methods.h: Add (Signed)PackWithSignedSaturation.
5780 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5782 * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
5784 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5786 * mini-ops.h: Remove dword packed add/sub with saturation ops.
5788 * cpu-x86.md: Remove dword packed add/sub with saturation ops.
5790 * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
5793 * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
5795 2008-10-24 Mark Probst <mark.probst@gmail.com>
5797 * method-to-ir.c, mini.c: Special casing for the synchronized
5798 wrapper for the ldtoken+GetTypeFromHandle case.
5800 2008-10-24 Zoltan Varga <vargaz@gmail.com>
5802 * mini.c (mono_replace_ins): Move this to branch-opts.c.
5804 * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
5805 created/split bblocks.
5807 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5809 * mini-ops.h: Add packed signed mul high.
5813 * mini-x86.c (mono_arch_output_basic_block): Same.
5815 * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
5817 * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
5819 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5821 * basic-simd.cs: Tests for Vector16sb.
5823 2008-10-24 Zoltan Varga <vargaz@gmail.com>
5825 * inssel.brg (stmt): Fix OP_HARD_NOP rule.
5827 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
5829 * mini-ops.h: Add packed signed min, max and compare greater.
5833 * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
5836 * simd-methods.h: Add CompareGreaterThan.
5838 * simd-methods.h: Remove CompareEquals.
5840 * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
5842 * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
5844 * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
5847 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
5849 * basic-simd.cs: Fix tests due to change in the API.
5851 2008-10-21 Zoltan Varga <vargaz@gmail.com>
5853 * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
5855 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
5857 * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
5859 * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
5860 inst_offset as this has invalid values for LDADDR.
5862 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
5864 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
5866 * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
5868 2008-10-21 Zoltan Varga <vargaz@gmail.com>
5870 * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
5871 for accessing field->data.
5873 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
5875 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
5877 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
5879 * simd-methods.h: Add SignedPackWithUnsignedSaturation.
5881 * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
5883 2008-10-21 Zoltan Varga <vargaz@gmail.com>
5885 * dominators.c (mono_compute_natural_loops): Allocate GList enties
5886 from the cfg mempool.
5888 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
5890 * basic-simd.cs: Tests for new methods in Vector8us.
5892 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
5894 * mini-ops.h: Add multiply and store high.
5898 * mini-x86.c (mono_arch_output_basic_block): Same.
5900 * simd-methods.h: Same.
5902 * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
5905 2008-10-19 Zoltan Varga <vargaz@gmail.com>
5907 * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
5908 mono_class_setup_vtable ().
5910 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
5911 mono_class_get_vtable_entry () for accessing klass->vtable.
5913 * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
5915 * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
5918 * method-to-ir.c (mono_save_token_info): Don't save references made from
5921 * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
5922 of generic instances.
5924 * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
5926 2008-10-19 Mark Probst <mark.probst@gmail.com>
5928 * cpu-ppc.md, mini-ppc.c: The length of the code generated for
5929 OP_JMP depends on the method signature. Calculate it properly.
5931 2008-10-19 Zoltan Varga <vargaz@gmail.com>
5933 * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
5936 * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
5938 (emit_extra_methods): Add another table mapping method indexes to
5939 offsets in the extra_method_info table.
5941 * mini.h: Bump AOT file format version.
5943 * aot-runtime.c: Merge most of the code from mono_aot_get_method
5944 and mono_aot_get_method_from_token () into one function.
5946 2008-10-19 Mark Probst <mark.probst@gmail.com>
5948 * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
5951 2008-10-18 Zoltan Varga <vargaz@gmail.com>
5953 * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
5956 * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
5959 * mini.c (mono_patch_info_equal): Compare the generic context as well.
5961 * mini.h: Bump aot file format version.
5963 * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
5964 AOT file can contain native code for methods which are not in the METHOD
5965 table. Generate code for non-sharable generic instances of generic methods
5966 found in the METHODSPEC table.
5968 * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
5969 encoding generic type handles.
5971 * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
5972 (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
5974 * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
5975 macros + MONO_ADD_INS.
5977 * mini.c (mono_jump_info_token_new2): New function which takes a generic
5980 * mini.h (MonoJumpInfoToken): Include fields for a generic context.
5982 * mini.h: Bump aot file format version.
5984 * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
5986 2008-10-17 Mark Probst <mark.probst@gmail.com>
5988 * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
5989 platforms, with definable stack alignment value. Set to 16 now
5992 * mini.c, mini.h, driver.c: Command line option for disabling
5995 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
5997 * basic-simd.cs: Tests for new methods in Vector4ui.
5999 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
6001 * mini-ops.h: Add packed int shuffle.
6005 * mini-x86.c (mono_arch_output_basic_block): Same.
6007 * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
6008 extract mask, max, min, shuffle.
6010 * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
6012 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
6014 * basic-simd.cs: Tests for new methods in Vector8us.
6016 2008-10-17 Mark Probst <mark.probst@gmail.com>
6018 * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
6019 RuntimeTypeHandle, not a TypedReference.
6021 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
6023 * simd-intrinsics.c: remove relocations.
6025 2008-10-17 Zoltan Varga <vargaz@gmail.com>
6027 * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM
6028 optimizations from the x86 backend.
6030 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
6032 * simd-methods.h, simd-intrinsics.c: debloat method names and
6033 prepare for no relocations.
6035 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
6037 * mini-ops.h: Add packed min/equal and sum of absolute differences.
6041 * mini-x86.c (mono_arch_output_basic_block): Same.
6043 * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
6044 extract mask, max, min and sum of absolute differences.
6046 * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
6049 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
6051 * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
6052 Renamed one test for consistency.
6054 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
6056 * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
6057 fix to the code that deal with other blocks.
6059 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
6061 * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
6063 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
6065 * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
6066 that deals with vreg interference. Explicitly check for OP_LDADDR to be
6067 able to process the source reg.
6069 2008-10-16 Martin Baulig <martin@ximian.com>
6071 * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
6073 * inssel.brg: Add `OP_HARD_NOP'.
6075 * mini.h (MonoCompile): Added `keep_cil_nops' flag.
6077 * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
6078 `OP_HARD_NOP' instruction when running inside the debugger.
6080 * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
6081 `OP_HARD_NOP' instruction when running inside the debugger.
6083 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
6085 * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
6086 now works. The issue with the regalloc tripping up no longer
6089 * simd-intrinsics.c (load_simd_vreg): Same.
6091 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
6093 * basic-simd.cs: Tests for new Vector8ui methods.
6095 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
6097 * simd-intrinsics.c (get_simd_vreg): Simplify code and test
6098 only for type. This fixes crashes where MonoInst::klass is checked
6099 for ops of type != VTYPE or OBJ.
6101 * simd-intrinsics.c (load_simd_vreg): Same.
6103 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
6105 * mini-ops.h: Add ops for packed shuffle/max/avg and
6110 * mini-x86.c (mono_arch_output_basic_block): Same.
6112 * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
6115 * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
6116 to emit extract mask op.
6118 * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
6119 to emit word shuffles.
6121 2008-10-15 Mark Probst <mark.probst@gmail.com>
6123 * mini.c (mono_allocate_stack_slots_full): Align stack frame to
6124 the largest alignment needed by a variable, but at least
6127 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
6129 * basic-simd.cs: Tests for the fixes in the last commit.
6131 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
6133 * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
6134 no longer handles STACK_PTR input.
6136 * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
6138 * simd-intrinsics.c (load_simd_vreg): New function that works like
6139 get_simd_vreg but handles STACK_PTR input.
6141 * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
6142 as the input can be an arbitrary pointer.
6144 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
6145 LDADDR local optimization directly otherwise use a store op.
6147 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
6149 * basic-simd.cs: Tests for dup low and dup high.
6151 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
6153 * mini-ops.h: Add dup low and dup high ops.
6157 * mini-x86.c (mono_arch_output_basic_block): Same.
6159 * simd-intrinsics.c (vector4f_intrinsics): Same.
6161 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
6163 * basic-simd.cs: Tests for recently added functionality.
6165 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
6167 * mini-ops.h: Add remaining sse1 fp ops.
6169 * cpu-x86.md: Add remaining sse1 fp ops.
6171 * mini-x86.c (mono_arch_output_basic_block): Same.
6173 * mini.h: Add enum for simd FP compare conditions.
6175 * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
6177 * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
6178 so the backed can generate the appropriate op.
6180 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
6181 This patch squeese one more byte from the SimdIntrinsc struct.
6183 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
6184 a a shift amount intead of simply or'ing it.
6186 * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
6188 * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
6189 byte so we can have an aditional flags field without increasing struct size.
6191 * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
6192 against the simd_supported_versions bitmask.
6194 * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
6196 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
6198 * mini.c: remove rawbuffer code (the only use here is unsafe because
6199 it takes locks during signal handling and the kernel now provides much
6200 better info in proc/pid/smaps these days).
6202 2008-10-13 Zoltan Varga <vargaz@gmail.com>
6204 * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
6205 OP_X86_PUSH_OBJ. Fixes #434620.
6207 * objects.cs: Add a test.
6209 2008-10-12 Rodrigo Kumpera <rkumpera@novell.com>
6211 * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
6212 that the packuswb/packusdw don't work with unsigned numbers for what
6213 would be negative numbers in signed format.
6215 * cpu-x86.md: Add doubleword forms of many ops and packing ones.
6216 Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
6218 * mini-ops.h: Add doubleword forms of many ops and packing ones.
6220 * mini-x86.c: Emit doubleword forms of many ops and packing ones.
6222 * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
6224 * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
6226 * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
6229 * simd-intrinsics.c (simd_version_name): New function, returns the name of the
6230 version as the enum in mini.h.
6232 * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
6233 for sse3 ops, check the simd_version field if present. This way the code
6234 works with all versions of sse.
6236 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6238 * simd-intrinsics.c: Fixed intrinsic name typo.
6240 * mini.h: Added missing simd exported function.
6242 * basic-simd.cs: Added tests for Vector4ui.
6243 Fixed broken test for Vector16b.
6245 2008-10-10 Zoltan Varga <vargaz@gmail.com>
6247 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
6248 the max length to 64.
6250 2008-10-10 Mark Probst <mark.probst@gmail.com>
6252 * method-to-ir.c: Only do the fast virtual generic method call for
6253 non-wrapper methods.
6255 * mini.h, mini-trampolines.c: The new generic virtual remoting
6256 trampoline handles virtual method calls via the vtable (as done by
6257 the fast virtual generic method calls) to remoting proxies.
6259 * mini.c (mono_jit_create_remoting_trampoline): For generic
6260 methods reate a generic virtual remoting trampoline.
6262 * mini-amd64.h: Enable fast virtual generic method calls again.
6264 2008-10-10 Mark Probst <mark.probst@gmail.com>
6266 * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
6267 restore registers when doing tail calls.
6269 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6271 * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
6274 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6276 * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
6278 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6280 * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
6282 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6284 * basic-simd.cs: Retrofit for API changes.
6286 2008-10-10 Mark Probst <mark.probst@gmail.com>
6288 * mini-ppc.c: Handle integer stack arguments for tail calls.
6290 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6292 * optflags-def.h: Removed sse3 optimization.
6296 * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
6299 * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
6301 * mini.h: Added enumeration with simd versions.
6303 * simd-intrinsics.c (emit_intrinsics): Use the new static var
6306 * simd-intrinsics.c: Added mono_simd_intrinsics_init.
6308 * mini.c (mini_init): Call mono_simd_intrinsics_init.
6310 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
6312 * basic-simd.cs: Added tests for Vector8u and Vector16u.
6314 * basic-simd.cs: Fixed test naming.
6316 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
6318 * mini-ops.h: Added ops for packed and saturated math, shifts
6319 and packing/unpacking.
6321 * cpu-x86.md: Added descriptors for the above ops.
6323 * mini-x86.c: Added code to emmit the above ops.
6325 * simd-intrinsics.c: Added support for Vector16u and Vector8u.
6327 2008-10-08 Zoltan Varga <vargaz@gmail.com>
6329 * aot-compiler.c (compile_method): Enable AOT for generic code.
6331 * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
6333 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
6335 * mini.c: add a workaround for a common screwup that ends up blamed
6336 to mono (other processes blocking signal delivery).
6338 2008-10-07 Zoltan Varga <vargaz@gmail.com>
6340 * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
6341 in the LDFLD/STFLD opcodes. Fixes #432673.
6343 * iltests.il.in: Add a new test.
6345 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
6347 * mini-arm.c: attach the thread in unmanaged->managed transitions
6348 using delegates (bug #433148).
6350 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
6352 * basic-simd.cs: Use new ShuffleSel constants.
6354 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
6356 * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
6358 * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
6359 only disable simd intrinsics if no sse2 is detected.
6361 * optflags-def.h: Added sse3.
6363 * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
6366 2008-10-07 Zoltan Varga <vargaz@gmail.com>
6368 * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
6369 when adding delegate-invoke wrappers.
6371 2008-10-07 Zoltan Varga <vargaz@gmail.com>
6373 * Makefile.am: Reenable the simd tests.
6375 2008-10-07 Bill Holmes <billholmes54@gmail.com>
6377 * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
6378 add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
6379 other vreg is allocated to that hreg.
6381 Contributed under MIT/X11 license.
6383 2008-10-07 Zoltan Varga <vargaz@gmail.com>
6385 * Makefile.am: Disable the simd tests for now as Mono.Simd is not
6388 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
6390 * basic-simd.cs: New test suite for SIMD intrinsics.
6392 * Makefile.am: Added new tests.
6394 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
6396 * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
6400 * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
6402 * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
6403 using SSE2 aware opcodes.
6405 * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
6406 is enabled, this code path is only reachable if conversion ops are emmited after
6409 * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
6411 This optimization saves 6 bytes per conversion against the old version.
6413 2008-10-06 Zoltan Varga <vargaz@gmail.com>
6415 * aot-compiler.c (compile_method): Don't skip methods referencing
6416 generic methods without a corresponding entry in token_info_hash, since
6417 encode_method_ref () can handle all generic methods now.
6419 * method-to-ir.c (mono_save_token_info): Don't save the token info if a
6420 generic context is set.
6422 * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
6423 generic sharing of LDTOKEN.
6425 2008-10-06 Mark Probst <mark.probst@gmail.com>
6427 * mini-amd64.h: Temporarily disabled fast virtual generic method
6428 calls because it breaks the System.Runtime.Remoting tests.
6430 2008-10-06 Zoltan Varga <vargaz@gmail.com>
6432 * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
6434 * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
6435 so inlining actually works.
6436 (check_inline_caller_method_name_limit): Ditto.
6438 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
6440 * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
6441 64 bit safety (from Olaf Hering and Andreas Farber).
6443 2008-10-06 Zoltan Varga <vargaz@gmail.com>
6445 * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
6446 mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
6447 unused virtual call support code.
6449 * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
6451 * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
6452 which can't use aot trampolines.
6453 (decode_patch): Don't create aot trampolines for methods which can't use
6456 * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
6457 use aot trampolines.
6459 * mini.h: Bump AOT image format version.
6461 2008-10-05 Zoltan Varga <vargaz@gmail.com>
6463 * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
6464 to save_token_info () since cmethod is inflated for constrained calls.
6466 * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
6468 2008-10-04 Andreas Farber <andreas.faerber@web.de>
6470 * Makefile.am: Add build rules for ppc64.
6471 This avoids the build failing at pedump with unresolved symbols
6472 due to lack of arch_sources. Instead it will now fail earlier
6473 due to lack of cpu-ppc64.md.
6475 Contributed under MIT/X11 license.
6477 2008-10-04 Mark Probst <mark.probst@gmail.com>
6479 * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
6482 * iltests.il.in: Add test case for tail call with many arguments.
6484 2008-10-03 Zoltan Varga <vargaz@gmail.com>
6486 * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
6487 to the fast virtual generic method code until the aot case is fixed.
6489 2008-10-03 Mark Probst <mark.probst@gmail.com>
6491 * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
6493 2008-10-03 Mark Probst <mark.probst@gmail.com>
6495 * mini-amd64.c, mini-amd64.h: Implement generic virtual method
6498 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
6500 * simd-intrinsics.c: Forgot to add this one.
6502 * mini-codegen.c: Fix macro in case SIMD is not supported.
6504 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
6506 This patch land initial JIT support for simd intrinsics.
6508 * mini-x86.h: Added new define to make --enable_minimal work on x86.
6510 * Makefile.am: Added simd-intrinsics.c
6512 * simd-intrinsics.c: New file with simd instrinsic related
6515 * cfold.c (mono_constant_fold_ins2): Fold XZERO.
6517 * cpu-x86.md: Add simd related instructions.
6519 * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
6521 * driver.c: Added two new --regression variants.
6523 * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
6525 * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
6527 * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
6528 extract some complicated logic to helper functions.
6530 * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
6532 * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
6534 * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
6535 the specialized simplification pass.
6537 * method-to-ir.c (mono_spill_global_vars): Use new macro.
6539 * mini-codegen.c: Added SIMD constants to all regbanks arrays.
6541 * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
6544 * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
6545 if MONO_ARCH_NEED_SIMD_BANK is defined.
6547 * mini-ops.h: Added the new simd ops.
6549 * mini-x86.c: Added mono_arch_xregname.
6551 * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
6553 * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
6555 * mini-x86.h: Define simd related MONO_ARCH macros.
6557 * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
6559 * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
6561 * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
6562 MONO_CLASS_IS_SIMD to deal with simd related IR.
6564 * mini.h (MonoInst): Added spill_var to the backend union.
6566 * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
6568 * mini.h: Added forward declarations of the new simd fuctions.
6570 * optflags-def.h: Added new optimization names SIMD.
6572 * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
6574 * regalloc.h: Added support for working with 3 register banks.
6576 * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
6578 * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
6580 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
6582 * mini-exceptions.c: remove 64 bit related ifdef clutter.
6584 2008-10-03 Zoltan Varga <vargaz@gmail.com>
6586 * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
6587 instead of one on 64 bit systems.
6589 * method-to-ir.c: Remove unused includes.
6591 2008-10-02 Zoltan Varga <vargaz@gmail.com>
6593 * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
6594 cfg->used_int_regs, since the two are different on arm.
6596 2008-10-02 Mark Probst <mark.probst@gmail.com>
6598 * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
6599 mono_method_get_vtable_index() to get the vtable index.
6601 2008-10-02 Mark Probst <mark.probst@gmail.com>
6603 * method-to-ir.c (mono_method_to_ir2): Don't create native
6604 wrappers for array methods, because they're never called (and if
6605 they were called they wouldn't work).
6607 2008-10-02 Mark Probst <mark.probst@gmail.com>
6609 * method-to-ir.c (mono_method_to_ir2): Array methods are
6610 special-cased and must not be invoked indirectly via the (M)RGCTX
6611 when generic sharing is turned on. Fixes #431413.
6613 2008-10-01 Mark Probst <mark.probst@gmail.com>
6615 * method-to-ir.c: When generic sharing is active, call
6616 non-interface virtual generic methods via the standard trampoline.
6618 * mini-trampolines.c: Handle virtual generic shared methods.
6620 * mini.h, mini-x86.c, mini-x86.h: New argument for
6621 mono_arch_build_imt_thunk() which is non-NULL for virtual generic
6622 method thunks and which is the trampoline to call if the lookup
6623 fails. Enable the virtual generic method thunk for x86.
6625 * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
6626 mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
6627 argument but assert that it's NULL, because these archs don't yet
6628 implement the virtual generic method thunk. Changes in the IMT
6629 thunk data structures.
6631 2008-10-01 Zoltan Varga <vargaz@gmail.com>
6633 * aot-compiler.c (emit_globals): Avoid invalid characters in
6634 the static linking symbol.
6636 * objects.cs: Add a test for the range check optimization. Fix warnings.
6638 * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
6639 optimization from the current JIT.
6641 * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
6642 later in decompose_array_access_opts () to allow more optimizations.
6644 * method-to-ir.c (mono_handle_soft_float): Rename this to
6645 mono_decompose_soft_float () for consistency.
6647 * mini-ops.h: Fix arguments of OP_STRLEN.
6649 * method-to-ir.c (save_cast_details): Extract the cast details saving code
6650 into a separate function.
6651 (reset_cast_details): Ditto.
6652 (handle_unbox): Save cast details. Fixes #431254.
6654 * method-to-ir.c: Remove some obsolete FIXMEs.
6656 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
6658 * ir-emit.h (alloc_dreg): Write a warning before crashing.
6660 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
6662 * mini-codegen.c: More work on macros to make them
6663 ready for multiple regbanks.
6665 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
6667 * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
6669 * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
6671 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
6673 * mini-codegen.c (mono_spillvar_offset): Proper support for
6676 2008-09-30 Zoltan Varga <vargaz@gmail.com>
6678 * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
6679 the stack overflow changes.
6681 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
6683 * mini-codegen.c: Make all bank macros depend on reg_bank.
6685 * mini-codegen.c (mono_local_regalloc): Make free mask
6686 initialization regbank aware.
6688 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
6690 * mini-codegen.c (mono_local_regalloc): Extract callee
6691 mask selection to a function and make it regbank aware.
6693 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
6695 * mini-codegen.c (mono_local_regalloc): Changed the cloberring
6696 code to deal with many regbanks.
6698 2008-09-30 Zoltan Varga <vargaz@gmail.com>
6700 * mini-codegen.c: More fp->regbank changes.
6702 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
6704 * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
6705 of a hardcoded constant.
6707 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
6709 * method-to-ir.c (type_from_stack_type): Fix typo.
6711 2008-09-29 Zoltan Varga <vargaz@gmail.com>
6713 * mini-ia64.c (emit_move_return_value): Convert float return values to
6716 * objects.cs: Add a new test.
6718 * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
6719 VARARG methods to fix an assert later.
6721 * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
6722 end so it at least compiles.
6724 2008-09-28 Zoltan Varga <vargaz@gmail.com>
6726 * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
6728 2008-09-28 Rodrigo Kumpera <rkumpera@novell.com>
6730 * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
6731 optimization to a new function (emit_optimized_ldloca_ir) and enable
6732 it for both ldloca and ldloca_s.
6734 2008-09-28 Zoltan Varga <vargaz@gmail.com>
6736 * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
6737 gshared CASTCLASS code.
6739 * driver.c (mono_main): Add a workaround for shutdown crashes seen on
6740 amd64, where the libc stack unwinder encounters stack frames referring to
6741 native code in unmapped memory.
6743 * method-to-ir.c (mini_emit_check_array_type): Add support for generic
6746 * generics.cs: Add new test.
6748 2008-09-27 Zoltan Varga <vargaz@gmail.com>
6750 * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
6751 add a check that one of the ARM_FPU_ constants is defined.
6753 * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
6755 * mini-exceptions.c: Fix build on non-altstack platforms.
6757 * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
6760 * ir-emit.h: Add a comment to NEW_PCONST.
6762 * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
6764 * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
6766 * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
6767 after the changes to MonoJitDomainInfo.
6769 2008-09-27 Mark Probst <mark.probst@gmail.com>
6771 * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
6773 2008-09-27 Mark Probst <mark.probst@gmail.com>
6775 * mini-ppc.c: Compiler warning fixes.
6777 2008-09-27 Mark Probst <mark.probst@gmail.com>
6779 * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
6782 2008-09-27 Mark Probst <mark.probst@gmail.com>
6784 * exceptions-ppc.c, mini-ppc.h: Compile
6785 mono_arch_handle_altstack_exception() on Darwin, too.
6787 2008-09-27 Mark Probst <mark.probst@gmail.com>
6789 * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
6790 work on archs which don't have generic sharing implemented, only
6791 without the vtable_arg.
6793 2008-09-26 Mark Probst <mark.probst@gmail.com>
6795 * mini.c: Added comment explaining why delegate ctor icall
6796 wrappers are compiled.
6798 2008-09-26 Mark Probst <mark.probst@gmail.com>
6800 * mini.c: Don't produce trampolines to delegate ctor icall
6801 wrappers but compile them upfront.
6803 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
6805 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
6806 runtime-set function when going back to managed code. Currently this
6807 is used to set back the protection on the soft ovf pages and/or to
6808 throw the stack overflow exception that happened in unmanaged code.
6810 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
6812 * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
6813 runtime-set function when going back to managed code. Currently this
6814 is used to set back the protection on the soft ovf pages and/or to
6815 throw the stack overflow exception that happened in unmanaged code.
6817 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
6819 * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
6820 the support code for restoring stack protection after stack overflows
6821 that happen in unmanaged code. Don't set the exec permission on the
6824 2008-09-26 Zoltan Varga <vargaz@gmail.com>
6826 * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
6827 delegate->method_ptr is set. Fixes #428054.
6829 2008-09-25 Zoltan Varga <vargaz@gmail.com>
6831 * tests.cs: Rename to ratests.cs.
6833 * method-to-ir.c: Merge the emit_get_rgctx () calls into the
6834 emit_get_rgctx_... functions.
6836 2008-09-25 Mark Probst <mark.probst@gmail.com>
6838 * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
6840 2008-09-25 Mark Probst <mark.probst@gmail.com>
6842 * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
6843 before asserting that method is sharable.
6845 2008-09-25 Mark Probst <mark.probst@gmail.com>
6847 * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
6848 whether method needs a static RGCTX wrapper used instead of
6851 * generic-sharing.c, mini.h: A few functions moved to
6852 metadata/generic-sharing.c.
6854 2008-09-25 Mark Probst <mark.probst@gmail.com>
6856 * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
6857 Generic code sharing for value types, which essentially means
6858 treating value type methods like static methods. The RGCTX is
6859 passed in the same way.
6861 2008-09-25 Zoltan Varga <vargaz@gmail.com>
6863 * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
6864 opcode when creating multi-dimensional arrays of open types.
6866 * generic-sharing.c (mono_method_check_context_used): Handle arrays of
6869 * generics.cs: Add a test.
6871 * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
6873 2008-09-24 Zoltan Varga <vargaz@gmail.com>
6875 * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
6877 * mini.c (mini_method_compile): Set it when running under the debugger.
6879 * method-to-ir.c (mono_handle_global_vregs): Disable global->local
6880 vreg optimization if the flag is set.
6882 * driver.c (mono_main): Add --attach= option to pass options to
6885 * mini.c (sigquit_signal_handler): Start the attach agent.
6887 * ssapre.c: Disable this to save space since it is not yet ported to
6890 * regalloc2.c: Disable this to save space.
6892 * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
6894 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
6896 * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
6897 the -v option useful again.
6899 2008-09-24 Zoltan Varga <vargaz@gmail.com>
6901 * mini-amd64.c (mono_arch_output_basic_block): Add support for
6904 * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
6905 arrays of arrays. Fixes #428406.
6907 * method-to-ir.c (mini_emit_castclass): Ditto.
6909 * objects.cs: Add new test.
6911 2008-09-23 Rodrigo Kumpera <rkumpera@novell.com>
6913 * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
6914 was wrong at it choked against target_type_is_incompatible for byref types.
6916 2008-09-23 Zoltan Varga <vargaz@gmail.com>
6918 * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most
6921 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
6923 * mini-exceptions.c: update a few more exceptions-related counters.
6925 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
6927 * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
6928 new functions to allocate from persistent mempools.
6930 2008-09-23 Zoltan Varga <vargaz@gmail.com>
6932 * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow
6933 multiple register banks in the future.
6935 * mini-codegen.c (mono_local_regalloc): Fix a warning.
6937 2008-09-22 Rodrigo Kumpera <rkumpera@novell.com>
6939 * mini.c (type_to_eval_stack_type): Remove duplicated function.
6941 * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
6943 * mini.h: Export type_to_eval_stack_type.
6945 This function was nearly duplicated in method-to-ir.c and mini.c. The difference
6946 is only ins->klass of byref types.
6948 2008-09-22 Zoltan Varga <vargaz@gmail.com>
6950 * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
6951 (mini_emit_memcpy2): Ditto.
6953 * mini-amd64.c: Fix a warning.
6955 2008-09-21 Mark Probst <mark.probst@gmail.com>
6957 * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
6960 2008-09-19 Rodrigo Kumpera <rkumpera@novell.com>
6962 * method-to-ir.c: Extract stloc micro-optimization to a
6963 function and apply it to all cases.
6965 2008-09-19 Mark Probst <mark.probst@gmail.com>
6967 * method-to-ir.c: Don't fail generic code sharing in cases we
6970 2008-09-18 Mark Probst <mark.probst@gmail.com>
6972 * mini-ppc.c: Handle structs in tailcalls on Darwin.
6974 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
6976 * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
6979 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
6981 * trace.c: make tracing more useful and correct, with per-thread
6984 2008-09-15 Mark Probst <mark.probst@gmail.com>
6986 * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
6987 doing a method call and the argument is an R4.
6989 2008-09-14 Zoltan Varga <vargaz@gmail.com>
6991 * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
6994 2008-09-13 Mark Probst <mark.probst@gmail.com>
6996 * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
6998 2008-09-12 Zoltan Varga <vargaz@gmail.com>
7000 * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
7001 (MONO_JUMP_TABLE_FROM_INS): Ditto.
7003 2008-09-11 Zoltan Varga <vargaz@gmail.com>
7005 * driver.c: Add a --agent argument (not supported yet) to load managed
7006 agent assemblies before loading the main assembly, similarly to how the
7007 Java VM handles agents.
7009 2008-09-11 Mark Probst <mark.probst@gmail.com>
7011 * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
7012 function to do stack layout of local variables.
7014 2008-09-11 Mark Probst <mark.probst@gmail.com>
7016 * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
7019 2008-09-11 Zoltan Varga <vargaz@gmail.com>
7021 * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
7022 abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
7023 JIT if DISABLE_JIT is defined.
7025 * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
7028 2008-09-10 Mark Probst <mark.probst@gmail.com>
7030 * iltests.il.in: Disable the fconv test on PPC (the result is
7031 undefined according to ECMA).
7033 2008-09-10 Mark Probst <mark.probst@gmail.com>
7035 * iltests.il.in: Enable tail call tests for PPC.
7037 * mini.h: Add variable for storing incoming valuetype argument
7038 addresses for tail calls.
7040 * mini-ppc.c: Implement valuetype arguments and return values for
7043 2008-09-09 Mark Probst <mark.probst@gmail.com>
7045 * mini-ppc.c: Partially implement tail calls (struct arguments and
7046 return values not supported).
7048 * method-to-ir.c: Enable tail calls on PPC.
7050 2008-09-08 Zoltan Varga <vargaz@gmail.com>
7052 * aot-compiler.c (emit_wrapper_info): Omit the klass name from
7053 runtime-invoke wrappers to work around the problem of them getting
7054 assigned to a random class.
7056 * aot-runtime.c (mono_aot_get_method): Ditto.
7058 2008-09-07 Zoltan Varga <vargaz@gmail.com>
7060 * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
7061 the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
7063 2008-09-07 Mark Probst <mark.probst@gmail.com>
7065 * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
7066 until they're implemented properly.
7068 * exceptions-ppc.c: Use arch-independent exception-handling code
7069 instead of custom one.
7071 * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
7074 * tramp-ppc.c, mini-ppc.c: Fixed warnings.
7076 * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
7077 applies when __powerpc__ is defined.
7079 2008-09-06 Zoltan Varga <vargaz@gmail.com>
7081 * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
7082 methods to their code to avoid computing the full name of wrappers and
7083 doing a lookup in a string hash table.
7085 2008-09-05 Zoltan Varga <vargaz@gmail.com>
7087 * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
7088 we identify bblocks before method_to_ir () is ran.
7090 * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
7091 Also avoid optimizing branches pointing to themselves.
7093 * mini.c (mini_method_compile): Ditto. Fixes #422947.
7095 2008-09-05 Rodrigo Kumpera <rkumpera@novell.com>
7097 * driver.c (mono_main): Enable the new verifier under core-clr and cas.
7099 2008-09-05 Zoltan Varga <vargaz@gmail.com>
7101 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
7102 (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
7103 (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
7106 * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all
7107 jumped to the same entry in plt_jump_table.
7109 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
7111 * method-to-ir.c (initialize_array_data): Handle field with RVA from
7114 2008-08-31 Zoltan Varga <vargaz@gmail.com>
7116 * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
7117 other assignment can be if converted. Saves 1.5% on corlib size and fixes
7120 2008-08-29 Geoff Norton <gnorton@novell.com>
7122 * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
7123 segment, and doesn't properly handle .space as .text. Fixes
7126 2008-08-29 Geoff Norton <gnorton@novell.com>
7128 * mini.c: Disable the mach exception handler when running on
7131 2008-08-29 Geoff Norton <gnorton@novell.com>
7133 * aot-compiler.c: Patch from Renaldas Zioma to properly register
7134 globals on Darwin/ARM
7136 2008-08-28 Zoltan Varga <vargaz@gmail.com>
7138 * mini.c: Avoid not initializing the runtime when doing AOT compilation,
7139 since too many things depend on it. Instead, call
7140 mono_runtime_set_no_exec ().
7142 * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
7145 * aot-compiler.c: Add an 'asm-only' AOT option.
7147 * mini.c: Avoid initializing the runtime when doing AOT compilation.
7149 * aot-compiler.c (compile_method): Disable gshared support for now as it
7152 2008-08-27 Bill Holmes <billholmes54@gmail.com>
7154 * mini-amd64.h : Fix a compiler warning.
7156 * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
7157 Changed to use a callback function to retrieve the unwind info.
7158 This avoids problems observed when code blocks were removed by
7159 unloading an app domain.
7161 * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole
7162 and branch excludes for Winx64. The fix in exceptions-amd64.c allows them
7165 Contributed under MIT/X11 license.
7167 2008-08-27 Bill Holmes <billholmes54@gmail.com>
7169 * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
7170 case to keep the stack aligned to 8.
7172 Contributed under MIT/X11 license.
7174 2008-08-26 Zoltan Varga <vargaz@gmail.com>
7176 * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
7177 avoid repeated linear searches.
7179 2008-08-25 Zoltan Varga <vargaz@gmail.com>
7181 * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
7182 methods it can't handle.
7184 * aot-compiler.c (add_method): Avoid adding a method twice.
7185 (add_wrappers): Add runtime invoke wrappers for all methods.
7187 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
7188 function to create an aot-compatible version of this trampoline.
7190 * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
7192 2008-08-24 Zoltan Varga <vargaz@gmail.com>
7194 * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
7196 * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
7197 with a generic sharing failure.
7199 * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
7201 * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
7202 CEE_RETHROW. Fixes #419634.
7204 * mini.c (mono_method_to_ir): Ditto.
7206 * exceptions.cs: Add a new test.
7208 * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
7209 to mono_type_stack_size_internal () since some callers might not pass in
7212 * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
7213 instrument_prolog. Fixes #419878.
7215 * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
7216 doubles in soft float mode volatile.
7218 2008-08-23 Zoltan Varga <vargaz@gmail.com>
7220 * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
7222 * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
7223 to handle soft float correctly.
7225 * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
7228 * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
7230 * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
7231 to sp, since the generics catch code requires it.
7233 * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
7236 * method-to-ir.c (emit_imt_argument): Pass imt_arg to
7237 mono_arch_emit_imt_argument ().
7239 * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
7241 * mini-arm.c tramp-arm.c: Generic sharing updates.
7243 2008-08-22 Zoltan Varga <vargaz@gmail.com>
7245 * mini-arm.c: Fix the arm build.
7247 * generic-sharing.c (mini_type_get_underlying_type): New helper function
7248 handling enums, generic instances and generic sharing.
7249 (mini_type_stack_size_full): Ditto.
7251 * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
7253 * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
7255 * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
7257 * tramp-arm.c: Implement the rgctx fetch and the generic class init
7260 * mini-arm.c: Various small generic sharing changes.
7262 * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
7264 (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
7267 * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
7268 helper function to return a generic class init trampoline.
7270 * method-to-ir.c mini.c: Use it.
7272 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
7273 arch-specfic function to return a generic class init trampoline.
7275 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
7276 the GENERIC_CLASS_INIT custom code.
7278 * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
7279 a fatal error, not a sharing failure.
7281 * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
7284 * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
7285 trampoline argument from MONO_ARCH_VTABLE_REG.
7287 * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
7288 order of the arguments to the C trampoline: pass 'slot' as the trampoline
7289 argument, and pass the vtable in VTABLE_REG.
7291 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
7292 order of the arguments to the C trampoline: pass 'slot' as the trampoline
7293 argument, and pass the vtable in VTABLE_REG.
7294 (mono_arch_create_trampoline_code_full): Remove some special casing for
7295 the rgctx fetch trampoline.
7297 * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
7300 * iltests.il: Add a test for it.
7302 2008-08-21 Zoltan Varga <vargaz@gmail.com>
7304 * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
7306 * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
7309 * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
7310 use mono_jit_info_table_find () to avoid recursion.
7311 (mono_delegate_trampoline): Add a sync wrapper here.
7313 * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
7316 * mini.c (mono_method_to_ir): Ditto.
7318 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
7319 add_sync_wrapper argument. Don't add a sync wrapper here.
7320 (mono_create_jump_trampoline): Don't add a sync wrapper here.
7322 * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
7324 2008-08-20 Bill Holmes <billholmes54@gmail.com>
7326 * exceptions-amd64.c (seh_handler): For Winx64 adding missing copy
7327 of nonvolatile registers back from MonoContext to CONTEXT.
7329 Contributed under MIT/X11 license.
7331 2008-08-20 Bill Holmes <billholmes54@gmail.com>
7333 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): When shifting the
7334 arguments on Winx64 there are only 4 argument registers. For this
7335 logic to work the last argument must be pulled from the stack.
7337 Contributed under MIT/X11 license.
7339 2008-08-20 Zoltan Varga <vargaz@gmail.com>
7341 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7343 * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
7344 MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
7345 encode/decode_method_ref ().
7347 * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
7349 * aot-runtime.c (decode_patch): Ditto.
7351 * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
7352 MONO_PATCH_INFO_METHOD.
7354 * aot-runtime.c (decode_exception_debug_info): Decode the contents of
7357 * aot-compiler.c (emit_exception_debug_info): Emit the contents of
7360 * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
7362 * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
7363 one from the caller.
7365 * aot-runtime.c (decode_generic_inst): New function to decode and
7366 return a interned generic inst.
7367 (decode_klass_ref): Use it.
7368 (decode_method_ref): Ditto.
7370 * aot-compiler.c (emit_exception_debug_info): Save
7371 jinfo->has_generic_jit_info too.
7373 2008-08-19 Zoltan Varga <vargaz@gmail.com>
7375 * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
7377 * iltests.il.in: Add a test for fconv_to_i.
7379 * liveness.c: Disable the liveness2 pass for now to save space.
7381 * regalloc2.c: Include mempool-internals.h to fix warnings.
7383 * aot-compiler.c (encode_method_ref): Encode the context of generic
7386 * aot-runtime.c (decode_method_ref): Inflate generic methods using
7387 the context saved in the aot file.
7389 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7391 * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
7393 * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
7394 volatile so they won't be optimized away.
7396 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
7402 * dominators.c: Remove duplicated functions that now are in
7403 mempool-internals.h.
7405 2008-08-19 Zoltan Varga <vargaz@gmail.com>
7407 * aot-compiler.c: Fix warnings.
7409 * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
7411 * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
7413 * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
7416 * mini.c (mono_resolve_patch_target): Ditto.
7418 * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
7419 (encode_klass_ref): Add support for encoding VARs/MVARs.
7421 * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
7423 * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
7424 the handling of the got entries into a separate 'decode_got_entry' function.
7425 Add support for RGCTX_FETCH.
7427 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
7428 clobbered by the trampoline code.
7430 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
7431 not clobbered by the indirect calling code.
7433 2008-08-18 Zoltan Varga <vargaz@gmail.com>
7435 * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
7438 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
7440 * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
7441 signature using the compilation mempool otherwise we would leak it.
7443 2008-08-18 Zoltan Varga <vargaz@gmail.com>
7445 * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
7446 mono_emit_abs_call ().
7448 * patch-info.h: Add GENERIC_CLASS_INIT.
7450 * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
7452 * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
7453 as their target as a near call.
7455 * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
7457 (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
7459 * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
7460 call to a runtime function described by a patch.
7462 * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
7463 mono_emit_abs_call, this has the advantage that the ABS handling code in
7464 mono_codegen () can handle them both, and can handle other stuff in the
7465 future without additional code.
7467 * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
7469 (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
7472 * mini.h: Add missing bblock related prototypes.
7474 * mini.h (MonoCompile): Remove unused reverse_inst_list and
7475 reverse_inst_list_len fields.
7477 * mini.c: Refactor this file a bit by moving branch optimizations to
7480 * method-to-ir.c: Merge generic sharing changes missed earlier.
7482 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
7484 * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
7485 shared patches. Process METHODCONST as a shared patch.
7487 * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
7488 as it crashes on the 2.0 mscorlib.
7490 * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
7493 * aot-compiler.c: Use is_plt_patch () in a few additional places.
7494 (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
7497 * aot-compiler.c: Reorganize the got handling code to be a bit more
7500 2008-08-17 Zoltan Varga <vargaz@gmail.com>
7502 * aot-compiler.c: Make the patch_to_plt_offset hash table use
7503 mono_patch_info_equals/hash, and use it to massively simplify
7506 * mini.c (mono_patch_info_hash): Simplify this and add support for
7509 * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
7511 * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
7512 handling code, since an offset is not enough to identify a trampoline.
7514 * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
7516 2008-08-17 Mark Probst <mark.probst@gmail.com>
7518 * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
7520 * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
7522 * mini-ops.h: Argument and result types for OVF_CARRY ops.
7524 * decompose.c: PPC decompositions for various ops.
7526 * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
7528 2008-08-17 Zoltan Varga <vargaz@gmail.com>
7530 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
7531 call the generic trampoline code using a call, instead of a jump, to
7532 remove some special casing from the generic trampoline code.
7534 * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
7535 (mono_codegen): Ditto.
7537 * aot-compiler.c aot-runtime.c: Ditto.
7539 * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
7541 * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
7542 helper function to find the offset corresponding to a lazy fetch trampoline.
7544 * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
7545 when doing generic sharing.
7547 * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
7550 * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
7551 mini-trampolines.c to be with the other trampoline creation functions.
7553 * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
7554 as it is equal to method->signature in most cases, add a
7555 mono_emit_method_call_full variant which takes a signature and an imt
7558 2008-08-16 Zoltan Varga <vargaz@gmail.com>
7560 * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
7561 to this function, since it could be computed easily from the method
7563 (mono_helper_compile_generic_method_wo_context): Removed, not needed any
7566 * method-to-ir.c mini.c: Remove references to
7567 compile_generic_method_wo_context.
7569 * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
7570 generic method calls.
7572 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
7573 dimensional non-szarrays.
7575 * mini.c (mini_init): Register mono_array_new_1.
7577 * jit-icalls.c (mono_array_new_1): New jit icall.
7579 * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
7580 pointing to the method.
7582 * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
7583 method addresses belonging to METHOD_JUMP patches in the
7584 jump_target_got_slot_hash.
7585 (mono_aot_load_method): Ditto.
7587 * aot-compiler.c (compile_method): Allow AOT compilation of methods with
7588 METHOD_JUMP patches.
7590 * mini.c (mini_create_jit_domain_info): New helper function which
7591 initializes/frees domain->runtime_info.
7592 (mini_free_jit_domain_info): Ditto.
7593 (mini_init): Install the domain hook functions with the runtime.
7595 * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
7596 information maintained by the JIT.
7598 * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
7599 insertion into jump_table_hash into mono_codegen (), also implement proper
7602 * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
7603 tail calls, it is already done by the aot code.
7605 * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
7608 * iltests.il.in: Make the jmp test a bit more complex.
7610 * aot-compiler.c (encode_method_ref): Handle references to normal methods of
7611 generic instances which doesn't have a token.
7613 * aot-runtime.c (decode_method_ref): Ditto.
7615 * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
7616 can handle this case now.
7617 (handle_box): Ditto.
7619 2008-08-15 Geoff Norton <gnorton@novell.com>
7621 * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
7624 2008-08-15 Zoltan Varga <vargaz@gmail.com>
7626 * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
7627 calling generic methods.
7629 * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
7631 * aot-runtime.c (decode_patch_info): Ditto.
7633 * mini.c (mono_resolve_patch_target): Ditto.
7635 * patch-info.h: Add METHOD_RGCTX.
7637 * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
7639 2008-08-14 Zoltan Varga <vargaz@gmail.com>
7641 * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
7642 arguments in registers.
7644 * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
7645 OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
7647 * mini.c (mini_method_compile): Abort aot compilation for generic
7648 methods if generic sharing is disabled.
7650 * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
7653 * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls
7654 requiring an mrgctx.
7656 * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
7657 store instructions when converting a vcall to a normal call.
7659 * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
7660 mono_arch_find_jit_info.
7662 2008-08-13 Zoltan Varga <vargaz@gmail.com>
7664 * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
7665 avoid calling mono_method_full_name () for every method even if the
7667 (check_inline_caller_method_name_limit): Ditto.
7669 2008-08-12 Zoltan Varga <vargaz@gmail.com>
7671 * driver.c (main_thread_handler): Allow AOT compilation of multiple
7672 assemblies in one run.
7674 * aot-compiler.c (mono_compile_assembly): Only print out a count of
7675 skipped methods if it is not 0.
7677 * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
7679 2008-08-12 Bill Holmes <billholmes54@gmail.com>
7681 * mini.c (mono_codegen): Changing a preprocessor check from WIN64 to
7682 MONO_ARCH_HAVE_UNWIND_TABLE.
7684 Contributed under MIT/X11 license.
7686 2008-08-12 Bill Holmes <billholmes54@gmail.com>
7688 * mini-amd64.c (mono_arch_cpu_optimizazions): Remove peephole and branch
7689 from default optimizaton list on Winx64.
7691 * mini-amd64.c (emit_tls_get): Added Winx64 specific implementation for GetTLS.
7693 * mini-amd64.c (mono_arch_emit_prolog): Adding an offset on Winx64 to get
7694 the LMF from the MonoJitTlsData structure.
7696 * mini-amd64.c (mono_arch_setup_jit_tls_data): Added Winx64 implementation.
7698 Contributed under MIT/X11 license.
7700 2008-08-12 Zoltan Varga <vargaz@gmail.com>
7702 * mini.c (sigsegv_signal_handler): Fix the build.
7704 * mini-amd64.c (emit_call_body): Use image->aot_module instead of
7705 assembly->aot_module.
7707 * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
7708 hash table. This simplifies and speeds up a lot of code, and fixes support
7711 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
7714 * mini-exceptions.c: Ditto.
7716 * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
7717 'native_offset' argument, since these are computed in the
7718 mono_find_jit_info () function.
7720 * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
7721 is used by exceptions-ppc.c.
7723 * exceptions-ppc.c: Call mono_find_jit_info () instead of
7724 mono_arch_find_jit_info ().
7726 * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
7727 mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
7728 generic code in mini-exceptions.c.
7730 2008-08-11 Zoltan Varga <vargaz@gmail.com>
7732 * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
7734 * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
7736 * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
7737 the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
7738 called while holding the loader lock. Fixes #415608.
7739 (mono_aot_get_method_from_token_inner): Ditto.
7741 2008-08-09 Zoltan Varga <vargaz@gmail.com>
7743 * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
7744 to reduce differences between this and the generic implementation in
7746 (ves_icall_get_frame_info): Ditto.
7748 * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
7750 * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
7753 * exceptions-ppc.c (arch_get_call_filter): Rename this to
7754 mono_arch_get_call_filter () and make it non-static, for consistency with the
7755 other architectures.
7757 2008-08-09 Rodrigo Kumpera <rkumpera@novell.com>
7760 * local-propagation.c:
7761 * mini-x86.c: Correct the name of arch defines.
7763 2008-08-09 Zoltan Varga <vargaz@gmail.com>
7765 * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
7766 NO_EMULATE_LONG_SHIFT_OPS define.
7768 2008-08-08 Zoltan Varga <vargaz@gmail.com>
7770 * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
7771 now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
7773 * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
7774 MACH fixes. Merged from the 2.0 branch.
7776 * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
7778 * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
7779 (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
7781 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
7783 * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
7784 mono_marshal_get_native_wrapper () signature changes.
7786 2008-08-07 Rodrigo Kumpera <rkumpera@novell.com>
7788 * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
7789 conversion bug under arm.
7791 2008-08-06 Rodrigo Kumpera <rkumpera@novell.com>
7793 * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
7795 * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
7796 with overflow checking.
7798 2008-08-05 Marek Habersack <mhabersack@novell.com>
7800 * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
7801 to the genmdesc.pl file
7803 2008-08-05 Zoltan Varga <vargaz@gmail.com>
7805 * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
7806 arg_array in the soft-float versions of the LOAD/STORE macros.
7808 * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
7811 * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
7813 2008-08-02 Zoltan Varga <vargaz@gmail.com>
7815 * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
7816 a float HFA. Fixes #413621.
7818 2008-08-02 Gert Driesen <drieseng@users.sourceforge.net>
7820 * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
7821 frame_size to args_size. Fixes build.
7823 2008-08-02 Zoltan Varga <vargaz@gmail.com>
7825 * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
7826 and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
7828 * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
7829 the stack are not unaligned. Fixes #413247.
7831 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
7833 * mini.c: update jitted methods performance counters.
7835 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
7837 * mini-exceptions.c: increase the exceptions thrown performance
7838 counter in mono_handle_exception ().
7840 2008-07-29 Zoltan Varga <vargaz@gmail.com>
7842 * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
7843 can work with netmodules.
7845 2008-07-28 Geoff Norton <gnorton@novell.com>
7847 * mini-x86.h: Correct the frame alignment on OSX. Fixes the jit
7850 2008-07-28 Zoltan Varga <vargaz@gmail.com>
7852 * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
7855 2008-07-28 Bill Holmes <billholmes54@gmail.com>
7857 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
7858 The float param registers and other param registers must be the
7859 same index on Windows x64.
7861 * mini-amd64.c (mono_arch_allocate_vars) : Implementing the
7862 ArgValuetypeAddrInIReg argument case. Setting the argument
7863 op to OP_VTARG_ADDR (OP_REGOFFSET)).
7865 * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix. Use the size
7866 variable computed above as the copy length for arguments of storage
7867 type ArgValuetypeAddrInIReg.
7869 * mini-amd64.c (mono_arch_emit_call) : Implementing the
7870 ArgValuetypeAddrInIReg argument case. This case will rely on
7871 mono_arch_emit_outarg_vt to emit the correct code later in the process.
7873 * mini-amd64.c (mono_arch_emit_call) : On Winx64 there always needs to be
7874 a 32 byte stack allocation for all calls. We will omit the adjustment for
7875 jump and tail call instructoins as they do not follow the typical call behavior.
7877 * mini-amd64.c (mono_arch_emit_outarg_vt) : Implementing the case for
7878 ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
7879 local variable and pass the local variable by reference to the called method.
7881 * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
7882 Implementing the ArgValuetypeAddrInIReg argument case. When the address
7883 of a struct is passed in a register it must be saved with the other
7884 volatile argument on the stack.
7886 * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix. When omitting the
7887 frame pointer the stack adjustment value must be saved to the unwind
7890 Contributed under MIT/X11 license.
7892 2008-07-28 Zoltan Varga <vargaz@gmail.com>
7894 * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
7895 which got lost in the merge.
7897 2008-07-27 Zoltan Varga <vargaz@gmail.com>
7899 * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
7902 * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
7904 * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
7905 icalls, since they won't be patched.
7907 * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
7908 different code sequence when running under valgrind to prevent some valgrind
7911 * iltests.il.in: Add new regression test.
7913 * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
7916 * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
7917 accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
7919 * iltests.il.in: Add new test.
7921 * aot-compiler.c: Fix some warnings.
7923 * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
7926 2008-07-27 Zoltan Varga <vargaz@gmail.com>
7928 * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
7929 (mini_usage_jitdeveloper): Add a missing --wapi option.
7931 2008-07-25 Zoltan Varga <vargaz@gmail.com>
7933 * mini-codegen.c: Simplify the is_fp macros.
7934 (free_up_ireg): Remove, use free_up_reg instead.
7935 (free_up_reg): Fix the fp case.
7937 2008-07-26 Zoltan Varga <vargaz@gmail.com>
7939 * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
7942 * exceptions-x86.c: Merge some changes which seemed to have got lost
7943 in the linear-ir merge.
7945 * liveness.c: Disable the liveness2 pass on 32 bit platforms.
7947 * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
7948 long vreg volatile even if the variable was already created.
7950 * liveness.c (update_liveness2): Avoid eliminating dead definitions of
7953 2008-07-26 Zoltan Varga <vargaz@gmail.com>
7955 * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
7957 * mini.c (mono_jit_compile_method_inner): Add support for
7958 MONO_EXCEPTION_BAD_IMAGE.
7960 * method-to-ir.c (mono_method_to_ir2): Avoid a crash if
7961 mini_method_get_context () returns NULL. Fixes #356531.
7963 * mini.c (mono_method_to_ir): Ditto.
7965 * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
7966 accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
7968 2008-07-25 Zoltan Varga <vargaz@gmail.com>
7970 * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
7971 in the LDFTN implementation.
7973 2008-07-25 Mark Probst <mark.probst@gmail.com>
7975 * mini-trampolines.c (mono_magic_trampoline): When sharing generic
7976 code, patch calls to icalls, too, even if they're not in the
7977 shared generic code hash. Fixes #411962.
7979 2008-07-25 Zoltan Varga <vargaz@gmail.com>
7981 * cpu-x86.md: Increase the length of the fcall opcodes.
7983 * mini-x86.c (emit_move_return_value): Avoid some precision issues for
7984 calls returning floats.
7986 * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
7989 * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
7992 * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
7993 into the domain->method_code_hash.
7995 * aot-compiler.c: Fix win32 build.
7997 * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
7999 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
8000 gshared NEWARR implementation.
8002 * cpu-sparc.md: Remove duplicate localloc_imm opcode.
8004 * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
8005 can be used outside of method_to_ir.
8007 * mini.h (MonoCompile): Add arg_types field.
8009 * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
8011 * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
8012 the values of the local arg_array and param_types array.
8014 2008-07-24 Zoltan Varga <vargaz@gmail.com>
8016 * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
8017 got accesses might only get generated later when NEWOBJ is decomposed.
8019 * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
8020 looking up the native code of the target method when a delegate is called
8023 * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
8026 * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
8028 * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
8029 AOT work on platforms without a working dlsym implementation.
8031 * mini.h: Bump AOT image format version.
8033 2008-07-24 Mark Probst <mark.probst@gmail.com>
8035 * mini-exceptions.c: Free a MonoType with
8036 mono_metadata_free_type() instead of g_free().
8038 * aot-runtime.c: Free a MonoType.
8040 2008-07-24 Zoltan Varga <vargaz@gmail.com>
8042 * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
8045 * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
8048 2008-07-23 Massimiliano Mantione <massi@ximian.com>
8049 * mini.c (sigprof_signal_handler): call the new "runtime initialized"
8052 2008-07-23 Zoltan Varga <vargaz@gmail.com>
8054 * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
8055 NEWOBJ calls on valuetypes.
8057 * iltests.il.in: Add new test.
8059 * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
8061 2008-07-22 Zoltan Varga <vargaz@gmail.com>
8063 * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
8064 is no longer needed.
8066 * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
8067 non register sized integer arguments.
8068 (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
8069 (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to
8072 * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
8075 * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
8076 two a binop with different sized arguments is emitted.
8078 * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
8079 instruction in the ins==NULL case.
8081 2008-07-23 Zoltan Varga <vargaz@gmail.com>
8083 * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
8085 * mini-x86.c: Fix osx build.
8087 * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
8090 * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
8091 instruction for non int sized variables.
8093 * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
8096 2008-07-23 Robert Jordan <robertj@gmx.net>
8098 * method-to-ir.c: Fix MSVC build.
8100 2008-07-22 Zoltan Varga <vargaz@gmail.com>
8102 * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
8103 a non int sized type, widen it to an int since newer versions of gcc seem to
8104 generate code which needs this.
8106 * ssa2.c abcremoval2.c: Fix warnings.
8108 * *: Merge the Linear IR branch.
8110 The original branch is at trunk/branches/vargaz/mini-linear-il, and
8111 the ChangeLog file there describes all the changes done over the years.
8112 Further documentation can be found at www.mono-project.com/Linear_IL.
8114 2008-07-21 Bill Holmes <billholmes54@gmail.com>
8116 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
8117 The float param registers and other param registers must be the
8118 same index on Windows x64.
8120 Contributed under MIT/X11 license.
8122 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
8124 * mini.c: Make the previous fix GC safe.
8126 2008-07-21 Raja R Harinath <harinath@hurrynot.org>
8128 * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
8130 2008-07-21 Bill Holmes <billholmes54@gmail.com>
8132 * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
8133 on Winx64. This type will not be passed on the stack (ArgOnStack), but
8134 ArgValuetypeAddrInIReg instead.
8136 Contributed under MIT/X11 license.
8138 2008-07-21 Zoltan Varga <vargaz@gmail.com>
8140 * mini-codegen.c (get_register_spilling): Fix a warning.
8142 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
8144 * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
8145 for types which the initialization fails. Raises the provided exception
8146 at the right stop after cleanup.
8148 2008-07-16 Zoltan Varga <vargaz@gmail.com>
8150 * aot-compiler.c: Free most of the memory allocated during compilation.
8152 * mini.c (mini_parse_debug_options): Fix a leak.
8154 * mini.c (mini_method_compile): Don't add the method to the jit info tables
8155 during aot compilation.
8157 2008-07-14 Zoltan Varga <vargaz@gmail.com>
8159 * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as
8160 it has too much register pressure.
8162 2008-07-13 Zoltan Varga <vargaz@gmail.com>
8164 * inssel.brg (CEE_CASTCLASS): Remove some dead code.
8166 2008-07-12 Zoltan Varga <vargaz@gmail.com>
8168 * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
8171 * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
8172 on amd64 similar to the way it is done on arm.
8174 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8176 * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for
8177 consistency, normalize error messages, avoid loading aot-only modules in
8180 * driver.c (mono_main): Rename --aot-only command line option to --full-aot
8183 * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
8185 2008-07-11 Martin Baulig <martin@ximian.com>
8188 (MonoDebuggerInfo): Add `interruption_request'.
8190 2008-07-12 Zoltan Varga <vargaz@gmail.com>
8192 * aot-compiler.c (emit_plt): Remove some dead code.
8194 * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
8196 * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
8197 return the plt info offset belonging to a given plt entry.
8199 * mini-trampolines.c (mono_aot_plt_trampoline): Use
8200 mono_aot_get_plt_info_offset.
8202 * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
8203 similar to the amd64 code by makeing jumps through a separate jump table
8204 instead of embedding the jump addresses into the code.
8206 2008-07-11 Zoltan Varga <vargaz@gmail.com>
8208 * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
8211 2008-07-10 Martin Baulig <martin@ximian.com>
8213 * mini.c (mini_method_compile): Disable generics sharing when
8214 running in the debugger.
8216 2008-07-10 Zoltan Varga <vargaz@gmail.com>
8218 * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
8220 * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
8221 the local register allocator from running out of registers on x86 when
8224 2008-07-10 Bill Holmes <billholmes54@gmail.com>
8226 * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when
8227 expressing IntMin for the VS Compiler. See Compiler Warning (level 2)
8230 Contributed under MIT/X11 license.
8232 2008-07-10 Zoltan Varga <vargaz@gmail.com>
8234 * aot-compiler.c: Get rid of whitespace in the generated assembly file to
8235 speed up the assembler.
8237 2008-07-09 Zoltan Varga <vargaz@gmail.com>
8239 * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
8242 * mini.c: Move the soft float handling macros a bit earlier, add
8243 NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
8246 * mini.h: Add prototype for mono_arch_fixup_jinfo.
8248 * mini.c (mini_init): In aot-only mode, set the root domain code manager to
8249 read-only to help catch code allocation requests.
8251 * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
8252 and turn it off when using --aot-only or when compiling with --aot=full.
8254 * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
8255 jump table for switches from the normal domain mempool, not the code
8258 * mini-trampolines.c (get_unbox_trampoline): New function to return an
8259 unbox trampoline which handles aot-only mode too.
8261 * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
8262 an AOTed unbox trampoline.
8264 * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
8266 2008-07-09 Bill Holmes <billholmes54@gmail.com>
8268 * wapihandles.c: Fixing MSVC builds. Include statement changed from <> to
8271 Contributed under MIT/X11 license.
8273 2008-07-09 Bill Holmes <billholmes54@gmail.com>
8275 * mini.c (mono_codegen): Allocate space at the end of the code block and store
8276 the unwind information for the method at the end of the allocated block.
8278 * mini-amd64.h: Added declarations for the unwind routines and adding field to
8279 MonoCompileArch to hold the unwind info for SEH on Winx64
8281 * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
8282 frame pointer info for the method being compiled.
8284 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
8285 the call to mono_exception_from_token.
8287 * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations. This code is responsible
8288 storing the method prolog information in a format that the Winx64 SEH can understand. This
8289 information is stored a the end of the method block because it is all 32-bit offset based.
8291 Contributed under MIT/X11 license.
8293 2008-07-09 Zoltan Varga <vargaz@gmail.com>
8295 * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
8297 * wapihandles.c: Fix warnings.
8299 * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
8302 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling
8303 mono_jit_compile_method in aot-only mode since that calls the type
8306 * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
8307 get_delegate_invoke_impl in aot-only mode.
8309 * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
8311 2008-07-08 Zoltan Varga <vargaz@gmail.com>
8313 * trace.c (mono_trace_enter_method): Fix printing of Type instances.
8315 * aot-compiler.c (compile_method): Disable the check for GSHARED since it
8318 * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
8320 * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
8321 init trampoline from the AOT file as well.
8323 * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
8324 mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
8327 * mini.c (mini_init): Move the call to mono_exceptions_init () after
8330 * exceptions-amd64.c: Add _full variants for the remaining exception code
8331 creation functions as well, allow emission of relocatable code, remove
8332 caching since that is now done by the caller.
8334 * mini-exceptions.c: Add _full variants for the remaining exception code
8335 creation functions as well, add aot-only support.
8337 * aot-compiler.c (compile_method): Allow calls to methods of constructed types
8338 if we can determine a proper token for them.
8339 (add_wrappers): Add a few more wrappers.
8340 (emit_method_code): Remove some dead code.
8341 (emit_trampolines): Emit exception code too.
8343 * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
8345 * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
8346 mono_array_new_va which avoids varargs.
8348 * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
8350 * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
8351 mono_arch_create_specific_trampoline () in all places.
8353 * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
8354 a bit so it can be used for other things as well.
8356 * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
8359 * exceptions-amd64.c: Rename the caching from the exception code creation
8360 functions, it is done by the caller instead.
8362 * exceptions-amd64.c: Change the signature of the exception code creation
8363 functions to allow the creation of relocatable code later.
8365 * mini-exceptions.c: Add a set of functions to query the various
8366 runtime-generated exception functions.
8368 * mini.c mini-exceptions.c: Use the newly added functions instead of the
8369 mono_arch_.. () functions.
8371 2008-07-07 Zoltan Varga <vargaz@gmail.com>
8373 * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
8375 * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
8377 * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
8378 (mini_get_vtable_trampoline): Ditto.
8380 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
8381 code in the AOT case by returning the code size and a list of relocations to
8384 * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
8386 2008-07-07 Bill Holmes <billholmes54@gmail.com>
8388 * mini-amd64.c: On Winx64 the calling convention always requires the caller to
8391 Contributed under MIT/X11 license.
8393 2008-07-07 Zoltan Varga <vargaz@gmail.com>
8395 * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
8396 so the buffer size can be computed correctly. Fixes #404735.
8398 * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
8399 normally as cfg->debug_info is already freed.
8401 2008-07-06 Zoltan Varga <vargaz@gmail.com>
8403 * mini-amd64.c: For calls returning vtypes in registers, don't store
8404 the return address on the stack, instead allocate a separate local for
8407 2008-07-05 Mark Probst <mark.probst@gmail.com>
8409 * mini-trampolines.c, mini.h: Add an argument to
8410 mono_create_jit_trampoline_in_domain() for turning off the adding
8411 of the sync wrapper.
8413 * mini.c: Use the JIT trampoline without sync instead of
8414 ldftn_nosync in static RGCTX invoke wrappers so that the call can
8417 2008-07-04 Mark Probst <mark.probst@gmail.com>
8419 * driver.c: Turn on GSHARED optimization by default.
8421 2008-07-04 Zoltan Varga <vargaz@gmail.com>
8423 * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
8424 to MONO_TRAMPOLINE_JIT since it better reflects what it does.
8426 * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
8427 create a variant of the generic trampoline code callable from AOTed trampolines.
8429 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
8430 trampoline code callable from AOTed trampolines.
8432 * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
8434 2008-07-04 Mark Probst <mark.probst@gmail.com>
8436 * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
8437 pass-through manner.
8439 * mini.c: Generic method sharing. Pass MRGCTX to generic methods
8440 and don't fail sharing for them anymore.
8442 * mini-exceptions.c: Handle exceptions in shared generic methods.
8444 * generic-sharing.c: When checking the context of a generic
8445 method, also check its class's context. Don't treat wrappers as
8448 * mini-trampolines.c: Some code factored out to
8449 metadata/generic-sharing.c. Handle the MRGCTX case.
8451 * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
8452 we must deal with the method being of another instantiation of the
8453 class. Add static rgctx invoke wrappers to generic methods.
8455 2008-07-04 Mark Probst <mark.probst@gmail.com>
8457 * mini.c: Provide all jit infos of generic shared methods with a
8460 * mini-exceptions.c: Handle the new situation that a generic info
8461 might be available, but not info about the this/vtable/mrgctx
8464 2008-07-03 Mark Probst <mark.probst@gmail.com>
8466 * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
8469 2008-07-03 Zoltan Varga <vargaz@gmail.com>
8471 * dominators.c (check_dominance_frontier): Fix a warning.
8473 * mini.h: Add some missing prototypes.
8475 * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
8477 * driver.c (mono_jit_init_version): Correct the comments since the first
8478 argument should be the name of the root domain, not a filename.
8480 * aot-runtime.c (make_writable): Error out if this is called while running
8482 (load_aot_module): Ditto.
8484 * aot-compiler.c: Really fix the computation of method indexes.
8486 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous
8487 optimizations as this is no longer called frequently.
8489 * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
8490 method and the invoke impl code and pass it to the delegate trampoline instead of
8491 just the delegate class.
8493 2008-07-02 Zoltan Varga <vargaz@gmail.com>
8495 * aot-compiler.c: Fixup the computation of method indexes.
8496 (add_wrappers): Create the base methods of the runtime invoke wrappers using
8497 the method builder infrastructure.
8499 * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
8502 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
8503 mode, load the method right away instead of creating a trampoline.
8505 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
8507 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
8510 2008-07-01 Zoltan Varga <vargaz@gmail.com>
8512 * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
8513 (mono_aot_load_method): Use method_index instead of method->token.
8515 * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
8516 can handle icalls etc. properly.
8518 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8520 * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
8522 * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
8523 (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
8524 JIT_ICALL_ADDR patch type.
8526 * patch-info.h: Add JIT_ICALL_ADDR patch type.
8528 * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
8530 (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
8532 * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
8534 2008-06-30 Zoltan Varga <vargaz@gmail.com>
8536 * mini.c: Use domain->jit_code_hash_lock for controlling access to
8537 domain->jit_code_hash.
8539 2008-06-29 Zoltan Varga <vargaz@gmail.com>
8541 * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
8543 2008-06-27 Zoltan Varga <vargaz@gmail.com>
8545 * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
8546 get_this_arg_from_call, let it compute it when needed.
8548 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
8549 gsctx from code only when needed.
8551 * mini-trampolines.c (get_generic_context): Rename this to
8552 mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
8553 it can be called by the arch backends.
8555 * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
8557 2008-06-26 Zoltan Varga <vargaz@gmail.com>
8559 * driver.c (mono_main): Add experimental --aot-only command line option.
8561 * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
8564 2008-06-26 Kornel Pal <kornelpal@gmail.com>
8566 * driver.c (DllMain): Remove mono_module_handle.
8568 Contributed under MIT/X11 license.
8570 2008-06-25 Zoltan Varga <vargaz@gmail.com>
8572 * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
8573 for emitting methods which are not in the source assembly. Detect and report
8574 failure of assembling+linking.
8576 * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
8578 * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
8580 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
8582 * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
8584 2008-06-24 Zoltan Varga <vargaz@gmail.com>
8586 * mini.h: Remove some obsolete prototypes.
8588 * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
8590 2008-06-24 Mark Probst <mark.probst@gmail.com>
8592 * mini.c (get_object_generic_inst): Variable-sized arrays are not
8593 supported by Visual Studio, so use alloca().
8595 2008-06-23 Zoltan Varga <vargaz@gmail.com>
8597 * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
8600 2008-06-23 Mark Probst <mark.probst@gmail.com>
8602 * mini.c: Fail sharing of a generic method if it contains an open
8603 catch clause (because we don't pass MRGCTXs yet).
8605 2008-06-23 Mark Probst <mark.probst@gmail.com>
8607 * mini.c: When compiling a method with generic sharing, insert the
8608 method instantiated with an all-Object generic context into the
8609 jit info table, instead of the context of the first instantiation
8610 of the method we happen to compile.
8612 2008-06-18 Martin Baulig <martin@ximian.com>
8614 * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
8615 `major_version' and `minor_version'.
8617 2008-06-17 Mark Probst <mark.probst@gmail.com>
8619 * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
8620 mono_method_is_generic_sharable_impl() takes an additional
8621 argument specifying whether to treat type variables as reference
8624 2008-06-17 Mark Probst <mark.probst@gmail.com>
8626 * mini.h: Removed obsolete prototypes.
8628 2008-06-17 Mark Probst <mark.probst@gmail.com>
8630 * mini.c: Don't fail generic sharing for initobj and sizeof - we
8631 already handle them.
8633 2008-06-17 Mark Probst <mark.probst@gmail.com>
8635 * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
8636 tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
8637 tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
8638 tramp-x86.c: Added a MonoGenericContext* argument to
8639 mono_arch_get_unbox_trampoline() so that it can call other
8640 functions which require it.
8642 2008-06-17 Mark Probst <mark.probst@gmail.com>
8644 * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
8645 mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
8646 mono_arch_get_this_arg_from_call() takes a
8647 MonoGenericSharingContext* as well.
8649 2008-06-17 Mark Probst <mark.probst@gmail.com>
8651 * mini.c: Factor out code for emitting unbox into emit_unbox() and
8652 implement generic sharing of unbox.
8654 2008-06-17 Mark Probst <mark.probst@gmail.com>
8656 * mini.c: Don't compute the vtable to determine whether a field is
8657 special static, because it might not work for open types.
8659 2008-06-17 Mark Probst <mark.probst@gmail.com>
8661 * mini.c: Removed the unused token_type and token_source arguments
8662 from get_runtime_generic_context_ptr().
8664 2008-06-17 Marek Habersack <mhabersack@novell.com>
8666 * mini.c (ADD_BINOP): fix the build
8668 2008-06-16 Zoltan Varga <vargaz@gmail.com>
8670 * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
8673 2008-06-16 Mark Probst <mark.probst@gmail.com>
8675 * mini.h: Removed class relations enum that's not used anymore.
8677 2008-06-16 Mark Probst <mark.probst@gmail.com>
8679 * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
8681 * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
8682 the lazy fetch trampoline access code.
8684 2008-06-15 Zoltan Varga <vargaz@gmail.com>
8686 * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
8688 2008-06-14 Zoltan Varga <vargaz@gmail.com>
8690 * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
8692 * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
8694 * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
8696 2008-06-13 Zoltan Varga <vargaz@gmail.com>
8698 * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
8701 * mini-ops.h: Add MIN/MAX_UN opcodes.
8703 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
8706 * basic-math.cs: Add more min/max tests.
8708 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
8710 2008-06-13 Mark Probst <mark.probst@gmail.com>
8712 * mini.c: Small fix in the prologue of emit_castclass.
8714 2008-06-13 Zoltan Varga <vargaz@gmail.com>
8716 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
8718 * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
8719 do not work even for unsigned types. Fixes #400014.
8721 * basic-math.cs: Add regression tests for unsigned Min/Max.
8723 2008-06-13 Mark Probst <mark.probst@gmail.com>
8725 * mini.c: Added additional context_used argument to several
8726 functions, which will be needed for sharing generic methods. Use
8727 GET_RGCTX macro wherever appropriate. Declare only one
8728 context_used in mono_method_to_ir().
8730 2008-06-13 Mark Probst <mark.probst@gmail.com>
8732 * mini.c, generic-sharing.c: Removed generic class relations.
8734 * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
8735 functions due to MRGCTX changes.
8737 2008-06-13 Mark Probst <mark.probst@gmail.com>
8739 * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
8740 graph.c, local-propagation.c, aliasing.c: New opcodes for calls
8741 with calculated IMT.
8743 * mini.c: Generic sharing of calls via generic interfaces.
8745 * jit-icalls.c, jit-icalls.h: Helper function for compiling a
8746 generic method with non-constant MonoGenericContext*. Instead,
8747 the context is taken out of the method itself.
8749 2008-06-13 Mark Probst <mark.probst@gmail.com>
8751 * mini.c: Generic sharing of ldvirtftn.
8753 2008-06-13 Mark Probst <mark.probst@gmail.com>
8755 * mini.c: Generic sharing of ldftn.
8757 2008-06-13 Mark Probst <mark.probst@gmail.com>
8759 * mini.c: Do pass VTable/RGCTX argument to static generic methods.
8761 2008-06-13 Mark Probst <mark.probst@gmail.com>
8763 * mini.c: Generic sharing of the special case of ldtoken followed
8764 by a call to GetTypeFromHandle.
8766 2008-06-13 Mark Probst <mark.probst@gmail.com>
8768 * mini.c: Generic sharing of box for nullable types.
8770 2008-06-13 Zoltan Varga <vargaz@gmail.com>
8772 * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
8773 are passed on the stack. Fixes #324807.
8775 2008-06-12 Bill Holmes <billholmes54@gmail.com>
8777 * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
8778 for the ArgValuetypeAddrInIReg case.
8780 * mini-amd64.c:mono_arch_allocate_vars: Adding a case for
8781 ArgValuetypeAddrInIReg to avoid asserts. Code needs to be added here.
8783 * mini-amd64.c: mono_arch_call_opcode: Adding Winx64 code for an ArgInfo of
8784 type ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
8785 local variable and pass the local variable by reference to the called method.
8787 * mini-amd64.c: mono_arch_emit_prolog: Adjust the stack for calls to
8788 mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
8790 Contributed under MIT/X11 license.
8792 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
8794 * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
8796 * debug-mini.c (mono_debug_print_vars): Release memory after printing
8799 2008-06-10 Martin Baulig <martin@ximian.com>
8802 (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
8804 2008-06-09 Kornel Pal <kornelpal@gmail.com>
8806 * main.c: Add and set argv [argc] to NULL to match C specification that fixes
8807 possible error when no arguments are passed.
8809 Contributed under MIT/X11 license.
8811 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
8813 * mini-exceptions.c (ves_icall_get_trace): Skip source locations
8814 where the file name is NULL.
8816 2008-06-09 Zoltan Varga <vargaz@gmail.com>
8818 * mini.c: Fix s390 build.
8820 2008-06-08 Zoltan Varga <vargaz@gmail.com>
8822 * trace.c (mono_trace_parse_options): Fix warnings.
8824 * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
8826 2008-06-07 Zoltan Varga <vargaz@gmail.com>
8828 * mini.c (remove_block_if_useless): Avoid printing the method name.
8830 * mini.c: Remove needless setting of ins->cil_code which is now done by
8833 * mini-amd64.c: Add some code to avoid saving callee saved registers in the
8836 * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
8837 translated code after it has been patched.
8839 2008-06-06 Zoltan Varga <vargaz@gmail.com>
8841 * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
8842 avoid problems during code patching on SMP systems.
8843 (emit_call): Avoid adding a patch info which is already added by
8845 (mono_arch_emit_exceptions): Ditto.
8847 2008-06-05 Zoltan Varga <vargaz@gmail.com>
8849 * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
8850 MONO_TYPE_ISSTRUCT already checks for it.
8852 2008-06-05 Bill Holmes <billholmes54@gmail.com>
8854 * mini-amd64.c:merge_argument_class_from_type: When marshaling
8855 structs with floats on Winx64 the float registers are not used.
8856 The integer registers are always used..
8857 * mini-amd64.c:add_valuetype: When marshaling structs on Winx64
8858 only one register will be used and only if the size of the struct
8859 is 1,2,4, or 8 bytes.
8861 * tramp-amd64.c : Adjusting size used for mono_global_codeman_reserve
8864 Contributed under MIT/X11 license.
8866 2008-06-05 Martin Baulig <martin@ximian.com>
8868 * debug-debugger.c (debugger_lookup_class): Also call
8869 mono_class_setup_methods() here; we're only called from RTI.
8871 2008-06-05 Andreas Farber <andreas.faerber@web.de>
8873 * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
8874 (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
8875 * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
8876 Post-process object files and add dtrace-generated object, if necessary.
8878 Contributed under MIT/X11 license.
8880 2008-06-04 Mark Probst <mark.probst@gmail.com>
8882 * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
8885 * mini.c: Generic sharing for unbox.any and castclass.
8887 2008-06-04 Mark Probst <mark.probst@gmail.com>
8889 * mini.c: Ignore tailcall prefix in shared generic code and when
8890 doing calls which require a vtable/rgctx argument.
8892 2008-06-04 Mark Probst <mark.probst@gmail.com>
8894 * mini.c: Don't free the JIT info.
8896 * driver.c: Changes in the JIT info table testing code.
8898 2008-06-03 Zoltan Varga <vargaz@gmail.com>
8900 * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread
8901 interruption. Fix some warnings.
8903 * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
8904 interruption_checkpoint.
8906 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
8908 * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
8909 from embedding applications.
8911 2008-06-02 William Holmes <billholmes54@gmail.com>
8913 * mini-amd64.c : Correcting some of the issues for Winx64 dealing with
8914 reserving 32 bytes on the stack when making calls.
8916 Contributed under MIT/X11 license.
8918 2008-06-01 Zoltan Varga <vargaz@gmail.com>
8920 * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
8921 the linear IL branch.
8923 * driver.c: Print out more information for --version on arm.
8925 2008-05-30 Zoltan Varga <vargaz@gmail.com>
8927 * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
8928 bb_exit instead, since out of line bblocks might not actually be emitted
8931 * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
8932 maximum epilog size for out of line bblocks if tracing is enabled.
8934 * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
8936 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8938 * arrays.cs: Regression tests for allocating arrays with negative sizes.
8940 2008-05-28 Zoltan Varga <vargaz@gmail.com>
8942 * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
8943 CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE
8946 2008-05-27 Zoltan Varga <vargaz@gmail.com>
8948 * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
8949 the 'value' to store is a constant.
8951 * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
8953 * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
8954 of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
8956 2008-05-26 Zoltan Varga <vargaz@gmail.com>
8958 * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
8959 for accessing method->generic_container.
8961 2008-05-24 Zoltan Varga <vargaz@gmail.com>
8963 * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
8965 * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
8967 * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
8969 * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
8972 2008-05-23 Zoltan Varga <vargaz@gmail.com>
8974 * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
8976 * mini.c: Handle the case when mono_class_vtable () fails.
8978 2008-05-23 Massimiliano Mantione <massi@ximian.com>
8979 * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
8982 2008-05-22 Mark Probst <mark.probst@gmail.com>
8984 * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
8985 together with domain sharing.
8987 2008-05-22 Mark Probst <mark.probst@gmail.com>
8989 * mini.c: Treat callvirts to final methods like non-virtual calls
8990 when doing generic sharing, i.e. look them up in the runtime
8993 2008-05-22 Mark Probst <mark.probst@gmail.com>
8995 * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
8996 with computed types (for generic sharing).
8998 * mini.c: Generic sharing for mkrefany and refanyval.
9000 2008-05-22 Zoltan Varga <vargaz@gmail.com>
9002 * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
9005 * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
9006 the generic sharing code.
9008 * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
9011 2008-05-21 Zoltan Varga <vargaz@gmail.com>
9013 * mini.h: Remove the declaration of mono_aot_init_vtable ().
9015 2008-05-21 C.J. Adams-collier <cjac@colliertech.org>
9017 * driver.c: updated copyright date
9019 2008-05-21 Zoltan Varga <vargaz@gmail.com>
9021 * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
9024 2008-05-19 Martin Baulig <martin@ximian.com>
9026 * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
9027 pointing to the new `_mono_debug_using_mono_debugger' variable.
9030 (mono_main): Check mono_debug_using_mono_debugger() rather than
9031 the `MONO_INSIDE_MDB' environment variable to check whether we're
9032 inside the debugger.
9034 2008-05-19 Zoltan Varga <vargaz@gmail.com>
9036 * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
9039 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
9041 * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
9043 * mini.c: Added mini_assembly_can_skip_verification. This
9044 function checks if the assembly requested to skip verification.
9045 Fixes part of #387274.
9047 2008-05-07 Zoltan Varga <vargaz@gmail.com>
9049 * mini.c (mini_get_method): Disable the check for open generic classes when
9050 using generic sharing.
9052 * generics.cs: Add a test for #387034.
9054 * mini.c (mini_get_method): Check whenever the method class is an open generic
9055 type, and return NULL in that case, causing a verification error. Fixes
9058 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
9060 * driver.c (mono_main): Revert r102623. The right
9061 thing to do is to enable the verifier under verifiable
9062 unless a --security flag was passed.
9064 We need this non-trivial behavior for --verify-all otherwise
9065 mcs-compileall won't be able to use it. As it needs everything to
9066 be verified under validil.
9068 2008-05-06 Martin Baulig <martin@ximian.com>
9072 * debug-mini.c (mono_debugger_thread_created): Add proper locking.
9073 (mono_debugger_thread_cleanup): Likewise.
9074 (mono_debugger_extended_notification): Likewise.
9076 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
9078 * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
9079 against both inflated and non-inflated methods. We need to check against the
9080 generic definition for cases where the instantiated method is not visible.
9081 We need to check against the inflated types for cases where the instantiation
9082 changes any super type. This fixes #382986.
9084 Note that this doesn't need to be applied to other parts of mono_method_to_ir
9085 that check for visibiliy as generic params only appears as the type subject
9086 of tokens on call opcodes. Field manipulation and ldftn must always
9087 target an exact type.
9089 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
9091 * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
9092 if no related --security flag is passed.
9094 2008-05-05 Andreas Farber <andreas.faerber@web.de>
9096 * mini-arch.h: Prepare support for ppc64.
9098 Contributed under MIT/X11 license.
9100 2008-05-05 Andreas Farber <andreas.faerber@web.de>
9102 * aot-runtime.c: Prepare support for ppc64.
9104 Contributed under MIT/X11 license.
9106 2008-05-05 Andreas Farber <andreas.faerber@web.de>
9108 * mini-ops.h: Prepare support for ppc64.
9110 Contributed under MIT/X11 license.
9112 2008-05-04 Andreas Farber <andreas.faerber@web.de>
9114 * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
9116 Contributed under MIT/X11 license.
9118 2008-05-03 Zoltan Varga <vargaz@gmail.com>
9120 * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
9121 assemblies, since aot_name is not a full path, causing us to load MS.NET
9122 assemblies on windows.
9124 ?2008-04-28 Kornel Pal <kornelpal@gmail.com>
9126 * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
9127 for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
9128 * main.c: Use UTF-8 encoded command line instead of Windows default code
9129 page on Windows to support Unicode.
9130 * driver.c (DllMain): New function for mixed-mode assembly support.
9131 * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
9132 export __stdcall functions without decoration.
9134 Contributed under MIT/X11 license.
9136 2008-04-28 Mark Probst <mark.probst@gmail.com>
9138 * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
9139 saving it very early.
9141 2008-04-28 Mark Probst <mark.probst@gmail.com>
9143 * mini.h, mini.c: Lots of code for accessing the old RGCTX
9144 deleted. The only way to access the new RGCTX is via the
9147 * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
9148 vtable instead of the RGCTX to static methods.
9150 * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
9151 accessing the new RGCTX.
9153 * generic-sharing.c: There is no separation between self, type
9154 arguments and other types in the RGCTX anymore.
9156 2008-04-25 Jonathan Chambers <joncham@gmail.com>
9158 * mini-amd64.c (add_general): Remove previous stack adjustment.
9159 (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
9160 adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
9161 for 32 bytes of stack space reserved for all calls.
9163 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
9164 (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack
9167 Code contributed under MIT/X11 license.
9169 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
9171 * mini.c (mini_method_verify): Only verify non-inflated methods, check
9172 against the root definition, peeling out method and type instantiations.
9173 Cache verify success results, code that fails verification is still
9174 checked multiple times.
9176 2008-04-23 Zoltan Varga <vargaz@gmail.com>
9178 * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
9180 2008-04-23 Jonathan Chambers <joncham@gmail.com>
9182 * mini-amd64.c (add_general): Always increment stack on Win64.
9183 (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
9186 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for
9187 stack based argument handling on Win64.
9189 Code contributed under MIT/X11 license.
9191 2008-04-23 Raja R Harinath <harinath@hurrynot.org>
9193 * Makefile.am (version.h): Add support for git-svn.
9195 2008-04-22 Zoltan Varga <vargaz@gmail.com>
9197 * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
9198 so instead of calling g_spawn_command_line_sync, we do everything by hand,
9199 avoiding allocations and libc functions which might deadlock.
9201 * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
9202 'no-gdb-backtrace' option is set.
9204 * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
9206 * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
9208 2008-04-21 Martin Baulig <martin@ximian.com>
9210 * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
9211 and `get_lmf_addr'; `notification_address' is no longer a pointer.
9213 2008-04-21 Martin Baulig <martin@ximian.com>
9215 * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
9216 `thread_vtable', `event_handler_ptr' and `event_handler'.
9218 2008-04-21 Martin Baulig <martin@ximian.com>
9220 * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
9221 allows delayed initialization of the `executable_code_buffer' when
9224 2008-04-21 Martin Baulig <martin@ximian.com>
9226 * mini.h (mono_debugger_create_notification_function): Removed.
9227 * tramp-*.c (mono_debugger_create_notification_function): Removed.
9229 * mdb-debug-info64.s
9230 (MONO_DEBUGGER__notification_function): Added this in the .text section.
9232 * mdb-debug-info32.s
9233 (MONO_DEBUGGER__notification_function): Added this in the .text section.
9235 * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
9236 currently only works on x86 and x86_64, so don't create it on ppc.
9238 2008-04-21 Martin Baulig <martin@ximian.com>
9240 * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
9243 (mini_method_compile): In the fp elimination check, check
9244 `debug_options.mdb_optimizations' in addition to
9245 mono_debug_using_mono_debugger().
9247 * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
9248 disable some JIT optimizations which are only disabled when
9249 running inside the debugger.
9250 Added `--help-debug' option to describe the debugging options.
9251 (parse_debug_options): New static function to parse the `--debug'
9252 options, so we can easily add more stuff in future.
9254 2008-04-20 Zoltan Varga <vargaz@gmail.com>
9256 * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
9257 the method has no body.
9259 2008-04-19 Jonathan Chambers <joncham@gmail.com>
9261 * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
9262 assembly is not allowed in MSVC 64-bit compiler.
9263 (mono_arch_cpu_init): Don't set floating point precision on MSVC build
9264 as we get floating point exceptions everywhere.
9266 * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
9267 correctly align arguments for call to throw_exception.
9268 (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
9270 Code contributed under MIT/X11 license.
9272 2008-04-19 Zoltan Varga <vargaz@gmail.com>
9274 * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
9276 2008-04-17 Zoltan Varga <vargaz@gmail.com>
9278 * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
9280 * mini-amd64.c (NEW_INS): Set cil_code.
9282 * mini.c (mini_method_compile): Move the disabling of fp elimination to here
9283 from mini-amd64.c so all debugger related logic is in one place.
9285 * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
9286 later won't have a random ip assigned to them.
9288 2008-04-16 Zoltan Varga <vargaz@gmail.com>
9290 * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
9291 the arch specific function initializes code_size.
9292 (mono_create_delegate_trampoline): Ditto.
9294 * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
9295 tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
9298 * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if
9299 running under the debugger.
9301 * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
9304 * mini.c (mini_method_compile): Set a few flags in cfg if running under the
9305 debugger. Also move the disabling of optimizations here from driver.c.
9306 (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
9309 * mini.h (MonoCompile): Add a few new flags.
9311 2008-04-15 Zoltan Varga <vargaz@gmail.com>
9313 * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
9314 so the cil_code field of created MonoInst's is properly set.
9315 (mini_select_instructions): Ditto.
9317 * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
9318 (MONO_INST_NEW_CALL): Ditto.
9320 * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
9321 in many places so the ins->cil_code field is properly initialized.
9323 * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
9326 2008-04-14 Zoltan Varga <vargaz@gmail.com>
9328 * mini.c (mini_method_compile): Print a different message when compiling a
9331 * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
9334 2008-04-11 Zoltan Varga <vargaz@gmail.com>
9336 * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
9339 * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
9341 2008-04-11 Zoltan Varga <vargaz@gmail.com>
9343 * mini.c (handle_stack_args): Make this return void since its return value was
9344 never used. Also set cfg->unverifiable for invalid IL instead of calling
9347 2008-04-10 Mark Probst <mark.probst@gmail.com>
9349 * mini.c: Make sure "this" is live in catch clauses with type
9350 variables in shared generic code.
9352 2008-04-08 Mark Probst <mark.probst@gmail.com>
9354 * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
9355 generic_class_is_reference_type() to ensure the proper behaviour
9356 when sharing generic code and the type in question is a type
9359 2008-04-08 Zoltan Varga <vargaz@gmail.com>
9361 * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
9362 race conditions when printing thread dumps. Fixes #377738.
9364 2008-04-08 Massimiliano Mantione <massi@ximian.com>
9366 aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
9367 shows up when both MonoInst arguments can cause aliasig.
9368 There is likely no way in the current JIT to trigger this problem, but
9369 it showed up in the development of generics sharing, when in a new
9370 opcode both args of an OP_GROUP can be aliases (addresses of a local).
9371 When the generics sharing code will be committed, its tests will be
9372 valid also for this bug.
9374 2008-04-08 Zoltan Varga <vargaz@gmail.com>
9376 * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
9379 * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
9382 2008-04-07 Zoltan Varga <vargaz@gmail.com>
9384 * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
9385 use a more detailed exception message for InvalidCastException.
9387 * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
9389 * driver.c (mono_main): Add --debug=casts option to turn on better
9390 InvalidCastException message details.
9392 * mini.c (mini_get_debug_options): New helper function to return the address of
9393 the debug_options variable.
9395 * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
9396 the jit_tls TLS variable.
9398 * mini.c (mono_jit_tls): New TLS variable.
9400 * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
9403 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
9405 * mini.h: Removed verifer related stuff. This code was moved to verify.c
9407 * mini.c: Removed verifer related stuff, code moved to verify.c.
9409 * driver.c: Using code from verify.c instead of mini.c.
9411 2008-04-05 Zoltan Varga <vargaz@gmail.com>
9413 * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
9416 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
9418 * mini.c (check_for_method_verify): Enabling verification of
9419 corlib if mono_verify_all is set. Bugs in the verifier preventing that
9422 2008-04-04 Zoltan Varga <vargaz@gmail.com>
9424 * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
9425 caller saved registers as well.
9427 * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
9428 saved registers as well.
9430 2008-03-30 Zoltan Varga <vargaz@gmail.com>
9432 * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
9434 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
9437 2008-03-27 Zoltan Varga <vargaz@gmail.com>
9439 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
9441 (get_call_info): Take a gsctx argument instead of 'cfg'.
9443 2008-03-26 Zoltan Varga <vargaz@gmail.com>
9445 * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
9446 mono_verify_all is set.
9448 * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
9450 * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
9452 2008-03-25 Zoltan Varga <vargaz@gmail.com>
9454 * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
9457 * driver.c mini.c mini.h: Add a --verify-all development option to test the
9458 verifier and the code generated by the compiler.
9460 2008-03-25 Mark Probst <mark.probst@gmail.com>
9462 * mini.c: Generic sharing of the non-nullable case of the box
9465 2008-03-24 Zoltan Varga <vargaz@gmail.com>
9467 * inssel.brg: Fix the build.
9469 * iltests.il.in: Add a test for lconv.ovf.u8.un.
9471 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
9473 * mini.c (mono_method_to_ir): Implement readonly for ldelema and
9474 Array:Address. Fixes #372410.
9476 * iltests.il.in: New tests for readonly prefix.
9478 2008-03-23 Zoltan Varga <vargaz@gmail.com>
9480 * mini.h mini.c mini-trampolines.c: Move trampoline related code to
9483 * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to
9486 * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
9488 * mini.c (mono_decompose_op_imm): New helper function.
9490 * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
9491 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
9494 * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
9495 mono_arch_output_basic_block. Fix warnings.
9497 * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
9500 2008-03-22 Zoltan Varga <vargaz@gmail.com>
9502 * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
9503 since the extra frame is now detected automatically inside the loop.
9505 * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole
9506 opts which are now in mono_peephole_ins ().
9508 * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
9510 * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
9511 frames and skip duplicate managed-to-native frames. Fixes #367665.
9513 * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
9514 opts which are now in mono_peephole_ins ().
9515 (mono_arch_peephole_pass_2): Ditto.
9517 * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
9519 * mini-codegen.c (mono_peephole_ins): New helper function containing the
9520 arch independent peephole optimizations.
9522 * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
9523 opts which are now in mono_peephole_ins ().
9525 * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
9527 * mini-s390.c (mono_arch_output_basic_block): Fix build.
9529 * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
9532 * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
9533 CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
9536 2008-03-21 Zoltan Varga <vargaz@gmail.com>
9538 * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
9539 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
9542 * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
9543 mono_arch_output_basic_block. Fix warnings.
9545 2008-03-20 Zoltan Varga <vargaz@gmail.com>
9547 * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
9550 2008-03-20 Zoltan Varga <vargaz@gmail.com>
9552 * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
9555 * iltests.il: Add new tests.
9557 2008-03-20 Kornel Pal <kornelpal@gmail.com>
9559 * mini.c: Removed Windows version macros.
9561 2008-03-20 Mark Probst <mark.probst@gmail.com>
9563 * generic-sharing.c: Put reflection types in the extensible part
9564 of the runtime generic context.
9566 * mini.c: Generic sharing of the GetTypeHandle special case of the
9567 ldtoken instruction.
9569 2008-03-20 Zoltan Varga <vargaz@gmail.com>
9571 * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
9573 * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
9575 * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for
9576 consistency with the other version on the linear IR branch.
9578 * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
9580 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
9582 * iltests.il.in: Add new tests.
9584 2008-03-19 Zoltan Varga <vargaz@gmail.com>
9586 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
9588 * iltests.il.in: Add new tests.
9590 2008-03-19 Mark Probst <mark.probst@gmail.com>
9592 * mini.c: Two variables with the same name were declared in
9593 nesting contexts and one wasn't initialized. Fixed.
9595 2008-03-19 Mark Probst <mark.probst@gmail.com>
9597 * mini.c: Generic sharing of the initobj instruction.
9599 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
9601 * mini.c: make the test to optimize ldtoken from typeof() more
9604 2008-03-18 Mark Probst <mark.probst@gmail.com>
9606 * mini.c: Generic sharing of the initobj instruction for reference
9609 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
9611 * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
9612 the mono_breakpoint_clean_code() code to perform bound checks.
9614 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
9616 * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
9617 mono_arch_patch_callsite() to include the start of the managed method
9618 to be able to perform bound checks.
9620 2008-03-17 Mark Probst <mark.probst@gmail.com>
9622 * mini.c: Generic sharing for the isinst instruction.
9624 2008-03-17 Mark Probst <mark.probst@gmail.com>
9626 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
9627 inssel-long32-mips.brg: Added opcodes for doing indirect calls
9628 with the runtime generic context argument.
9630 * mini.c: Share calls to several types of unsharable methods by
9631 putting the address of the method code in the runtime generic
9632 context and doing an indirect call.
9634 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
9637 2008-03-16 Mark Probst <mark.probst@gmail.com>
9639 * generic-sharing.c: Change due to a change in the runtime genric
9642 2008-03-15 Martin Baulig <martin@ximian.com>
9645 (mono_arch_nullify_class_init_trampoline): Add call to
9646 mono_breakpoint_clean_code() to make things work when running
9647 inside the debugger.
9650 (mono_arch_nullify_class_init_trampoline): Add call to
9651 mono_breakpoint_clean_code() to make things work when running
9652 inside the debugger.
9654 2008-03-14 Zoltan Varga <vargaz@gmail.com>
9656 * inssel-long.brg (reg): Fix 64 bit build.
9658 2008-03-14 Mark Probst <mark.probst@gmail.com>
9660 * mini.c, mini.h: Share static generic code by passing it an
9661 implicit argument pointing to the runtime generic context.
9663 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
9664 inssel-long32-mips.brg: New opcodes for calling shared static,
9665 which need to be passed the runtime generic context.
9667 * mini-amd64.c, mini-x86.c: Save the runtime generic context
9668 argument on the stack in the prologue if needed. New function for
9669 finding the runtime generic context argument from the registers
9670 saved by the trampoline.
9672 * mini-amd64.h, mini-x86.h: Specify which register to use for the
9673 runtime generic context argument.
9675 * tramp-amd64.c: Also restore the register used for the runtime
9676 generic context argument.
9678 * mini-trampoline.c: Resolve shared static calls by consulting the
9679 runtime generic context via the new argument.
9681 * generic-sharing.c: Add an argument to sharability-checking
9682 functions that specifies whether type variables should be treated
9683 as sharable type arguments.
9685 * inssel-x86.brg: Removed a superfluous, buggy rule.
9687 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
9690 2008-03-14 Martin Baulig <martin@ximian.com>
9692 * debug-debugger.c (main_thread_handler): Call
9693 mono_runtime_run_main() without sending any notifications.
9695 * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
9697 2008-03-14 Zoltan Varga <vargaz@gmail.com>
9699 * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
9701 2008-03-14 Mark Probst <mark.probst@gmail.com>
9703 * tramp-x86.c: Fixed register restore offsets in the trampoline
9704 code for ECX and EDX.
9706 2008-03-12 Geoff Norton <gnorton@novell.com>
9708 * mini-arm.h: Add some #defines for locating sp, pc, r4 with
9709 different ucontext_t implementations.
9710 * exceptions-arm.c: Use the above defines to get exceptions working on
9711 iPhone (based on a patch by Luke Howard lukeh@padl.com)
9712 * mini-arm.c: Implement iPhone icache support (based on a patch by
9713 Luke Howard lukeh@padl.com)
9715 2008-03-12 Mark Probst <mark.probst@gmail.com>
9717 * mini.c: Enable generic sharing of calls to non-static
9718 non-interface non-generic non-value-type methods.
9720 * mini-trampolines.c: Resolve calls from shared generic code.
9722 2008-03-11 Zoltan Varga <vargaz@gmail.com>
9724 * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
9726 * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
9728 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
9730 * mini.c: some fixes for the AOT compiler.
9732 2008-03-07 Zoltan Varga <vargaz@gmail.com>
9734 * cpu-amd64.md: Add clob:1 to some float opcodes.
9736 2008-03-07 Rodrigo Kumpera <rkumpera@novell.com>
9738 * mini.h: Added MiniVerifierMode enumeration.
9740 * mini.c: Added mini_verifier_set_mode to control
9741 the usage of the new verifier.
9743 * mini.c (mono_method): Integrated the new verifier.
9745 * driver.c: Extended --security option with validil and
9746 verifiable options to activate the new verifier.
9748 2008-03-07 Zoltan Varga <vargaz@gmail.com>
9750 * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation
9751 optimization to ctors taking 0 or 2 arguments too.
9753 * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
9756 * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
9758 * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
9760 2008-03-06 Zoltan Varga <vargaz@gmail.com>
9762 * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
9763 non-aot case as well.
9765 * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
9767 * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
9770 * aot-compiler.c (encode_patch): Ditto.
9772 * mini.h (G_MININT32): Fix the definition of this.
9774 2008-03-05 Zoltan Varga <vargaz@gmail.com>
9776 * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
9778 * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
9780 2008-03-04 Zoltan Varga <vargaz@gmail.com>
9782 * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for
9783 methods returning vtypes in registers.
9784 (mono_arch_allocate_vars): Ditto.
9786 * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
9788 * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().
9790 * generics.cs: Add a test from the linear IR branch.
9792 * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
9794 * mini.c (inline_method): Cache failed inline attempts.
9796 2008-03-04 Mark Probst <mark.probst@gmail.com>
9798 * mini.c: For shared methods of generic classes put the location
9799 of "this" into the MonoGenericJitInfo.
9801 * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
9802 register out of a MonoContext by register number. Add the generic
9803 sharing context as an argument to mono_arch_find_this_argument().
9805 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
9806 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
9807 for new arch function.
9809 * mini-exception.c: Handle open exception clauses in shared
9812 * mini-trampolines.c: Supply additional argument to
9813 mono_arch_find_this_argument().
9815 2008-03-04 Zoltan Varga <vargaz@gmail.com>
9817 * Makefile.am (regtests): Run the bench.exe tests last.
9819 2008-03-03 Zoltan Varga <vargaz@gmail.com>
9821 * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
9824 2008-03-02 Zoltan Varga <vargaz@gmail.com>
9826 * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
9829 * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
9831 * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
9833 * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
9834 whose class has no cctor.
9836 * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
9838 2008-03-01 Zoltan Varga <vargaz@gmail.com>
9840 * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
9843 2008-02-29 Zoltan Varga <vargaz@gmail.com>
9845 * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
9846 to be in sync with the code on the linear IR branch.
9848 * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
9850 * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
9852 2008-02-27 Zoltan Varga <vargaz@gmail.com>
9854 * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
9856 * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
9858 * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
9860 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
9862 * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
9864 * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
9867 2007-11-14 Yoichi NAKAYAMA <nakayama@pixela.co.jp>
9869 * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
9870 OP_LOADR4_MEMBASE emission.
9872 * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
9873 (mono_spillvar_offset_float): Ditto.
9875 * mini-mips.c (mono_arch_emit_prolog): Ditto.
9877 * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
9880 * basic-long.cs: Add regression tests for them.
9882 * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
9884 (mono_arch_allocate_vars): Fix representation of single-precision float
9886 (mono_arch_output_basic_block): Ditto.
9888 * inssel-mips.brg: Ditto, remove duplicate items.
9890 * mini-mips.c (emit_load_volatile_arguments): New function to handle
9891 arguments of tail calls as on other platforms.
9892 (mono_arch_output_basic_block): Handle tail calls.
9894 * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
9897 * objects.cs (test_5_pass_static_struct): Add test for it.
9899 Contributed under MIT/X11 license.
9901 2008-02-26 Zoltan Varga <vargaz@gmail.com>
9903 * Makefile.am: Use gmcs for compiling the regression tests.
9905 * *.2.cs *.2.il: Rename to *.cs and *.il.
9907 2008-02-24 Zoltan Varga <vargaz@gmail.com>
9909 * regalloc.h: Make the vassign array smaller.
9911 * mini.c (mini_method_compile): Remove an unused field in cfg.
9913 * mini-codegen.c: Add a bunch of micro optimizations.
9915 2008-02-23 Zoltan Varga <vargaz@gmail.com>
9917 * regalloc.h: Remove some unused fields.
9919 2008-02-22 Zoltan Varga <vargaz@gmail.com>
9921 * mini-amd64.c (mono_arch_patch_code): Fix a warning.
9923 * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
9925 2008-02-22 Mark Probst <mark.probst@gmail.com>
9927 * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
9929 * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
9930 trampoline: Fetch an entry from the runtime generic context. If
9931 it's NULL, jump to the actual trampoline to fill the runtime
9932 generic context. Otherwise, return it.
9934 * mini.c: Call the lazy fetch trampoline to get entries out of the
9935 runtime generic context.
9937 * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
9938 tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
9939 tramp-sparc.c: Stubs for the lazy fetch trampoline.
9941 2008-02-21 Mark Probst <mark.probst@gmail.com>
9943 * mini.c: Fetch data out of the extensible part of the runtime
9944 generic context instead of calling a helper function.
9946 * generic-sharing.c: Some functions moved into
9947 metadata/generic-sharing.c. Helper function for fetching other
9948 types now checks and asserts against extensible rgctx (just for
9949 debugging purposes - the helper function isn't called anymore
9950 unless for debugging).
9952 2008-02-21 Zoltan Varga <vargaz@gmail.com>
9954 * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
9955 for tail calls up to the point that the tests in iltests.exe run. Also add a
9956 dummy CKFINITE implementation.
9957 (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
9958 needed for trampoline LMF frames.
9960 * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for
9961 trampoline LMF frames.
9963 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
9965 * mini.c (inline_method): clean any pending loader error when inlining fail.
9966 Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
9968 2008-02-21 Zoltan Varga <vargaz@gmail.com>
9970 * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
9972 * aot-runtime.c (decode_patch_info): Ditto.
9974 * mini.c (mono_resolve_patch_target): Ditto.
9976 * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
9979 * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
9981 * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
9982 if it references an icall address.
9984 2008-02-20 Zoltan Varga <vargaz@gmail.com>
9986 * cpu-s390x.md: Remove some more unused opcodes.
9988 * cpu-s390x.md: Remove some unused opcodes.
9990 * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
9991 mono_op_imm_to_op ().
9993 * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
9994 instead of a switch statement.
9996 * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
9997 the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
9999 * mini-codegen.c: Eliminate rassign macro which is no longer needed.
10001 * mini-codegen.c: Remove unused mono_regstate2_... functions.
10003 * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
10006 2008-02-19 Zoltan Varga <vargaz@gmail.com>
10008 * driver.c (mono_main): Improve error reporting when an assembly cannot be
10009 opened. Fixes #362607.
10011 * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
10013 * iltests.il.in: Add a test for static methods in interfaces.
10015 2008-02-18 Zoltan Varga <vargaz@gmail.com>
10017 * genmdesc.c (build_table): Fix a crash on older glib versions.
10019 * cpu-sparc.md: Remove some unused opcodes.
10021 * genmdesc.c: Error out if the .md contains CEE_ opcodes if
10022 MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
10024 * cpu-amd64.md: Remove some unused opcodes.
10026 * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
10027 like the other opcodes.
10029 2008-02-17 Zoltan Varga <vargaz@gmail.com>
10031 * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
10033 * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
10035 * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
10036 variables 'cfg' instead of 'm' for consistency.
10038 * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
10040 * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
10041 argument holding the vtype return address, to avoid the ambigious use of
10042 cfg->ret for this purpose.
10044 * mini.c (NEW_RETLOADA): Use vret_addr if set.
10046 * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
10048 * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
10049 new mono_print_ins () function which only takes one argument.
10051 2008-02-15 Zoltan Varga <vargaz@gmail.com>
10053 * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
10056 2008-02-14 Zoltan Varga <vargaz@gmail.com>
10058 * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
10060 * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
10062 * mini-x86.c: Sync with the version on the linear IR branch by adding new
10063 opcodes and other small changes.
10065 * mini-ops.h: Add some new opcodes from the linear IR branch.
10067 * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
10069 * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
10070 opcodes, use the REG_MEMBASE opcodes instead.
10072 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
10073 opcodes, use the REG_MEMBASE opcodes instead.
10075 * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
10078 * mini.c (mono_op_imm_to_op): New helper function.
10080 * mini-ops.h: Add some opcodes from linear IR branch.
10082 2008-02-13 Zoltan Varga <vargaz@gmail.com>
10084 * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov
10087 2008-02-12 Zoltan Varga <vargaz@gmail.com>
10089 * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to
10092 * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
10094 2008-02-09 Zoltan Varga <vargaz@gmail.com>
10096 * aot-compiler.c (emit_method_code): Add an assert.
10098 * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
10099 the IMT code so it is AOT friendly. Enable AOT for methods which call interface
10102 2008-02-08 Zoltan Varga <vargaz@gmail.com>
10104 * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for
10105 some load/store opcodes so they are consistent.
10106 (mono_arch_emit_prolog): Simplify some code.
10108 * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
10110 * objects.cs: Add tests for large argument offsets on ARM.
10112 * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large
10113 stack offsets. Fixes #359651.
10115 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
10117 * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
10119 * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
10121 * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
10123 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
10125 * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
10126 rid of CEE_CONV_R_UN.
10128 * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
10130 2008-02-07 Zoltan Varga <vargaz@gmail.com>
10132 * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
10134 * mini.c (mono_normalize_opcodes): Add some more opcodes.
10136 * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
10138 * cpu-amd64.md: Remove some unused opcodes.
10140 * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
10142 * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
10144 * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make
10145 arch specific functions for its parts. Call the peephole pass after local
10146 regalloc so the prolog can compute a more accurate max_offset.
10148 * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
10149 the corresponding OP_I/OP_L opcodes.
10151 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
10153 * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
10155 2008-02-06 Zoltan Varga <vargaz@gmail.com>
10157 * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
10158 as they are handled in mini.c.
10160 * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
10162 * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
10163 case since it is handled in mini.c.
10165 * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
10167 * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
10169 * *.c: Use the new opcodes in the IR and back end code.
10171 * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
10173 * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
10175 2008-02-06 Mark Probst <mark.probst@gmail.com>
10177 * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
10178 an assert because it has a race condition.
10180 2008-02-06 Zoltan Varga <vargaz@gmail.com>
10182 * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
10184 * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
10186 * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
10188 * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
10189 use OP_MOVE/OP_FMOVE/OP_ICONST instead.
10191 2008-02-05 Zoltan Varga <vargaz@gmail.com>
10193 * cpu-amd64.md (move): Correct the maximum size of move.
10195 2008-02-05 Mark Probst <mark.probst@gmail.com>
10197 * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
10198 the generic class init trampoline to return quickly if the class
10201 2008-02-04 Zoltan Varga <vargaz@gmail.com>
10203 * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
10204 issues where an 32 bit callsite cannot be patched by a 64 bit address.
10206 2008-02-03 Zoltan Varga <vargaz@gmail.com>
10208 * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
10211 2008-01-31 Zoltan Varga <vargaz@gmail.com>
10213 * objects.cs: Add some soft-float tests.
10215 * mini.c: Fix a couple more soft-float issues.
10217 * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
10219 * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
10220 avoid a REX prefix.
10222 2008-01-30 Zoltan Varga <vargaz@gmail.com>
10224 * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
10225 exception happens while compiling a virtual method.
10227 2008-01-29 Zoltan Varga <vargaz@gmail.com>
10229 * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
10231 * mini-sparc.c: Fix build.
10233 * mini-sparc.c (get_call_info): Add support for generic sharing.
10235 * mini-exceptions.c: Add a FIXME.
10237 2008-01-27 Zoltan Varga <vargaz@gmail.com>
10239 * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
10240 altstack handling code.
10242 * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
10244 * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
10246 * mini-s390.c: Add support for generic sharing.
10248 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
10250 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
10252 * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
10254 * mini-s390x.c: Add support for generic sharing.
10256 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
10258 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
10260 * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
10261 can be used since it takes a 16 bit signed immediate.
10263 * inssel-s390x.brg: Fix OP_SETRET.
10265 * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
10267 * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
10269 * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
10271 * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
10273 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
10276 * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
10279 * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
10280 of the unused mono_arch_patch_delegate_trampoline stuff.
10282 2008-01-26 Zoltan Varga <vargaz@gmail.com>
10284 * basic-long.cs: Move the fp related tests to basic-float.cs.
10286 * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
10288 * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
10290 * basic-calls.cs: Add a test for proper float argument passing.
10292 * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
10293 if the context corresponds to an exception received through a signal.
10295 * exceptions.cs: Add a test for nullref handling at the start of a try
10298 * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
10300 * jit-icalls.c (mono_break): New JIT icall.
10302 * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
10304 * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
10306 2008-01-25 Zoltan Varga <vargaz@gmail.com>
10308 * cpu-*.md: Get rid of unused opcodes.
10310 * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
10312 * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
10315 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
10318 * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
10319 the arch independent trampoline code in mini-trampolines.c.
10321 * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
10323 * mini.c (get_runtime_generic_context_ptr): Fix a warning.
10325 * mini-s390.h: Remove an unused define.
10327 * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
10328 the arch independent trampoline code in mini-trampolines.c.
10330 * mini-arm.c (mono_arch_emit_prolog): Fix build.
10332 2008-01-24 Zoltan Varga <vargaz@gmail.com>
10334 * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
10336 * mini-s390.c (mono_arch_emit_prolog): Fix build.
10338 * mini-s390x.c (mono_arch_emit_prolog): Fix build.
10340 * mini-ppc.c (mono_arch_emit_prolog): Fix build.
10342 * cpu-amd64.md: Use smaller sizes for int opcodes.
10344 * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
10346 * *.cs: Add some tests from the linear-ir branch. Move structs tests to
10349 * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
10352 * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
10353 instead of though a pointer to save an indirection when accessing elements of
10356 * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
10358 (NOT_IMPLEMENTED): New helper macro.
10359 (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
10362 * *.c: Use the new helper macro.
10364 2008-01-21 Zoltan Varga <vargaz@gmail.com>
10366 * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
10368 2008-01-20 Zoltan Varga <vargaz@gmail.com>
10370 * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
10373 2008-01-18 Zoltan Varga <vargaz@gmail.com>
10375 * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
10376 profiling is enabled.
10378 * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
10380 (mono_arch_emit_prolog): Add more first bblock optimizations.
10382 * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
10383 in order if possible.
10384 (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
10385 bblock, since the arguments are still in their original registers.
10387 * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
10389 2008-01-17 Zoltan Varga <vargaz@gmail.com>
10391 * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
10394 * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
10397 * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
10399 * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
10400 process async exceptions received while in unmanaged code.
10402 * mini.c (mini_init): Install a callback with the runtime which will be called
10403 when a thread receives an async exception while in unmanaged code.
10405 * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
10407 * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
10409 2008-01-16 Wade Berrier <wberrier@novell.com>
10416 2008-01-16 Zoltan Varga <vargaz@gmail.com>
10418 * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
10419 compilation with sun cc.
10421 * cpu-*.md: Fix the build.
10423 * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
10425 * mini-amd64.h: Add some comments to the MonoLMF structure.
10427 * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
10429 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
10430 in the LMF structure if possible. This saves two instructions in the
10431 managed->native wrappers.
10433 * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
10435 2008-01-16 Mark Probst <mark.probst@gmail.com>
10437 * generic-sharing.c: New type argument lookup code which uses the
10438 runtime generic context template.
10440 2008-01-15 Zoltan Varga <vargaz@gmail.com>
10442 * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
10444 * mini-arm.c (add_general): Fix arm eabi parameter passing.
10445 (mono_arch_output_basic_block): Fix localloc implementation.
10447 * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
10449 * mini-ia64.c (peephole_pass): Fix ia64 build.
10451 * mini-amd64.c (peephole_pass): Fix a warning.
10453 * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
10454 at a constant offset from sp/fp.
10456 * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
10457 instead of obtaining it from *lmf in the managed method case.
10459 2008-01-14 Zoltan Varga <vargaz@gmail.com>
10461 * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
10463 Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
10465 * mini.h (MonoInstList): New type.
10466 (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
10467 __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
10468 MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
10469 __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
10470 MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
10471 MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
10472 MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
10473 MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
10474 MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
10475 MONO_INST_LIST_FOR_EACH_PREV_SAFE,
10476 MONO_INST_LIST_FOR_EACH_ENTRY,
10477 MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
10478 MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
10479 mono_inst_list_first, mono_inst_list_last,
10480 mono_inst_list_next, mono_inst_list_prev): New instruction
10481 list handling interfaces.
10482 (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
10483 list head 'ins_list'.
10484 (MonoInst): Replace next pointer with list head 'node'.
10485 (MonoCallInst): Make 'out_args' a MonoInstList.
10486 (MONO_INST_NEW_CALL): Explicitly init ->out_args.
10487 (MonoCompile): Delete reverse_inst_list and
10488 reverse_inst_list_len.
10489 * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
10490 mono_arch_lowering_pass, mono_arch_local_regalloc,
10491 mono_arch_output_basic_block, mono_arch_emit_prolog):
10492 Convert to new instruction lists.
10493 (insert_after_ins): Delete.
10494 * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
10496 * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
10497 * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
10498 split_bblock, mono_add_ins_to_end, mono_emit_call_args,
10499 mono_emulate_opcode, mono_emit_load_got_addr,
10500 inline_method, mono_method_to_ir, mono_print_bb_code,
10501 print_dfn, decompose_pass, nullify_basic_block,
10502 replace_out_block_in_code, remove_block_if_useless,
10503 merge_basic_blocks, move_basic_block_to_end,
10504 try_unsigned_compare, optimize_branches, mono_print_code,
10505 mini_select_instructions, remove_critical_edges): Likewise.
10506 * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
10507 peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
10508 mono_arch_output_basic_block, mono_arch_emit_prolog):
10510 * mini-mips.c (mono_arch_call_opcode, peephole_pass,
10511 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
10512 mono_arch_output_basic_block): Likewise.
10513 (inst_list_prepend, insert_after_ins): Delete.
10514 * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
10515 MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
10517 * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
10518 peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
10519 mono_arch_emit_prolog): Likewise.
10520 * cfold.c (mono_constant_fold): Likewise.
10521 * liveness.c (visit_bb, mono_analyze_liveness,
10522 optimize_initlocals): Likewise.
10523 * ssapre.c (dump_code, process_bb, code_motion): Likewise.
10524 * graph.c (mono_draw_code_cfg): Likewise.
10525 * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
10526 mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
10527 mono_ssa_cprop): Likewise.
10528 * abcremoval (get_relations_from_previous_bb, process_block):
10530 * local-propagation (mono_cprop_invalidate_values,
10531 mono_local_cprop_bb): Likewise.
10532 * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
10533 peephole_pass, mono_arch_output_basic_block,
10534 mono_arch_emit_prolog): Likewise.
10535 * mini-arm.c (mono_arch_call_opcode, peephole_pass,
10536 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
10537 mono_arch_emit_prolog): Likewise.
10538 (insert_after_ins): Delete.
10539 * aliasing.c (print_code_with_aliasing_information,
10540 mono_build_aliasing_information, mono_aliasing_deadce):
10541 Convert to new instruction lists.
10542 * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
10543 peephole_pass, NEW_INS, mono_arch_lowering_pass,
10544 mono_arch_local_regalloc, mono_arch_output_basic_block):
10546 (insert_after_ins): Delete.
10547 * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
10548 peephole_pass, mono_arch_output_basic_block): Convert to
10549 new instruction lists.
10550 * mini-codegen (InstList, inst_list_prepend,
10551 insert_after_ins): Delete.
10552 (insert_before_ins, get_register_force_spilling,
10553 get_register_spilling, free_up_ireg, free_up_reg,
10554 create_copy_ins, create_spilled_store, alloc_int_reg,
10555 alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
10556 to new instruction lists.
10557 * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
10558 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
10559 mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
10560 (insert_after_ins): Delete.
10561 * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
10562 mono_arch_local_regalloc, mono_arch_output_basic_block,
10563 mono_arch_call_opcode): Convert to new instruction lists.
10564 (insert_after_ins): Delete.
10565 * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
10566 peephole_pass, mono_arch_output_basic_block,
10567 mono_arch_emit_prolog): Convert to new instruction lists.
10569 2008-01-11 Zoltan Varga <vargaz@gmail.com>
10571 * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
10573 * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
10576 * Makefile.am (version.h): Make this work with non-bash shells.
10578 2008-01-10 Zoltan Varga <vargaz@gmail.com>
10580 * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
10582 2008-01-08 Zoltan Varga <vargaz@gmail.com>
10584 * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
10585 the InitializeArray optimization.
10587 2008-01-06 Zoltan Varga <vargaz@gmail.com>
10589 * mini.c driver.c: Don't include os/gc_wrapper.h.
10591 2008-01-05 Zoltan Varga <vargaz@gmail.com>
10593 * mini.c (print_jit_stats): Print GC statistics if available.
10595 2008-01-04 Zoltan Varga <vargaz@gmail.com>
10597 * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
10599 2007-12-29 Zoltan Varga <vargaz@gmail.com>
10601 * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
10603 2007-12-26 Zoltan Varga <vargaz@gmail.com>
10605 * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
10607 * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
10609 * driver.c (mono_main): Ditto.
10611 2007-12-23 Zoltan Varga <vargaz@gmail.com>
10613 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
10615 * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
10616 in the vtable can't be encoded.
10617 (compile_method): Ditto.
10619 2007-12-21 Zoltan Varga <vargaz@gmail.com>
10621 * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
10624 * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
10627 * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
10628 the top LMF entry belongs to the current method.
10630 * mini.c: Update after renaming of mono_thread_get_pending_exception ().
10632 2007-12-20 Zoltan Varga <vargaz@gmail.com>
10634 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
10636 * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
10638 * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
10640 * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
10642 * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
10644 * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
10647 * basic-float.cs: Add an ulong->double cast test.
10649 2007-12-15 Zoltan Varga <vargaz@gmail.com>
10651 * mini.c (mono_method_to_ir): Fix a warning.
10653 2007-12-14 Zoltan Varga <vargaz@gmail.com>
10655 * mini-ops.h: Add OP_SWITCH.
10657 * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
10658 CEE_SWITCH in back-end code, use OP_SWITCH instead.
10660 2007-12-11 Geoff Norton <gnorton@novell.com>
10662 * mini-s390x.c: Minor change to the MAX() define to allow
10663 it to compile with other gcc versions.
10665 2007-12-11 Geoff Norton <gnorton@novell.com>
10668 * mini-s390x.c: Implement sext_i4 to fix the build on s390x
10670 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
10672 exceptions-arm.c (mono_arch_get_restore_context): Restore
10675 exceptions-arm.c (throw_exception): Save the frame pointer.
10676 This is a partial fix for #323747. Only the client side is
10679 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
10681 * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
10682 was using an unrelated variable to log the class which
10683 needed the cctor to be called. This was crashing on arm.
10685 2007-12-09 Robert Jordan <robertj@gmx.net>
10687 * mini-x86.c (mono_arch_emit_epilog):
10688 Consider all kinds of 64-bit types. Fixes #323114.
10690 2007-12-08 Zoltan Varga <vargaz@gmail.com>
10692 * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
10694 2007-12-07 Zoltan Varga <vargaz@gmail.com>
10696 * mini-amd64.c (peephole_pass): Add a missing instruction check.
10698 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10700 * mini.c: run type ctor before allocating an object, not only
10701 when running it's constructor method (fixes at least part of bug #342507).
10703 2007-12-07 Zoltan Varga <vargaz@gmail.com>
10705 * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
10707 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
10708 * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
10711 * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
10712 mono_generic_class_init_trampoline () the same as it is done with the other
10715 * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
10716 aot-runtime.c aot-compiler.c: Implement AOT support.
10718 2007-12-07 Mark Probst <mark.probst@gmail.com>
10720 * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
10721 build for archs which don't have the vtable trampoline defined
10724 2007-12-07 Zoltan Varga <vargaz@gmail.com>
10726 * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
10728 * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
10730 * mini-trampolines.c (mono_get_trampoline_func): New helper function.
10732 * tramp-<ARCH>.c: Use the new helper function.
10734 2007-12-07 Mark Probst <mark.probst@gmail.com>
10736 * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
10737 trampoline call, which takes a vtable argument.
10739 * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
10740 OP_TRAMPCALL_VTABLEs like other calls.
10742 * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
10743 register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
10744 call. Implemented a support function which fetches the vtable
10745 from a register set.
10747 * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
10748 Implemented a generic class init trampoline, using the
10749 OP_TRAMPCALL_VTABLE opcode.
10751 * mini.c: Implemented static field access when sharing generic
10752 code. This implies initing the class using the new
10753 OP_TRAMPCALL_VTABLE call.
10755 2007-12-07 Mark Probst <mark.probst@gmail.com>
10757 * mini.c: Don't compile methods with sharing enabled if their
10758 classes are disabled for sharing.
10760 2007-12-06 Zoltan Varga <vargaz@gmail.com>
10762 * inssel.brg: Add a missing sign extension to the GETCHR and array access
10763 opcodes. Fixes #346563.
10765 * objects.cs: Add a new test.
10767 * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
10769 * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
10770 HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
10772 2007-12-06 Zoltan Varga <vargaz@gmail.com>
10774 * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
10776 2007-12-03 Zoltan Varga <vargaz@gmail.com>
10778 * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
10781 2007-12-02 Zoltan Varga <vargaz@gmail.com>
10783 * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
10785 * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
10786 optimization in the AOT case.
10788 2007-11-30 Zoltan Varga <vargaz@gmail.com>
10790 * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
10792 * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
10794 * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
10796 * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
10798 * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
10799 is created by the inlined delegate ctor.
10801 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
10803 * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
10805 2007-11-29 Zoltan Varga <vargaz@gmail.com>
10807 * cpu-x86.md: Fix the length of ckfinite.
10809 2007-11-28 Zoltan Varga <vargaz@gmail.com>
10811 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
10813 * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
10814 (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
10816 * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
10818 * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
10819 OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
10821 2007-11-28 Martin Baulig <martin@ximian.com>
10824 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
10825 after creating the trampoline.
10827 2007-11-27 Zoltan Varga <vargaz@gmail.com>
10829 * aot-runtime.c (load_aot_module): Check runtime version if needed.
10831 * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
10834 * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
10835 instead of the calling method to help AOT.
10837 * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
10839 2007-11-26 Zoltan Varga <vargaz@gmail.com>
10841 * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
10844 2007-11-23 Zoltan Varga <vargaz@gmail.com>
10846 * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
10848 * aot-compiler.c (compile_method): Correct check for generic method definitions.
10849 (encode_method_ref): No need to handle generic method definitions specially.
10851 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
10853 * aot-runtime.c (decode_klass_ref): Clean this up and rename from
10856 * aot-compiler.c (encode_klass_ref): Clean this up and rename from
10858 (compile_method): Enable generic sharing.
10860 2007-11-22 Zoltan Varga <vargaz@gmail.com>
10862 * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
10863 (mini_method_compile): Add preliminary support for AOTing shared generic code.
10865 * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
10868 * mini-trampolines.c: Fix a warning.
10870 * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
10872 (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
10873 (generic_class_is_reference_type): Remove unused function.
10875 * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
10876 in the generic vtable trampoline case.
10878 * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
10880 * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
10881 return an AOT method based on a vtable slot.
10883 * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
10885 * mini.c (mini_get_vtable_trampoline): Export this.
10887 2007-11-22 Martin Baulig <martin@ximian.com>
10890 (MonoDebuggerInfo): Move `debugger_version' up.
10892 2007-11-22 Martin Baulig <martin@ximian.com>
10895 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
10897 * mini-trampolines.c
10898 (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
10899 after compiling the method.
10901 2007-11-20 Martin Baulig <martin@ximian.com>
10904 (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
10905 (mono_debugger_remove_breakpoint): Likewise.
10906 (mono_debugger_check_breakpoints): Likewise.
10908 * debug-debugger.c: Implement the new breakpoint interface here.
10910 2007-11-18 Zoltan Varga <vargaz@gmail.com>
10912 * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
10913 CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
10915 * mini-x86.c (mono_arch_output_basic_block): Ditto.
10917 2007-11-17 Zoltan Varga <vargaz@gmail.com>
10919 * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
10921 * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
10924 * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
10927 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
10928 returning a vtype in a register.
10930 * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
10931 here from the arch specific code.
10933 * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
10936 * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
10937 (mono_arch_emit_prolog): Increment maximum prolog size.
10939 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
10940 START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
10942 * mini-x86.c (get_call_info): Receive a MonoCompile instead of a
10943 MonoGenericSharingContext.
10945 * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
10946 MonoGenericSharingContext. Allocate memory from the cfg mempool.
10948 2007-11-15 Mark Probst <mark.probst@gmail.com>
10950 * mini.c, mini.h, generic-sharing.c: Functions for producing code
10951 which extract fields out of the runtime generic context. Full
10952 sharing of the NEWARR opcode.
10954 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
10956 * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
10957 --enable-minimal=ssa.
10959 2007-11-13 Zoltan Varga <vargaz@gmail.com>
10961 * mini-trampolines.c (mono_delegate_trampoline): Update after
10962 mono_marshal_get_delegate_invoke () signature change.
10964 2007-11-13 Mark Probst <mark.probst@gmail.com>
10966 * mini.c: Removed the shared context in favor of the generic
10967 sharing context. Allocate the MonoJitInfo structure with room for
10968 the generic sharing context if it's needed.
10970 * mini.h: Remove MonoGenericSharingContext declaration. It's in
10971 domain-internals.h now.
10973 * mini-x86.c: Pass the generic sharing context to get_call_info ().
10975 * generic-sharing.c: Several changes for working without a shared
10976 context and instead operating on open types instead.
10978 2007-11-12 David S. Miller <davem@davemloft.net>
10980 * inssel-sparc.brg: Fix double instruction emit.
10982 2007-11-12 Zoltan Varga <vargaz@gmail.com>
10984 * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
10985 Get/Set/Address methods.
10987 * mini.c debug-debugger.c mini-trampolines.c: Update after
10988 mono_marshal_get_delegate_invoke signature change.
10990 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
10992 * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
10993 This can happens with dynamic methods. Fixes the other bug in #322722.
10995 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
10997 * tramp-arm.c (mono_arch_patch_callsite): Support patching
11000 * mini-arm.c (arm_patch): Implement patching of BX call
11001 sequence. Fixes one of the bugs in #322722.
11003 2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
11005 * mini-sparc.c (mono_arch_flush_icache): Make more efficient
11006 under Linux. We only need to flush every 32-byte cache line.
11008 2007-11-07 Massimiliano Mantione <massi@ximian.com>
11011 move_basic_block_to_end: Add branches when needed, eventually creating
11013 optimize_branches: added a parameter that tells if it's ok to create
11014 new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
11015 and avoid calling move_basic_block_to_end when it's not ok.
11018 2007-11-07 Mark Probst <mark.probst@gmail.com>
11020 * mini.c: Abort inlining call to InitializeArray if something
11021 looks wrong. Let the icall handle it, which now has proper safety
11024 2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
11026 * mini.c (mono_spill_call): add support for soft-float.
11028 * mini.c (mono_method_to_ir): add support for soft-float
11029 to inlined functions that return float.
11031 * mini.c (mono_method_to_ir): add support for soft-float
11032 to cee_stsfld opcode on float fields.
11034 2007-11-05 Geoff Norton <gnorton@novell.com>
11036 * mini-x86.h: Fix the structure access for X86 Leopard.
11039 2007-11-05 Martin Baulig <martin@ximian.com>
11041 * mini-trampolines.c
11042 (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
11043 after compiling the method to notify the debugger.
11045 2007-11-05 Martin Baulig <martin@ximian.com>
11047 * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
11049 2007-11-02 Zoltan Varga <vargaz@gmail.com>
11051 * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
11052 David Miller <davem@davemloft.net>. Allow larger offsets in branches.
11054 2007-11-01 Zoltan Varga <vargaz@gmail.com>
11056 * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
11057 native-to-managed wrappers.
11059 2007-11-01 Geoff Norton <gnorton@novell.com>
11061 * mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
11064 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
11066 * mini.c, mini-x86.c: when getting back from unmanaged code
11067 to managed via a marshaled delegate we also need to set the
11070 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
11072 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
11075 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
11077 * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
11078 let the debugger or other external agents to tell the JIT when
11079 a sw breakpoint has been inserted in the code that the JIT needs
11080 to be able to inspect.
11082 2007-10-31 Martin Baulig <martin@ximian.com>
11085 (MonoDebuggerInfo): Remove `runtime_class_init'.
11087 2007-10-30 Martin Baulig <martin@ximian.com>
11090 (mono_debugger_thread_created): Added `MonoThread *' argument.
11091 (mono_debugger_extended_notification): New public method.
11092 (mono_debugger_trampoline_compiled): New public method.
11095 (MonoDebuggerThreadInfo): Added `thread' and
11096 `extended_notifications' fields.
11099 (debugger_executable_code_buffer): New static variable.
11102 (MonoDebuggerInfo): Added `executable_code_buffer',
11103 `executable_code_buffer_size', `breakpoint_info_area',
11104 `breakpoint_table' and `breakpoint_table_size'.
11106 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
11108 * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
11109 that IP either is an unused value or the vtable pointer. IMT
11110 calls use vtable + offset now. Reduced by almost half the size
11113 2007-10-26 Jonathan Chambers <joncham@gmail.com>
11115 * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
11116 defines to access param registers. Replace long usage with
11117 gsize as sizeof(long) != sizeof(void*) on Win64.
11119 * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
11120 on Win64. Fix intrinsic, use _AddressOfReturnAddress
11121 instead of non-existant _GetAddressOfReturnAddress.
11123 * tramp-amd64.c: Use AMD64_ARG_REG# defines to access
11124 param registers. Save/restore %rdi and %rsi in MonoLMF.
11126 * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
11127 param registers. Modify (throw_exception) signature to take
11128 %rdi and %rsi on Win64.
11130 Code is contributed under MIT/X11 license.
11132 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11134 * helpers.c: unlink debugging output files.
11136 2007-10-25 Zoltan Varga <vargaz@gmail.com>
11138 * mini.c: Move mono_create_ftnptr () to object.c.
11140 2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
11142 * helpers.c (mono_disassemble_code): MonoCompile parameter is now
11143 optional. This function can now be used to disassemble code generated
11144 outside the JIT such as trampolines and IMT thunks.
11146 * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
11148 * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
11149 vtable pointer from a ldr instruction.
11151 * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
11152 new IMT call sequence.
11154 * mini-arm.c (mono_arch_output_basic_block): emit the IMT
11155 call sequence for interface invocations.
11157 * mini-arm.c (mono_arch_emit_imt_argument): added, required
11158 for imt support. This function is empty since IMT on ARM requires no
11159 special handling on the IR side.
11161 * mini-arm.c (mono_arch_find_imt_method): added, required for
11164 * mini-arm.c (mono_arch_find_this_argument): added, required
11167 * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
11168 a ldr instruction to load a value stored in the code stream.
11170 * mini-arm.c (mono_arch_build_imt_thunk):added, required
11174 2007-10-23 Zoltan Varga <vargaz@gmail.com>
11176 * mini.c (mini_init): Install the jump trampoline callback.
11178 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11180 * mini-trampolines.c: handle synchronized methods with the common
11181 vtable trampoline (bug #335601).
11183 2007-10-17 Zoltan Varga <vargaz@gmail.com>
11185 * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
11187 * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
11190 * mini-ia64.h mini-ia64.c: Add support for IMT.
11192 * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
11193 prolog. Fixes #331958.
11195 2007-10-15 Zoltan Varga <vargaz@gmail.com>
11197 * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
11199 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11201 * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
11204 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11206 * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
11209 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
11211 * mini-x86.c, mini-x86.h: x86 support for the common vtable
11214 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
11216 * mini-trampolines.c: changed the magic rampoline to understand
11217 the common vtable trampoline method: the method to invoke is
11218 determined by the vtable displacement of the call.
11220 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11222 * mini.c, mini.h: register the common vtable trampoline if the
11223 architecture supports it.
11225 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11227 * cpu-amd64.md: use the correct max length for tls_get.
11229 2007-10-14 Zoltan Varga <vargaz@gmail.com>
11231 * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
11232 CEE_STELEM_ANY. Fixes #333696.
11234 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
11236 * exceptions-x86.c: provide more graceful handling of the case where
11237 we followed a bogus function pointer from managed code (bug #332866).
11239 2007-10-11 Mark Probst <mark.probst@gmail.com>
11241 * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
11242 replaces the generic_shared flag and will carry more information
11245 * generic-sharing.c: Added mini_type_stack_size() which allows
11246 allows open types if given a generic sharing context.
11247 mini_get_basic_type_from_generic() takes a
11248 MonoGenericSharingContext* instead of a MonoCompile* now.
11250 * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
11251 mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
11252 mini-sparc.c, mini-x86.c: Trivial changes required by the two
11253 changes above. Just passing arguments through to the right
11256 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11258 * mini-arm.c: unify the call emission to emit_code_seq().
11260 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
11262 * tramp-arm.c: reduced the trampoline size.
11264 2007-10-10 Mark Probst <mark.probst@gmail.com>
11266 * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
11267 variable handling out of arch-specific code.
11269 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
11271 * mini-arm.c: implemented fast delegate dispatch.
11273 2007-10-09 Zoltan Varga <vargaz@gmail.com>
11275 * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
11276 that fp elimination is turned off if the space required by locals is too
11277 big. Fixes #331958.
11279 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
11281 * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
11282 ARM to the new style trampoline.
11284 2007-10-09 Zoltan Varga <vargaz@gmail.com>
11286 * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
11288 * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
11290 2007-10-09 Martin Baulig <martin@ximian.com>
11293 (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
11294 `field_info_offset_offset'.
11296 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
11298 * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
11299 removed more internal usage of the r11 register and made it available
11300 to the register allocator.
11302 2007-10-08 Mark Probst <mark.probst@gmail.com>
11304 * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
11305 when sharing generics and treat type variables as references.
11307 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11309 * mini-ppc.c: started removing the internal uses of register r11
11310 to eventually allow the register allocator to manage it as an
11311 additional available register.
11313 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
11315 * tramp-amd64.c: fixed memory corruption in the trampoline generation.
11317 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
11319 * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
11320 specific trampolines as they are not performance critical as a jump
11321 target (maybe align as before only for AOT code?). This saves about
11322 200 KB of native code on x86 for monodevelop startup.
11324 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
11326 * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
11327 monodevelop startup.
11329 2007-10-06 Zoltan Varga <vargaz@gmail.com>
11331 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
11333 * mini-sparc.h mini-sparc.c: Implement IMT support.
11335 * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
11336 its smaller and doesn't clobber sparc_g1.
11338 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
11340 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11342 * mini-ppc.c: optimized the size of the IMT thunks a bit.
11344 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
11346 * mini-ppc.c: implemented fast delegate invocation.
11348 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
11350 * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
11352 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11354 * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
11355 code to the new style trampoline in preparation for IMT support.
11357 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
11359 * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
11360 systems already. This also reduces the specific trampiline sizes and
11361 prepares for the use of r12 as the IMT identifier register.
11363 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11365 * mini-mips.h: endianess fix (simplified from a patch by
11366 Thomas Kunze <thommy@tabao.de>, bug #323737).
11368 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11370 * exceptions-ppc.c, mini-ppc.h: refactor to use macros
11371 to access ucontext fields and enable netbsd support
11372 (partially from Magnus Henoch <mange@freemail.hu>).
11374 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11376 * genmdesc.pl: patch from Henryk Plotz <henryk@openmoko.org> to
11377 use the preprocessor from the CPP env var if it is set.
11379 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11381 * mini-trampolines.c: fixed an assertion and moved it earlier in the
11382 code, before interface_offset gets used.
11384 2007-10-02 Zoltan Varga <vargaz@gmail.com>
11386 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
11387 mono_class_setup_vtable () before accessing klass->vtable.
11389 2007-10-01 Zoltan Varga <vargaz@gmail.com>
11391 * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
11394 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11396 * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
11397 IMT slots (this saves hundreds of KB of memory in programs like
11398 IronPython and Monodevelop).
11400 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
11402 * mini.c: print the delegate counter.
11404 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
11406 * mini-x86.c: make it easier to enable the debugging code for IMT
11409 2007-09-28 Martin Baulig <martin@ximian.com>
11412 (MonoDebuggerMetadataInfo): Add `klass_image_offset',
11413 `mono_method_klass_offset' and `mono_method_token_offset'.
11415 2007-09-20 Mark Probst <mark.probst@gmail.com>
11417 * mini.c: First generics sharing implementation. Can only share
11418 in very simple cases. If sharing doesn't work it falls back to
11419 dedicated compilation.
11421 * mini.h: Flag in MonoCompile to specify whether generic
11422 compilation is shared. Flags enum for marking which generic inst
11423 of a context is used. Prototypes for helper functions.
11425 * generic-sharing.c: Helper functions for generic method sharing.
11427 * optflags-def.h: Optimization flag (gshared) for enabling generic
11428 method sharing added.
11430 * Makefile.am: generic-sharing.c added.
11432 2007-09-19 Daniel Nauck <dna@mono-project.de>
11434 * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
11436 2007-09-19 Massimiliano Mantione <massi@ximian.com>
11437 * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
11440 2007-09-19 Martin Baulig <martin@ximian.com>
11442 * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
11443 mono_debug_cleanup() is now part of mono_cleanup().
11445 2007-09-18 Zoltan Varga <vargaz@gmail.com>
11447 * driver.c (mono_main): Fix a warning.
11449 2007-09-17 Zoltan Varga <vargaz@gmail.com>
11451 * aot-compiler.c: Optimize various parts when processing large assemblies.
11454 * mini.c (mono_patch_info_hash): Improve hash function.
11456 2007-09-14 Jonathan Chambers <joncham@gmail.com>
11458 * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
11460 Code is contributed under MIT/X11 license.
11462 2007-09-14 Zoltan Varga <vargaz@gmail.com>
11464 * mini.c (mini_init): Fix a leak.
11466 * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
11468 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
11470 * mini.c: redirect string.InternalAllocStr() to the managed allocator.
11472 2007-09-14 Zoltan Varga <vargaz@gmail.com>
11474 * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
11476 2007-09-13 Zoltan Varga <vargaz@gmail.com>
11478 * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
11481 * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
11483 * mini.c (handle_alloc): Enable managed allocators in AOT code.
11485 * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
11487 * aot-runtime.c (decode_patch_info): Ditto.
11489 2007-09-12 Jonathan Chambers <joncham@gmail.com>
11491 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
11492 static case. Cache delegates in architecture specific code,
11493 based on number of parameters.
11495 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
11496 in architecture specific code, based on number of parameters.
11498 * mini-trampolines.c (mono_delegate_trampoline): Architecture specific
11499 caching happen in architecture specific code now.
11501 Code is contributed under MIT/X11 license.
11503 2007-09-12 Jonathan Chambers <joncham@gmail.com>
11505 * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
11506 mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
11507 mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
11509 Code is contributed under MIT/X11 license.
11511 2007-05-15 Massimiliano Mantione <massi@ximian.com>
11512 * mini.c: (mono_thread_abort) Fixed bug #82416.
11514 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
11516 * mini.: hook the new managed GC allocation feature into the JIT.
11518 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
11520 * mini.c: implementation for the new runtime tls opcode.
11522 2007-09-11 Martin Baulig <martin@ximian.com>
11525 (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
11526 `mono_method_inflated_offset'.
11528 2007-09-07 Zoltan Varga <vargaz@gmail.com>
11530 * driver.c mini.h mini.c: Add a new devel command line option for injecting
11531 async exceptions into a method.
11533 * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
11534 purpose of testing whenever the unwinder works at every instruction.
11536 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
11538 * mini.c: check accessibility of method used in ldftn (fixes
11541 2007-09-04 Zoltan Varga <vargaz@gmail.com>
11543 * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
11545 * inssel.brg: Fix a warning.
11547 2007-09-03 Martin Baulig <martin@ximian.com>
11549 * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
11550 now takes the `main_method' as argument.
11552 2007-09-02 Zoltan Varga <vargaz@gmail.com>
11554 * cpu-sparc.md (endfilter): Add missing src1:i argument.
11556 2007-08-30 Jonathan Chambers <joncham@gmail.com>
11558 * driver.c: include the cil-coff.h header on Windows.
11560 Code is contributed under MIT/X11 license.
11562 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
11564 * mini.c, driver.c: don't include the cil-coff.h header.
11566 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
11568 * mini.c: flag places that needs fixes fo soft-float support.
11570 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
11572 * mini.h, inssel-float.brg: fix soft-float constant loads on big
11573 endian systems (partially from Dean Jenkins, bug #81924).
11575 2007-08-28 Mark Probst <mark.probst@gmail.com>
11577 * mini.c (check_linkdemand): Remove embedded reference object in
11578 call to LinkDemandSecurityException.
11579 (mono_jit_compile_method_inner): Call LinkDemandSecurityException
11580 with an IntPtr instead of a reference object.
11582 2007-08-28 Zoltan Varga <vargaz@gmail.com>
11584 * mini.c (handle_initobj): Handle alignment properly.
11586 * inssel.brg (mini_emit_memset): Ditto.
11588 * inssel.brg (mini_emit_memcpy): Ditto.
11590 * inssel-sparc.brg: Ditto.
11592 * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
11594 2007-08-26 Zoltan Varga <vargaz@gmail.com>
11596 * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
11597 exceptions raised in unmanaged code. Fixes part of #82594.
11599 2007-08-24 Mark Probst <mark.probst@gmail.com>
11601 * mini.c (mono_method_to_ir), declsec.c
11602 (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
11604 2007-08-22 Martin Baulig <martin@ximian.com>
11607 (MonoDebuggerThreadInfo): New typedef.
11608 (mono_debugger_thread_table): New global variable.
11609 (mono_debugger_thread_created): New public function.
11610 (mono_debugger_thread_cleanup): New public function.
11613 (MonoDebuggerInfo):
11614 - removed `get_current_thread' and `lookup_assembly'.
11615 - removed `data_table'.
11616 - added `thread_table'.
11619 (mono_thread_start_cb): Call mono_debugger_thread_created().
11620 (mono_thread_attach_cb): Likewise.
11621 (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
11622 (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
11625 * driver.c (mono_main): Move mono_debug_init() up, before calling
11626 mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
11628 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
11630 * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
11631 together when passing several arguments of type double (gives a small
11632 speedup and saves a few bytes of generated code).
11634 2007-08-20 Jb Evain <jbevain@novell.com>
11636 * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
11638 2007-08-20 Jb Evain <jbevain@novell.com>
11640 * mini.c (mono_method_to_ir): throw MethodAccessException
11641 and FieldAccessException instead of InvalidProgramException.
11643 2007-08-20 Mark Probst <mark.probst@gmail.com>
11645 * mini.c: CoreCLR security checks.
11647 * mini.h: Removed MonoSecurityMode (moved to
11648 metadata/security-manager.h) and mono_security_mode global var
11649 (replaced by set/get functions in security-manager.h).
11651 * driver.c: Added "core-clr-test" security mode for testing. Used
11652 set-function for setting security mode.
11654 2007-08-17 Mark Probst <mark.probst@gmail.com>
11656 * mini.c: MonoJitInfo's are freed hazardously now. Statistics for
11657 the new jit_info_table.
11659 * driver.c: Test code for the new jit_info_table (enabled by the
11660 define MONO_JIT_INFO_TABLE_TEST).
11662 2007-08-14 Zoltan Varga <vargaz@gmail.com>
11664 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
11665 detection of call <REG> instruction sequence. Fixes build on freebsd.
11667 2007-08-13 Zoltan Varga <vargaz@gmail.com>
11669 * mini-exceptions.c: Fix a warning.
11671 2007-08-11 Zoltan Varga <vargaz@gmail.com>
11673 * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
11674 stack overflow handling code on amd64 too.
11676 * mini-exceptions.c (mono_setup_altstack): Make this use
11677 mono_thread_get_stack_bounds ().
11679 * mini-x86.h: Disable sigaltstack on solaris x86.
11681 2007-08-10 Zoltan Varga <vargaz@gmail.com>
11683 * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
11685 2007-08-10 Geoff Norton <gnorton@customerdna.com>
11687 * tramp-x86.c: Remove some unneeded alignment changes on Apple. Fixes #82387.
11689 2007-08-08 Zoltan Varga <vargaz@gmail.com>
11691 * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
11693 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
11695 2007-08-03 Neale Ferguson <neale@sinenomine.net>
11697 * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
11700 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
11702 * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
11703 to be emitted (bug #82281).
11705 2007-08-01 Martin Baulig <martin@ximian.com>
11707 Merged the `debugger-dublin' branch.
11709 * debug-debugger.h (MonoDebuggerInfo):
11710 Removed the `old_*' compatibility entries.
11711 Added `debugger_version' and `data_table'.
11712 Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
11713 Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
11716 (MiniDebugMethodBreakpointInfo): Add `address_list'.
11717 (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
11718 instead of a `gconstpointer'.
11719 (mono_debugger_insert_method_breakpoint): Return a
11720 `MonoDebugMethodAddressList *'.
11722 2007-06-28 Martin Baulig <martin@ximian.com>
11724 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
11726 2007-08-01 Zoltan Varga <vargaz@gmail.com>
11728 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using
11729 __builtin_frame_address () since it is broken on older gcc versions.
11731 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11733 * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
11734 on the stack overflow handling and made the managed stack overflows
11735 catchable in most cases using soft guard pages.
11736 * exceptions-x86.c: added code to restore the protection in the soft
11737 guard pages at the end of exception handling.
11739 2007-07-31 Zoltan Varga <vargaz@gmail.com>
11741 * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
11743 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
11745 * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
11746 exception handling.
11748 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
11750 * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
11751 signal handling support until it has been ported to the new mechanism.
11752 * mini.c: fixed stack overflow detection and use the new
11753 architecture code to handle signals on the altstack.
11755 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
11757 * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
11758 stack overflows on the alt stack.
11760 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
11762 * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
11763 stack overflows on the alt stack.
11765 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
11767 * exceptions-ppc.c: cleanup preparing for altstack support.
11769 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
11771 * exceptions-arm.c: cleanup preparing for altstack support.
11773 2007-07-27 Mark Probst <mark.probst@gmail.com>
11775 * mini.c (print_jit_stats): Output hazard pointer stats.
11777 2007-07-26 Mark Probst <mark.probst@gmail.com>
11779 * driver.c, mini.c: Replaced security mode flags with a single
11782 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11784 * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
11786 2007-07-25 Mark Probst <mark.probst@gmail.com>
11788 * mini.c, mini.h, driver.c (mono_main): Added command-line flag
11789 (which doesn't do anything yet) for activating Core CLR
11790 (Silverlight) security.
11792 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
11794 * mini-codegen.c: work around a possible gcc bug on arm.
11796 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
11798 * driver.c, mini-x86.h, mini-amd64.h: print a nice error
11799 message for platforms that don't support AOT compilation.
11801 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
11803 * mini.h, mini.c, driver.c: temporary smcs hack.
11805 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
11807 * mini-arm.h, mini-arm.c: arm EABI fixes.
11809 2007-07-22 Zoltan Varga <vargaz@gmail.com>
11811 * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
11814 * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
11815 trampolines taking a method argument.
11817 * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
11819 * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
11820 * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
11822 * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
11823 JIT compilation throws an exception. Fixes #82050.
11825 2007-07-19 Mark Probst <mark.probst@gmail.com>
11827 * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
11828 with the MONO_EXCEPTION_ defines.
11830 2007-07-17 Zoltan Varga <vargaz@gmail.com>
11832 * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
11835 * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
11836 the cause of an assertion.
11838 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
11840 * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
11843 2007-07-15 Zoltan Varga <vargaz@gmail.com>
11845 * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
11846 assert. Should fix #82103.
11848 2007-07-14 Zoltan Varga <vargaz@gmail.com>
11850 * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
11851 here too. Fixes #82095.
11853 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
11856 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
11858 * mini-amd64.h: Enable IMT for amd64.
11860 * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
11862 2007-07-12 Zoltan Varga <vargaz@gmail.com>
11864 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
11866 2007-07-12 Mark Probst <mark.probst@gmail.com>
11868 * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
11869 as soon as check_linkdemand sets an exception_type.
11871 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
11873 * mini-x86.c: fixed offsets for IMT call sequence.
11874 * mini-x86.h: enable IMT again.
11876 2007-07-11 Zoltan Varga <vargaz@gmail.com>
11878 * trace.c (mono_trace_enter_method): Decode MonoType too.
11880 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
11882 * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
11884 * mini-amd64.c: Add preliminary IMT implementation.
11886 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
11888 * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
11889 understand the new IMT-base interface invocation (thanks to
11890 Daniel Nauck for the report and the remote debugging session).
11892 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
11894 * mini-x86.c: size and speed optimizations for the IMT bsearch.
11896 2007-07-11 Zoltan Varga <vargaz@gmail.com>
11898 * Makefile.am (aotcheck): Make this actually use the AOTed code.
11900 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
11902 * mini-trampolines.c: implement AOT IMT support.
11903 * mini-x86.h: enable IMT support for wider testing.
11905 2007-07-10 Zoltan Varga <vargaz@gmail.com>
11907 * inssel.brg (emit_imt_argument): Add aot support here.
11909 * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
11911 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11913 * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
11914 of the IMT implementation, partially from massi, with my
11915 implementation of the bsearch sequence. Disabled by default until
11916 the AOT code is implemented.
11918 2007-07-10 Zoltan Varga <vargaz@gmail.com>
11920 * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
11922 * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
11924 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11926 * inssel.brg, mini.c, mini.h, mini-trampolines.c:
11927 arch-independent IMT JIT code from Massimiliano
11928 Mantione (massi@ximian.com) with small cleanups from me.
11930 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
11932 * Makefile.am: fix svn invocation to get the svn revision to be
11933 independent of the local language (build fix).
11935 2007-07-09 Mark Probst <mark.probst@gmail.com>
11937 * mini.c (inline_method): Reset cfg->exception_type if the
11938 inlining is aborted. Fixes: 82049.
11940 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
11942 * mini.c: remove assert from exception handling code when exception_ptr
11945 2007-07-05 Zoltan Varga <vargaz@gmail.com>
11947 * mini.c (mono_codegen): Add an assert.
11949 * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method
11950 enter and leave code.
11951 * mini-amd64.c (mono_arch_emit_prolog): Likewise.
11953 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11955 * mini-ppc.c: fixed memory corruption for localloc(0)
11958 2007-07-05 Zoltan Varga <vargaz@gmail.com>
11960 * mini.c: Fix warnings.
11962 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
11964 * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
11965 to emit better double->int conversions.
11967 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
11969 * mini.c: the provided Min/Max optimizations are valid for unisgned
11972 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
11974 * 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
11976 2007-06-28 Miguel de Icaza <miguel@novell.com>
11978 * mini.c (mono_running_on_valgrind): Add support for reporting the
11979 method and its boundaries to valgrind.
11981 2007-06-28 Martin Baulig <martin@ximian.com>
11983 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
11985 2007-06-25 Zoltan Varga <vargaz@gmail.com>
11987 * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
11989 * generic.2.cs: Add new test case.
11991 2007-06-25 Martin Baulig <martin@ximian.com>
11993 Merged the `debugger-dublin' branch.
11996 (mono_debugger_insert_method_breakpoint): New public method.
11997 (mono_debugger_remove_method_breakpoint): Likewise.
11998 (mono_debugger_check_breakpoints): New static method.
11999 (mono_debug_close_method): Call mono_debugger_check_breakpoints().
12001 * debug-debugger.h (MonoDebuggerInfo):
12002 Renamed (to keep backward compatibility in the vtable):
12003 `insert_breakpoint' -> `old_insert_breakpoint'.
12004 `remove_breakpoint' -> `old_remove_breakpoint'.
12005 `create_string' -> `old_create_string'.
12006 `lookup_class' -> `old_lookup_class'.
12007 `lookup_type' -> removed; changed into a dummy field.
12008 `lookup_assembly' -> `old_lookup_assembly'.
12009 Added (same functionality, but different signature):
12010 `create_string', `lookup_class', `lookup_assembly'
12012 `get_method_addr_or_bpt', `remove_method_breakpoint',
12013 `runtime_class_init'.
12015 * debug-debugger.c: Merged the `debugger-dublin' branch.
12017 2007-06-23 Zoltan Varga <vargaz@gmail.com>
12019 * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
12021 (peephole_pass): Likewise.
12023 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
12025 * driver.c: hopefully make setaffinity work also for ancient
12028 2007-06-22 Atsushi Enomoto <atsushi@ximian.com>
12030 * driver.c : win32 build fix.
12032 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
12034 * driver.c: check for the MONO_NO_SMP env var and bind to a single
12035 processor if it is set.
12037 2007-06-21 Martin Baulig <martin@ximian.com>
12039 * debug-mini.h: New file.
12042 (mono_debugger_insert_breakpoint_full): Moved here from
12043 ../metadata/mono-debug-debugger.c.
12044 (mono_debugger_remove_breakpoint): Likewise.
12045 (mono_debugger_breakpoint_callback): Likewise.
12047 2007-06-15 Raja R Harinath <rharinath@novell.com>
12049 * jit-icalls.c (mono_helper_compile_generic_method): Update to
12050 changes in MonoGenericClass.
12052 2007-06-14 Zoltan Varga <vargaz@gmail.com>
12054 * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
12056 2007-06-14 Raja R Harinath <rharinath@novell.com>
12058 * jit-icalls.c (mono_helper_compile_generic_method): Update to
12059 removal of MonoGenericMethod.
12061 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
12063 * mini-exceptions.c: hooks for the exception events profiling API.
12065 2007-06-14 Randolph Chung <tausq@debian.org>
12067 * Makefile.ma: Add hppa target.
12068 * mini-arch.h: Include mini-hppa.h
12069 * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
12070 mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
12071 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
12073 2007-06-14 Randolph Chung <tausq@debian.org>
12075 * inssel.brg: Add rules for "chained" compare-branch operations so that
12076 a single compare op can affect multiple branches. Adjust cost for
12077 OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
12078 * inssel-long32.brg: Update rules to use compare-branch macros. Adjust
12079 cost for some rules so that they can more easily be overridden by
12080 per-arch rules (with fixes from lupus).
12081 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
12083 2007-06-13 Randolph Chung <tausq@debian.org>
12085 * mini-ops.h: Reorder branch ops so that they match the order of the
12086 corresponding CEE_* ops. The code expects them this way.
12087 Add new ops for HPPA target.
12088 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
12090 2007-06-13 Randolph Chung <tausq@debian.org>
12092 * mini-exceptions.c: Handle cases where the stack grows towards
12094 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
12096 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
12098 * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
12100 * driver.c: explain where a non-matching corlib is found.
12102 2007-06-13 Mark Probst <mark.probst@gmail.com>
12104 * mini.c (print_jit_stats): Output dynamic code allocation stats.
12106 2007-06-10 Sanghyeon Seo <sanxiyn@gmail.com>
12108 * mini-exceptions.c: Generate a method profile leave event during
12109 an exception to ensure that the profiler gets notified.
12111 2007-06-07 Zoltan Varga <vargaz@gmail.com>
12113 * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir
12116 * cpu-amd64.md: Add long_and/or/xor opcodes.
12118 2007-06-06 Wade Berrier <wberrier@novell.com>
12120 * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
12121 (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction
12122 length of instruction shr_imm (expected 8, got 10)
12124 2007-06-06 Zoltan Varga <vargaz@gmail.com>
12126 * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
12128 2007-06-06 Mark Probst <mark.probst@gmail.com>
12130 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
12131 MonoInternalHashTable again (fixed bug in the internal hash table
12134 2007-06-06 Mark Probst <mark.probst@gmail.com>
12136 * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
12137 Have to figure out what makes it crash the SWF regression.
12139 2007-06-05 Zoltan Varga <vargaz@gmail.com>
12141 * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
12143 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
12145 * mini.c: optimize out the type check when storing null in a
12148 2007-06-04 Mark Probst <mark.probst@gmail.com>
12150 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
12151 MonoInternalHashTable.
12153 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
12155 * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
12156 signed integer methods.
12158 2007-06-02 Zoltan Varga <vargaz@gmail.com>
12160 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case
12161 permanently since the current approach doesn't work.
12163 2007-06-02 Zoltan Varga <vargaz@gmail.com>
12165 * inssel.brg (stmt): Only call delegate->invoke_impl if
12166 MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
12168 2007-06-01 Zoltan Varga <vargaz@gmail.com>
12170 * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
12171 the sreg2==rdx case.
12173 * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
12174 account if it contains a rex prefix.
12175 (peephole_pass): Handle OP_FMOVE as well.
12177 2007-06-01 Zoltan Varga <vargaz@gmail.com>
12179 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
12180 as it causes regressions.
12182 2007-05-31 Zoltan Varga <vargaz@gmail.com>
12184 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
12185 static case as well.
12187 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
12189 * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
12190 (mono_arch_get_this_arg_from_call): Ditto.
12192 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
12194 * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
12197 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
12198 (mono_arch_get_this_arg_from_call): Ditto.
12200 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
12202 * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
12203 try to create optimized invoke code and use that for further invocations.
12204 Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
12206 * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
12208 2007-05-29 Rodrigo Kumpera <kumpera@gmail.com>
12210 * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
12211 sealed classes or methods.
12212 *devirtualization.cs: tests for the new optimization
12214 2007-05-29 Zoltan Varga <vargaz@gmail.com>
12216 * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
12217 by the update_volatile () function.
12219 2007-05-27 Zoltan Varga <vargaz@gmail.com>
12221 * driver.c (mono_main): Call g_thread_init () early since newer glib versions
12224 * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
12226 2007-05-24 Jonathan Chambers <joncham@gmail.com>
12228 * mini.c: Add configure checks for header files.
12229 * mini-x86.c: Add configure checks for header files.
12230 * trace.c: Add configure checks for header files.
12231 * aot-runtime.c: Add configure checks for header files.
12232 * aot-compiler.c: Add configure checks for header files.
12233 * driver.c: Add configure checks for header files.
12234 * mini-codegen.c: Add configure checks for header files.
12236 Code is contributed under MIT/X11 license.
12238 2007-05-22 Zoltan Varga <vargaz@gmail.com>
12240 * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
12241 icompare_imm -128 + op_iclt. Fixes #81703.
12243 2007-05-19 Zoltan Varga <vargaz@gmail.com>
12245 * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
12247 2007-05-15 Massimiliano Mantione <massi@ximian.com>
12249 * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
12250 inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
12251 so that all isinst checks now use "interface_bitmap".
12253 2007-05-15 Zoltan Varga <vargaz@gmail.com>
12255 * cpu-amd64.md (jmp): Fix a warning.
12257 * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
12259 * basic.cs: Add new regression test.
12261 * basic.cs: Remove test which is now in basic-long.cs.
12263 * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
12265 * basic-long.cs: Add new test.
12267 2007-05-13 Zoltan Varga <vargaz@gmail.com>
12269 * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
12271 2007-05-12 Zoltan Varga <vargaz@gmail.com>
12273 * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
12275 * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
12278 * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception
12279 throwing code a bit.
12281 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of
12282 the exception throwing code a bit.
12284 * mini-x86.c (get_call_info): Allocate result from a mempool.
12286 2007-05-11 Zoltan Varga <vargaz@gmail.com>
12288 * aot-compiler.c (find_typespec_for_class): Fix the assert.
12290 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
12292 * mini.h (MonoCompile): Add 'token_info_hash' field.
12294 * mini.c: Save token->method associations during compilation so the AOT
12295 compiler can use it.
12297 * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
12298 which reference generic classes and methods.
12300 2007-05-10 Zoltan Varga <vargaz@gmail.com>
12302 * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
12304 * aot-compiler.c (compile_method): Fix a typo in a comment.
12306 * aot-runtime.c (decode_cached_class_info): Skip generic types.
12308 * aot-compiler.c: Add minimal support for AOTing generic code by skipping
12309 everything generic.
12311 * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
12313 2007-05-09 Zoltan Varga <vargaz@gmail.com>
12315 * mini.h (MonoCompile): Add 'args' field.
12317 * mini.c (mono_compile_create_vars): Store variables representing the arguments
12320 * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
12322 2007-05-08 Zoltan Varga <vargaz@gmail.com>
12324 * mini.c (mono_compile_get_interface_var): Remove this unused function.
12326 * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
12328 * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
12329 opcodes for some opcodes.
12331 * mini.h *.brg *.c: Use the new opcodes.
12333 2007-05-08 Massimiliano Mantione <massi@ximian.com>
12335 * mini.h: Bumped aot revision.
12337 * inssel.brg: modified code generation of type checks for interfaces
12338 to use the new "MonoClass.interface_bitmap" instead of the old
12339 "MonoClass.interface_offsets".
12341 2007-04-30 Zoltan Varga <vargaz@gmail.com>
12343 * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
12345 2007-04-29 Zoltan Varga <vargaz@gmail.com>
12347 * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
12350 2007-04-27 Neale Ferguson <neale@sinenomine.net>
12352 * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
12354 2007-04-27 Wade Berrier <wberrier@novell.com>
12356 * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in
12357 mini.h) to fix build.
12359 2007-04-26 Zoltan Varga <vargaz@gmail.com>
12361 * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
12363 * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
12364 causes the corlib unit tests to fail.
12366 2007-04-25 Zoltan Varga <vargaz@gmail.com>
12368 * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
12370 * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
12372 * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional
12373 opcodes to the comparison relations.
12375 * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional
12376 opcodes to their types.
12378 * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
12380 * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache
12381 it in cfg->arch.cinfo.
12383 * local-propagation.c (mono_local_cprop_bb): Fix a warning.
12385 * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in
12386 cfg->cil_offset_to_bb.
12388 2007-04-24 Zoltan Varga <vargaz@gmail.com>
12390 * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
12391 created becase of initlocals.
12393 2007-04-23 Zoltan Varga <vargaz@gmail.com>
12395 * mini-alpha.c cpu-alpha.md: More alpha port work from
12396 Sergey Tikhonov <tsv@solvo.ru>.
12398 2007-04-21 Andreas Faerber <andreas.faerber@web.de>
12400 * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
12402 2007-04-19 Zoltan Varga <vargaz@gmail.com>
12404 * cpu-s390.md (break): Correct the length of break instruction.
12406 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
12408 * mini.c: fix a couple of soft-float issues and comments.
12410 2007-04-15 Miguel de Icaza <miguel@novell.com>
12412 * trace.c (is_filenamechar): - is also a filename char.
12414 2007-04-15 Neale Ferguson <neale@sinenomine.net>
12416 * mini-s390.c: Correct checking for enum type in return value processing.
12418 2007-04-14 Raja R Harinath <rharinath@novell.com>
12420 * Makefile.am (BUILT_SOURCES): Add 'version.h'.
12421 (version.h): Makefile is in the build directory.
12423 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
12425 * mini-amd64.h: fix for assertion failure on Solaris/amd64
12427 2007-04-11 Martin Baulig <martin@ximian.com>
12429 * mini.c (can_access_member): Fix handling of generic classes;
12432 2007-04-10 Zoltan Varga <vargaz@gmail.com>
12434 * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
12436 2007-04-05 Zoltan Varga <vargaz@gmail.com>
12438 * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
12440 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
12442 * mini-codegen.c: make sure the right spill amount is
12443 used for fp or integer registers (fixes the float_sub_spill() on ppc).
12445 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
12447 * mini-ppc.c: fixes for the fp_branch_nan test.
12449 2007-03-23 Zoltan Varga <vargaz@gmail.com>
12451 * basic.cs: Comment out new test which still fails on ia64.
12453 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
12455 * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
12457 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12459 * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
12461 2007-03-22 Zoltan Varga <vargaz@gmail.com>
12463 * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
12464 on 64 bit machines. Fixes part of #80738.
12466 * basic.cs: Add regression test.
12468 2007-03-17 Zoltan Varga <vargaz@gmail.com>
12470 * inssel.brg basic.cs: Revert previous change to fix build.
12472 * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
12475 * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
12477 * basic.cs: Add new regression test.
12479 2007-03-17 Zoltan Varga <vargaz@gmail.com>
12481 * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
12484 2007-03-16 Neale Ferguson <neale@sinenomine.net>
12486 * cpu-s390x.md: Correct length of break instruction.
12488 2007-03-16 Neale Ferguson <neale@sinenomine.net>
12490 * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
12491 * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
12493 2007-03-15 Jonathan Chambers <joncham@gmail.com>
12495 * *.c: Begin WIN64 port.
12496 * mini.c: Use correct register in profiler.
12497 * mini-amd64.c: No inline assembly on Win64.
12498 * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
12499 Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
12500 * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
12501 is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
12502 mono_arch_ip_from_context for Win64.
12504 Contributed under MIT/X11 license.
12506 2007-03-15 Zoltan Varga <vargaz@gmail.com>
12508 * exceptions-amd64.c (seh_handler): Ditto.
12510 * exceptions-x86.c (seh_handler): Fix a memory leak.
12512 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
12514 * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
12515 mini-s390x.c: fixed peephole optimizations to deal
12516 correctly with 1 and 2 byte reload avoidance.
12518 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
12520 * cpu-s390.md, cpu-s390x.md: update localloc length.
12522 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
12524 * cpu-g4.md: added missing descriptions.
12526 2007-03-14 Miguel de Icaza <miguel@novell.com>
12528 * Makefile.am: Add support so the tail tests are not executed on
12529 PowerPC as that is a known limitation of the PowerPC port.
12531 2007-03-13 Jonathan Chambers <joncham@gmail.com>
12533 * runmdesc.bat: Move to msvc directory.
12535 2007-03-13 Jonathan Chambers <joncham@gmail.com>
12537 * runmdesc.bat: Run executable that was produced by the current
12538 target and sent via an argument.
12540 2007-03-11 Zoltan Varga <vargaz@gmail.com>
12542 * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
12545 * generics.2.cs: Add regression test.
12547 2007-03-09 Wade berrier <wberrier@novell.com>
12549 * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
12551 2007-03-09 Zoltan Varga <vargaz@gmail.com>
12553 * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
12554 AOT code depends on this.
12556 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
12558 * mini.c: more precise tracking of types in the eval stack
12559 (part of fix for bug #81044).
12561 2007-03-07 Zoltan Varga <vargaz@gmail.com>
12563 * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
12565 * aot-compiler.c (encode_patch): Remove an obsolete comment.
12567 2007-03-06 Zoltan Varga <vargaz@gmail.com>
12569 * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
12571 * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
12573 2007-02-22 Zoltan Varga <vargaz@gmail.com>
12575 * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
12576 a pointer on 64 bit systems. Fixes #80190.
12578 * iltests.il: Add new regression test.
12580 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12582 * mini.c: inline a constant for Environment.IsRunningOnWindows.
12584 2007-02-19 Geoff Norton <gnorton@customerdna.com>
12586 * trace.c: Remove an erroneous alignemnt check when tracing.
12587 Fixes --trace on OSX86.
12589 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
12591 * mini-$(arch).h: initialize SP in context for all the archs.
12593 2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
12595 * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
12596 regressions in the thread tests.
12598 2007-02-14 Zoltan Varga <vargaz@gmail.com>
12600 * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
12601 - fixed implementation of LOCALLOC opcode
12602 - implemented non-un compare for floats
12604 - implementation of FDIV and CKFINITE opcodes
12605 - fixes for latest mono updates
12606 - additional arch opcodes
12608 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
12610 * Makefile.am: simplify and merge rules for cross-compilation.
12612 2007-02-07 Massimiliano Mantione <massi@ximian.com>
12614 * local-propagation.c: Actually *apply* the fix for bug 80591...
12616 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
12618 * mini-exceptions.c: backuot part of the last change
12619 (fixes cas tests on amd64 related to GetExecutingAssembly ()).
12621 2007-02-06 Massimiliano Mantione <massi@ximian.com>
12622 * inssel.brg: Fix bug 59286.
12625 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
12627 * mini-exceptions.c: patch from Zoltan to correctly check for
12628 stack boundaries (using the stack register, not the frame register),
12629 fixes bugs #80724, #79717.
12631 2007-02-03 Zoltan Varga <vargaz@gmail.com>
12633 * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
12634 OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
12636 * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
12637 presence of frame pointer elimination.
12639 2007-02-01 Geoff Norton <gnorton@customerdna.com>
12641 * mini-x86.h: NetBSD UCONTEX_REG defines.
12643 2007-02-01 Zoltan Varga <vargaz@gmail.com>
12645 * inssel-amd64.brg: Fix amd64 build.
12647 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
12649 * mini.h: remove extern to workaround what looks likes gcc bug 26905
12652 2007-01-31 Zoltan Varga <vargaz@gmail.com>
12654 * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
12657 * mini-<ARCH>.c: Use mono_is_regsize_var ().
12659 2007-01-30 Mark Mason <mason@broadcom.com>
12661 * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
12662 * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
12663 * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
12664 beginning support for CEE_JMP [not quite working yet]
12665 * tramp-mips.c: LMF handling now works
12667 2007-01-30 Zoltan Varga <vargaz@gmail.com>
12669 * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
12671 * mini.h (NULLIFY_INS): New macro.
12673 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
12675 * mini.c: statistical profiler fix for windows, patch
12676 from Tor Lillqvist (tml@novell.com).
12678 2007-01-30 Massimiliano Mantione <massi@ximian.com>
12679 * local-propagation.c: Fix bug 80591.
12681 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
12683 * Makefile.am: put back the --export-dynamic option as with
12684 the previous gmodule flags (thanks to Robert Jordan).
12686 2007-01-28 Zoltan Varga <vargaz@gmail.com>
12688 * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
12690 mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
12691 simplify and speed up the local register allocator. Also rename some fields
12692 like iassign->vassign.
12694 * regalloc.c: Remove some functions which are no longer used since their
12695 inlined version is in mini-codegen.c.
12697 * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
12699 * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
12701 2007-01-27 Zoltan Varga <vargaz@gmail.com>
12703 * mini-amd64.c (peephole_pass): Remove optimizations which omit a
12704 narrowing. Fixes #80622.
12706 * iltests.il: Add new regresssion test.
12708 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
12710 * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
12711 debug-debugger.c, debug-debugger.h: warning fixes.
12712 * driver.c: updated copyright year and made it fit in one line.
12714 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
12716 * aot-runtime.c: updated to use mono-dl instead of gmodule.
12718 2007-01-25 Zoltan Varga <vargaz@gmail.com>
12720 * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
12722 * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
12724 * iltests.il: Add new test for bug #80507.
12726 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12728 * mini-arm.h: use soft-float also on vfp for now.
12730 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
12732 * mini.c: fix some more soft-float issues.
12734 2007-01-24 Zoltan Varga <vargaz@gmail.com>
12736 * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
12738 2007-01-24 Massimiliano Mantione <massi@ximian.com>
12739 * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
12740 mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
12741 MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
12743 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
12745 * mini-arm.c: typo fix.
12747 2007-01-23 Neale Ferguson <neale@sinenomine.net>
12749 * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
12751 2007-01-21 Zoltan Varga <vargaz@gmail.com>
12753 * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
12754 Share stack slots for scalar types. Avoid expensive g_list_free () calls.
12756 * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
12758 * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto.
12760 * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
12762 * inssel.brg: Fix a warning.
12764 * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
12766 * abcremoval.c ssa.c ssapre.c: Update after this change.
12768 * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
12770 * dominators.c (df_set): Use mono_bitset_union_fast.
12772 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
12774 * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
12775 mini-codegen.c: reduce relocations and memory usage for the cpu
12778 2007-01-20 Zoltan Varga <vargaz@gmail.com>
12780 * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
12782 * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
12783 to reduce their size.
12785 2007-01-19 Mark Mason <mason@broadcom.com>
12787 * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
12788 * mini-mips.c: more configuration macros, support long conditional branches, additional
12789 asserts, fix epilog instrumentation.
12790 * mini-mips.h: use standard stack walk
12791 * cpu-mips.md: increase size of div, rem and conditional branches
12793 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
12795 * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
12798 2007-01-19 Zoltan Varga <vargaz@gmail.com>
12800 * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
12801 (compile_method): Ditto.
12803 * aot-runtime.c (decode_klass_info): Ditto.
12805 * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
12806 needed by the code generated by inssel.brg. Also fix a warning.
12808 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
12810 * mini.c: deal with enums that become genericinsts by
12811 being nested in a generic class (bug #79956).
12813 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
12815 * mini.c: match the generic definition to check for
12816 private access with generic types (bug #78431).
12818 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
12820 * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
12821 to make life easier for people cross-compiling that insist on not
12824 2007-01-17 Mark Mason <mason@broadcom.com>
12826 * inssel-long.brg: patch to deal with mips missing flags
12827 * inssel-long32-mips.brg: implement overflow checks
12828 * insset-mips.brg: implement overflow checks
12829 * mini-mips.h: implement conditional exception handling
12830 * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
12831 Remove unused code, minor cleanups.
12832 * exceptions-mips.c: minor cleanups
12833 * mini-ops.h: add mips conditional exception ops
12834 * cpu-mips.md: add mips conditional exception ops
12837 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
12839 * inssel.brg: patch from Mark Mason <mason@broadcom.com>
12840 to deal with mips missing of flags.
12842 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
12844 * exceptions-ppc.c: execute fault handlers.
12846 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
12848 * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
12850 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
12852 * mini.c: handle also floating point values in initialize_array.
12854 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
12856 * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
12857 array initialization and make it conditional on the intrins option.
12859 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
12861 * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
12862 relocations and put the patch info names close to the enum definition.
12864 2007-01-15 Mark Mason <mason@broadcom.com>
12866 * basic.cs, exceptions.cs: break up large tests to increase debugability.
12868 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
12870 * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
12872 2007-01-12 Raja R Harinath <rharinath@novell.com>
12874 * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
12876 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
12878 * Makefile.am: distribute the mips sources.
12880 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
12882 * mini-codegen.h: handle bug #80489 here, by excluding ecx
12885 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
12887 * cpu-x86.md: back out for now as this triggers other regressions.
12889 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
12891 * cpu-x86.md: force src1 and dest regpair for long shift instructions
12892 to eax:edx, so ecx can't get allocated to them (bug #80489).
12894 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
12896 * mini.c, mini-exceptions.c: enabled running fault handlers
12899 2007-01-03 Miguel de Icaza <miguel@novell.com>
12901 * driver.c: If nothing fail, do not use the string "failed",
12902 because it makes it very annoying to view test result logs on the
12905 2006-12-30 Miguel de Icaza <miguel@novell.com>
12907 * debug-debugger.c (mono_debugger_main): Rename "main" to
12908 "main_method" to prevent a warning.
12910 Remove a warning for unused field.
12912 2006-12-28 Martin Baulig <martin@ximian.com>
12915 (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
12917 2006-12-22 Martin Baulig <martin@ximian.com>
12919 * mdb-debug-info32.s, mdb-debug-info64.s: New files.
12920 Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
12921 seperate `.mdb_debug_info' section, so we can access it from the
12922 debugger even if the binary is stripped.
12924 * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
12925 from the `.mdb_debug_info' here to prevent the linker from
12926 removing that section.
12928 * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
12929 mdb-debug-info64.s.
12931 2006-12-19 Robert Jordan <robertj@gmx.net>
12933 * mini-x86: enable the code to return small structures in
12934 registers for FreeBSD as well. Fixes bug #80278.
12935 * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
12937 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12939 * mini-x86.c: align the stack when calling the profiler
12940 function instrumenting the prolog (on OSX).
12942 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
12944 * mini.c: emit a break opcode where Debugger.Break () is called.
12946 2006-12-13 Miguel de Icaza <miguel@novell.com>
12948 * mini.c (mono_method_to_ir): Provide useful information on this
12949 assert, to prevent others from debugging like I did.
12951 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
12953 * mini.c: enable code which was incorrectly commented
12956 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
12958 * mini-x86.c: enable on OSX, too, the code to return small
12959 structures in registers.
12961 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
12963 * mini-x86.c: remove the use of the dynamic code manager here, too.
12965 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
12967 * mini.h, debug-debugger.c, tramp-*.c: fixed
12968 mono_debugger_create_notification_function() to use
12969 mono_global_codeman_reserve () instead of a dynamic code manager.
12971 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
12973 * mini.c, jit-icalls.h, jit-icalls.c: remove the
12974 ves_array_element_address() jit icall and use a generated
12975 managed method instead (which is about 4 times faster for a rank 3
12978 2006-11-29 Mark Mason <mason@broadcom.com>
12980 * basic-calls.cs: additional tests for passing
12981 structures as function arguments.
12983 2006-11-29 Mark Mason <mason@broadcom.com>
12985 * mini-mips.h: disable custom exception handling
12986 * mini-mips.c: throw/rethrow should use jalr to call
12987 exception stubs. Fixed bug with passing structures
12988 by value. More support for tracing floating point
12991 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12993 * mini.c: fixed typo in the soft-float ldind.r4 handling
12996 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
12998 * mini.c, mini.h, driver.c: added --runtime command line
12999 option to select a different runtime than the autodetected one.
13000 * jit.h: added API for embedders to initialize with a specific
13003 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
13005 * mini.c: handle also boxing of r4 values (bug #80024).
13007 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
13009 * mini-ppc.c: force indirect calls until we reserve
13010 enough address space for all the generated code.
13012 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
13014 * exceptions-arm.c: workaround bugs in the libc definition
13015 of struct ucontext.
13017 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
13019 * inssel.brg: fixes from me and Mark Mason.
13021 2006-11-23 Dick Porter <dick@ximian.com>
13023 * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
13024 semaphore display now we've fixed the initial value
13026 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13028 * inssel.brg: partially revert the last change to fix the build.
13030 2006-11-21 Mark Mason <mason@broadcom.com>
13032 * inssel.brg: Add and use compare-and-branch macros to support
13033 architectures that do not have condition code registers (ie. MIPS).
13034 * *-mips.{c,brg,md}: Fix copyright statements
13036 2006-11-20 Mark Mason <mason@broadcom.com>
13038 * Makefile.am: remove mini-codegen.c from list of MIPS sources
13039 * mini.c: Allow GET_CONTEXT to be specified by the arch port
13040 * mini.h: Added declaration for mono_print_ins()
13041 * mini-codegen.c: added ins_spec initializer for MIPS
13042 * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
13043 vreg to be virtual and hreg to be non-virtual.
13044 * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
13045 is not yet working/implemented correctly.
13046 * mini-codegen.c (print_ins): rename to mono_print_ins(), make
13047 non-static, fixup calls to print_ins() from other parts in the file.
13049 2006-11-20 Mark Mason <mason@broadcom.com>
13051 * basic-calls.cs: added tests for passing structures as arguments
13054 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
13056 * inssel-long32.brg: optimize signed division by power of two.
13058 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
13060 * mini-arm.c: added support for interworking with thumb code
13061 (mono must be still be built using the ARM instruction encoding).
13063 2006-11-19 Miguel de Icaza <miguel@novell.com>
13065 * mini.c (type_from_op): Separate the conditions for OP_EQ as the
13066 verifier has different rules for it. Fixes a few verifier issues
13069 * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
13070 at the end, so people know what happened.
13072 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
13074 * brach-opts.c: in optimize_exception_target() make sure we
13075 are in a catch clause (fixes bug #79871).
13077 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
13079 * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
13080 more soft-float support fixes.
13082 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
13084 * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
13085 that are passed half on the stack and half in registers.
13087 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
13089 * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
13090 more mips integration work from Mark E Mason
13091 <mark.e.mason@broadcom.com>.
13093 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
13095 * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
13096 cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
13097 tramp-mips.c: added sources for the mips port, not
13098 integrated in the build yet. Contributed by
13099 Mark E Mason <mark.e.mason@broadcom.com>.
13101 2006-11-14 Neale Ferguson <neale@sinenomine.net>
13103 * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
13105 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13107 * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
13108 put the soft-float rules in its own file since it seems to
13109 break s390 compilation.
13111 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
13113 * mini-arm.c: fixed wrnings.
13115 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
13117 * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
13118 inssel-arm.brg: ARM support for soft-float.
13120 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
13122 * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
13123 loads and stores of 32 bit fp values.
13125 2006-11-10 Zoltan Varga <vargaz@gmail.com>
13127 * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
13129 * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
13130 works. Fixes #79852 and #79463.
13132 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
13134 * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
13135 more soft-float support WIP and fixes.
13137 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
13139 * mini-arm.c: some VFP updates.
13141 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
13143 * mini-exceptions.c: 0 is a valid local var offset in some
13144 architectures, don't assert (bug #78508).
13146 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
13148 * exceptions-arm.c: fixed off by one error in stack walk code.
13150 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
13152 * mini.h, mini.c: more precise tracking of type load exceptions.
13154 2006-11-03 Robert Jordan <robertj@gmx.net>
13156 * Makefile.am: [WIN32] Add monow.exe target.
13157 * driver.c: [WIN32] Don't detach the console when debugging.
13160 2006-10-30 Miguel de Icaza <miguel@novell.com>
13162 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
13164 2006-10-23 Zoltan Varga <vargaz@gmail.com>
13166 * aot-compiler.c (emit_method_info): Add a case missed earlier.
13168 * driver.c (mini_regression): Fix --regression with AOT.
13170 * aot-compiler.c (emit_method_info): Fix AOT on amd64.
13172 2006-10-17 Zoltan Varga <vargaz@gmail.com>
13174 * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
13176 * mini-sparc.h: Don't use sigaction on sparc/linux.
13178 * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
13180 * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
13182 * mini-exceptions.c: Add proper include files for getpid ().
13184 2006-10-16 Zoltan Varga <vargaz@gmail.com>
13186 * aot-runtime.c (mono_aot_get_method): Change this to return the native code
13187 address instead of a MonoJitInfo* to avoid decoding the exception info for the
13190 * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
13191 name cache to reduce its size.
13193 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
13195 2006-10-15 Zoltan Varga <vargaz@gmail.com>
13197 * mini-x86.c: Save/restore the current LMF structure more efficiently using
13198 the mono_lmf TLS variable.
13200 * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in
13201 trampoline lmf frames.
13203 * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
13205 2006-10-14 Zoltan Varga <vargaz@gmail.com>
13207 * mini-amd64.c: Save/restore the current LMF structure more efficiently using
13208 the mono_lmf TLS variable.
13210 * mini-exceptions.c: Access the LMF structure through accessors.
13212 * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS
13213 variable instead of in jit_tls->lmf.
13215 * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
13217 * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in
13218 trampoline lmf frames.
13220 * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
13222 2006-10-12 Zoltan Varga <vargaz@gmail.com>
13224 * mini.c trace.c mini-x86.c: Revert these too.
13226 * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
13229 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
13231 * genmdesc.c: removed now dead code.
13233 2006-10-09 Robert Jordan <robertj@gmx.net>
13235 * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
13237 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
13239 * mini.h: do not leave gaps in the opcode values.
13241 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
13243 * jit-icalls.h: flag functions as internal here, too.
13245 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
13247 * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
13248 functions with the internal attribute.
13250 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
13252 * aot-compiler.c: fclose the file descriptor in the profile read loop.
13254 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
13256 * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
13259 2006-10-05 Zoltan Varga <vargaz@gmail.com>
13261 * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
13262 tail calls as on other platforms.
13264 * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
13266 * iltests.il: Add a few tailcall tests.
13268 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
13270 * driver.c: fix loop for old compilers (bug #79521).
13272 2006-10-02 Zoltan Varga <vargaz@gmail.com>
13274 * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
13276 * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
13278 * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
13279 metadata without any code.
13281 * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
13282 more precise debugging information using gdb.
13284 2006-09-30 Zoltan Varga <vargaz@gmail.com>
13286 * inssel-ia64.brg: Make the helper methods static.
13288 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
13290 * inssel-x86.brg: make the helper methods static.
13292 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
13294 * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
13296 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
13298 * mini.c: updates for monoburg changes.
13299 * inssel.brg: make a few helper functions static as they should.
13301 2006-09-27 Zoltan Varga <vargaz@gmail.com>
13303 * Makefile.am: Move mini-codegen.c to common_sources.
13305 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
13307 * mini.h: instroduce inst_call in MonoInst for use in OUTARG
13309 * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
13310 mini-ppc.h: port to use the common local register allocator.
13312 2006-09-26 Zoltan Varga <vargaz@gmail.com>
13314 * mini.h: Remove the comment too then.
13316 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
13318 * mini.h: put back backend.data which is to be used shortly and
13319 doesn't increase the size of MonoInst. If any 64 bit arch aligned
13320 pointers on 4 byte boundaries it'd have much bigger issues running
13321 and you can ifdef it out anyway.
13323 2006-09-26 Zoltan Varga <vargaz@gmail.com>
13325 * mini.h (MonoInst): Remove backend.data field since it is unused and increases
13326 MonoInst size by 4 bytes on 64 bit machines.
13328 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
13330 * *.{c,h,brg}: long due removal of the unused field in MonoInst and
13331 replacement with more meaningful field names. Arch maintainers, please
13332 check the assigned names are good enough for your arch.
13334 2006-09-26 Zoltan Varga <vargaz@gmail.com>
13336 * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the
13337 OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
13339 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
13341 * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
13342 relocations and memory requirements, put the optimization flags
13343 definitions in their own file.
13345 2006-09-24 Zoltan Varga <vargaz@gmail.com>
13347 * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
13349 * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
13351 2006-09-22 Zoltan Varga <vargaz@gmail.com>
13353 * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
13355 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
13357 * inssel.brg: use the correct function to get the size of an item
13358 in an array, given an element class.
13359 * aot-compiler.c: do not access class->class_size directly.
13361 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
13363 * mini.h, debug-mini.c: added a debugging function to print
13364 info about local variables and arguments in a jitted method.
13366 2006-09-20 Zoltan Varga <vargaz@gmail.com>
13368 * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
13370 * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
13372 2006-09-19 Zoltan Varga <vargaz@gmail.com>
13374 * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
13375 inner and outer loops when passing vtypes.
13377 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
13379 * mini-ppc.c: take into account the cpu errata for cache flushing
13380 which caused some random errors (bug #79381).
13382 2006-09-19 Zoltan Varga <vargaz@gmail.com>
13384 * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to
13385 mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
13387 2006-09-17 Zoltan Varga <vargaz@gmail.com>
13389 * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
13392 * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
13393 freebsd ports tree.
13395 * mini-amd64.c (emit_call): Avoid near calls on freebsd.
13396 (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
13398 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
13401 2006-09-13 Zoltan Varga <vargaz@gmail.com>
13403 * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
13405 2006-09-12 Zoltan Varga <vargaz@gmail.com>
13407 * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this
13408 macro does not have to be changed during debugging.
13410 * 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>.
13412 * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
13414 * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
13416 * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if
13417 MONO_ARCH_NO_EMULATE_MUL is defined.
13419 * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
13421 * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
13423 * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
13425 * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
13427 2006-09-11 Zoltan Varga <vargaz@gmail.com>
13429 * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
13430 stuff to mini-exceptions.c where it is used.
13432 * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
13433 setup code, the real one is in mini-exceptions.c.
13435 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
13436 layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
13437 some changes from the freebsd ports tree.
13439 * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
13442 * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
13444 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
13446 * mini.c: on Linux, check for /proc to be mounted
13447 (bug# 79351, novell bug#201204).
13449 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
13451 * mini.c: handle cases where pthread_attr_getstack() behaves
13452 incorrectly (bug #78096).
13454 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
13456 * mini-arm.c: support larger stack frames (bug #79272).
13458 2006-09-08 Zoltan Varga <vargaz@gmail.com>
13460 * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
13462 * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef
13465 * aot-runtime.c (mono_aot_get_class_from_name): New function used by
13466 mono_class_from_name () to find a class from its name.
13468 * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
13470 2006-09-07 Zoltan Varga <vargaz@gmail.com>
13472 * mini-amd64.c (emit_call): Avoid strstr () call if possible.
13474 2006-09-05 Kornel Pal <kornelpal@gmail.com>
13476 * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
13478 2006-09-04 Zoltan Varga <vargaz@gmail.com>
13480 * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
13481 callinfo->trampoline.
13483 * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
13485 (mono_arch_patch_code): Add some debug code to help track down similar failures in the
13488 2006-09-03 Zoltan Varga <vargaz@gmail.com>
13490 * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
13492 2006-09-02 Zoltan Varga <vargaz@gmail.com>
13494 * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
13495 stats.method_trampolines, it is already done by the generic trampoline code.
13497 * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
13499 2006-09-01 Zoltan Varga <vargaz@gmail.com>
13501 * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
13503 * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
13505 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
13507 * mini.c (print_jit_stats): Print mscorlib mempool size too.
13509 * mini.c (print_jit_stats): Print new stats.
13511 * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
13513 2006-08-31 Zoltan Varga <vargaz@gmail.com>
13515 * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
13516 Address on two dimensional arrays. Fixes #78729.
13518 * mini.h (MonoCompile): Add a 'skip_visibility' field.
13520 * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
13523 * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
13525 * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
13528 * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
13530 (mini_get_ldelema_ins): Ditto.
13532 2006-08-30 Zoltan Varga <vargaz@gmail.com>
13534 * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
13535 (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation.
13538 2006-08-29 Neale Ferguson <neale@sinenomine.net>
13540 * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
13541 mono_arch_get_patch_offset as a dummy entry point to allow successful link.
13543 * exceptions-s390x.c: Cosmetic change.
13545 * tramp-s390.c: Fix warning.
13547 * cpu-s390.md: Correct length of mul_imm.
13549 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
13551 * aot-compiler.c: added binary writer with ELF backend
13552 implementation (only on Linux/x86 for now).
13554 2006-08-18 Zoltan Varga <vargaz@gmail.com>
13556 * Makefile.am: Don't run net 2.0 AOT tests.
13558 * aot-compiler.c (compile_method): Skip methods with tail calls as well.
13559 (mono_compile_assembly): Skip net 2.0 assemblies as well.
13561 * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
13563 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
13565 * aot-compiler.c: simplified and refactored the asm-writing code
13566 to allow different backends.
13568 2006-08-18 Zoltan Varga <vargaz@gmail.com>
13570 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
13572 * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a
13573 little. Share patches of type TYPE_FROM_HANDLE as well.
13575 * mini.c (mono_patch_info_equal): New helper function.
13576 (mono_patch_info_hash): Ditto.
13578 * aot-compiler.c (emit_method_code): Fix s390 build.
13580 * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
13581 is not handled because it is stored as a flag and not as a type ctor. Fixes
13584 2006-08-17 Zoltan Varga <vargaz@gmail.com>
13586 * aot-compiler.c: Fix computation of GOT slot statistics.
13588 * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
13589 Also remove support for not PIC AOT.
13591 * mini.h: Bump AOT file format version.
13593 * objects.cs: Add a test for #78990.
13595 * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
13596 (peter.dettman@iinet.net.au). Fixes #79087.
13598 * basic-long.cs: Add a test for the above.
13600 2006-08-16 Zoltan Varga <vargaz@gmail.com>
13602 * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
13604 * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
13607 2006-08-15 Zoltan Varga <vargaz@gmail.com>
13609 * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
13612 2006-08-10 Jonathan Chambers <joncham@gmail.com>
13614 * mini.c: Don't verify COM proxy invoke calls
13617 2006-08-10 Dick Porter <dick@ximian.com>
13619 * wapihandles.c (mini_wapi_seminfo): More info, to help track down
13620 which process is holding semaphores locked.
13622 2006-08-08 Zoltan Varga <vargaz@gmail.com>
13624 * mini-ia64.c mini-amd64.c: Fix #79027.
13626 * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
13628 * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
13630 * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
13631 implicit arguments in a vararg call. Fixes #79027.
13633 2006-08-07 Zoltan Varga <vargaz@freemail.hu>
13635 * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
13636 (mono_get_array_new_va_signature): Ditto.
13638 2006-08-05 Zoltan Varga <vargaz@gmail.com>
13640 * aot-runtime.c: Call init_plt lazily.
13642 * inssel-long.brg: Fix unsigned long->int conversion.
13644 * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
13646 * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
13647 that most data is now in the .rss/.data section.
13649 2006-08-04 Zoltan Varga <vargaz@gmail.com>
13651 * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.
13653 * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
13655 * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
13657 * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
13659 * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
13660 virtual call. Fixes #79010.
13662 * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method
13663 and use the result as the this argument in the real call.
13665 * generics.2.cs: Add a new test for #79010.
13667 2006-08-03 Zoltan Varga <vargaz@gmail.com>
13669 * mini-x86.c: Fix a warning.
13671 * aot-compiler.c: Add a bunch of statistics.
13673 * mini.c (inline_method): Disable inlining in out-of-line bblocks.
13675 2006-08-02 Zoltan Varga <vargaz@gmail.com>
13677 * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
13679 2006-08-01 Zoltan Varga <vargaz@gmail.com>
13681 * 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>.
13683 2006-07-13 Miguel de Icaza <miguel@novell.com>
13685 * mini.c (mono_method_to_ir): Obtain the original method in the
13686 CIL stream and use this to perform validation.
13690 2006-07-19 Zoltan Varga <vargaz@gmail.com>
13692 * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
13693 (mono_arch_call_opcode): Ditto.
13695 * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
13698 * mini.c (mono_patch_info_dup_mp): New helper function.
13700 * aot-compiler.c (compile_method): Fix some of the memory allocated during
13701 compilation. Fixes #78827.
13703 2006-07-18 Kornel Pal <kornelpal@gmail.com>
13705 * declsec.c: Use original security informations for
13706 MONO_WRAPPER_MANAGED_TO_MANAGED.
13708 2006-07-15 Jonathan Chambers <joncham@gmail.com>
13710 * mini.c: Allow Com Interop methods/classes and
13711 don't verify COM wrapper calls
13714 2006-07-13 Zoltan Varga <vargaz@gmail.com>
13716 * inssel-long32.brg: Fix long->i4 checked conversion.
13718 * exceptions.cs: Add a test for the above.
13720 2006-07-08 Zoltan Varga <vargaz@gmail.com>
13722 * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
13724 * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown
13727 * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
13730 2006-07-03 Zoltan Varga <vargaz@gmail.com>
13732 * mini.c: Fix solaris/x86 exception handling.
13734 * Makefile.am: Get rid of $(ICU_LIBS).
13736 2006-07-02 Zoltan Varga <vargaz@gmail.com>
13738 * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
13739 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
13740 (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
13742 * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
13744 * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
13745 this function causes a SIGSEGV.
13747 2006-06-22 Zoltan Varga <vargaz@gmail.com>
13749 * mini.c: Remove unused solaris/x86 includes.
13751 2006-06-21 Zoltan Varga <vargaz@gmail.com>
13753 * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
13755 2006-06-20 Jb Evain <jbevain@gmail.com>
13757 * cpu-g4.md: fix max length of start_handler instruction.
13759 2006-06-20 Massimiliano Mantione <massi@ximian.com>
13760 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
13762 2006-06-16 Massimiliano Mantione <massi@ximian.com>
13763 * ssa.c: Fixed bug 78653 for SSA based deadce.
13764 * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
13765 MonoInst.flags, used in SSA based deadce.
13766 * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
13767 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
13769 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
13771 * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
13772 it can end up using non executable memory on ppc64 systems
13773 running ppc32 userspace (fix from Johannes Berg).
13775 2006-06-14 Dick Porter <dick@ximian.com>
13777 * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
13780 2006-06-13 Massimiliano Mantione <massi@ximian.com>
13781 * mini.c: Made so that inline is locally disabled if it would
13782 trigger a .cctor, because too many apps depend on this behavior
13783 (which seems to be also the one of the MS CLR).
13785 2006-06-13 Zoltan Varga <vargaz@gmail.com>
13787 * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
13788 No idea why this worked before.
13790 * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
13791 which branch to outer exception clauses since they could skip the
13792 inner finally clauses. Fixes #78633.
13794 * exceptions.cs: Add a test for the above.
13796 * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
13799 * iltests.il: Add a test for the above.
13801 2006-06-12 Zoltan Varga <vargaz@gmail.com>
13803 * mini.c (remove_block_if_useless): Do not remove the bblock immediately
13804 after the end of a try bblock, to prevent asserts in mini_method_compile ().
13806 * iltests.il: Add a test for the above.
13808 2006-06-10 Zoltan Varga <vargaz@gmail.com>
13810 * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
13812 * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
13813 methods as instrinsics.
13815 2006-06-09 Wade Berrier <wberrier@novell.com>
13817 * Makefile.am: Fix sources list for svn rename so that make dist succeeds
13818 (simple-cee-ops.h ssapre-mini-ops.h)
13820 2006-06-09 Neale Ferguson <neale@sinenomine.net>
13822 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
13823 * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
13825 * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
13826 * cpu-s390x.md: Fix max. length values for a couple of instructions.
13828 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
13830 * mini-exceptions.c: Minor fix for building mono in Visual Studio.
13832 2006-06-08 Massimiliano Mantione <massi@ximian.com>
13834 * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
13835 * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
13836 * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
13837 * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
13838 * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
13839 of opcodes, so that bug 78549 should not happen again.
13840 * ssapre.c: Updated to use the renamed files.
13842 2006-06-08 Zoltan Varga <vargaz@gmail.com>
13844 * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move
13845 in OP_ATOMIC_EXCHANGE_I4.
13847 2006-06-07 Wade Berrier <wberrier@novell.com>
13849 * tramp-s390.c: Fix s390 build (add missing pointer declarations
13850 in mono_debugger_create_notification_function)
13852 2006-06-06 Zoltan Varga <vargaz@gmail.com>
13854 * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
13856 * mini.c (type_from_stack_type): Disable some changes which do not
13859 * driver.c: Reenable opts.
13861 * mini.h (MonoStackSlot): New structure to keep track of the verification state
13862 of the evaluation stack.
13864 * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
13865 evaluation stack trace at entry to the bblock.
13867 * mini.c (merge_stacks): New function to perform verification of stack merges.
13868 Turned off by default.
13870 * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
13873 2006-06-06 Massimiliano Mantione <massi@ximian.com>
13875 * local-propagation.c: Fixed bug 78549.
13877 2006-06-04 Zoltan Varga <vargaz@gmail.com>
13879 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
13881 2006-06-02 Miguel de Icaza <miguel@novell.com>
13883 * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
13884 tramp-arm.c, tramp-ia64.c
13885 (mono_debugger_create_notification_function): Update signature to
13886 new signature and use new protocol for creating the notification
13889 Should fix the build.
13891 2006-06-02 Geoff Norton <gnorton@customerdna.com>
13893 * exceptions-ppc.c (mono_jit_walk_stack)
13894 (ves_icall_get_frame_info): Fix the build
13896 2006-06-02 Zoltan Varga <vargaz@gmail.com>
13898 * mini.c (mono_set_defaults): Fix the handling of -O=-all.
13900 2006-05-31 Raja R Harinath <rharinath@novell.com>
13902 * il2tests.2.il: New file for generics CIL tests. Add test for
13904 * Makefile.am: Update.
13907 * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
13910 2006-05-30 Massimiliano Mantione <massi@ximian.com>
13912 * aliasing.c: Fixed bug 78311.
13914 2006-05-29 Martin Baulig <martin@ximian.com>
13916 * mini-exceptions.c (mono_find_jit_info): When computing the
13917 native offset, check whether we're actually inside the method's
13918 code; call mono_debug_print_stack_frame() to format the frame.
13919 (ves_icall_System_Exception_get_trace): Call
13920 mono_debug_print_stack_frame() to format the stack frame.
13921 (ves_icall_get_trace): Update to the new debugging API.
13922 (mono_jit_walk_stack_from_ctx): Likewise.
13923 (ves_icall_get_frame_info): Likewise.
13925 * mini.c (get_method_from_ip): Use the new debugging API.
13926 (mono_print_method_from_ip): Likewise.
13929 (mono_jit_walk_stack): Use the new debugging API.
13930 (ves_icall_get_frame_info): Likewise.
13932 2006-05-27 Zoltan Varga <vargaz@gmail.com>
13934 * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
13936 2006-05-25 Massimiliano Mantione <massi@ximian.com>
13938 * mini.c: Added "limitator" to inline for debugging.
13940 2006-05-24 Martin Baulig <martin@ximian.com>
13942 * debug-debugger.c (mono_debugger_init): Create a private,
13943 malloc()-based code manager for the notification function and
13944 intentionally leak it on exit. This fixes the crash-on-exit race
13948 (mono_debugger_create_notification_function): Added
13949 `MonoCodeManager *' argument.
13952 (mono_debugger_create_notification_function): Added
13953 `MonoCodeManager *' argument.
13955 2006-05-23 Massimiliano Mantione <massi@ximian.com>
13957 * aliasing.c: Fixed 64 bit issue.
13958 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
13959 default since all known bugs are fixed (one more time!).
13961 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
13963 * mini.c: write barrier support.
13965 2006-05-23 Martin Baulig <martin@ximian.com>
13967 * debug-debugger.c: Revert Paolo's change. Add comment and #error
13968 check at the top of the file.
13970 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
13972 * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
13973 reverting changes without reason and without changelog entries.
13975 2006-05-18 Zoltan Varga <vargaz@gmail.com>
13977 * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
13978 to a few opcodes. Fixes #78439.
13980 * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
13981 consistency with other archs.
13983 * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
13985 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
13987 * debug-debugger.c: fix the build.
13989 2006-05-17 Martin Baulig <martin@ximian.com>
13992 (debugger_thread_vtable): Moved here from ../metadata/threads.c.
13993 (debugger_init_threads): Formerly known as mono_debugger_init_threads().
13994 (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
13995 (debugger_attach): Call GC_mono_debugger_add_all_threads().
13997 2006-05-11 Zoltan Varga <vargaz@gmail.com>
13999 * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
14001 2006-05-10 Zoltan Varga <vargaz@gmail.com>
14003 * mini-x86.c (mono_arch_instrument_epilog): Fix handling of
14004 MONO_TYPE_GENERICINST.
14006 * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of
14007 MONO_TYPE_GENERICINST.
14009 2006-05-09 Zoltan Varga <vargaz@gmail.com>
14011 * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
14014 2006-05-08 Zoltan Varga <vargaz@gmail.com>
14016 * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
14018 (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
14020 2006-05-06 Zoltan Varga <vargaz@gmail.com>
14022 * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
14023 mono_trace_cleanup ().
14025 * iltests.il: Fix problem with the newly added test.
14027 * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
14028 due to register constraints, free up the previous hreg. Fixes #78314.
14030 * iltests.il: Add new test for #78314.
14032 * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
14033 Interlocked.Add. Fixes #78312.
14035 * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
14037 2006-05-05 Zoltan Varga <vargaz@gmail.com>
14039 * inssel.brg (mini_emit_virtual_call): Fix a warning.
14041 2006-05-05 Martin Baulig <martin@ximian.com>
14043 * debug-mini.c (mono_debug_open_block): New method.
14046 (mono_arch_output_basic_block): Call mono_debug_open_block() at
14047 the beginning of each basic block.
14050 (mono_arch_output_basic_block): Call mono_debug_open_block() at
14051 the beginning of each basic block.
14053 2006-05-04 Massimiliano Mantione <massi@ximian.com>
14055 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
14056 default until I understand why they break the build on amd64.
14058 2006-05-04 Zoltan Varga <vargaz@gmail.com>
14060 * mini.c (mini_cleanup): Call mono_cleanup ().
14062 * mini.c (UNVERIFIED): New macro to make it easier to track down verification
14065 2006-05-04 Massimiliano Mantione <massi@ximian.com>
14067 * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
14068 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
14069 default since all known bugs are fixed, and I cannot reproduce bug
14070 77944... I'm asking Matt Hargett to test again after this commit.
14072 2006-04-28 Massimiliano Mantione <massi@ximian.com>
14074 * mini-codegen.c: Fixed typo that thrashed inline.
14076 2006-04-28 Zoltan Varga <vargaz@gmail.com>
14078 * dominators.c (compute_dominators): Avoid using a worklist since
14079 it is not correct in some cases. Instead, iterate over all bblocks as
14080 in the original paper. Fixes --compile-all -O=all System.Xml.dll.
14082 2006-04-28 Miguel de Icaza <miguel@novell.com>
14084 * mini.c (mono_jit_compile_method_inner): Use
14085 mono_prepare_exception_from_error that resets the value
14088 2006-04-27 Miguel de Icaza <miguel@novell.com>
14090 * mini.c: Move the mini_loader_error_to_exception to metadata.
14092 2006-04-27 Massimiliano Mantione <massi@ximian.com>
14094 * aliasing.c: Fixed bug 78210.
14096 2006-04-27 Massimiliano Mantione <massi@ximian.com>
14098 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
14099 default until all their problems (or the ones they trigger) are fixed.
14101 2006-04-26 Zoltan Varga <vargaz@gmail.com>
14103 * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
14105 * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
14106 as loaded only after resolving patches since that could invoke the same method.
14108 * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
14110 * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
14113 * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
14116 * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
14119 * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
14120 made from AOT code through the PLT table.
14122 * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
14123 holding the plt offset when a call is made to the aot plt trampoline.
14125 2006-04-25 Zoltan Varga <vargaz@gmail.com>
14127 * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the
14130 * Makefile.am (common_sources): Fix build breakage.
14132 * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
14133 calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
14134 intra-assembly calls if possible.
14136 * tramp-*.c: Add new functions for patching/nullifying PLT entries.
14138 * mini-trampolines.c: Handle PLT entries.
14140 * mini.c: Avoid creating a GOT var for calls.
14142 * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
14143 from mscorlib code.
14145 * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
14146 from mscorlib code.
14148 * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
14151 * mini.h: Bump AOT file format version.
14153 * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
14156 2006-04-25 Martin Baulig <martin@ximian.com>
14158 * driver.c: Disable copyprop, consprop and inline when running
14159 inside the debugger.
14161 2006-04-25 Martin Baulig <martin@ximian.com>
14163 * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
14164 with `get_current_thread' and added `detach'.
14165 (MonoDebuggerMetadataInfo): Added `thread_size',
14166 `thread_tid_offset', `thread_stack_ptr_offset' and
14167 `thread_end_stack_offset'.
14169 2006-04-25 Zoltan Varga <vargaz@gmail.com>
14171 * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and
14174 * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
14175 ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
14177 * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
14179 * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
14181 * aot.c: Add support for ADJUSTED_IID.
14183 2006-04-24 Zoltan Varga <vargaz@gmail.com>
14185 * aot.c (emit_method_order): Don't align method_order_end.
14187 * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
14188 the interface ID changes.
14190 2006-04-21 Dick Porter <dick@ximian.com>
14192 * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
14193 cleaning up a thread. Fixes the new part of bug 77470.
14195 2006-04-20 Geoff Norton <gnorton@customerdna.com>
14197 * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
14198 to managed wrapper.
14200 2006-04-19 Zoltan Varga <vargaz@gmail.com>
14202 * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
14204 * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
14205 SIGSEGV. Fixes #78072.
14207 * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
14208 unregister our SIGABRT handler.
14210 2006-04-19 Massimiliano Mantione <massi@ximian.com>
14212 * mini.c: Disabled inline where it can alter the call stack in a
14213 way visible from managed code.
14214 * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
14217 2006-04-16 Zoltan Varga <vargaz@gmail.com>
14219 * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
14220 on other platforms. Fixes #78089.
14222 2006-04-13 Martin Baulig <martin@ximian.com>
14224 * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
14225 determine whether we're inside the debugger.
14228 (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
14230 2006-04-12 Zoltan Varga <vargaz@gmail.com>
14232 * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
14233 handler clauses. Fixes #78024.
14235 * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
14236 in the CALL_MEMBASE opcodes. Fixes #78088.
14237 (mono_arch_get_vcall_slot_addr): Ditto.
14239 2006-04-10 Martin Baulig <martin@ximian.com>
14241 * debug-debugger.c: The thread handling code has now been moved
14242 into ../metadata/threads.c.
14244 2006-04-10 Zoltan Varga <vargaz@gmail.com>
14246 * driver.c (mono_main): Fix --with-gc=none build.
14248 * mini-codegen.c (mono_spillvar_offset): Improve alignment.
14249 (mono_spillvar_offset_float): Ditto.
14250 (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
14251 hreg, not when its !global, since on ia64, there is a third category: stacked
14254 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
14256 * mini.c: set MonoInst->klass for load field address and a few other
14259 2006-04-10 Zoltan Varga <vargaz@gmail.com>
14261 * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
14263 2006-04-07 Zoltan Varga <vargaz@gmail.com>
14265 * dominators.c (compute_dominators): Fix yet another bug which surfaced after
14266 the branch opt changes.
14268 2006-04-06 Dick Porter <dick@ximian.com>
14270 * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
14272 * wapihandles.c (mini_wapi_seminfo):
14273 * driver.c (mono_main): Add semaphore info option
14275 2006-04-05 Zoltan Varga <vargaz@gmail.com>
14277 * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
14278 branch optimization changes. Fixes #78009.
14280 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
14282 * mini.c: ignore accessibility of methods in managed->native wrappers.
14284 2006-04-04 Zoltan Varga <vargaz@gmail.com>
14286 * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
14288 * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
14290 2006-04-03 Zoltan Varga <vargaz@gmail.com>
14292 * mini.c: Modify the branch optimizations to preserve the invariant that
14293 the entries inside the in_bb and out_bb arrays are unique.
14294 (mono_unlink_bblock): Avoid creation of new arrays.
14296 2006-04-02 Zoltan Varga <vargaz@gmail.com>
14298 * mini.c (mono_unlink_bblock): Fix regression caused by previous
14301 2006-04-01 Zoltan Varga <vargaz@gmail.com>
14303 * mini.c (optimize_branches): Remove the "optimizations" in
14304 the cbranch1/cbranch2 -> branch cases which were causing several
14305 problems in the past. Fixes #77986.
14307 2006-03-31 Chris Toshok <toshok@ximian.com>
14309 * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
14310 default optimizations :(
14312 2006-03-31 Zoltan Varga <vargaz@gmail.com>
14314 * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
14317 2006-03-31 Massimiliano Mantione <massi@ximian.com>
14319 * local-propagation.c: Added comments to structs and removed
14320 "Mono" prefixes from local tree mover types.
14322 2006-03-30 Zoltan Varga <vargaz@gmail.com>
14324 * Makefile.am (arch_sources): Define this for each architecture so
14325 libmono_la_SOURCES is defined in one place.
14327 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
14329 * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
14332 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
14334 * driver.c: print the GC name supplied by configure.
14336 2006-03-29 Massimiliano Mantione <massi@ximian.com>
14338 * local-propagation.c: Added tree mover, and moved here all the
14339 local propagation code from mini.c
14340 * mini.c: Added support for treeprop, and moved all the local
14341 propagation code to local-propagation.c
14342 * mini.h: Added support for treeprop
14343 * driver.c: Added support for treeprop, enabled consprop, copyprop,
14344 treeprop, inline and deadce by default
14345 * Makefile.am: Added local-propagation.c
14347 2006-03-25 Zoltan Varga <vargaz@gmail.com>
14349 * exceptions-sparc.c: Applied patch from David S. Miller <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
14351 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
14353 * debug-debugger.c: make it compile without the Boehm GC.
14355 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
14357 * mini.c: fixed issue with mismatch when an icall is registered
14358 with multiple names but same address.
14360 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
14362 * declsec.c, mini-exceptions.c: use write barrier to set reference
14363 fields of managed objects.
14365 2006-03-19 Zoltan Varga <vargaz@gmail.com>
14367 * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
14368 (can_access_internals): Fix a warning.
14370 * mini.c (print_method_from_ip): Rename this to
14371 mono_print_method_from_ip so it gets exported.
14373 * trace.c: Deal with strings inside StringBuilder's containing garbage
14374 and fix memory leaks. Fixes #77848.
14376 2006-03-19 Zoltan Varga <vargaz@gmail.com>
14378 * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
14381 2006-03-16 Neale Ferguson <neale@sinenomine.net>
14383 * mini-s390.c: Remove OP_X86_TEST_NULL.
14385 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
14387 * mini.c: use the correct GetHashCode() for the moving collector.
14389 2006-03-16 Massimiliano Mantione <massi@ximian.com>
14391 * liveness.c: Regalloc spill cost tuning.
14393 2006-03-15 Neale Ferguson <neale@sinenomine.net>
14395 * mini-s390x.h: Correct S390_LONG macro.
14397 * mini-s390x.c: Cleanup unused code.
14399 2006-03-15 Zoltan Varga <vargaz@gmail.com>
14401 * jit-icalls.h: New file.
14403 * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
14404 icalls and include that instead of including jit-icalls.c.
14406 * mini-ppc.c (mono_arch_output_basic_block): Remove references to
14409 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
14411 * mini.c: when checking for member accessibility, also check for
14412 friend assemblies and for explicit interface implementations.
14414 2006-03-14 Zoltan Varga <vargaz@gmail.com>
14416 * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
14418 * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
14420 * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
14421 common cases are done first.
14423 * mini-ops.h: Only define platform specific opcodes on the given platform.
14425 * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
14428 2006-03-14 Martin Baulig <martin@ximian.com>
14430 Revert Paolo's change from r57348:
14432 * mini.h: don't use gboolean for bitfields.
14433 * mini.c: verifier changes for fields and methods accessibility.
14435 2006-03-13 Neale Ferguson <neale@sinenomine.net>
14437 * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
14439 * mini-s390x.c: Fix conv_r_un.
14441 * cpu-s390, cpu-s390x.md: Fix lengths.
14443 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
14445 * mini.c: nested types have access to all the nesting
14446 levels, not just the enclosing types.
14448 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
14450 * mini.c: added a few more verification checks.
14452 2006-03-12 Zoltan Varga <vargaz@gmail.com>
14454 * liveness.c: Merge optimizations from the linear-il branch.
14456 2006-03-11 Zoltan Varga <vargaz@gmail.com>
14458 * mini-ia64.c (emit_call): Add a comment.
14460 * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
14462 * tramp-ia64.c: Fix some warnings.
14464 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
14466 * mini.h: don't use gboolean for bitfields.
14467 * mini.c: verifier changes for fields and methods accessibility.
14469 2006-03-11 Zoltan Varga <vargaz@gmail.com>
14471 * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
14472 lazy icall wrapper changes.
14474 * dominators.c: Replace all the dominator algorithms with faster
14475 ones from the linear-il branch.
14477 * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
14480 * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
14481 common cases are done first.
14483 * mini-amd64.c: Fix some warnings.
14485 * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
14488 * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
14491 * mini.h: Add a missing prototype.
14493 2006-03-10 Zoltan Varga <vargaz@gmail.com>
14495 * mini.c: Compile icall wrappers lazily.
14497 * mini-codegen.c: Use printf instead of g_print since its much faster.
14499 * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
14502 * mini.c (optimize_branches): Cache the negative result from
14503 remove_block_if_useless ().
14505 * mini.c (optimize_branches): Avoid restarting the iteration after each change.
14506 Also fix some bblock linking issues.
14508 * helpers.c (mono_disassemble_code): Reduce the size of the temporary
14511 * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
14513 * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
14514 accessed fields first, for better cache behavior.
14516 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
14518 * mini.c: speedup IList<T> array accesses.
14520 2006-03-09 Zoltan Varga <vargaz@gmail.com>
14522 * mini.c (mono_method_to_ir): Handle large methods overflowing the
14523 inline_costs counter. Fixes #77190.
14525 2006-03-06 Zoltan Varga <vargaz@gmail.com>
14527 * mini-exceptions.c: Call mono_trace_is_enabled () before printing
14528 trace messages. Fixes #77706.
14530 2006-03-04 Martin Baulig <martin@ximian.com>
14532 * tramp-amd64.c, tramp-x86.c
14533 (mono_debugger_create_notification_function): Use
14534 mono_global_codeman_reserve() to allocate a buffer at runtime and
14537 * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
14539 * debug-debugger.c (mono_debugger_init): Dynamically allocate the
14540 notification function at runtime and then call `initialize' in the
14541 `MONO_DEBUGGER__debugger_info' vtable.
14543 2006-03-04 Zoltan Varga <vargaz@gmail.com>
14545 * iltests.il: Fix a visibility problem.
14547 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
14549 * driver.c, mini.c: add hooks for the counters API.
14551 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
14553 * driver.c: show disabled options.
14555 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
14557 * linear-scan.c: always use cost-driven selection.
14559 2006-02-28 Raja R Harinath <rharinath@novell.com>
14561 * jit-icalls.c (helper_compile_generic_method): Revert change from
14564 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
14566 * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
14568 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
14570 * inssel.brg: style fixes, mostly to force the updated monoburg
14571 to run for people using svn.
14573 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
14575 * mini.c: match monoburg changes.
14577 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
14579 * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
14580 ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
14581 declaration in the header file.
14583 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
14585 * helpers.c: reduce relocations and mem usage.
14587 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
14589 * mini.h, mini-codegen.c: disable logging features if
14590 requested by configure.
14592 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
14594 * mini.c: tiny verifier changes.
14596 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
14598 * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
14599 cpu-pentium.md: stack alignment changes for osx/x86,
14600 partially from Geoff Norton <gnorton@customerdna.com>.
14602 2006-02-24 Raja R Harinath <harinath@gmail.com>
14604 * jit-icalls.c (helper_compile_generic_method): Update to changes
14605 in metadata/class.c.
14607 2006-02-24 Zoltan Varga <vargaz@gmail.com>
14609 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
14611 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
14612 interface calls with large offsets.
14614 2006-02-23 Raja R Harinath <rharinath@novell.com>
14616 * jit-icalls.c (helper_compile_generic_method): Document the
14617 special-case we depend on so that we can inflate the method twice
14618 with the same context with no bad side-effects.
14620 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
14622 * mini-x86.c, mini-amd64.c: fix for case when xen support
14625 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
14627 * mini-x86.c, mini-amd64.c: generate code to access tls items
14628 in a faster way for Xen systems.
14630 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
14632 * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
14633 updates and compilation fixes for the OSX/x86 port, mostly from
14634 Geoff Norton <gnorton@customerdna.com>.
14636 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
14638 * inssel.brg: faster interface call implementation
14639 to sync with the interface_offsets MonoVTable changes.
14641 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
14643 * mini.c: more verification checks.
14645 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
14647 * mini.c: added a few more verification checks.
14649 2006-02-17 Neale Ferguson <neale@sinenomine.net>
14651 * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
14652 facility on the processor and use it if available.
14654 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
14656 * driver.c, aot.c, mini.c: throw exception if the IL code is
14657 invalid or unverifiable.
14659 2006-02-17 Raja R Harinath <rharinath@novell.com>
14661 * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
14664 2006-02-16 Zoltan Varga <vargaz@gmail.com>
14666 * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
14668 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
14670 * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
14671 mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
14672 handling of instantiated generic valuetypes.
14674 2006-02-11 Zoltan Varga <vargaz@gmail.com>
14676 * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of
14677 MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
14680 * generics.2.cs: Revert the nullable reftypes tests.
14682 2006-02-10 Zoltan Varga <vargaz@gmail.com>
14684 * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
14685 using __builtin_frame_address (1) as it doesn't work in the presence
14686 of optimizations. Hopefully fixes #77273.
14688 * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
14689 -> generics.cs change as it doesn't work with some automake versions.
14691 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
14693 * mini.c: handle systems that sue a different way to
14694 retrieve the stack address of the current thread.
14696 2006-02-09 Zoltan Varga <vargaz@gmail.com>
14698 * Makefile.am generics.2.cs: Rename this to generics.cs and handle
14699 it specially in the makefile.
14701 * generics.2.cs: Add tests for nullable reference types.
14703 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
14705 * mini.c: always handle the case when mono_jit_init()
14706 is called in a thread different from the main thread,
14707 confusing libgc (bug #77309).
14709 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
14711 * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
14713 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
14715 * mini.c: change optimize_branches () to use a single loop
14716 and introduce a new optimization to simplify some range checks.
14718 2006-02-03 Martin Baulig <martin@ximian.com>
14720 * debug-debugger.c (debugger_thread_manager_thread_created): Removed
14721 and merged with debugger_thread_manager_add_thread().
14722 (mono_debugger_main): Call debugger_thread_manager_add_thread() to
14723 inform the debugger about the main thread.
14725 2006-02-03 Zoltan Varga <vargaz@gmail.com>
14727 * basic.cs: Add test for div.un/rem.un constant folding.
14729 2006-02-03 Neale Ferguson <neale@sinenomine.net>
14731 * cpu-s390x.md: correct int_xor_imm length
14733 2006-02-03 Zoltan Varga <vargaz@gmail.com>
14735 * generics.2.cs: New test for #77442.
14737 * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
14740 2006-02-02 Martin Baulig <martin@ximian.com>
14742 * tramp-x86.c, tramp-amd64.c: It's now safe to #include
14743 <mono/metadata/mono-debug-debugger.h>
14745 * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
14747 2006-02-02 Martin Baulig <martin@ximian.com>
14749 * debug-debugger.h: New header file for debug-debugger.c.
14751 * debug-debugger.c: Big API cleanup; don't run the managed Main()
14752 function is a separate thread anymore; add support for attaching.
14754 2006-02-01 Zoltan Varga <vargaz@gmail.com>
14756 * tramp-x86.c: Fix a warning.
14758 2006-01-31 Zoltan Varga <vargaz@gmail.com>
14760 * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
14761 on very large methods.
14763 * aot.c (load_patch_info): Fix a warning.
14765 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
14767 * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
14768 mini-ops.h: alu membase optimizations.
14770 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
14772 * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
14773 to speedup StringBuilder.
14775 2006-01-27 Zoltan Varga <vargaz@gmail.com>
14777 * dominators.c (mono_compute_natural_loops): Fix detection of
14778 loop body start blocks.
14780 * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
14782 2006-01-26 Zoltan Varga <vargaz@gmail.com>
14784 * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
14787 2006-01-25 Massimiliano Mantione <massi@ximian.com>
14789 * aliasing.c: Fixed aliasing issue on 64 bit archs.
14791 2006-01-25 Martin Baulig <martin@ximian.com>
14793 * debug-debugger.c: Moved the `MonoDebuggerManager' and
14794 `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
14795 started to cleanup this file a little bit.
14797 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
14799 * mini.c: optimize a codepath frequently happening in generics code.
14801 2006-01-23 Martin Baulig <martin@ximian.com>
14803 * Makefile.am: Only compile debug-debugger.c on supported platforms.
14805 * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
14806 functions directly.
14808 * driver.c: debug-debugger.c is only available if
14809 `MONO_DEBUGGER_SUPPORTED' is defined.
14811 2006-01-23 Martin Baulig <martin@ximian.com>
14813 * debug-debugger.c: Only enable this on platforms where the Mono
14814 Debugger is working (x86 and x86_64).
14816 2006-01-21 Martin Baulig <martin@ximian.com>
14818 The Mono Debugger is now using the normal `mono' instead of the
14819 `mono-debugger-mini-wrapper' when executing managed code.
14821 * debug-debugger.c: New file; previously known as
14822 debugger/wrapper/wrapper.c.
14824 * debug-mini.c (mono_init_debugger): Removed.
14826 * driver.c (mono_main): Added new `--inside-mdb' command line
14827 argument which is used when running inside the debugger.
14829 2006-01-20 Zoltan Varga <vargaz@gmail.com>
14831 * liveness.c (mono_analyze_liveness): Remove some unused data
14834 2006-01-17 Zoltan Varga <vargaz@gmail.com>
14836 * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
14838 2006-01-16 Zoltan Varga <vargaz@gmail.com>
14840 * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
14841 depends on implementation details of monobitset.
14843 * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
14846 2006-01-15 Zoltan Varga <vargaz@gmail.com>
14848 * liveness.c: Update after monobitset changes.
14850 2006-01-14 Zoltan Varga <vargaz@gmail.com>
14852 * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
14854 2006-01-11 Neale Ferguson <neale@sinenomine.net>
14856 * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
14858 * mini-s390x.c: Remove warning messages.
14860 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
14862 * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
14864 2006-01-10 Zoltan Varga <vargaz@gmail.com>
14866 * generics.2.cs: Add ldelem/stelem_any test.
14868 2006-01-10 Neale Ferguson <neale@sinenomine.net>
14870 * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
14872 2006-01-07 Zoltan Varga <vargaz@gmail.com>
14874 * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
14876 2006-01-06 Zoltan Varga <vargaz@gmail.com>
14878 * generics.2.cs: Reenable vtype tests.
14880 * inssel-x86.brg: Remove an icorrect valuetype rule.
14882 2006-01-06 Neale Ferguson <neale@sinenomine.net>
14884 * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
14885 initial support for OP_ABS.
14887 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14889 * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
14891 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14893 * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int
14894 conversion and implement LADD/LSUB.
14896 * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
14899 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14901 * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
14903 * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
14906 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14908 * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when
14909 localloc is encountered. Fixes crash in test-183.cs when using gmcs
14910 (stack walk problem).
14912 2006-01-04 Zoltan Varga <vargaz@gmail.com>
14914 * aot.c (mono_aot_load_method): Fix a warning.
14916 2006-01-03 Neale Ferguson <neale@sinenomine.net>
14918 * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
14920 2006-01-03 Zoltan Varga <vargaz@gmail.com>
14922 * iltests.il: Add test for #77148.
14924 * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
14927 2006-01-03 Neale Ferguson <neale@sinenomine.net>
14929 * mini-s390x.c, inssel-s390x.brg: Remove debug statements
14931 2006-01-03 Neale Ferguson <neale@sinenomine.net>
14933 * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
14934 cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
14936 * basic-long.cs: Add lconv-to-r4/r8 tests.
14938 2006-01-03 Zoltan Varga <vargaz@gmail.com>
14940 * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
14942 * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
14943 here as on other archs.
14945 2005-12-29 Neale Ferguson <neale@sinenomine.net>
14947 * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
14949 2005-12-29 Neale Ferguson <neale@sinenomine.net>
14951 * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
14953 * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
14955 * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
14956 instrument_prolog; Add memory_barrier instruction.
14958 2005-12-26 Zoltan Varga <vargaz@gmail.com>
14960 * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
14962 2005-12-23 Zoltan Varga <vargaz@gmail.com>
14964 * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
14966 * aliasing.c inssel.brg: Fix warnings.
14968 * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
14969 could skip initialization of some parts of memory.
14971 * mini.c mini-ia64.c: Fix warnings.
14973 * inssel-sparc.brg: Add an implementation of lneg which actually works.
14975 2005-12-22 Zoltan Varga <vargaz@gmail.com>
14977 * aliasing.c (mono_build_aliasing_information): Add a workaround for
14978 a crash seen on sparc.
14980 * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
14982 * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
14984 2005-12-21 Neale Ferguson <neale@sinenomine.net>
14986 * mini-ops.h: Add s390_backchain instruction
14988 * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
14990 * cpu-s390.md: Add s390_backchain instruction
14992 * mini-s390.c: Significant ABI changes
14994 * mini-s390.h: Cater for zero length structures
14996 2005-12-20 Neale Ferguson <neale@sinenomine.net>
14998 * mini-s390.c: ABI fixes
15000 * inssel-s390.brg: Remove debug statements
15002 * cpu-s390.md: Fix length of ATOMIC_xx operations
15004 2005-12-19 Zoltan Varga <vargaz@gmail.com>
15006 * basic-float.cs: Add float<->long conversion tests.
15008 2005-12-16 Neale Ferguson <neale@sinenomine.net>
15010 * mini-s390.c: Fix LOCALLOC processing.
15012 * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
15014 2005-12-15 Zoltan Varga <vargaz@gmail.com>
15016 * iltests.il: Add tests for some opcodes not covered by the other
15019 2005-12-15 Neale Ferguson <neale@sinenomine.net>
15021 * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct
15022 register loading for Tail processing; Correct trace output.
15024 * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
15026 * cpu-s390.md: Correct size of jmp instruction.
15028 2005-12-13 Neale Ferguson <neale@sinenomine.net>
15030 * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
15032 2005-12-13 Neale Ferguson <neale@sinenomine.net>
15034 * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
15035 Bring s390 up to current level.
15037 2005-12-12 Zltan Varga <vargaz@gmail.com>
15039 * generics.2.cs: Disable the newly added tests as they do not work yet.
15041 * generics.2.cs: Add valuetype tests.
15043 2005-12-09 Zoltan Varga <vargaz@gmail.com>
15045 * basic-long.cs: Add i4->u8 test.
15047 * objects.cs: Add tests for JIT intrinsic.
15049 * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
15050 optimizations lost by a mistake.
15052 2005-12-07 Zoltan Varga <vargaz@gmail.com>
15054 * basic-long.cs: Remove a test moved to objects.cs.
15056 * arrays.cs: Add more array tests.
15058 2005-12-06 Zoltan Varga <vargaz@gmail.com>
15060 * arrays.cs: Add new tests for multi-dimensional arrays.
15062 2005-12-06 Raja R Harinath <rharinath@novell.com>
15064 * Makefile.am (test_sources2): Add generics.2.cs.
15065 (EXTRA_DIST): Add test_sources2.
15067 2005-12-05 Ben Maurer <bmaurer@ximian.com>
15069 Support for boxing and unboxing nullable types as well as the
15070 isinst operation on nullables, per the CLI ammendment.
15072 * inssel.brg (CEE_ISINST): Special case for nullable
15074 * mini.c (handle_unbox_nullable): new method
15075 (handle_box): Special case for nullable types
15076 (mono_method_to_ir): Call handle_unbox_nullable in correct
15079 * generics.2.cs: New test suite
15081 * Makefile.am: Support for regression tests with generics.
15083 2005-12-03 Zoltan Varga <vargaz@gmail.com>
15085 * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
15086 allocated to registers. Fixes #76800.
15088 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
15090 * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
15092 2005-11-30 Zoltan Varga <vargaz@gmail.com>
15094 * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot
15097 2005-11-29 Zoltan Varga <vargaz@gmail.com>
15099 * objects.cs basic-calls.cs: Move a test depending on valuetypes to
15102 * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
15104 * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
15105 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
15107 * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
15108 single precision before storing to a single precision location.
15110 2005-11-28 Raja R Harinath <rharinath@novell.com>
15112 * Makefile.am (ILASM): Use profile-dependent location of ilasm.
15114 2005-11-27 Zoltan Varga <vargaz@gmail.com>
15116 * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
15119 * basic.cs: Remove test_0_byte_compares test which was moved to
15120 objects.cs a long time ago.
15122 2005-11-22 Massimiliano Mantione <massi@ximian.com>
15124 * aliasing.c: Fixed aliasing issue on 64 bit archs.
15126 2005-11-20 Zoltan Varga <vargaz@gmail.com>
15128 * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
15129 handlers are called.
15131 * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
15134 * mini-ia64.c: Add support for the throw->branch exception
15137 * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
15139 2005-11-18 Massimiliano Mantione <massi@ximian.com>
15141 * mini.c: Enabled "fastpath" deadce :-)
15143 2005-11-18 Massimiliano Mantione <massi@ximian.com>
15145 * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
15146 alias analysis pass to support it.
15147 * mini.h: Likewise.
15149 * liveness.c: Likewise (liveness computation can use aliasing
15150 information to be more accurate).
15151 * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
15152 moreover made so that "--compile-all" uses the given optimization
15153 flags and not the default ones.
15154 * aliasing.c: Alias analysis (new file).
15155 * aliasing.h: Likewise.
15156 * Makefile.am: added "aliasing.c" and "aliasing.h".
15158 2005-11-17 Zoltan Varga <vargaz@gmail.com>
15160 * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
15163 2005-11-13 Zoltan Varga <vargaz@gmail.com>
15165 * mini-exceptions.c (mono_handle_exception_internal): Remove the
15166 fp >= end_of_stack exit condition, as it is not needed, and it might
15167 become true for fp eliminated frames.
15169 2005-11-11 Zoltan Varga <vargaz@gmail.com>
15171 * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
15174 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
15176 * mini-arm.c: fixed alignment of doubles/longs to match
15177 the C ABI (bug #76635).
15179 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
15181 * aot.c: fix compilation with --enable-minimal=aot.
15183 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
15185 * mini-arm.c: fixed compatibility with the new
15186 floating point emulator package for compares.
15188 2005-11-03 Atsushi Enomoto <atsushi@ximian.com?
15190 * mini.c : reverted sig->pinvoke changes (r51396-51397).
15192 2005-11-01 Zoltan Varga <vargaz@freemail.hu>
15194 * mini-exceptions.c (print_stack_frame): Output to stderr.
15195 (mono_handle_native_sigsegv): Ditto.
15197 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
15199 * mini-amd64.c (mono_arch_output_basic_block): Remove unused
15200 OP_LCONV_TO_OVF_I implementation.
15202 * mini-amd64.c: Add support for the throw->branch exception
15205 * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
15206 when the catch clause catches a more general exception, i.e. Object.
15208 2005-10-30 Zoltan Varga <vargaz@gmail.com>
15210 * cpu-ia64.md: Remove unused opcodes.
15212 * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
15213 specific defines for architectures defining USE_SIGACTION.
15215 * mini-ia64.c: Fix some warnings.
15217 * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
15218 version seemed to skip a frame.
15220 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
15222 * mini.c: Clean up the usage of sig->pinvoke flag. Now
15223 only calls which are made to native code use this flag.
15225 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
15227 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
15228 varargs methods as well.
15230 * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
15231 which have save_lmf set. Reorganize methods prologs a bit.
15233 * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
15234 debugger to the proper place.
15236 2005-10-29 Martin Baulig <martin@ximian.com>
15238 * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
15239 when running inside the debugger until the debugger has support
15242 2005-10-26 Zoltan Varga <vargaz@gmail.com>
15244 * mini.h: Fix a warning.
15246 2005-10-24 Miguel de Icaza <miguel@novell.com>
15248 * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
15249 we expose publicly, this returns the string.
15251 2005-10-22 Zoltan Varga <vargaz@freemail.hu>
15253 * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
15254 with fp elimination.
15256 2005-10-21 Zoltan Varga <vargaz@gmail.com>
15258 * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
15259 native stacktrace using the glibc 'backtrace' function if available.
15261 2005-10-20 Zoltan Varga <vargaz@gmail.com>
15263 * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
15265 * mini-exceptions.c (mono_handle_native_sigsegv): New function to
15266 handle SIGSEGVs received while in native code.
15268 * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
15269 code, call mono_handle_native_sigsegv which will abort the runtime
15270 after printing some diagnostics, instead of converting it into a
15271 confusing NullReferenceException.
15273 2005-10-18 Zoltan Varga <vargaz@gmail.com>
15275 * cpu-pentium.md: Remove unused opcodes.
15277 2005-10-18 Zoltan Varga <vargaz@freemail.hu>
15279 * mini-amd64.h (MonoLMF): Add rsp field.
15281 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
15284 2005-10-17 Zoltan Varga <vargaz@gmail.com>
15286 * mini-codegen.c (get_register_spilling): Fix some warnings.
15288 2005-10-16 Zoltan Varga <vargaz@freemail.hu>
15290 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
15291 elimination during exception handling. Enable fp elimination by
15294 * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
15297 2005-10-16 Martin Baulig <martin@ximian.com>
15299 * mini-exceptions.c
15300 (mono_debugger_run_finally): New public method for the debugger.
15302 2005-10-10 Zoltan Varga <vargaz@gmail.com>
15304 * debug-mini.c (mono_debug_init_method): Fix warning.
15306 * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
15307 the 'exname' parameter const to fix some warnings.
15309 2005-10-09 Zoltan Varga <vargaz@freemail.hu>
15311 * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
15312 introduced by the previous patch.
15314 2005-10-08 Zoltan Varga <vargaz@gmail.com>
15316 * basic-float.cs: Add test for precision of float arithmetic.
15318 * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
15319 when loading/storing single values from/to memory.
15321 * mini.c (mono_jit_compile_method_with_opt): Create the function
15322 pointers in the correct domain.
15324 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
15326 * mini-exceptions.c (mono_handle_exception_internal): Fix bug
15327 introduced by previous patch.
15329 * mini-exceptions.c (mono_handle_exception_internal): Handle the case
15330 when out_filter_idx is NULL.
15332 * mini-exceptions.c: Don't run filter clauses twice during exception
15333 handling. Fixes #75755.
15335 2005-10-07 Zoltan Varga <vargaz@gmail.com>
15337 * aot.c: Add support for ldflda wrappers.
15339 * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
15342 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
15344 * mini.c, mini.h: do not consider exception handlers blocks when
15345 setting up interface variables.
15347 2005-10-04 Zoltan Varga <vargaz@freemail.hu>
15349 * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
15351 2005-10-03 Zoltan Varga <vargaz@gmail.com>
15353 * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
15354 causes a regression.
15356 * mini.c (mini_thread_cleanup): Fix reading of freed memory.
15358 2005-10-02 Zoltan Varga <vargaz@freemail.hu>
15360 * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
15361 of the OP_P definitions.
15363 * TODO: Add a proposal for dealing with the CEE/OP mess.
15365 * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm
15366 optimizations from the x86 port.
15368 * cpu-amd64.md: Ditto.
15370 * basic.cs basic-long.cs: Add tests.
15372 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
15374 * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
15375 Patrik Torstensson's implementation of my exception-handling
15376 optimization idea, when the exception object is not used
15379 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
15381 * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
15382 of the mul_imm optimizations from the old jit.
15384 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
15386 * mini.c, liveness.c: patch by Patrik Torstensson and
15387 Zoltan Varga to improve performance in methods with
15390 2005-09-30 Zoltan Varga <vargaz@gmail.com>
15392 * driver.c: Remove 'Globalization' entry from --version.
15394 2005-09-28 Zoltan Varga <vargaz@gmail.com>
15396 * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
15397 there is a profiler interested in JIT events.
15399 * aot.c: Load profile files produced by the AOT profiling module, and
15400 reorder methods based on the profiling info. Add a 'method_order' table
15401 to the AOT file to make mono_aot_find_jit_info work with the reordered
15404 * mini.h: Bump AOT file version info.
15406 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
15408 * mini-arm.h: work around what looks like a gcc bug when optimizations
15411 2005-09-28 Raja R Harinath <rharinath@novell.com>
15413 * Makefile.am (AM_CFLAGS): Don't use += to append inside
15414 conditionals. Use ...
15415 (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
15417 2005-09-27 Zoltan Varga <vargaz@freemail.hu>
15419 * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
15420 to determine the amount of memory to copy when passing valuetypes.
15422 * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
15423 4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
15425 2005-09-27 Zoltan Varga <vargaz@gmail.com>
15427 * mini.h mini.c aot.c: Add infrastructure to collect pagefault
15428 information about aot.
15430 2005-09-27 Ben Maurer <bmaurer@ximian.com>
15432 * *.c: Replace the use of {Enter,Leave}CriticalSection with
15433 macros. This will allow a deadlock debugger to easily be plugged
15436 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
15438 * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
15440 2005-09-27 Raja R Harinath <rharinath@novell.com>
15442 * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
15443 (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
15444 (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
15445 ($(arch_built)) [CROSS_COMPILING]: Error out.
15447 2005-09-26 Zoltan Varga <vargaz@gmail.com>
15449 * aot.c: Add support for the no_special_static flag for classes.
15451 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
15453 * Reapply reverted patches.
15455 * *: Revert r50174 as well.
15457 * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
15459 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
15461 * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
15463 2005-09-23 Miguel de Icaza <miguel@novell.com>
15465 * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
15466 part of the SIG_HANDLER_SIGNATURE.
15468 2005-09-23 Zoltan Varga <vargaz@gmail.com>
15470 * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
15473 * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention
15474 introduced by previous patch.
15476 2005-09-21 Zoltan Varga <vargaz@gmail.com>
15478 * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
15479 saved registers too.
15481 * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based
15482 upon the information returned by get_call_info ().
15484 * mini-x86.c (add_float): Fix stack size calculation.
15485 (mono_arch_call_opcode): Rewrite this so it works based up the
15486 information returned by get_call_info ().
15487 (mono_arch_get_this_vret_args): Ditto.
15489 2005-09-21 Zoltan Varga <vargaz@freemail.hu>
15491 * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
15492 in cinfo to determine the registers which need to be used.
15494 2005-09-20 Miguel de Icaza <miguel@novell.com>
15496 * driver.c (mono_main): Add --server and --desktop flags.
15498 2005-09-16 Zoltan Varga <vargaz@gmail.com>
15500 * mini-ia64.h: Make register masks 64 bit. Don't treat argument
15501 registers as global registers.
15503 * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no
15504 longer needed with the new register allocator.
15506 * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
15508 * cpu-ia64.md: Remove unused opcodes.
15510 * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
15512 2005-09-16 Zoltan Varga <vargaz@freemail.hu>
15514 * cpu-amd64.md: Remove unused opcodes.
15516 * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
15517 needed with the new register allocator.
15519 * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
15522 2005-09-16 Raja R Harinath <rharinath@novell.com>
15524 * Makefile.am (check-local): Don't invoke semdel-wrapper.
15526 2005-09-16 Martin Baulig <martin@ximian.com>
15528 * exceptions-amd64.c
15529 (throw_exception): Don't call mono_debugger_throw_exception() if
15530 we're a rethrow - see the FIXME in the code.
15532 2005-09-15 Geoff Norton <gnorton@customerdna.com>
15534 * mini.c (mono_init_exceptions): This only works on some architectures.
15536 2005-09-15 Zoltan Varga <vargaz@gmail.com>
15538 * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
15541 * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
15543 * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
15544 now in mini-exceptions.c.
15546 2005-09-15 Zoltan Varga <vargaz@freemail.hu>
15548 * mini-amd64.h mini-am64.c: Remove the altstack support code which is
15549 now in mini-exceptions.c.
15551 2005-09-15 Zoltan Varga <vargaz@gmail.com>
15553 * exceptions-x86.c: Applied patch from Patrik Torstensson
15554 <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
15556 * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
15557 code into mini-exceptions.c. Add some assertions to it.
15559 2005-09-12 Zoltan Varga <vargaz@gmail.com>
15561 * aot.c (emit_section_change): Applied patch from "The Software Team"
15562 (<software@solmersa.com>). Fix as errors on windows.
15564 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
15566 * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
15567 method info into the LMF.
15569 2005-09-11 Zoltan Varga <vargaz@gmail.com>
15571 * mini-ia64.c: Add proper unwind info for method epilogs.
15573 * exceptions-ia64.c: Add some code to help debugging.
15575 * mini-ia64.c mini-ia64.h: Add sigaltstack support.
15577 * mini-exceptions.c: Fix warning.
15579 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
15581 * mini.c: Really fix build.
15583 * mini-x86.c mini-amd64.c: Fix build.
15585 2005-09-11 Zoltan Varga <vargaz@gmail.com>
15587 * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
15589 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
15590 some Interlocked methods as intrinsics.
15592 * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
15593 for Thread methods as well.
15595 * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
15597 * inssel.brg: Add rule for OP_MEMORY_BARRIER.
15599 * mini-ia64.c mini-x86.c mini-amd64.c
15600 cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of
15603 * mini.c (mono_init_exceptions): Fix build breakage.
15605 2005-09-10 Zoltan Varga <vargaz@gmail.com>
15607 * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
15608 of instructions. Use the new ia64_unw_op macros for emitting unwind
15611 * mini.c (mono_init_exceptions): Initialize exception handling
15612 related trampolines at startup.
15614 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
15616 * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
15618 2005-09-09 Zoltan Varga <vargaz@gmail.com>
15620 * mini.c: Handle type loading errors gracefully during compilation and
15621 throw the appropriate exception.
15623 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
15625 * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
15626 for the mono binary.
15628 2005-09-09 Martin Baulig <martin@ximian.com>
15630 * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
15633 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
15635 * mini-arm.h: use emulation for conv.r.un for the release.
15637 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
15639 * mini-arm.c, objects.cs: more fixes and tests for them.
15641 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
15643 * mini-arm.c: align structures to at least 4 bytes to be able
15644 to keep our current optimized memcpy.
15646 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
15648 * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
15650 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15652 * mini.c: ignore SIGPIPE.
15654 2005-09-04 Zoltan Varga <vargaz@gmail.com>
15656 * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
15658 * mini-ia64.h mini-ia64.c: Add some minor optimizations.
15660 2005-09-02 Zoltan Varga <vargaz@gmail.com>
15662 * mini.h: Add prototype for mono_allocate_stack_slots_full.
15664 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
15666 * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
15667 exception handling support.
15668 * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
15669 patch by Brian Koropoff <briank@marakicorp.com>).
15671 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
15673 * mini.c: revert another 'optimization' which breaks when
15674 items on the eval stack need to be saved at a basic block end
15677 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
15679 * jit-icalls.c: for arrays, ensure we always provide
15682 2005-08-30 Zoltan Varga <vargaz@gmail.com>
15684 * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
15686 * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
15688 2005-08-29 Zoltan Varga <vargaz@gmail.com>
15690 * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
15691 arguments in their original register.
15693 2005-08-28 Zoltan Varga <vargaz@gmail.com>
15695 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
15698 * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
15699 when ssapre is enabled.
15701 * inssel-long.brg: Fix bug in previous patch.
15703 * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize
15704 multiplication by a constant.
15706 2005-08-27 Zoltan Varga <vargaz@gmail.com>
15708 * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
15711 * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
15714 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
15716 * inssel-arm.brg: apply changes tested by Brian Koropoff
15717 <briank@marakicorp.com>.
15719 2005-08-25 Zoltan Varga <vargaz@gmail.com>
15721 * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
15723 2005-08-24 Zoltan Varga <vargaz@gmail.com>
15725 * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
15726 to the same register if dreg is just a base register.
15727 (print_ins): Improve printing of membase opcodes.
15729 * inssel-x86.brg: Add optimized ldind(reg) rules.
15731 * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
15733 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
15735 * mini.c: when running under valgrind, set the stack bottom for
15736 the GC at the actual approximate stack for the app (fixes running
15737 mono with valgrind).
15739 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
15741 * mini.c: do no break at the first valuetype to init found
15742 (fixes bug #75791).
15744 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
15746 * cpu-arm.md, mini-arm.c: more fixes and LMF support.
15748 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
15750 * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
15752 2005-08-23 Zoltan Varga <vargaz@freemail.hu>
15754 * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
15756 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
15758 * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
15760 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
15763 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
15766 * mini.c (optimize_branches): Don't quit after 1000 iterations on large
15769 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
15771 * tramp-arm.c: allocate less memory for the trampoline and fix typo.
15773 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
15775 * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
15776 in the tail recursion optimization.
15778 * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as
15779 debug info into the assembly file.
15781 * iltests.il: Add test for filter regions.
15783 * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
15784 initial stack of filter regions. Fixes #75755.
15786 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
15788 * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
15789 stack requirements.
15791 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
15793 * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
15794 the check for an already compiled method on non-ia64 platforms.
15795 (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
15798 * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
15800 * inssel-x86.brg: Add some optimized call rules.
15802 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
15804 * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
15807 * mini.h mini-trampolines.c: Pass the trampoline argument to
15808 mono_arch_patch_delegate_trampoline.
15810 * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
15812 * mini-trampolines.c: Fix build.
15814 * mini-amd64.h: Add delegate trampolines.
15816 * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
15818 * inssel-amd64.brg: Add optimized call rules.
15820 * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
15822 * inssel-ia64.brg: Add optimized ldind(reg) rules.
15824 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
15826 * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
15829 * mini-ia64.c: Remove LMF fixmes.
15831 * mini-ia64.h: Remove most fields from LMF.
15833 * inssel-ia64.brg (stmt): Fix unaligned access errors.
15835 * mini-trampolines.c: Add support for IA64 function descriptors.
15837 * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
15838 for IA64 function descriptors.
15840 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
15842 * tramp-arm.c: patch the vtable for virtual calls. Added
15843 support code to register/unregister the LMF.
15844 * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
15847 2005-08-19 Dick Porter <dick@ximian.com>
15849 * mini.c: Use a gsize to store the thread ID, so it can hold a 64
15850 bit value if needed.
15852 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
15854 * mini.c (mini_get_method): Move handling of wrapper data here.
15856 * mini.c (mono_method_to_ir): Add support for dynamic methods.
15858 * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
15861 * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so
15862 bblock->code does not remain empty.
15864 2005-08-17 Zoltan Varga <vargaz@freemail.hu>
15866 * arrays.cs: Add regression test for #75832.
15868 * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
15869 rules. Fixes #75832.
15871 * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
15872 instruction scheduling.
15874 2005-08-12 Zoltan Varga <vargaz@freemail.hu>
15876 * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
15878 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
15880 * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
15882 * mini-codegen.c: Fix VC build.
15884 * cpu-pentium.md: Increase length of atomic_exhange_i4.
15886 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15888 * mini.h: fix signature for mono_register_opcode_emulation.
15890 2005-08-09 Zoltan Varga <vargaz@freemail.hu>
15892 * mini.c: Get rid of most of the helper_sig_... constants using
15893 mono_create_icall_signature ().
15895 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
15897 * jit-icalls.c (helper_ldstr): New helper function.
15899 * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
15901 * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
15902 throw, load the string using a helper call instead of creating a string object.
15904 * aot.c: Update after LDSTR changes.
15906 * mini.h: Bump AOT file version.
15908 * aot.c: Save class size info into the AOT file. Print more statistics during
15911 * mini.h: Bump AOT file version.
15913 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
15914 ordering of disasm cases. Fixes #74957.
15916 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
15918 * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
15919 jit-icalls.c, mini-codegen.c, Makefile.am: changes in
15920 the generic code needed for the ARM port.
15922 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
15924 * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
15925 inssel-arm.brg: more ARM features and fixes.
15927 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
15929 * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
15930 ARM port work in progress.
15932 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
15934 * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
15936 * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
15938 * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
15940 * inssel.brg (mini_emit_memset): Add support for unaligned access.
15942 * *-ia64.*: Ongoing IA64 work.
15944 * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
15946 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
15948 * TODO: Remove out-of-data todo stuff.
15950 * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
15953 * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
15955 * mini.h: Bump corlib version.
15957 2005-07-27 Martin Baulig <martin@ximian.com>
15960 (create_copy_ins): Added `const unsigned char *ip' argument; set
15961 `copy->cil_code' from it.
15963 2005-07-27 Martin Baulig <martin@ximian.com>
15965 * mini-exceptions.c (mono_handle_exception): Don't call
15966 mono_debugger_handle_exception() for filters.
15968 2005-07-27 Zoltan Varga <vargaz@freemail.hu>
15970 * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
15973 2005-07-26 Martin Baulig <martin@ximian.com>
15975 Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
15977 * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
15978 helper_compile_generic_method() if the method is actually virtual
15981 2005-07-26 Martin Baulig <martin@ximian.com>
15984 (trampoline_code): Renamed to `mono_trampoline_code' and made it
15985 public; this is now accessed directly by the debugger.
15986 (mono_generic_trampoline_code): Removed.
15989 (mono_debug_init_method): Also add interncalls and wrappers.
15991 2005-07-23 Zoltan Varga <vargaz@freemail.hu>
15993 * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
15995 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
15997 * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
15999 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
16001 * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
16003 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
16005 * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
16006 getting TLS offsets on AMD64 too.
16008 2005-07-20 Kornel Pal <kornelpal@hotmail.com>
16010 * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
16012 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
16014 * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
16015 inssel-arm.brg, mini-arm.h: ARM port work in progress.
16017 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
16019 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
16021 * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
16024 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call
16025 mono_sparc_is_virtual_call ().
16027 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
16029 * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
16030 trampoline parameters.
16032 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
16034 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
16035 to mono_arch_get_vcall_slot_addr.
16037 * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
16040 * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
16042 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
16044 * mini-ia64.h mini-ia64.c: Finish pinvoke support.
16046 2005-07-19 Martin Baulig <martin@ximian.com>
16048 * exceptions-amd64.c (throw_exception): Call
16049 mono_debugger_throw_exception() here like we're doing it on i386.
16051 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
16053 * mini-ia64.c: Add optimized TLS access support.
16055 2005-07-18 Zoltan Varga <vargaz@freemail.hu>
16057 * mini-exceptions.c: Ongoing IA64 work.
16059 * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
16061 * mini.c: Use the default optimization set when embedding. Fixes
16064 2005-07-11 Zoltan Varga <vargaz@freemail.hu>
16066 * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts
16067 of trampolines to a separate file.
16069 * mini-trampolines.c: New file.
16071 * mini.h tramp-x86.c: Move arch independent parts of trampolines to a
16074 * tramp-x86.c: Reorganize the trampoline code to be similar to the
16077 * mini-codegen.c: Fix cygwin build.
16079 2005-07-10 Zoltan Varga <vargaz@freemail.hu>
16081 * mini.c: Add some minor changes needed by the IA64 port.
16083 * *-ia64.*: Ongoing IA64 work.
16085 2005-07-09 Zoltan Varga <vargaz@freemail.hu>
16087 * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split
16088 trampolines into arch-independent and arch-dependent parts.
16090 * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
16092 2005-07-08 Zoltan Varga <vargaz@freemail.hu>
16094 * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
16096 * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
16097 the xp-regalloc-branch for amd64.
16099 * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
16100 xp-regalloc-branch for x86.
16102 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
16104 * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
16106 2005-07-06 Martin Baulig <martin@ximian.com>
16109 (mono_jit_compile_method_inner): Call mono_get_inflated_method().
16110 (mono_jit_runtime_invoke): Likewise.
16112 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
16114 * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
16117 * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
16118 without loading their metadata. Reorganize the file format so exception handling+
16119 debug info is kept separate from normal method info. Create MonoJitInfo
16120 structures for methods lazily.
16122 * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
16124 (x86_class_init_trampoline): Patch AOT class init trampolines too.
16126 * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
16128 * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
16131 * mini.h: Bump AOT file version.
16133 2005-07-04 Zoltan Varga <vargaz@freemail.hu>
16135 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
16137 2005-07-01 Raja R Harinath <rharinath@novell.com>
16139 * Makefile.am (check-local): Call semdel-wrapper.
16141 2005-06-29 Zoltan Varga <vargaz@freemail.hu>
16143 * mini-x86.c: Revert the last change as it seems to break the build..
16145 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
16147 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
16149 * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
16151 2005-06-27 Ben Maurer <bmaurer@ximian.com>
16153 * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
16154 outside of the macro, so strange stuff doesn't happen with gcc4
16155 (NEW_AOTCONST_TOKEN): Likewise.
16157 2005-06-28 Martin Baulig <martin@ximian.com>
16159 * mini.c (mini_class_is_system_array): New static method; use this
16160 instead of `klass->parent == mono_defaults.array_class' everywhere
16161 since this also works for the new generic array class.
16163 2005-06-26 Ben Maurer <bmaurer@ximian.com>
16165 * inssel.brg: Remove warnings.
16167 2005-06-24 Zoltan Varga <vargaz@freemail.hu>
16169 * mini-ia64.c: Ongoing IA64 work.
16171 * basic-float.cs: Add float->i1 conversion test.
16173 * iltests.il: Add conv.u4 test.
16175 2005-06-23 Zoltan Varga <vargaz@freemail.hu>
16177 * inssel-long.brg: Fix bug caused by last change.
16179 2005-06-23 Geoff Norton <gnorton@customerdna.com>
16181 * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other
16182 BSDs. Allows the x86 JIT to work on OSX86
16184 2005-06-22 Zoltan Varga <vargaz@freemail.hu>
16186 * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
16189 * mini-ia64.c: Ongoing IA64 work.
16191 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
16193 * mini-ia64.c: Ongoing IA64 work.
16195 * driver.c: Clean up jit_code_hash as well when using --regression.
16197 * inssel-long.brg: Fix long->i4/u4 conversion rules.
16199 * basic-long.cs: Add tests for long->u4 conversion.
16201 2005-06-18 Ben Maurer <bmaurer@ximian.com>
16203 * mini.c: Take mono_get_domainvar out of macros. This makes sure
16204 that we do not depend on undefined C behavior: the order stuff
16205 gets evaluated within an expression. Fixes mono when compiled on
16208 2005-06-18 Zoltan Varga <vargaz@freemail.hu>
16210 * *-ia64.*: Ongoing IA64 work.
16212 * aot.c: Lower memory usage while loading AOT methods.
16214 * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
16216 * mini.h: Bump AOT file format version.
16218 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
16220 * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
16222 2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
16224 * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
16225 not on callee assembly). Fixed some comments.
16227 2005-06-16 Zoltan Varga <vargaz@freemail.hu>
16229 * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
16230 it gets proper disassembly.
16231 (emit_method_info): Remove some dead code.
16233 * mini.c (mini_method_compile): Allways allocate the GOT var in
16234 mono_method_to_ir for emulating opcodes.
16236 2005-06-13 Zoltan Varga <vargaz@freemail.hu>
16238 * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
16239 before freeing the code memory. Fixes #74990.
16241 * objects.cs: Add regression test for #74992.
16243 * liveness.c: Extend live ranges of arguments to the beginning of the
16244 method. Fixes #74992.
16246 * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
16247 so it points into the faulting instruction.
16249 2005-06-12 Zoltan Varga <vargaz@freemail.hu>
16251 * jit-icalls.c (mono_imul_ovf): Add exception handling.
16253 * *-ia64.*: Ongoing IA64 work.
16255 * mini.c (mini_init): Fix signature of mono_delegate_ctor.
16257 2005-06-11 Zoltan Varga <vargaz@freemail.hu>
16259 * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
16261 * *-ia64.*: Ongoing IA64 work.
16263 2005-06-10 Zoltan Varga <vargaz@freemail.hu>
16265 * basic-long.cs: Add tests for add/sub.ovf.
16267 * basic.cs: Add tests for sub.ovf.
16269 * *-ia64.*: Ongoing IA64 work.
16271 2005-06-09 Zoltan Varga <vargaz@freemail.hu>
16273 * *-ia64.*: Ongoing IA64 work.
16275 * basic.cs: Add conv.ovf.i4.un test.
16277 2005-06-09 Massimiliano Mantione <massi@ximian.com>
16279 * mini.c: (remove_block_if_useless) Fixed bug 75061.
16281 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16283 * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
16285 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
16287 * *-ia64.*: Ongoing IA64 work.
16289 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16292 * mini.c: added the ability to toggle trace on/off using SIGUSR2.
16294 2005-06-04 Zoltan Varga <vargaz@freemail.hu>
16296 * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
16298 2005-06-03 Zoltan Varga <vargaz@freemail.hu>
16300 * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
16302 * mini-amd64.c (amd64_patch): Add an assert to check that the destination
16303 of a call is callable by a near call.
16305 2005-05-31 Zoltan Varga <vargaz@freemail.hu>
16307 * mini-ia64.c: Ongoing IA64 work.
16309 2005-05-29 Zoltan Varga <vargaz@freemail.hu>
16311 * genmdesc.c: Make the generated array non-static.
16313 * inssel-long.brg: Fix LSHR_IMM rule.
16315 * *-ia64.*: Ongoing IA64 work.
16317 * *-ia64.*: Ongoing IA64 work.
16319 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
16321 * *-ia64.*: Ongoing IA64 work.
16323 * *-ia64.*: Ongoing IA64 work.
16325 * mini-ia64.c: Ongoing IA64 work.
16327 * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
16329 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
16331 * objects.cs basic-calls.cs: Move some tests to objects.cs.
16333 * objects.cs basic-long.cs: Move some tests to objects.cs.
16335 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
16337 * *-ia64.*: Ongoing IA64 work.
16339 * iltests.il: Add a new test.
16341 * mini.c (mono_method_to_ir): Initialize valuetypes when created using
16342 newobj. Fixes #75042.
16344 2005-05-22 Zoltan Varga <vargaz@freemail.hu>
16346 * *-ia64.*: Ongoing IA64 work.
16348 * *-ia64.*: Ongoing IA64 work.
16350 * *-ia64.*: Ongoing IA64 work.
16352 * basic.cs objects.cs: Move tests accessing static variables as well.
16354 * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
16356 2005-05-21 Zoltan Varga <vargaz@freemail.hu>
16358 * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
16360 * driver.c: Always print failed tests.
16362 * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
16365 * *ia64*: Ongoing IA64 work.
16367 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
16369 * basic.cs: Add tests for add.ovf. Fix warnings.
16371 2005-05-18 Miguel de Icaza <miguel@novell.com>
16373 * driver.c (mono_main): Avoid crash if no argument is passed to
16374 --break; Do not use g_error, but f_printf. And fix all other
16375 ocurrences of the same crash.
16377 2005-05-17 Zoltan Varga <vargaz@freemail.hu>
16379 * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
16380 and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
16383 2005-05-14 Zoltan Varga <vargaz@freemail.hu>
16385 * *-ia64.*: Add beginnings of IA64 backend.
16387 * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.
16389 2005-05-13 Zoltan Varga <vargaz@freemail.hu>
16391 * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
16394 * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
16396 * mini-amd64.c: Fix a warning.
16398 2005-05-10 Zoltan Varga <vargaz@freemail.hu>
16400 * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
16401 in float_neg. Fixes #74897.
16403 * mini-amd64.c (emit_call): Fix another near call bug.
16405 2005-05-06 Sebastien Pouliot <sebastien@ximian.com>
16407 * declsec.c: Keep the appdomain information in the structure. Added a
16408 missing "return FALSE" for Unmanaged if FullTrust is set (or else the
16409 value gets overwritten).
16410 * declsec.h: Set the default MonoArray for the the stack to 6. Added
16411 an MonoAppDomain member to MonoSecurityFrame.
16412 * mini-exceptions.c: Do not use a glist to keep GC allocated objects
16413 used in the stack walk. Now use a MonoArray which grow (double) when
16416 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
16418 * mini.c: Re-enabled runtime cleanup, since running threads should
16419 now properly stop when exiting.
16421 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
16423 * mini-codegen.c: New file contaning the arch-independent local
16424 register allocator. Not used by any architectures yet.
16426 * mini.h linear-scan.c: Merge some changes from the
16427 mini-xp-local-regalloc branch.
16429 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
16431 * mini-amd64.c (emit_call): Fix calls to native functions when the
16432 runtime is compiled as a shared library. Fixes #74756.
16434 * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
16435 on a literal field. Fixes #74751.
16437 2005-04-25 Raja R Harinath <rharinath@novell.com>
16439 * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
16441 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
16443 * objects.cs: Add missing null casting test.
16445 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
16447 * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
16448 in wrapper methods. Also rename 'address' variable to 'offset'.
16450 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
16452 * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
16455 * Makefile.am (MCS): Use -unsafe instead of --unsafe.
16457 * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
16460 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
16462 * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
16464 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
16466 * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
16467 just the last bytes.
16469 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
16471 * aot.c (mono_compile_assembly): Fix warning.
16473 * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
16474 by the _MSC_VER stuff.
16476 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
16478 * inssel-long.brg: Fix #74588.
16480 * cpu-amd64.md: Fix #74591.
16482 * iltests.il: Add new regression tests.
16484 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
16486 * trace.c (mono_trace_enter_method): Print enums as an int, not as a
16489 2005-04-11 Zoltan Varga <vargaz@freemail.hu>
16491 * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
16493 * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches
16494 from Bill Middleton <flashdict@gmail.com>.
16496 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
16498 * arrays.cs: Add new regression test. Fix warnings.
16500 2005-04-09 Zoltan Varga <vargaz@freemail.hu>
16502 * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
16503 and leakage in CKFINITE.
16505 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
16506 this to a null op since it is called on amd64 too.
16508 * exceptions-amd64.c (get_throw_trampoline): Align stack.
16510 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
16511 body since this is not used on amd64.
16513 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
16515 * mini-amd64.c: Remove obsolete fixmes.
16517 * mini.c (print_method_from_ip): Fix debugging support.
16519 2005-2-1 Massimiliano Mantione <massi@ximian.com>
16521 * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
16522 so that expressions that don't give much gain are not reduced.
16523 * ssapre.h: Likewise.
16525 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
16527 * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
16529 * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
16531 * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
16533 2005-04-01 Zoltan Varga <vargaz@freemail.hu>
16535 * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
16537 * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
16539 2005-03-31 Zoltan Varga <vargaz@freemail.hu>
16541 * mini-x86.c: If sigaltstack support is enabled, perform win32 style
16544 * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
16546 * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
16548 * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
16550 * mini-x86.h mini-x86.c exceptions-x86.c: Add support for
16551 MONO_ARCH_USE_SIGACTION. Fixes #74252.
16553 * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
16555 * mini-x86.c: Fix up stack overflow handling.
16557 * exceptions.cs: Add new regression test.
16559 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
16561 * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
16562 mono_jit_thread_attach.
16564 * mini.c (mono_method_to_ir): Verify called method is not abstract.
16566 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
16568 * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
16569 avoid calling constructors using callvirt.
16571 * inssel.brg: Fix #74073.
16573 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
16575 * aot.c, mini.h: Added mono-compiler.h header to allow/ease
16576 compilation with non-GCC compilers.
16577 * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
16578 possible using VS.NET. Adapted from the work of J Lothian (for VC6).
16580 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
16582 * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
16583 klass->interface_offsets (will likely fix bug#74073).
16585 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
16587 * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
16589 2005-03-28 Zoltan Varga <vargaz@freemail.hu>
16591 * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
16592 to amd64_div_reg_size ().
16594 * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
16596 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
16598 * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
16600 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
16602 * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
16604 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
16606 * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
16608 * mini.c (mono_precompile_assembly): Load and precompile referenced
16609 assemblies as well. Fixes #74015.
16611 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
16613 * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
16615 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
16617 * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
16618 a lot of checks and (anyway) permissions cannot work until corlib is
16621 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
16623 * mini-ppc.c: fixed ABI issue on sysv/ppc.
16625 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
16627 * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
16628 calls (fixes bug#72824).
16630 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
16632 * mini.c: fix tail recursion elimination (see test in bug#73936).
16634 2005-03-21 Zoltan Varga <vargaz@freemail.hu>
16636 * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
16637 some fp functions in sse2 mode.
16639 2005-03-20 Zoltan Varga <vargaz@freemail.hu>
16641 * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
16643 2005-03-19 Zoltan Varga <vargaz@freemail.hu>
16645 * mini.h mini.c: Add mono_get_jit_tls_key ().
16647 * mini-x86.c: Enable fast TLS support on windows.
16649 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
16651 * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
16652 * mini.c: Check for p/invoke method when generating code. If a
16653 p/invoke method, or it's class, isn't decorated with [Suppress
16654 UnmanagedCodeSecurity] then generate code to call System.Security.
16655 UnmanagedDemand (only if the security manager is active).
16657 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
16659 * tramp-amd64.c (create_specific_trampoline): Revert parts of the
16660 last change as it seems to cause strange crashes.
16662 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
16664 * *.c: handle unsafe function pointers where needed.
16666 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
16668 * mini.c (mono_jit_free_method): Remove the fixme too.
16670 2005-03-15 Miguel de Icaza <miguel@novell.com>
16672 * mini.c: As discussed, make the code actually free the delegate
16673 thunk now, to enable the debugging of delegate problems, use
16674 MONO_DEBUG=1 when running Mono.
16676 This takes also care of parts of the leaks as seen by Joe.
16678 2005-03-15 Zoltan Varga <vargaz@freemail.hu>
16680 * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable
16681 thread_tls_offset calculation.
16683 2005-03-14 Sebastien Pouliot <sebastien@ximian.com>
16685 * declsec.c: Reworked linkdemand checks for icall. The previous code
16686 was using the declaration code (untrusted) and didn't work as expected
16687 with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
16690 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
16692 * iltests.il: Add new localloc test.
16694 * mini-amd64.c: Handle large stack allocations the same way as on
16695 windows if stack overflow handling is working.
16697 * mini-amd64.c: Allocate the signal stack using mmap.
16699 * mini.c (sigsegv_signal_handler): Fix reading of context.
16701 * mini-exceptions.c: Fix up stack overflow handling.
16703 * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
16705 * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
16707 * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
16709 * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
16711 * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
16712 tramp_init functions as they are no longer needed.
16714 2005-03-12 Zoltan Varga <vargaz@freemail.hu>
16716 * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
16718 * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
16720 * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
16722 * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
16725 * mini-ops.h: Add OP_LMUL_IMM.
16727 * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
16728 long mul/div opcodes as intrinsic.
16730 * mini-amd64.c (emit_call): Handle the case when the callee might be
16733 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
16735 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
16738 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
16740 * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
16742 2005-03-09 Ben Maurer <bmaurer@ximian.com>
16744 * mini.c (mono_codegen): Don't leak here, to help people running
16747 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
16749 * mini-amd64.c (mono_arch_output_basic_block): Fix int->float
16750 conversions in sse2 mode.
16752 * basic-float.cs: Add regression test.
16754 * mini-amd64.c: Reenable sse2.
16756 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
16758 * mini-amd64.c: Disable sse2 until some regressions are fixed.
16760 2005-03-07 Joerg Rosenkranz <joergr@voelcker.com>
16762 * driver.c: Copyright text should include 2005.
16764 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
16766 * cpu-amd64.md (load_membase): Fix more max lengths.
16768 2005-03-06 Zoltan Varga <vargaz@freemail.hu>
16770 * cpu-amd64.md (load_membase): Fix max length.
16772 * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
16774 * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
16776 * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
16777 support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
16779 * basic-float.cs: Add rounding regression test.
16781 * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
16783 2005-03-04 Neale Ferguson <NealeFerguson@earthlink.net>
16785 * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
16786 structures in registers for pinvoke wrappers.
16788 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
16790 * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
16792 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
16794 * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
16795 wrapper to mono_jit_thread_attach.
16797 * mini.c (mini_jit_thread_attach): New jit icall.
16799 * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in
16800 native->managed wrappers.
16802 * exceptions.cs: Add new regression test.
16804 * mini.c (optimize_branches): Check regions in the cbranch to throw
16805 block case as well. Fixes #73242.
16807 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
16809 * mini.c: thread safety fixes.
16811 2005-02-27 Zoltan Varga <vargaz@freemail.hu>
16813 * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
16814 patching stuff, since delegates use jump trampolines so there is
16817 * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in
16820 * tramp-amd64.c: Fix build.
16822 * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
16823 it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
16825 * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
16826 Rename this to mono_arch....
16827 (mono_amd64_get_delegate_method_ptr_addr): Ditto.
16829 * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
16831 * mini-amd64.c (emit_call): If both the caller and the callee is
16832 guaranteed to have 32 bit addresses, emit a normal call.
16834 * tramp-amd64.c: Adapt to changes in mini-amd64.c.
16836 * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines.
16837 * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
16838 method_ptr inside delegates.
16840 2005-02-26 Zoltan Varga <vargaz@freemail.hu>
16842 * mini.c (mono_jit_free_method): Free the method info even if the native code is
16843 invalidated. Fixes #73001.
16845 * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
16847 * mini-x86.c: Only use stdcall for pinvokes on windows.
16849 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
16851 * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
16852 * mini-x86.c: remove unreliable __thread var offset detection,
16853 use the correct accessors and enable by default.
16855 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
16857 * mini.c (mono_jit_free_method): Fix memory leak.
16859 2005-02-22 Zoltan Varga <vargaz@freemail.hu>
16861 * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW.
16863 2005-02-21 Zoltan Varga <vargaz@freemail.hu>
16865 * cpu-amd64.md: Fix lengths of atomic opcodes.
16867 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
16869 * driver.c: try to not imply using ICU is any good.
16871 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
16873 * mini-amd64.c (mono_arch_get_inst_for_method): Implement more
16874 functions as inline ops.
16876 * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
16877 some Interlocked functions as inline ops.
16879 * mini.c (move_basic_block_to_end): Fix bug in last patch.
16881 * mini.h (MonoBasicBlock): Reorganize fields a bit.
16883 * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
16885 * mini.c: Add support for OP_NOT_TAKEN.
16887 * mini-amd64.h mini-amd64.c: Add support for passing/returning small
16888 structures in registers for pinvoke wrappers.
16890 * mini-amd64.c: Fix warnings.
16892 2005-02-19 Zoltan Varga <vargaz@freemail.hu>
16894 * mini.h (MonoCompile): Add 'ret_var_is_local' field.
16896 * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
16898 * mini.c (NEW_RETLOADA): If the ret variable is a local, use its
16899 address instead of loading the address from it.
16901 * mini-x86.c: Add support for returning small structs in registers
16902 on Win32. Fixes part of #70864.
16904 2005-02-18 Zoltan Varga <vargaz@freemail.hu>
16906 * trace.c (get_token): Improve error checking.
16908 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
16910 * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
16912 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
16914 * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
16915 it can be reused for MonoClass.
16916 * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
16919 2005-02-15 Sebastien Pouliot <sebastien@ximian.com>
16921 * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code
16922 instead of a MonoReflectionMethod. The method information wasn't used
16923 when displaying SecurityException details (but will be now).
16925 2005-02-15 Atsushi Enomoto <atsushi@ximian.com>
16927 * Makefile.am : windows build fix.
16929 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
16931 * iltests.il: Add new regression test.
16933 * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
16936 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
16938 * mini.c: Moved linkdemand check into helper function check_linkdemand
16939 to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP,
16942 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
16944 * declsec.c: Added statistics counter for different kinds of
16946 * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
16947 (and commented) declaration.
16948 * mini.c: Added statistics counter for security Demand code
16949 generation. Added display of security statistics.
16951 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
16953 * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
16954 Fix compilation errors under gcc-2.95.
16956 2005-02-12 Ben Maurer <bmaurer@ximian.com>
16958 * mini.c, driver.c: Use the new jit trampoline hashtable
16960 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
16962 * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
16964 2005-02-11 Martin Baulig <martin@ximian.com>
16966 * debug-mini.c (mono_debug_close_method): Free the line number array.
16968 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
16970 * aot.c: Break up large methods into smaller ones. Share GOT slots for
16973 * mini.h: Bump AOT file format version.
16975 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
16977 * declsec.c: Added LinkDemand support and it's special cases for ECMA,
16979 * declsec.h: Added macros to get/set lazyly initialized security
16980 informations about assemblies. Added new enum for different type of
16981 possible LinkDemand violation. Added function to check LinkDemands.
16982 * mini.h: Added a field to MonoCompile to hold any security violation
16983 detected when JITting a method (so it can be thrown later).
16984 * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL
16985 and CEE_CALLVIRT. Added code to throw exception at the end of
16986 mini_method_compile (note: the exception is unhandled right now).
16988 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
16990 * mini.c, jit-icalls.c: use the managed implementation of
16991 memset for initobj and memset, to avoid managed <-> unmanaged
16994 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
16996 * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
16997 optimization if it would need a GOT var.
16999 * basic.cs: Add tests for constant propagation and switch statements.
17001 * ssa.c: Fix out-of-range constant propagation and switch statements.
17003 2005-02-09 <vargaz@freemail.hu>
17005 * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
17007 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
17009 * cpu-amd64.md (load_membase): Fix max length of load_membase.
17011 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
17013 * mini.c: update to new signature of mono_class_get_allocation_ftn().
17015 2005-02-06 Neale Ferguson <NealeFerguson@earthlink.net>
17017 * cpu-s390.md, mini-s390.c: Correct bug with register usage on certain
17018 arithmetic operations.
17020 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
17022 * mini-ppc.c: add a workaround for broken user code that
17023 DllImports vararg functions with non-vararg signatures.
17025 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
17027 * mini.c (mono_jit_compile_method_inner): Add detection and a
17028 meaningfull error message for assemblies written in Managed C++.
17030 * tramp-amd64.c mini-amd64.h: Add support for
17031 create_trampoline_from_token ().
17033 * aot.c mini-x86.c abcremoval.c: Applied patch from
17034 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
17036 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
17038 * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline
17039 which takes a MonoImage/token as parameter instead of a MonoMethod.
17041 * aot.c: Use the new trampoline for initializing vtables.
17043 * aot.c: Add support for ldfld/stfld_remote wrappers.
17045 * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
17046 rules for compare <MEM>, IMM.
17048 * mini.h (MONO_AOT_FILE_VERSION): Bump it.
17050 * aot.c: Handle inherited finalizers correctly.
17052 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
17054 * inssel.brg (stmt): Add a missing _setup_... ().
17056 * aot.c: Save some parts of the class state to the AOT file and use it
17057 to recompute that state when a class is initialized.
17059 * mini.c: Install AOT hooks into the runtime.
17061 * mini.h: Bump AOT file format version.
17063 * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
17066 * iltests.il: Add new test.
17068 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
17070 * mini.c: fix typo.
17072 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
17074 * mini.c: setup the statistical profiler in the thread attach
17075 callback to cope with the new single thread code.
17077 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
17079 * mini-ppc.c: ensure we have enough room for the profiler
17080 calls (fixed bug#72084).
17082 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
17084 * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding
17087 2005-2-1 Massimiliano Mantione <massi@ximian.com>
17089 * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
17091 2005-2-1 Massimiliano Mantione <massi@ximian.com>
17093 * ssapre.c: Fixed an issue with down safety (this allows IronPython
17094 to succesfully execute parrotbench).
17095 * ssapre.h: Likewise.
17097 2005-2-1 Massimiliano Mantione <massi@ximian.com>
17099 * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
17100 variable for stores to method arguments (fixes a SSAPRE issue).
17102 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
17104 * mini.c: handle value types in dup, fixes gen-112.cs.
17106 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
17108 * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
17109 sequence for calls in dynamic methods to avoid thunks.
17111 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
17113 * mini.c: correctly remove dynamic methods from the hashtable.
17115 2005-1-20 Massimiliano Mantione <massi@ximian.com>
17117 * driver.c: Disabled SSAPRE until fix the bug that appears
17118 in IronPython's parrotbench.
17120 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
17122 * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
17124 * mini.c (mono_method_to_ir): Revert the previous change.
17126 * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
17127 when AOT compiling.
17129 * tramp-x86.c (x86_magic_trampoline): Avoid calls to
17130 mono_jit_info_table_find () etc. when running under valgrind.
17132 * inssel.brg: Fix warnings.
17134 * mini-exceptions.c: Fix warnings.
17136 2005-01-31 Martin Baulig <martin@ximian.com>
17138 * driver.c (compile_all_methods_thread_main): Don't try to compile
17139 generic methods or anything which has type parameters.
17141 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
17143 * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
17145 * TestDriver.cs: Add --verbose flags.
17147 * graph.c ssa.c: Fix 64 bit warnings.
17149 * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c
17150 trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
17151 Fix 64 bit warnings.
17153 * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
17154 variable not spotted by gcc.
17156 * mini-amd64.c inssel-amd64.brg: Applied patch from
17157 Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of
17158 X86_COMPARE_MEMBASE opcodes.
17160 * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
17162 2005-01-29 Ben Maurer <bmaurer@ximian.com>
17164 * *: MonoMethod->signature might be NULL now. You *MUST* use
17165 mono_method_signature.
17167 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
17169 * driver.c (compile_all_methods_thread_main): Compile the methods
17170 without invoking cctors.
17172 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
17174 * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
17175 * basic-calls.cs: test for the above.
17177 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
17179 * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after
17180 MonoJitInfo changes.
17182 2005-01-27 Zoltan Varga <vargaz@freemail.hu>
17184 * mini-exceptions.c (mono_handle_exception): Compute the stack trace
17185 eagerly if it contains dynamic methods.
17187 * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
17189 * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
17190 trace, it is now computed by an icall from trace_ips.
17192 * mini-exceptions.c: Fix a warning.
17194 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
17196 * mini-exceptions.c: don't bother getting stack trace info if
17197 it's not going to be used.
17199 2005-01-27 Raja R Harinath <rharinath@novell.com>
17201 * Makefile.am (common_sources): Add ssapre-cee-ops.h and
17204 2005-01-26 Zoltan Varga <vargaz@freemail.hu>
17206 * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
17208 * aot.c: Avoid calling mono_method_get_header () if not needed.
17210 * mini.h: Bump AOT file format version.
17212 * mini.c (mono_emit_native_call): Allocate a GOT var here.
17214 * mini.c (mono_print_tree): Print more info for calls.
17216 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
17218 * declsec.h: Remove warning by adding missing include for marshal.h
17220 2005-01-26 Martin Baulig <martin@ximian.com>
17222 * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
17225 2005-01-25 Zoltan Varga <vargaz@freemail.hu>
17227 * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
17230 * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
17232 * aot.c (mono_compile_assembly): Fix a warning.
17234 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
17236 * declsec.c: Look for security attributes on the original MonoMethod
17237 (and not the wrapped one). This fix permissions on icalls.
17239 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
17241 * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
17243 * mini.c (mono_allocate_stack_slots): Add a fixme.
17245 * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
17247 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
17249 * inssel.brg: optimize casts of sealed types (more
17250 optimizations waiting for fixes in remoting).
17252 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
17254 * inssel.brg (stmt): Add another dummy rule.
17256 * driver.c: Fix warnings.
17258 * driver.c (mono_main): If running under valgrind, instruct glib to use
17259 the system allocation functions so valgrind can track the memory
17260 allocated by the g_... functions.
17262 * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
17264 * mini-ops.h: Add OP_DUMMY_STORE opcode.
17266 * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
17268 * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
17269 variables in try regions.
17271 * mini.c (mini_method_compile): Don't disable optimizations on large
17272 methods when AOT compiling.
17274 * mini.c (mono_allocate_stack_slots): New arch independent method to
17275 allocate stack slots. Not yet used.
17277 2005-01-22 Ben Maurer <bmaurer@ximian.com>
17279 * debug-mini.c (mono_debug_close_method): Plug some leaks.
17281 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
17283 * mini-ppc.c: make the branch info relative as the code
17284 buffer can be reallocated.
17286 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
17288 * aot.c: Allow decoding of the new MONO_PATCH_INFO_DECLSEC.
17289 * driver.c: Removed the AOT/security restriction. Now initialize the
17290 security manager (in metadata) if --security is used.
17291 * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
17292 rather than the pointer to declarative security, when AOT is used.
17294 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
17296 * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
17297 basic blocks, reduced intrinsic exception throwing code size.
17299 2005-01-22 Miguel de Icaza <miguel@ximian.com>
17301 * driver.c (mini_usage): Reorder the usage screen.
17303 2005-01-21 Zoltan Varga <vargaz@freemail.hu>
17305 * mini.c (mono_resolve_patch_target): Fix warning.
17307 2005-01-20 Zoltan Varga <vargaz@freemail.hu>
17309 * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
17312 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
17314 * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
17315 breaks the amd64 build.
17317 * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem
17318 register allocation. Fixes #71454.
17320 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
17322 * arrays.cs: Add new regression test.
17324 2005-1-20 Massimiliano Mantione <massi@ximian.com>
17326 * ssapre.c: Turned usage of snprintf to GString.
17327 * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
17328 (I left it on by mistake in my previous commit).
17330 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
17332 * mini.c, cfold.c, basic-calls.cs: preserve side effects
17333 on cond branch optimization (fixes bug# 71515).
17335 2005-1-20 Massimiliano Mantione <massi@ximian.com>
17337 * abcremoval.c: Fixed bug 71062.
17338 * abcremoval.h: Likewise.
17340 2005-1-20 Massimiliano Mantione <massi@ximian.com>
17342 * mini.c: Added a new functionality to optimize_branches, the removal
17343 of useless basic blocks, and fixed some problem in the removal of
17344 critical edges; some utility functions added for both purposes.
17345 * ssapre.c: Added complex expression support, and fixed bug 70637.
17346 * ssapre.h: Likewise.
17347 * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
17349 * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
17350 * driver.c: Re-enabled SSAPRE.
17352 2005-01-19 Martin Baulig <martin@ximian.com>
17354 * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
17355 the result of mono_get_method_constrained().
17357 2005-01-18 Neale Ferguson <NealeFerguson@earthlink.net>
17359 * exceptions-s390.c tramp-s390.c: Allocate code using the global code
17362 2005-01-18 Geoff Norton <gnorton@customerdna.com>
17364 * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
17365 be detected. Fixes #59296.
17367 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
17369 * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
17370 which can happen. Fixes #71361.
17372 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
17374 * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
17377 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
17379 * mini.c (mono_create_jump_trampoline): Revert last change as it causes
17380 appdomain-unload.exe to fail.
17382 * mini.c: Fix some memory leaks.
17384 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
17386 * inssel.brg: handle the new size of rank, idepth, max_interface_id.
17387 Fixed bug and sped up some codepaths.
17389 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
17391 * mini.c: Fix some memory leaks.
17393 * exceptions.cs basic-long.cs: Add test for checked ulong->int
17396 * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
17398 * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
17401 * iltests.il: Add regression test for #71320.
17403 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
17405 * mini.c (mono_codegen): Fix installation of profiler hooks.
17407 * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
17409 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
17411 * mini.h, mini.c, cfold.c: optimize access to enum
17412 readonly fields, too. Eval conditional branches if possible
17413 to perform unreachable code removal in more cases.
17415 2005-01-15 Zoltan Varga <vargaz@freemail.hu>
17417 * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
17419 * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
17422 * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
17423 WinXP DEP. Fixes #71244.
17425 2005-01-14 Zoltan Varga <vargaz@freemail.hu>
17427 * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
17429 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
17431 * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
17433 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
17435 * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo
17438 * mini.h: Bump AOT version.
17440 * mini.h (MonoCompile): Change exvar to a hash table.
17442 * mini.c: Allocate a separate exvar for each handler block.
17444 * mini.c: Get rid of the computation of filter_lengths, its not needed.
17446 * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
17447 ex var with the pending exception and only throw if the two are equal.
17450 * exceptions.cs: Add tests for rethrow and nested catch clauses.
17452 * mini-x86.c: Fix warnings.
17454 * Makefile.am (common_sources): Move mini-exceptions.c here as it is
17455 used by all the ports now.
17457 * aot.c: Add write-symbols and save-temps options.
17459 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
17461 * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
17463 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
17465 * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx
17468 * tramp-s390.c: Check vtable slot belongs to the domain.
17470 * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
17471 as per other platforms.
17473 * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
17475 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
17477 * driver.c: we don't run the Main() code in a subthread anymore.
17479 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
17481 * mini.c: added experimental rtc support in the statistical
17482 profiler: if the user has the permission, more accurate statistics
17483 are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
17484 The MONO_RTC value must be restricted to what the linux rtc allows:
17485 power of two from 64 to 8192 Hz.
17487 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
17489 * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
17491 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
17493 * mini-ppc.c: better icache flush for smp.
17495 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
17497 * mini-amd64.c (emit_move_return_value): Fix memory leak.
17499 * mini-x86.c (get_call_info): Add the get_call_info () code from the
17500 amd64 port, not yet used.
17502 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
17504 * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
17507 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
17509 * driver.c: Added --security option to activate the security manager.
17510 Right now this will allow code generation for declarative demands and
17511 is disabled when AOT is specified.
17512 * mini.c: Add code generation for declarative security demands.
17513 * mini.h: Add mono_use_security_manager as an extern gboolean.
17515 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
17517 * aot.c (mono_compile_assembly): Speed up compilation a bit by
17518 emitting more dense assembly code.
17520 * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
17521 exception throwing stuff.
17523 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
17525 * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
17528 * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
17529 left in by mistake.
17531 * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is
17534 * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
17536 * tramp-*.c: Only patch vtable slots if the object is in the current
17537 domain. Fixes appdomain-unload.exe.
17539 * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
17541 * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
17544 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
17546 * mini.c (reverse_branch_op): New helper function.
17548 * mini.c (optimize_branches): Run the new optimization only on
17549 platforms which support it. Also reverse all kinds of branches.
17551 * mini.h (MonoBasicBlock): Add 'out_of_line' field.
17553 * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
17556 * mini.c (optimize_branches): Reverse not-equals branches if the false
17557 bblock is a throw. This happens a lot of time with argument checking in
17560 * mini.c (mono_codegen): Add support for placing basic blocks after
17561 the function epilogue.
17563 * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
17566 2005-01-05 Miguel de Icaza <miguel@ximian.com>
17568 * mini.c (setup_stat_profiler): Only set this up if the platform
17569 supports ITIMER_PROF.
17571 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
17573 * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
17576 * inssel.brg: Fix a warning.
17578 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
17580 * mini.c: added support for statistical profiler
17581 (run with: --profile=default:stat).
17583 2005-01-04 Zoltan Varga <vargaz@freemail.hu>
17585 * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
17587 * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
17589 * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes
17590 related to global registers from the amd64 port.
17592 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
17594 * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
17596 * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
17597 with global registers.
17598 (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
17600 * aot.c (emit_method_code): Fix the 'method emitted as' messages.
17602 2004-12-31 Zoltan Varga <vargaz@freemail.hu>
17604 * debug-mini.c (encode_value): Fix off-by-one.
17606 * aot.c (encode_value): Likewise.
17608 * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
17610 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
17612 * mini.c linear-scan.c: Add a workaround for the mcs crash when using
17615 * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
17617 * aot.c (emit_method_info): Increase size of temp buffer.
17619 * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in
17622 2004-12-28 Zoltan Varga <vargaz@freemail.hu>
17624 * aot.c (emit_method_info): Fix build.
17626 * aot.c: Further rework of the AOT file format to reduce the size of
17627 the method info data.
17629 * mini.h: Bump AOT file format version.
17631 2004-12-27 Martin Baulig <martin@ximian.com>
17633 * mini.c (mini_get_method): New static method; call
17634 mono_get_method_full() and mono_get_inflated_method().
17635 (mono_method_to_ir): Use mini_get_method() instead of
17636 mono_get_method_full().
17638 2004-12-26 Patrik Torstensson <patrik.torstensson@gmail.com>
17640 * mini-x86.c (atomic ops): fixed bug interlocked bug #70784.
17642 2004-12-25 Zoltan Varga <vargaz@freemail.hu>
17644 * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
17646 * inssel-amd64.brg: Add some optimization rules.
17648 2004-12-24 Ben Maurer <bmaurer@ximian.com>
17650 * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
17651 standard not GC'd stuff is fine.
17653 2004-12-24 Zoltan Varga <vargaz@freemail.hu>
17655 * aot.c: Rework the AOT file format to get rid of most of the global
17656 symbols. This reduces the size of the mscorlib.dll.so by 1MB.
17658 * mini.h: Bump AOT file format version.
17660 2004-12-23 Zoltan Varga <vargaz@freemail.hu>
17662 * mini.h: Bump AOT file format version.
17664 * aot.c (mono_aot_is_got_entry): New function to determine if an
17665 address is inside a GOT.
17667 * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
17669 * cpu-pentium.md: Increase the maximum size of some instructions which
17670 might involve a got access.
17672 * mini.c (get_method_from_ip): Another debug helper function.
17674 * mini.c: Call mono_get_got_var () in a couple places. Handle the case
17675 when got var accesses are created during the decompose phase.
17677 * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
17679 * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
17680 argument mini_compile_method and to MonoCompile, and use this to
17681 determine whenever a given method is compiled for AOT. This allows the
17682 other methods compiled during AOT compilation to be free of AOT stuff,
17683 so the backends does not need to add special support for them by
17684 creating a fake GOT etc.
17686 * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
17689 2004-12-21 Ben Maurer <bmaurer@ximian.com>
17691 * mini.c (mono_method_to_ir): It turns out that some of the
17692 x-appdomain wrappers are lax with types, so just ignore this for
17695 * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
17696 at the vtable->klass. If it is non-shared code we can just use the
17699 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
17701 * mini-ppc.c: access MonoDomain from tls, too.
17703 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
17705 * declsec.c: Removed unused variable (and related warning ;-)
17707 2004-12-21 Ben Maurer <bmaurer@ximian.com>
17709 * iltests.il: New test for LDELEMA on an array of ref types.
17711 * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
17712 all ldelema's on reftypes.
17713 (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
17714 it was the wrong place to put it.
17716 * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
17717 register to pop to make this cleaner, at the request of Paolo.
17719 2004-12-20 Ben Maurer <bmaurer@ximian.com>
17721 * mini-ops.h (OP_GETHASHCODE): New op.
17723 * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
17725 * mini.c (mini_get_inst_for_method): Create the intrinsic hash
17728 For a microbenchmark, this reduces the cost of Hashtable.get_Item
17731 * mini-x86.c (mono_arch_output_basic_block): Rather than
17739 The first is 3 bytes while the second is 1. This saves 36 kb on
17740 mscorlib, quite a big saving. When bootstraping mcs, I was able to
17741 see a small boost because of icache locality.
17743 * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
17745 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
17747 * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
17748 started code sharing with the generic code.
17750 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
17752 * mini-ppc.c, cpu-g4.md: added code for direct access to
17755 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
17757 * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
17758 mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
17761 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
17763 * declsec.c|h: Added functions to cache the declarative stack modifiers
17764 in MonoJitInfo and to create a security frame from a MonoJitInfo
17766 * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
17767 created. Register internal calls for System.Security.SecurityFrame::
17768 _GetSecurityFrame and _GetSecurityStack.
17769 * mini.h: Added definition for new icalls (in mini-exceptions.c) and
17770 the definitions for the new stack walk/callback mechanism.
17771 * mini-exceptions.c: Added internal call GetSecurityFrame (to get the
17772 first security frame for LinkDemands and InheritanceDemands) and
17773 GetSecurityStack for Demands. Both use the new mono_walk_stack code
17775 * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
17776 walk initialization (lupus).
17778 2004-12-20 Ben Maurer <bmaurer@ximian.com>
17780 * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
17782 (handle_loaded_temps): Do not create a temporary variable for
17783 things that we know are temps. They will never be modified.
17784 (mono_spill_call): Set MONO_INST_IS_TEMP
17785 (mono_emulate_opcode): ditto
17787 (mono_method_to_ir.CEE_DUP): ditto
17789 2004-12-19 Ben Maurer <bmaurer@ximian.com>
17791 * mini.c (type_to_eval_stack_type): Make this handle the void type
17792 (mono_emit_call_args): set the call->type with type_to_eval_stack_type
17793 (emit_tree): use ip_in_bb to special case some common idioms
17794 Update all callers to pass in the IP.
17795 (mono_method_to_ir): Make CEE_CALL* do the above as well.
17797 This gives us a nice 2% speedup in mcs bootstrap.
17799 * mini-x86.c (peephole_pass): Peephole pass to make
17808 * mini.c (ip_in_bb): new method.
17809 (mono_method_to_ir): use this method rather than doing the hash
17812 * linear-scan.c (mono_linear_scan): When expiring actives, you
17813 don't need to keep around variables that expire on this
17814 instruction. This makes it so that:
17817 store (ebx add (ebx, 1))
17821 2004-12-19 Zoltan Varga <vargaz@freemail.hu>
17823 * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc
17824 combination to avoid doing two copies. Fix up problems with previous
17827 * mini.c: Fix 64 bit warnings.
17829 * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
17831 2004-12-17 Zoltan Varga <vargaz@freemail.hu>
17833 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
17834 changes from the x86 code.
17836 * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
17838 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
17840 * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
17841 throwing code to reduce its size, unify the AOT and non-aot code and
17842 get rid of relocations in the AOT case.
17844 * mini-x86.h mini.c exceptions-x86.c
17845 (mono_arch_get_throw_corlib_exception): New arch specific function to
17846 raise corlib exceptions which doesn't require relocations in the
17849 * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
17851 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
17853 * mini.c (mono_emit_method_call): Only allocate the got var when it is
17856 * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
17859 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
17861 * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
17862 with add function when used from Inc/dec atomic
17863 functions. Re-enabled optimization on x86.
17864 * mini-ops.h: renamed atomic_add functions to
17865 allow _add to match the Interlocked::Add and
17866 _add_next to match Interlocked::Inc/Dec.
17868 2004-12-15 Massimiliano Mantione <massi@ximian.com>
17870 * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
17871 linking of BBs to the end BB, and enabled SSAPRE also with
17872 consprop and copyprop (which was prevented by that bug).
17874 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
17876 * mini-x86.c: disabling the Interlocked optimizing code.
17878 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
17880 * aot.c (load_aot_module): Move reading of got_addr after the AOT
17881 file version check.
17883 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
17885 * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm
17886 interlocked optimization due lack of support on x86, rewrote
17887 exchange to take into account that base may be in eax.
17889 xsp works again; activated Interlocked optimizing code.
17891 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
17893 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
17895 2004-12-13 Zoltan Varga <vargaz@freemail.hu>
17897 * mini-ops.h: Add new opcodes.
17899 * mini.h: Add new patch types. Add got_var to MonoCompile.
17901 * mini.h mini-x86.c mini-amd64.c aot.c: Rename
17902 mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
17903 make it work with all kinds of patchable code.
17905 * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
17906 address of the GOT, and referencing entries in the GOT.
17908 * mini.c: Add code to load the GOT address if needed by an opcode.
17910 * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position
17911 independent AOT code on the x86 using an elf-style Global Offset Table.
17913 2004-12-14 Raja R Harinath <rharinath@novell.com>
17915 * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
17917 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17919 * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
17922 2004-12-13 Patrik Torstensson <patrik.torstensson@gmail.com>
17924 * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
17925 of Interlocked:Increment/Decrement/Add as inline ops.
17926 (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
17928 2004-12-12 Geoff Norton <gnorton@customerdna.com>
17930 * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
17931 * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
17933 2004-12-12 Duncan Mak <duncan@ximian.com>
17935 * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
17936 again. `patch_info->table_size' is no longer valid after Zoltan's
17939 2004-12-12 Martin Baulig <martin@ximian.com>
17941 * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
17942 if we are the "real" method, ie. not an inlined method inside it.
17944 2004-12-11 Ben Maurer <bmaurer@ximian.com>
17946 * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
17947 before we look in the special fields table. This fixes
17948 ../tests/thread-static-init.cs.
17950 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17952 * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
17953 for Array get_Rank and get_Length. Fixes bug #70465.
17955 2004-12-11 Zoltan Varga <vargaz@freemail.hu>
17957 * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
17958 separate structure to reduce the size of MonoJumpInfo.
17960 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
17962 * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
17964 2004-12-10 Patrik Torstensson <patrik.torstensson@gmail.com>
17966 * mini.c (mini_get_inst_for_method): Changed to allow ports
17967 to return a MonoInst instead of opcode
17968 (renamed mini_get_opcode_for_method to better reflect the new functionality)
17970 * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method):
17971 Allow ports to return a created MonoInst instead of op-code, will enable
17973 (renamed mini_get_opcode_for_method to better reflected the functionality)
17975 2004-12-09 Zoltan Varga <vargaz@freemail.hu>
17977 * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
17979 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
17981 * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
17984 2004-12-08 Martin Baulig <martin@ximian.com>
17986 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
17987 if we're a CEE_CONSTRAINED call. Fixes gen-118.cs.
17989 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
17991 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
17994 * exceptions.cs: Disable some tests which depend on properties of x86 fp
17997 2004-12-08 Raja R Harinath <rharinath@novell.com>
17999 * Makefile.am (CLEANFILES): Add *.exe, *.dll.
18001 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
18003 * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
18004 bug introduced by the previous patch.
18006 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
18008 * mini-ppc.c, objectc.cs: handle large structs passed by value
18009 (fixes bug #69972).
18011 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
18013 * mini-ppc.c: OP_ARGLIST implementation from
18014 Geoff Norton <gnorton@customerdna.com>.
18016 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
18018 * inssel-x86.brg, inssel-ppc.brg: fix reference to register
18019 in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
18021 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
18023 * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
18025 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18027 * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
18030 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
18032 * mini-sparc.c: Zero out localled-ed memory.
18034 * iltests.il: Add tests for zeroing out localloc-ed memory.
18036 2004-12-04 Martin Baulig <martin@ximian.com>
18038 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
18039 mono_method_get_signature_full().
18041 2004-12-03 Massimiliano Mantione <massi@ximian.com>
18043 * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
18044 and some utility functions (always for SSAPRE), integrated SSAPRE.
18045 * mini.h: Likewise.
18046 * driver.c: Added ssapre option.
18047 * ssa.c: Small fix on OP_ARG handling.
18048 * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
18049 * Makefile.am: Likewise.
18051 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
18053 * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
18054 now in the xp code.
18056 * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
18059 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18061 * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
18063 * cpu-s390.md : Increase instruction length of oparglist.
18065 * mini-s390.c : Implement vararg and TYPEDEBYREF support.
18067 2004-11-30 Martin Baulig <martin@ximian.com>
18069 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
18070 virtual generic methods. We call a special helper_compile_generic_method()
18071 icall to retrieve the method from the vtable, inflate and compile
18072 it and then do a CEE_CALLI. Thanks a lot to Paolo for this idea.
18074 * jit-icalls.c (helper_compile_generic_method): New JIT icall.
18076 2004-11-30 Zoltan Varga <vargaz@freemail.hu>
18078 * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
18080 2004-11-29 Zoltan Varga <vargaz@freemail.hu>
18082 * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
18085 2004-11-27 Ben Maurer <bmaurer@ximian.com>
18087 * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
18088 platforms with PIC aot.
18090 2004-11-28 Martin Baulig <martin@ximian.com>
18092 * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
18095 2004-11-28 Martin Baulig <martin@ximian.com>
18097 * mini-x86.c (mono_arch_call_opcode): Use the original type, not
18098 the result of mono_type_get_underlying_type() to check whether
18101 2004-11-26 Martin Baulig <martin@ximian.com>
18104 (mono_method_to_ir): Use `!method->signature->has_type_parameters'
18107 2004-11-26 Zoltan Varga <vargaz@freemail.hu>
18109 * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
18110 the same way as the other arguments so they won't get clobbered.
18112 * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual
18113 calls through R11 since it is clobbered by the trampoline code.
18115 2004-11-26 Raja R Harinath <rharinath@novell.com>
18117 * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
18118 pick up in-tree mscorlib.dll.
18120 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
18122 * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
18124 * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to
18125 runtime data/code are now stored in a table similar to the GOT in ELF.
18126 This allows the code itself to be position independent.
18128 * aot.c: Fix loading of referenced assemblies after the lazy assembly
18131 * aot.c: Attach ELF type (object/function) directives to all global
18134 * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
18136 * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
18138 * mini-amd64.h: Turn on PIC AOT code.
18140 * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
18141 returning the offset within an OP_AOTCONST instruction where the GOT
18142 offset needs to be added.
18144 * mini.h: Bump AOT file format version.
18146 2004-11-25 Martin Baulig <martin@ximian.com>
18148 * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
18149 uninflated generic methods.
18151 2004-11-25 Martin Baulig <martin@ximian.com>
18153 * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
18155 2004-11-24 Martin Baulig <martin@ximian.com>
18157 * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
18158 original klass (this only applies for generic instances).
18160 2004-11-24 Martin Baulig <martin@ximian.com>
18162 * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
18163 `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
18166 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
18168 * mini.c (mono_method_to_ir): Disable inlining for methods containing
18169 localloc. Fixes #69678.
18171 * iltests.il (test_0_localloc_inline): Add regression test for #69678.
18173 2004-11-23 Zoltan Varga <vargaz@freemail.hu>
18175 * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
18176 used SSE registers on pinvoke calls. Fixes #69774.
18178 2004-11-23 Geoff Norton <gnorton@customerdna.com>
18180 * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
18181 vt->inst_vtype->data.klass. This fixes generic structs and bug #69766
18183 2004-11-23 Raja R Harinath <rharinath@novell.com>
18185 * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
18186 Refer directly to the mcs/ tree.
18188 2004-11-19 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18190 * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
18191 Check if a trampoline for a synchronized method is required.
18193 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
18195 * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
18196 with localloc if needed. Throe arithmetric exception in
18197 div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
18198 Adapted from a patch by Geoff Norton <gnorton@customerdna.com>.
18200 2004-11-19 Geoff Norton <gnorton@customerdna.com>
18202 * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
18203 types before switching on type. Fixes #69622.
18205 2004-11-19 Raja R Harinath <rharinath@novell.com>
18207 * Makefile.am (check-local): New. Integrate into 'make check'.
18208 (MCS,RUNTIME): Define using in-tree mono and mcs.
18210 (%.exe): Use $(ILASM).
18212 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
18214 * mini-ppc.c: adjust initial prolog size (bug #69691).
18216 2004-11-18 Zoltan Varga <vargaz@freemail.hu>
18218 * cpu-pentium.md (localloc): Increase max instruction len. Fixes
18221 2004-11-17 Raja R Harinath <rharinath@novell.com>
18223 * Makefile.am (clean-local): Rename from 'clean'.
18225 2004-11-15 Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18227 * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
18228 to mono_arch_is_int_overflow.
18229 * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
18232 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
18234 * declsec.c|h: New files to support declarative security attributes.
18235 Added function to check if a method has (applicable) security.
18236 * mini.c|h: Add check for declarative security attributes in
18237 mono_method_check_inlining.
18238 * Makefile.am: Added declsec.c and declsec.h to the build.
18240 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
18242 * mini.c, mini.h: update to keep dynamic code info per-domain.
18244 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
18246 * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
18247 (mini_init): Get rid of it from here too.
18249 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
18251 * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
18252 implemented OP_RETHROW (patch by Geoff Norton
18253 <gnorton@customerdna.com>).
18255 2004-11-10 Geoff Norton <gnorton@customerdna.com>
18257 * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
18258 between appdomains. Fixes appdomain-unload on PPC.
18260 2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
18262 * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18263 mini-exceptions.c: handle the new wrapper types.
18264 * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
18265 token value as a MonoClass* when compiling a wrapper.
18266 mono_jit_create_remoting_trampoline now takes an additional
18267 MonoRemotingTarget parameter.
18269 2004-11-10 Martin Baulig <martin@localhost>
18271 * mini.c (mono_method_to_ir): Use `generic_container->context'
18272 rather than creating a new one.
18274 2004-11-09 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18276 * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
18278 * inssel-390.md, mini-s390.c: Correct register allocation for globals.
18280 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
18282 * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
18283 the experimental aot cache stuff.
18285 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
18287 * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18288 mini-exceptions.c: update to exception clause structure changes.
18290 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
18292 * exceptions-x86.c (throw_exception): Fix warnings.
18294 * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support
18297 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
18299 * exceptions-sparc.c (get_throw_exception): Really fix this.
18301 2004-11-07 Ben Maurer <bmaurer@ximian.com>
18303 * tramp-*.c: we no longer support icalls without wrappers, so
18304 a bit of code can be removed here
18306 2004-11-07 Zoltan Varga <vargaz@freemail.hu>
18308 * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
18311 * cpu-sparc.md: Add op_rethrow.
18313 * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
18315 * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
18317 * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
18318 * mini-ops.h: Add OP_RETHROW.
18320 * mini.c inssel.brg: Distinguish between THROW and RETHROW.
18322 * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
18324 2004-11-05 Geoff Norton <gnorton@customerdna.com>
18326 * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
18327 Makes the output much easier to read
18329 2004-11-05 Ben Maurer <bmaurer@ximian.com>
18331 * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
18332 prevents another huge leak when compiling with ssa. Secondly, the
18333 performance of doing this rather than freeing the lists is much
18334 better. GList does a lock every time you allocate a list link,
18335 so that it can use a memory pool. So, it is better to just use
18336 a memory pool of our own.
18338 * ssa.c, linear-scan.c: replace g_list_remove_link with
18339 g_list_delete. The remove one does not free the GList, so we were
18340 leaking memory. On -O=all --compile-all with corlib, this cut down
18341 3 MB of allocations.
18343 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
18345 * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
18347 * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
18349 * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
18350 into a new function mono_create_jit_trampoline ().
18352 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
18354 * trace.c (get_spec): Allow tracing of classes without a namespace.
18356 2004-11-02 Sebastien Pouliot <sebastien@ximian.com>
18358 * mini.c: Fix pointer overwrite in mini_method_compile.
18360 2004-11-2 Geoff Norton <gnorton@customerdna.com>
18362 * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
18363 The darwin ABI needs some special handling for 1 and 2 byte structs
18364 Lets use lbz/lhz instead of lwz everywhere.
18365 * mini-ppc.c (calculate_sizes): The Darwin ABI needs from special handling
18366 for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
18367 Use stb/sth for the former, and put the latter always on stack instead of in
18368 argument registers.
18370 2004-10-30 Zoltan Varga <vargaz@freemail.hu>
18372 * trace.c (is_filenamechar): Add '_'.
18374 2004-10-29 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18376 * mini-s390.c: Fix prolog length to allow for large trace requirements.
18378 * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
18380 2004-10-29 Zoltan Varga <vargaz@freemail.hu>
18382 * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
18383 depends on libmonogc. Fixes #68805.
18385 2004-10-26 Miguel de Icaza <miguel@ximian.com>
18387 * mini.c (mono_jit_free_method): Provide extra information for
18388 this error. Currently this leaks, but will be turned into a
18389 developer option in the future.
18391 2004-10-26 Zoltan Varga <vargaz@freemail.hu>
18393 * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
18395 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
18397 * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte
18398 boundary. Fixes reading of PATCH_INFO_R4 and R8.
18399 (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
18401 2004-10-24 Zoltan Varga <vargaz@freemail.hu>
18403 * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
18404 trampolines for AOT code.
18406 2004-10-22 <vargaz@freemail.hu>
18408 * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
18409 constructed types. Fixes #68136.
18411 2004-10-21 Martin Baulig <martin@ximian.com>
18413 * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
18414 if it returns true, unwind the stack to the call instruction.
18416 2004-10-21 <vargaz@freemail.hu>
18418 * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
18420 * mini.h: Bump AOT version number.
18422 * objects.cs: Add another test for unbox trampolines.
18424 * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for
18427 2004-10-20 <vargaz@freemail.hu>
18429 * driver.c: Add SHARED to the set of optimizations tested.
18431 * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
18433 * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
18434 used by CEE_NEWARR.
18436 * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
18438 2004-10-20 Martin Baulig <martin@ximian.com>
18440 * mini-exceptions.c (mono_handle_exception): Call
18441 mono_debugger_handle_exception() to tell the debugger about
18442 catch/finally clauses.
18444 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
18446 * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
18448 * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
18451 2004-10-15 Geoff Norton <gnorton@customerdna.com>
18453 * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
18454 methods as their native size, fixed bug #57543, #57545.
18455 * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
18456 This saves a temporary register and mullw call down into 1 (minor perf
18457 increase for cases like sum = sum * 5; This use to translate into:
18460 It now translates to
18463 2004-10-15 Zoltan Varga <vargaz@freemail.hu>
18465 * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
18468 2004-10-11 Martin Baulig <martin@ximian.com>
18470 * mini.c (mono_method_to_ir): If we're a generic method, get the
18471 MonoGenericContainer from our MonoMethodNormal and create a
18472 MonoGenericContext from it.
18474 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
18476 * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
18478 * basic-long.cs: Add test for checked i8->i2 cast.
18480 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
18482 * inssel-ppc.brg: added a couple of speedup rules.
18484 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
18486 * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
18487 to speed up rebuilds.
18489 2004-10-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18491 * mini-s390.c: Minor fix to OP_OR_IMM.
18493 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
18495 * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
18496 better. Fixes appdomain-unload.exe on sparc.
18498 2004-10-02 Massimiliano Mantione <massi@ximian.com>
18500 * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
18501 simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
18504 2004-10-02 Zoltan Varga <vargaz@freemail.hu>
18506 * jit-icalls.c: Handle a nonexisting trunc function more correctly.
18508 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
18510 * mini.c: Always generate a field read/write wrapper for members
18511 of the class MarshalByRefObject since the actual instance could
18514 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
18516 * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
18518 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
18520 * driver.c mini.h trace.c: Move the setting of the main assembly into
18521 a separate function called mono_trace_set_assembly () and call it after
18522 actually loading the main assembly. Fixes #66872.
18524 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
18526 * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
18527 using the code manager.
18529 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
18531 * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
18533 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
18535 * cpu-amd64.md: Fix bug in previous patch.
18537 * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
18540 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
18542 * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18543 mini-exceptions.c: updates for changed stack walk interface.
18545 2004-09-21 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18547 * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
18549 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
18551 * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
18553 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
18555 * driver.c (mini_regression_list): Do not call mono_assembly_close
18556 since assemblies can't be unloaded.
18558 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
18560 * cpu-amd64.md: Fix more instruction lengths.
18562 * cpu-amd64.md: Fix lengths of some instructions.
18564 2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
18566 * inssel.brg: Make the array ldelema check aot friendly.
18568 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
18570 * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
18572 * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
18574 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
18576 * mini-x86.c: Fix build.
18578 * mini-sparc.c mini-x86.c mini-amd64.c: Use the new
18579 mono_type_get_underlying_type () helper function to simplify code.
18581 2004-09-09 Martin Baulig <martin@ximian.com>
18583 * mini-amd64.c: Don't access `type->data.klass' directly, call
18584 mono_class_from_mono_type() instead since the type may be a
18587 2004-09-09 Martin Baulig <martin@ximian.com>
18589 * mini-amd64.c (get_call_info): Fix support for generic instances.
18590 (add_valuetype): Use mono_class_from_mono_type() to get the class
18591 since we can be a generic instance.
18593 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
18595 * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
18597 2004-09-07 Ben Maurer <bmaurer@users.sourceforge.net>
18599 * liveness.c: reset spill costs on each scan: bug 62107
18601 2004-09-07 Bernie Solomon <bernard@ugsolutions.com>
18603 * exceptions-sparc.c (mono_arch_find_jit_info): remove
18604 unnecessary line that doesn't compile
18606 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
18608 * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
18609 trampolines, make them call an error function so people can fix their
18612 2004-09-06 Martin Baulig <martin@ximian.com>
18614 * mini.c (mono_method_to_ir): When initializing locals, handle a
18615 generic instances like a valuetype if it's a valuetype and like a
18616 class if it's a class.
18618 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
18620 * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
18621 stack. Fixes #64674.
18623 * exceptions.cs: Add test for unwinding of call arguments.
18625 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
18627 * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
18628 OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
18629 set the carry/borrow flag). The sparc and s390 implementations
18630 can now use optimized versions (and simplify the code). ppc bugfixes.
18632 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
18634 * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
18636 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
18638 * inssel-amd64.brg: Remove leftover 32 bit rule.
18640 * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
18642 2004-09-04 Zoltan Varga <vargaz@freemail.hu>
18644 * mini-exceptions.c (mono_find_jit_info): Refactor common code from
18645 mono_arch_find_jit_info functions into a new function. Fix a memory
18648 * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
18651 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
18653 * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
18656 * exceptions.cs: Add array size tests.
18658 * mini.c: Allocate a separate icall wrapper for each arity of
18659 mono_array_new_va. Fixes #59509.
18661 * exceptions.cs: Add testcase for 64578.
18663 * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
18665 * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
18667 2004-09-02 Martin Baulig <martin@ximian.com>
18669 * mini.c (mono_method_to_ir): When initializing the locals, call
18670 handle_initobj() on the generic instance itself, not its
18673 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
18675 * mini.h (MonoJitDynamicMethodInfo): New structure, extension of
18676 MonoJitInfo for dynamic methods.
18678 * mini.c: Rename trampoline_hash_mutex to jit_mutex.
18680 * mini.c: Add support for freeing JIT data for dynamic methods.
18682 2004-09-01 Martin Baulig <martin@ximian.com>
18684 * mini-x86.c (is_regsize_var): Added support for generic
18686 (mono_arch_emit_prolog): Make this compile again, use
18687 `x86_push_imm_template (code)'.
18689 2004-08-30 Ben Maurer <bmaurer@users.sourceforge.net>
18691 * mini-x86.c: make all push_imm instructions that get
18692 patched always emit the long form
18694 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
18696 * mini.c (mono_create_jump_trampoline): Store the jump trampolines
18697 in a per-domain hash.
18699 * mini-amd64.c (merge_argument_class_from_type): Handle generic
18702 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
18704 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
18707 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
18710 * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
18711 Beginnings of SSE2 support.
18713 * exceptions.cs: Add more tests for checked int<->uint casts.
18715 2004-08-28 Martin Baulig <martin@ximian.com>
18717 * mini-x86.c (mono_arch_instrument_epilog): Added support for
18721 (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
18722 Handle generic instances recursively.
18724 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
18726 * iltests.il: test for conv.u8 on a constant
18728 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
18730 * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
18731 LCONV_x4 (shrun_32 (membase)).
18733 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
18735 * inssel-x86.brg: c&p rules for push/setret of long
18737 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
18739 * inssel-x86.brg: c&p rules for compare (base, regvar) and
18740 compare (regvar, base)
18742 * inssel-x86.brg: more burg love
18744 * inssel.brg: more cleanup
18746 * inssel-x86.brg, inssel-long32.brg: burg cleanup.
18748 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
18750 * basic-long.cs, basic-calls.cs: new tests for optimization.
18752 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
18754 * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
18757 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
18759 * mini-amd64.c (read_tls_offset_from_method): Add another case.
18761 2004-08-25 Bernie Solomon <bernard@ugsolutions.com>
18763 * inssel.brg (mini_emit_memcpy): use
18764 NO_UNALIGNED_ACCESS to disable memcpy optimization
18766 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
18768 * mini-amd64.c: Handle generic types in various places.
18770 * mini.c (mono_method_to_ir): Handle generic types in init locals.
18772 2004-08-24 Zoltan Varga <vargaz@freemail.hu>
18774 * mini.c (handle_box): Fix warning.
18776 * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
18778 * mini-amd64.h: Enable the emit_state optimization.
18780 * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
18782 * mini-amd64.c: Add some new 64 bit peephole opts.
18784 * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
18786 * cpu-amd64.md: sreg1 of div instructions must be %rax.
18788 * mini-amd64.c: Register allocator fixes.
18790 * mini.c: Add an optimization to emit_state to avoid allocation of new
18791 registers on some platforms.
18793 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
18795 * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
18797 * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
18798 allocation. Fixes #63085.
18800 * basic-long.cs: Add new regression test.
18802 * mini-amd64.c: Register allocator improvements.
18804 2004-08-21 Zoltan Varga <vargaz@freemail.hu>
18806 * mini-amd64.c (read_tls_offset_from_method): Add another code
18809 * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
18810 instruction sequence for nullifying class init trampolines.
18812 * objects.cs: Add new regalloc test.
18814 * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
18816 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
18818 * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
18820 * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
18823 * driver.c: Fix profiling after TLS changes.
18825 * driver.c (mono_main): Set mono_stats.enabled if needed.
18827 * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
18830 2004-08-20 Ben Maurer <bmaurer@users.sourceforge.net>
18832 * mini-x86.c: use a 1 op rather than a 2 op tls access
18833 instruction -> faster.
18835 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
18837 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
18840 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
18842 * exceptions-sparc.c (throw_exception): fix typo
18844 2004-08-19 Ben Maurer <bmaurer@users.sourceforge.net>
18846 * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
18847 set tree->dreg correctly with tls. Allow any
18848 register to be used.
18850 * mini-x86.c (read_tls_offset_from_method): add new code
18851 generation pattern seen with GCC.
18854 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
18856 * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
18857 exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18858 exceptions-sparc.c: fix some performance issues in exception
18859 handling and setting of the stack trace for exceptions that were
18862 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
18864 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
18867 * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible
18870 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
18872 This patch inlines tls access, when possible.
18874 * mini.h: new arch functions for TLS intrinsics.
18875 All platforms updated with a stub.
18877 * mini.c: use the new intrinsics
18879 * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
18880 arch specific intrinsic for tls variables
18882 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
18884 * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
18887 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
18889 * mini.c: thread local allocation
18891 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
18893 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
18895 * Makefile.am: Link against the static version of libmonogc.
18897 * Makefile.am: Link the static versions of the convenience libraries
18898 into the mono executable.
18900 * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
18902 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
18904 * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
18905 on integer overflow.
18907 * mini-amd64.c: Reorganize function call code.
18909 * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
18911 2004-08-14 Ben Maurer <bmaurer@ximian.com>
18913 * inssel-x86.brg: use xor eax,eax.
18915 * basic.cs: new tests
18917 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
18919 * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
18920 in exception throwing code.
18922 2004-08-14 Ben Maurer <bmaurer@ximian.com>
18924 * inssel-x86.brg: use xor esi,esi.
18926 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
18928 * driver.c (mono_main): Call mono_trace_parse_options earlier so it
18929 can trace methods compiled during mini_init () too.
18931 * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle
18934 2004-08-14 Ben Maurer <bmaurer@ximian.com>
18936 * Makefile.am: static link on x86 (r=zoltan)
18938 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
18940 * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
18941 code since it causes some programs to fail.
18943 2004-08-12 Zoltan Varga <vargaz@freemail.hu>
18945 * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
18947 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
18949 * mini.c: ovfops_op_map - add STACK_OBJ case for
18951 * basic.cs: add test_0_pin_string as test
18954 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
18956 * Makefile.am: build C# if srcdir != builddir
18958 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
18960 * dominators.c, mini.h, mini-x86.c: fix loop alignment with
18961 fall-through blocks.
18963 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
18965 * driver.c: enable loop by default again and include abcrem in -O=all.
18967 2004-08-08 Zoltan Varga <vargaz@freemail.hu>
18969 * iltests.il: Add some localloc tests.
18971 * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
18973 * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly.
18976 * inssel-amd64.brg: Add some optimizations.
18978 * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
18981 * Makefile.am: Statically link mono against libmono on AMD64.
18983 * mini-amd64.c inssel-amd64.brg: Optimizations.
18985 2004-08-07 Zoltan Varga <vargaz@freemail.hu>
18987 * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
18989 * tramp-amd64.c: Patch calling code in trampolines.
18991 2004-08-06 Zoltan Varga <vargaz@freemail.hu>
18993 * mini-amd64.c: pinvoke struct passing fixes.
18995 2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
18997 * mini-sparc.c: redo change, make mono_arch_cpu_init call
18998 mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
19000 2004-08-05 Duncan Mak <duncan@ximian.com>
19002 * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
19005 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
19007 * mini-amd64.c (emit_move_return_value): Move return value for normal
19010 2004-08-05 Martin Baulig <martin@ximian.com>
19012 * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
19013 `type->type'; just modify `type' itself when dealing with enums
19014 and generic instances.
19015 (check_call_signature): Make `simple_type' a `MonoType *'.
19017 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
19019 * mini.c: Use OP_PADD to add offsets to addresses.
19021 * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
19023 2004-08-04 Bernie Solomon <bernard@ugsolutions.com>
19025 * mini-sparc.c (mono_arch_emit_epilog): fix check
19026 for folding last op into restore instruction
19028 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
19030 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
19031 helper methods using the code manager.
19033 * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
19035 * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
19037 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19039 * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
19040 cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
19042 * mini-s390.c: fix tail processing
19044 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
19046 * mini-ppc.c: mul.ovf.un exception name fix.
19048 2004-08-03 Martin Baulig <martin@ximian.com>
19050 * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
19051 instances; before jumping to `handle_enum', also modify `ptype'.
19053 2004-08-02 Bernie Solomon <bernard@ugsolutions.com>
19055 * cpu-sparc.md: fcall maximal length too small.
19057 2004-08-02 Zoltan Varga <vargaz@freemail.hu>
19059 * mini-amd64.c mini.h: Add initial support for passing/returning
19060 structures to/from pinvoked methods.
19062 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
19064 * mini-ppc.c: reg allocator fix.
19066 2004-07-31 Zoltan Varga <vargaz@freemail.hu>
19068 * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
19070 * inssel.brg: Optimize memset on 64 bit machines.
19072 * mini-amd64.c: Fix some vararg cases.
19074 2004-07-30 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19076 * mini-s390.c: Corrected macro in emit_float_to_int
19078 * s390-abi.cs: Tests to exercise the s390 ABI
19080 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
19082 * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
19085 * basic.cs: Add a test for add.ovf.un.
19087 2004-07-30 Bernie Solomon <bernard@ugsolutions.com>
19089 * mini-sparc.c: add case for OP_IDIV_UN
19091 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
19093 * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
19095 * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
19097 2004-07-30 Ben Maurer <bmaurer@ximian.com>
19099 * basic.cs: regression tests.
19101 * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
19104 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
19106 * basic.cs: Add a new test.
19108 * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling
19109 and AOT. Various fixes and optimizations.
19111 * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
19113 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
19115 * mini-ppc.c: make sure temp regs are not used for global reg
19118 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
19120 * cpu-sparc.md: conv_i8 fix for 64bits
19122 * mini-sparc.c: add cases for OP_IXXX codes for 64bits
19124 2004-07-29 Ben Maurer <bmaurer@ximian.com>
19126 * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
19127 add opcode for cmp BYTE PTR [eax], imm.
19129 * inssel.brg: Make memcpy and memset takes bases.
19131 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
19133 * *-amd64.*: More AMD64 work.
19135 2004-07-28 Ben Maurer <bmaurer@ximian.com>
19137 * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
19138 add a compare-not-equal opcode.
19140 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
19142 * mini.c: Use mono_init_from_assembly instead of mono_init.
19144 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
19146 * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
19148 * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
19150 * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
19152 * inssel.brg: 64 bit fixes.
19154 * mini.h (MonoCallInst): Add some AMD64 specific data.
19156 * mini.h: Add some OP_P opcodes.
19158 2004-07-28 Ben Maurer <bmaurer@ximian.com>
19160 * basic.cs: tests for 61797 and 61740
19162 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
19164 * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
19165 numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
19167 2004-07-24 Zoltan Varga <vargaz@freemail.hu>
19169 * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
19171 * *-amd64*.*: Ongoing AMD64 work.
19173 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
19175 * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
19177 * *-amd64*: Ongoing AMD64 work.
19179 * mini-arch.h: Add AMD64 support.
19181 * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
19183 * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
19185 * mini-ops.h: Add new opcodes.
19187 * Makefile.am: Add AMD64 support.
19189 * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
19190 rules into the inssel-long*.brg files.
19192 * *-amd64.*: Add beginnings of AMD64 backend.
19194 2004-07-22 Ben Maurer <bmaurer@ximian.com>
19196 * mini.c (print_dfn): commenting out the code that prints
19197 the cil. With -O=deadce, this makes -v -v crash.
19199 * cpu-pentium.md: make checkthis have a length of 2
19201 2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
19203 * mini-sparc.h: fix implementations of __builtin
19204 functions for Sun compiler for V9.
19206 2004-07-16 Ben Maurer <bmaurer@ximain.com>
19208 * mini.c: use the new stelem.ref wrapper
19209 * exceptions.cs, arrays.cs: new stelem.ref tests
19211 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19213 * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
19214 new XSP should work with these changes).
19216 2004-07-14 Ben Maurer <bmaurer@ximain.com>
19218 * inssel-{long32,x86,}.brg: trivial optimizations.
19220 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
19222 * mini.c: load value when emitting box operation in
19225 2004-07-12 Ben Maurer <bmaurer@ximian.com>
19227 * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
19228 is one byte shorter than cmp DWORD PTR [eax], 0.
19230 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
19232 * inssel-ppc.brg: arguments on the stack are always
19233 relative to the stack pointer (spotted by Neale Ferguson).
19235 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19237 * exceptions-x86.c: delay appending the method name to the trace until
19238 after mono_jit_info_table_find is called, as this gets the real
19241 2004-07-09 Ben Maurer <bmaurer@ximian.com>
19243 * aot.c: register roots
19245 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
19247 * aot.c : I could just use PLATFORM_WIN32 flag.
19249 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
19251 * aot.c : Reverting the previous fix. This time it broke linux build.
19253 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
19255 * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
19257 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
19259 * mini.c (handle_stack_args): Remove some more debugging code.
19261 * mini.c (handle_stack_args): Remove debug output left in by mistake.
19263 * driver.c mini.h aot.c: Allow additional options to be specified with
19264 --aot and pass them to mono_compile_assembly.
19266 * aot.c: Add experimental code to AOT compile all loaded assemblies
19267 on demand and save the code into a cache in the filesystem.
19269 * aot.c: Add support for more wrapper methods.
19271 * mini.c (handle_stack_args): Handle some corner cases. Fixes
19274 * cpu-*.md: Remove removed opcodes.
19276 * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
19277 CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
19278 related icalls to marshal.c.
19280 2004-07-06 Zoltan Varga <vargaz@freemail.hu>
19282 * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
19284 * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
19286 * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
19288 2004-07-06 Ben Maurer <bmaurer@ximian.com>
19289 * liveness.c: If liveness is recomputated we need to reset the information
19290 for each variable. This way, if the liveness range has been narrowed
19291 by optimizations that happened after the last computation, we can return
19294 For example, if you have
19299 // Tons of code that does not affect i
19305 i = 0 is dead code and will be removed by SSA. However, when
19306 linear scan gets to the code, i will still appear to be live
19307 throughout the entire block. This prevents good register allocation.
19309 2004-07-06 Martin Baulig <martin@ximian.com>
19311 * debug-mini.c (mono_debug_init_method): Allow
19312 MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
19313 (mono_debug_add_icall_wrapper): New method.
19315 * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
19317 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
19319 * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
19322 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
19324 * aot.c (mono_aot_load_method): Fix loading of debug info.
19326 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
19328 * aot.c: Add logging support.
19330 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
19332 * mini.h: Add prototype for mono_print_method_from_ip.
19334 * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
19336 * inssel.brg: 64 bit fixes.
19338 * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to
19341 * Makefile.am: Add SPARC64 support.
19343 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
19345 * aot.c: Fix alignment problems on 32 bit platforms.
19347 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
19349 * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
19352 * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
19355 * mini.h: Bump AOT file version. Some 64 bit fixes.
19357 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
19359 * inssel-sparc.brg: Add new rule to avoid register moves.
19361 * inssel.brg: Add ldind_to_load_membase helper function.
19363 2004-06-30 Ben Maurer <bmaurer@ximian.com>
19365 * mini.c: OffsetToStringData intrinsic.
19367 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
19369 * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
19371 * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
19374 * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
19375 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
19377 * mini.c: reinstated mono_compile_get_interface_var()
19378 on x86, too, since the change breaks the Gtk# build there as well.
19380 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19382 * driver.c: remove loop from the default optimizations: it seems to
19383 interact badly with some of the other options (see bug #60613).
19385 2004-06-25 Zoltan Varga <vargaz@freemail.hu>
19387 * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
19388 (fld@informatik.uni-bremen.de): Add Solaris x86 support.
19390 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
19392 * mini-ppc.c, cpu-g4.md: small updates to be able to compile
19393 vararg-using methods.
19395 2004-06-21 Martin Baulig <martin@ximian.com>
19397 * mini/mini-exceptions.c
19398 (mono_handle_exception): Added `gpointer original_ip' argument.
19399 After calling mono_unhandled_exception(), call
19400 mono_debugger_unhandled_exception() and if that returns true,
19401 restore the context and return.
19403 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
19405 * mini-ppc.c: prefer the use of relative branches so
19406 they won't need to be patched in aot code (patch from Patrick Beard).
19408 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
19410 * aot.c: patch from Patrick Beard to make the output assembly
19411 more correct for the MacOSX assembler. Small tweak to
19412 generate sane images on Linux/PPC, too.
19414 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19416 * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
19417 case until bug #59509 is fixed (shows up in #60332).
19419 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19421 * mini.c: make sure the needed wrappers are compiled, too, with
19424 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
19426 * driver.c: remove NPTL reference in --version output.
19428 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19430 * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
19431 generate valid assembly for the Mach-O assembler.
19433 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
19435 * driver.c: don't include abcrem in the all optimization specifier
19436 since it slows down jit compilation too much for now.
19438 2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
19440 * mini.c: use BIGMUL only if both operands have the same signage.
19441 * iltests.il: Test for bug 60056. (errors related to signage in
19446 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
19448 * mini.c, aot.c: memory leak fixes.
19450 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
19452 * inssel-long32.brg: implemented a few missing ulong cast opcodes.
19454 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
19456 * Makefile.am: remove the -static hack completely, it links in
19457 statically glib as well.
19459 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
19461 * iltests.il, mini.c: fixed bug#59580 in branch optimization.
19462 * exceptions.cs: make it compile with new mcs/csc.
19464 2004-06-03 Massimiliano Mantione <massi@ximian.com>
19465 * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
19466 and added relevant test case.
19468 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
19470 * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
19471 regressions in gtk-sharp.
19473 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
19475 * exceptions.cs: New regression tests.
19477 * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
19479 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
19481 * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
19483 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
19485 * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
19487 * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
19489 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
19491 * mini.c (mono_jit_runtime_invoke): Init class in this
19492 method instead of trusting mono_jit_compile_method to
19493 do the work (because wrappers can be in object class)
19495 2004-05-27 Zoltan Varga <vargaz@freemail.hu>
19497 * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
19499 * basic-long.cs: New regression test.
19501 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
19503 * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
19504 and div/rem checks.
19506 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
19508 * Makefile.am: fix miguel's change to build mono statically against
19509 libmono (track build dependencies).
19511 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
19513 * cfold.c: Some glib versions do not have G_MININT32.
19515 2004-05-26 Massimiliano Mantione <massi@ximian.com>
19517 * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
19518 with precision of tan, atan, sin and cos, and implemented related
19519 regressions tests (fixes bug 54467, but one new problem appeared and
19522 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
19524 * cfold.c (FOLD_BINOPZ): Avoid division by zero.
19526 * exceptions.cs: Add test for constant folding && division by zero.
19528 * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
19529 since driver.c is in libmono too, so the optimization was useless.
19531 * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
19532 variable to driver.c so the compiler can emit more efficient code to
19535 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19537 * Makefile.am: don't distribute generated inssel.[ch] files.
19539 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
19541 * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
19542 into the default appdomain. Fixes #58707.
19544 * jit-icalls.c: Remove the broken approximation for truncl, doing
19545 no conversion is better.
19547 * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
19550 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
19552 * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
19553 of the mcrxr instruction which is not available on some processors
19554 even if it's documented to be. Implement add and sub overflow correctly
19555 (still not complete for long unsigned). Speed up icalls a bit.
19557 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
19559 * mini.c (mono_jit_compile_method_with_opt): Make sure that
19560 we run .cctor in the current domain instead of target_domain.
19562 Fixes bug #58558, .cctor not being called in -O=shared.
19564 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19566 * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
19568 2004-05-24 Ben Maurer <bmaurer@users.sourceforge.net>
19570 * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
19571 which can be done with an imm8, do it that way.
19572 (mono_arch_output_basic_block): ditto for a jmp
19573 (mono_arch_emit_prolog): Computate maximum offset of a label.
19575 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
19577 * mini-x86.c (mono_arch_local_regalloc): the reg allocator
19578 now tries to allocate prefered physical reg's for virtual
19579 regs. This reduces the number of emited spills/loads with
19580 20-30% on our core assemblies.
19582 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19584 * jit-icalls.c: truncl() is not needed and trunc() is
19585 the correct thing to do anyway (bug #58287).
19587 2004-05-24 Zoltan Varga <vargaz@freemail.hu>
19589 * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
19592 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
19594 * driver.c: enable loop optimizations by default.
19596 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
19598 * mini-x86.c: fix calc of max loop size when aligning loops start.
19600 2004-05-23 Zoltan Varga <vargaz@freemail.hu>
19602 * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
19605 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
19607 * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
19610 * basic-long.cs: Add tests for add/subtract of immediates with carry.
19612 * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
19614 * mini.c (inline_method): Allways inline some wrappers even if the cost
19615 is too large. Fixes #58785.
19617 * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
19619 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
19621 * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
19622 (crichton@gimp.org). Beginning of support for sparc/linux.
19624 * mini-sparc.c: Optimize retrieval of LMF address.
19626 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
19628 * exceptions-ppc.c: handle alloca in methods with clauses.
19630 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
19632 * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
19634 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
19636 * mini.c: Delegate most of the abort signal work to
19637 mono_thread_request_interruption, which also handles Stop and Suspend
19640 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
19642 * mini.c mini.h: Allow inlining of icall wrappers if the backend
19643 supports the save/restore lmf opcodes.
19645 2004-05-19 Zoltan Varga <vargaz@freemail.hu>
19647 * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
19648 by gcc-3.4 as well.
19650 * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
19652 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
19654 * mini.h mini.c (mini_method_compile): Only run abc removal pass on
19655 methods which contain array accesses.
19657 * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
19658 boundaries. Fixes #58537.
19660 * iltests.il: Add regression test for #58537.
19662 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
19664 * mini-x86.c (mono_arch_local_regalloc): Last part of
19665 fix for bug #58633 (releasing register to early).
19667 2004-05-18 Miguel de Icaza <miguel@ximian.com>
19669 * basic-long.cs: Add new regression test.
19671 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
19673 * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
19674 register too early on the chain.
19676 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
19678 * mini.c (create_helper_signature): Use a helper function to reduce
19679 the code which needs to be written. Also set the calling convention of
19680 icalls on windows. Fixes #57840.
19682 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
19684 * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
19685 exceptions-ppc.c: added helper function to get the instruction address
19686 from a signal handler context.
19688 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
19690 * helpers.c: use g_get_tmp_dir. Invokes happyness
19693 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
19695 * helpers.c: Add new env variable to pass args to objdump.
19696 Specifically for those of us who love -Mintel. r=miguel, gonzalo.
19698 2004-05-17 Radek Doulik <rodo@ximian.com>
19700 * Makefile.am (common_sources): added abcremoval.h so it get
19701 disted and daily mono packages on go-mono.com will build again
19703 2004-05-17 Massimiliano Mantione <massi@ximian.com>
19705 * abcremoval.c: Fixed coding style, added copyright header.
19707 * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
19709 * mini.h: Added prototype for abc removal main function.
19711 * build_relations_propagation_table.pl: Added copyright header.
19713 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
19715 * basic-long.cs: reg test for complex ceq_long bug.
19717 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
19719 * mini-x86.c (mono_arch_local_regalloc): Correctly free
19720 reg in long and clob case (bug #58343). Fixed/added comments.
19722 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
19724 * mini.c (mono_jit_runtime_invoke): Follow new convention
19725 of calling the invoke method with an function pointer.
19727 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
19729 * ChangeLog: Fix author of memory leak patch.
19731 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
19733 * Makefile.am: fix make dist as well...
19736 2004-05-14 Massimiliano Mantione <massi@ximian.com>
19738 * cfold.c: Made so that conversions from pointer to int4 are no-ops
19739 on archs where pointers are 4 bytes long.
19741 * Makefile.am: Added abcremoval.c source file.
19743 * abcremoval.c: Added abcremoval.c.
19745 * abcremoval.h: Added abcremoval.h.
19747 * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
19749 * inssel.brg: Enabled bounds check removal.
19751 * mini.c: Added support for abcrem optimization.
19753 * mini.h: Added abcrem optimization label.
19755 * driver.c: Added support for abcrem optimization.
19757 * propagated_relations_table.def: Added propagated_relations_table.def.
19759 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
19761 * mini.c, cfold.c: fix style.
19763 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19765 * mini.c: handle issue with the low-level implementation of
19766 some long opcodes (bug #54209).
19768 2004-05-13 Ben Maurer <bmaurer@users.sourceforge.net>
19770 * basic.cs: test for my new cmov stuff.
19772 2004-05-13 Patrik Torstensson
19774 * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
19775 opt and added peephole documentation.
19777 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
19779 * tramp-ppc.c: rewrote the generic trampoline code.
19781 2004-05-11 Patrik Torstensson
19783 * mini-x86.c: optimize long shl/shr asm code (one less branch)
19785 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
19787 * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
19789 * mini.h mini.c dominators.c: Applied patch from Derek Woo
19790 (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
19792 * mini.c: Add new icalls for AsAny marshalling.
19794 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
19796 * tramp-ppc.c, mini-ppc.c: more cleanups.
19798 2004-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19800 * mini.c: no warnings.
19802 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19804 * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
19806 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
19808 * mini.c: In the thread abort signal handler, if the thread is in the
19809 process of being stoped, don't throw the Abort exception, just stop the
19812 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
19814 * tramp-ppc.c: removed old code.
19816 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19818 * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
19819 do some simple speed optimizations on ppc.
19821 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
19823 * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
19824 and large offsets in load/store.
19826 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
19828 * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
19829 it causes regressions.
19831 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
19833 * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
19836 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19838 * jit-icalls.c: remove warnings.
19839 * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
19840 speedups for unsafe code.
19842 2004-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
19844 * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
19846 2004-05-06 Zoltan Varga <vargaz@freemail.hu>
19848 * basic-calls.cs: Add new regression test.
19850 * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
19853 * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
19855 * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
19858 2004-05-06 Patrik Torstensson
19860 * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
19861 long reg allocation in any reg (not only eax:edx) and implemented
19862 long shl/shr ops in asm instead of helpers.
19864 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
19866 * mini-sparc.h: Fix warnings.
19868 * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
19871 * mini-exceptions.c (mono_handle_exception): Call the filter in a
19872 separate statement for clarity.
19874 * mini-sparc.c: Update status.
19876 2004-05-04 Zoltan Varga <vargaz@freemail.hu>
19878 * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
19881 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19883 * inssel-ppc.brg: another small pre-release workaround:
19884 we don't do overflow detection for long_sub_un.
19886 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19888 * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
19889 (also works around a weird ppc bug: 57957).
19891 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
19893 * tramp-ppc.c: trampoline fixes.
19895 Fri Apr 30 15:54:26 EDT 2004 Paolo Molaro <lupus@ximian.com>
19897 * mini-ppc.c: fixed typos.
19899 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19901 * mini-ppc.c, exceptions-ppc.c: more code saves registers
19902 at the top of the stack. Fixed typos. Use a frame registers
19903 for all the methods with exception clauses.
19905 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
19907 * exceptions-ppc.c: restore fp registers.
19909 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
19911 * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
19912 order from the stack top (moved the stack room to save the
19913 return value for trace after the param area). Fixed corruption
19914 in restoring registers on unwind.
19916 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
19918 * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
19920 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19922 * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
19923 and prolog/epilog for methods that use it. Allow
19924 enough param area room for varargs methods. Fix miguel's
19925 breakage in exception handling.
19927 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19929 * Makefile.am: run genmdesc only on current arch.
19931 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19933 * exceptions-x86.c:
19934 * mini-x86.h: fix the build on windows.
19936 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
19938 * 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.
19940 * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
19942 * mini-exceptions.c: New file.
19944 * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
19945 Move some parts of the x86 exception handling code to an
19946 arch-independent file so it can be shared with other ports.
19948 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
19950 * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
19952 2004-04-26 David Waite <mass@akuma.org>
19954 * driver.c: remove comma from end of enumeration declaration
19956 2004-04-26 Jackson Harper <jackson@ximian.com>
19958 * driver.c: parse config file before loading first assembly. This
19959 allows the user gac to be enabled/disabled.
19961 2004-04-23 Miguel de Icaza <miguel@ximian.com>
19963 * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
19964 simpler mechanism: we do not care what is encoded initially
19965 (branch absolute or relative), we care about the code and its
19966 target. I kept the old code for reference for now.
19968 The new code tries first to determine if the jump is anywhere in
19969 the -/+32 absolute meg range, if it succeeds, it encodes using the
19970 absolute branch; If not, it tried to find something in the
19971 relative range, if not, it uses the handle_thunk code.
19973 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
19975 * exceptions-ppc.c: use the correct ip register on macosx.
19977 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
19979 * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
19981 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
19983 * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
19984 Raise exception on integer divide by zero by hand since the hw
19985 doesn't support it. Handle NaNs in FP compares.
19987 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
19989 * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
19990 code reducing duplication between the platforms and enabled
19991 signal exception handling (on linux for now).
19993 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
19995 * exceptions-ppc.c: more macosx support.
19997 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19999 * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
20001 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
20003 * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
20005 2004-04-19 Ben Maurer <bmaurer@users.sourceforge.net>
20007 * iltests.il: more tests.
20009 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
20011 * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
20014 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
20016 * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
20018 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
20020 * liveness.c: Mark variables as volatile in all basic blocks reachable
20021 from exception clauses.
20023 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
20025 * exceptions.cs (test_0_rethow_stacktrace): Make this work with
20028 2004-04-18 Ben Maurer <bmaurer@users.sourceforge.net>
20030 * iltests.il, basic.cs: more tests for regalloc.
20032 2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
20034 * iltests.il: Some tests for register allocation modifications
20037 2004-04-16 Zoltan Varga <vargaz@freemail.hu>
20039 * exceptions.cs: Add regression test for bug #56782.
20041 * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
20042 original stack trace if an exception is rethrown. Fixes #56782. Oh,
20043 the beauty of fixing the same thing in 5 different files...
20045 2004-04-15 Zoltan Varga <vargaz@freemail.hu>
20047 * mini.c (mono_method_to_ir): Do not compute coverage for inlined
20050 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
20052 * mini.c: Add support for STRWLPARRAY marshalling convention.
20054 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
20056 * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
20057 to init the context to setup the regs pointer).
20059 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
20061 * exceptions-ppc.c: more exceptions work.
20063 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
20065 * mini.c: avoid reusing the same MonoInst on multiple trees: this is
20068 2004-04-13 Miguel de Icaza <miguel@ximian.com>
20070 * inssel-x86.brg (reg): Add new rules for add, sub and mul that
20071 can use the memory directly.
20073 * cpu-pentium.md: Update documentation from a post from Zoltan.
20075 add x86_add_membase, x86_sub_membase, x86_mul_membase
20077 2004-04-13 Miguel de Icaza <miguel@ximian.com>
20079 * mini-ppc.c: Remove unused definitions FLOAT_REGS and
20080 GENERAL_REGS they were also hardcoded for all PPC ports.
20082 (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
20084 Remove hard-coded limit for floating point registers, use
20085 PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
20087 Notice that in MacOS X calling conventions you can fit a lot more
20088 floating point values in registers, so I should update the PInvoke
20089 test to excercise the passing of floating point values on the
20090 stack (currently broken).
20092 2004-04-06 Miguel de Icaza <miguel@ximian.com>
20094 * tramp-ppc.c (create_trampoline_code): Added
20095 JUMP_TRAMPOLINE_SIZE.
20096 (ppc_magic_trampoline): Follow the pattern from
20097 x86_magic_trampoline: if code is set to zero, return.
20098 (create_trampoline_code): Always pass MonoMethod to the jump
20099 trampoline, before it was passing a null.
20100 (mono_arch_create_jump_trampoline): Implement the jump stub, could
20101 share the code with mono_arch_create_jit_trampoline.
20103 * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
20105 (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
20108 * cpu-g4.md: Added length for jmp instruction, the worst case
20109 scenario is 92 bytes (4 mandatory bytes, potential 19 registers
20112 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
20114 * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
20116 2004-04-07 Zoltan Varga <vargaz@freemail.hu>
20118 * mini.c: Only set bblock->real_offset when adding a new bblock, and
20119 before each IL instruction.
20121 * mini.c (CEE_BOX): Fix warnings.
20123 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20125 * mini.c: removed a few unused vars and extra whitespace.
20127 2004-04-05 Ben Maurer <bmaurer@users.sourceforge.net>
20129 * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
20131 (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
20133 (OP_GETCHR): use the above
20134 (CEE_LDELEMA): use the above.
20136 * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
20137 version of the generic impl.
20138 (MONO_EMIT_BOUNDS_CHECK_IMM): the same
20139 (CEE_LDELEMA): use the above.
20141 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
20143 * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
20146 * iltests.il: Added new regression test for #56317.
20148 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
20150 * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
20151 under NetBSD. Fixes #56450.
20153 * liveness.c (update_gen_kill_set): Fix previous patch.
20155 2004-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20157 * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
20159 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
20161 * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
20162 ldsfld and ldsflda.
20164 * inssel-sparc.brg: Add more optimizations.
20166 * mini-sparc.c: Replace multiply/divide with shifts if possible.
20168 2004-04-01 Martin Baulig <martin@ximian.com>
20170 * mini.c (handle_box): New static function; moved the
20171 implementation of CEE_BOX here.
20172 (mono_method_to_ir): Added `constrained_call' variable.
20173 (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
20174 (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
20175 mono_method_get_constrained() to get the method.
20177 2004-04-01 Martin Baulig <martin@ximian.com>
20179 * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
20180 (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
20181 (mono_method_to_ir): We don't need these macros anymore since
20182 mono_class_get_full() already takes care of it.
20184 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20186 * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
20187 use @function (as doesn't accept #function here) and check the return
20188 value of system and stop if fails.
20190 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20192 * mini.c: set the timeout to 2s when calling mono_domain_finalize.
20194 2004-03-31 Zoltan Varga <vargaz@freemail.hu>
20196 * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
20198 * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
20200 * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
20203 * basic-long.cs: Add test for negation of Int64.MinValue.
20205 2004-03-30 Zoltan Varga <vargaz@freemail.hu>
20207 * mini-sparc.c: Update status.
20209 * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
20211 * exceptions-sparc.c: Fix return value in filters.
20213 * inssel-sparc.brg: Fix register allocation in some rules.
20215 2004-03-28 Martin Baulig <martin@ximian.com>
20217 * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
20220 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
20222 * mini-x86.c (mono_arch_patch_code): Fix warnings.
20224 * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if
20225 dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
20226 remove unused conv_u4 opcode.
20228 * mini-x86.c: Remove valgrind workaround since it slows down things
20229 even when mono is not run under valgrind.
20231 2004-03-26 Zoltan Varga <vargaz@freemail.hu>
20233 * mini-sparc.c: Update status.
20235 * inssel-sparc.brg: Add some optimizations.
20237 * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
20238 future delay slot filling. Add support for varargs, tail calls and JMP.
20240 * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of
20241 CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
20243 * inssel.brg: Fix register allocation in OP_ARGLIST.
20245 * inssel.brg: Fix warnings.
20247 2004-03-25 Martin Baulig <martin@ximian.com>
20249 * mini.c (inflate_generic_field): Removed.
20250 (mini_get_method): Removed, use mono_get_method_full(),
20251 (mini_get_class): Removed, use mono_class_get_full().
20252 (mono_method_to_ir): Pass our generic context to
20253 mono_field_from_token().
20255 2004-03-25 Martin Baulig <martin@ximian.com>
20257 * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
20258 of a `MonoMethod *'.
20259 (mini_get_method): Take a `MonoGenericContext *' instead
20260 of a `MonoMethod *'.
20261 (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
20262 a new local variable called `generic_context' which holds the
20263 current `MonoGenericContext *'; use it to lookup things.
20265 2004-03-24 Martin Baulig <martin@ximian.com>
20267 * mini.c (mini_get_class): New static method; if we're inside a
20268 generic instance, inflate the class if neccessary.
20269 (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
20271 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
20273 * iltests.il: New regression test for #55976.
20275 * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
20278 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
20280 * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
20283 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
20285 * liveness.c: Consider SSA stores as well as loads when making vars
20288 * exceptions.cs: New regression tests for register allocation.
20290 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
20292 * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
20293 * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
20294 domain lock only to protect puntual access to data structures.
20295 Added access lock for sighash, jit_icall_hash_name,
20296 jit_icall_hash_addr and domain->code_mp.
20298 2004-03-20 Zoltan Varga <vargaz@freemail.hu>
20300 * driver.c: Print SIGSEGV handling method.
20302 * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
20304 * mini.c (setup_jit_tls_data): Handle case when this is called
20305 multiple times for a thread.
20307 * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx
20308 is different from fbxx_un. Fixes #54303. Also use constants instead of
20309 magic numbers in a lot of places.
20311 2004-03-19 Zoltan Varga <vargaz@freemail.hu>
20313 * exceptions.cs: Fix cctor test when --regression is used.
20315 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
20317 * mini-ppc.c, exceptions-ppc.c: basic exceptions support
20320 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
20322 * inssel-ppc.brg: fixed register assignments for some rules.
20324 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
20326 * exceptions.cs: Add test for exceptions in static constructors.
20328 * mini.c (mono_jit_compile_method_with_out): Move the calling of
20329 static constructors outside the domain lock. Fixes #55720.
20331 2004-03-17 Martin Baulig <martin@ximian.com>
20333 * mini.c (get_generic_field_inst): Removed, this'll never happen.
20334 (inflate_generic_field): Take the `MonoMethod *' instead of the
20335 `MonoClass *' and added support for generic method.
20336 (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
20337 have a `field->parent->gen_params', only inflate the field if it's
20338 an open constructed type.
20340 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
20342 * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
20343 exception object instead of the preconstructed ones.
20345 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20347 * mini.c: reverted changed to sigsegv_signal_handler commited
20348 accidentally in the previous patch.
20350 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20353 (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
20354 running --aot with an old assembly.
20356 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
20358 * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
20361 * mini-sparc.c: Add support for v9 branches with prediction.
20363 2004-03-15 Bernie Solomon <bernard@ugsolutions.com>
20365 * mini.c (mini_init): #warning is GNUC only
20367 * mini-sparc.h: implement __builtin_frame_address
20368 and __builtin_return_address for Sun C compiler
20370 2004-03-15 Zoltan Varga <vargaz@freemail.hu>
20372 * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
20374 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
20376 * basic-calls.cs: Add test for unaligned byref long argument passing.
20378 * mini-ops.h: Add sparcv9 compare and branch instructions.
20380 * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
20381 v9 instructions if we have a v9 cpu.
20383 * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
20384 registers for global allocation.
20386 * exceptions-sparc.c: Fixes.
20388 2004-03-11 Zoltan Varga <vargaz@freemail.hu>
20390 * liveness.c (mono_analyze_liveness): Optimized version.
20392 * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
20394 * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
20397 * basic-float.cs basic-calls.cs: New regression tests.
20399 2004-03-10 Zoltan Varga <vargaz@freemail.hu>
20401 * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
20402 sigaltstack implementation.
20404 * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
20406 * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
20407 stuff if SIGSEGV_ON_ALTSTACK is not defined.
20409 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
20411 * mini.c: Fix warnings.
20413 * mini.c (mono_resolve_patch_target): New function which contains the
20414 arch independent part of the patching process.
20416 * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
20417 patching code to a separate function.
20419 2004-03-09 Bernie Solomon <bernard@ugsolutions.com>
20421 * mini.c (add_signal_handler): ifdef out on Windows
20423 2004-03-08 Zoltan Varga <vargaz@freemail.hu>
20425 * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c
20426 cpu-sparc.md: Add exception handling support + other fixes.
20428 * driver.c: Print --help output to stdout. Fixes #55261. Also fix
20429 typed GC detection in --version.
20431 * basic.cs exceptions.cs: New regression tests.
20433 * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
20434 the arch specific code can store data during a compilation.
20436 * mini-ops.h: Add OP_SETFRET.
20438 * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
20439 function, register a separate icall for each arity, so the icalls can
20442 * mini.c (mono_print_tree): Print negative offsets in a more readable
20445 * mini.c: Make signal handling work on sparc.
20447 * mini.c (mini_init): Add emulation for lconv_to_r8_un.
20449 * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
20451 * jit-icalls.c: Emulate truncl by aintl on solaris.
20453 * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
20455 2004-03-05 Zoltan Varga <vargaz@freemail.hu>
20457 * mini.c (mini_init): fconv_to_ovf can raise exceptions.
20459 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
20461 * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
20462 a MarshalByRef type, inline a method that performs the check, taking into
20463 account that the object can be a proxy. Also implemented tow new opcodes:
20464 CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
20465 * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and
20466 OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
20468 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
20470 * mini-ppc.c: if a relative branch displacement is too big
20471 but it points to and area reachable with an absolute branch,
20474 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
20476 * mini.c: optimize small copies in cpblk.
20478 2004-03-01 Zoltan Varga <vargaz@freemail.hu>
20480 * basic-calls.cs basic-float.cs: New regression tests.
20482 * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at
20483 negative offsets from %fp. Implement localloc. Fix local register
20484 allocation. Fix the case when the this argument needs to be saved to
20485 the stack. Implement some missing opcodes.
20487 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
20489 * mini.c (mini_method_compile): Reenable global regalloc in methods
20490 with exception handlers.
20492 * linear-scan.c (mono_varlist_sort): Fix warning.
20494 * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
20496 * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
20499 * liveness.c: Make all variables uses in exception clauses volatile, to
20500 prevent them from being allocated to registers. Fixes #42136.
20502 2004-02-25 Zoltan Varga <vargaz@freemail.hu>
20504 * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
20505 causes regressions.
20507 * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
20508 argument to mono_arch_regalloc_cost.
20510 * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs
20513 2004-02-24 Zoltan Varga <vargaz@freemail.hu>
20515 * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c:
20516 Make the cost of allocating a variable to a register arch dependent.
20518 * basic-calls.cs: Fix compilation of tests.
20520 * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
20521 helper function to cut back on the number of #ifdefs needed.
20523 * mini-ppc.c: Fix compilation.
20525 * basic-calls.cs: New regression tests.
20527 * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
20529 * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
20530 of l0 since that is callee saved.
20532 * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
20535 * mini-sparc.c: Ongoing work + flag virtual calls with a special kind
20536 of delay instruction.
20538 * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
20540 * mini.h (MonoCallInst): Add 'virtual' flag.
20542 * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
20544 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
20546 * *.cs: New regression tests.
20548 * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc
20551 * mini.c (mono_runtime_install_handlers): Fix build.
20553 * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
20554 'signal_stack_size' members.
20556 * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an
20557 alternate signal stack.
20559 * exceptions-x86.c: Add stack overflow handling.
20561 * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing
20562 functions to arch independent code.
20564 * mini.c (mono_print_tree): Print more detailed info for load_membase
20567 2004-02-23 Martin Baulig <martin@ximian.com>
20569 * mini.c (mini_get_method): Set `gmethod->generic_inst'.
20571 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
20573 * mini-x86.c: fixed reg allocation for div/rem.
20575 2004-02-22 Miguel de Icaza <miguel@ximian.com>
20577 * driver.c (mono_main): Report some configuratio options on --version.
20579 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
20581 * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
20582 low in the address space. Correctly flush memory in thunks where we
20583 output native code.
20585 2004-02-20 Martin Baulig <martin@ximian.com>
20587 * mini.c (mini_get_method): New static method; inflate all generic
20588 methods and methods in open generic instances.
20589 (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
20590 (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
20592 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
20594 * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
20596 * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
20598 2004-02-19 Bernie Solomon <bernard@ugsolutions.com>
20600 * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
20602 * mini-sparc.c (flushi mono_arch_output_basic_block): make
20603 it compile using Sun's compiler.
20605 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
20607 * 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.
20609 * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
20611 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
20613 * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
20615 * mini-ppc.c: handle calls outside of the allowed range with thunks
20616 allocated using the code manager.
20617 * tramp-ppc.c: use the code manager to hold generated native code.
20618 Fixed the magic trampoline to just patch vtable entries.
20620 2004-02-17 Zoltan Varga <vargaz@freemail.hu>
20622 * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
20625 2004-02-16 Zoltan Varga <vargaz@freemail.hu>
20627 * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
20630 * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
20631 if we have a working __thread implementation.
20633 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove
20634 OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
20636 2004-02-15 Zoltan Varga <vargaz@freemail.hu>
20638 * mini-x86.c: Fix compilation under gcc 2.
20640 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
20642 * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
20643 contains a call to the wrapped function.
20645 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add
20646 OP_<CALL>_IMM opcodes, and use them under X86.
20648 * mini.c (mono_jit_find_compiled_method): Fix warning.
20650 * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
20652 * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
20654 * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
20655 functionality to mini.c.
20657 * mini.c (mono_create_jump_trampoline): New function to create a jump
20658 trampoline. Return a compiled method instead of a trampoline if it
20659 exists. Add a cache for jump trampolines.
20661 * mini.c (mono_jit_find_compiled_method): New function to return a
20662 compiled method if it exists.
20664 * mini-x86.c: Call mono_create_jump_trampoline instead of
20665 mono_arch_create_jit_trampoline.
20667 * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
20668 a jump trampoline. Fixes #52092.
20670 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
20672 * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
20673 which is not up-to-date. Add check_corlib_version () instead.
20675 * mini.c (mini_init): Call mono_thread_attach () so embedders do not
20678 * mini.c (mono_runtime_install_handlers): Remove check for valgrind
20679 since newer valgrind versions do not need it.
20681 * mini.c (mono_jit_compile_method_with_opt): New helper function to
20682 compile a method with a given set of optimizations.
20684 * mini.c: Compile icall wrappers on-demand instead of at startup.
20686 * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
20687 wrapper for an icall.
20689 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
20691 * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
20694 * iltests.il: Add test for non-empty stack before switch instruction.
20696 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
20698 * mini.c: Add support for new stringbuilder marshalling conventions.
20700 * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
20702 2004-02-01 Martin Baulig <martin@ximian.com>
20704 * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
20705 in `ginst->mtype_argv'.
20707 2004-01-31 Miguel de Icaza <miguel@ximian.com>
20709 * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
20710 facilitate grepping.
20712 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
20714 * mini.c: fixed buglet in initobj generic implementation for references.
20716 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
20718 * Makefile.am: make the version script conditional.
20719 * jit-icalls.c: handle missing truncl().
20721 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
20723 * exceptions.cs: Add more tests for double->int conversion.
20725 * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
20726 we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
20728 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
20730 * driver.c: make --verbose --version emit an error
20731 if the loaded corlib doesn't match the runtime version.
20733 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
20735 * mini-ppc.h: export ppc_patch().
20736 * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
20737 * tramp-ppc.c: call convention fixes: Linux/PPC support should be
20738 on par or better than on MacOSX.
20740 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
20742 * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
20743 mono_lookup_pinvoke_call.
20745 * mini-x86.c: Under windows, the default pinvoke calling convention is
20746 stdcall. Fixes #52834.
20748 * mini.c (optimize_branches): Add an upper bound to the number of
20749 iterations to prevent infinite loops on strange loops. Fixes #53003.
20751 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
20753 * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
20754 and ISINST. Fixes #52093.
20756 * objects.cs (test_0_vector_array_cast): New tests.
20758 2004-01-15 Zoltan Varga <vargaz@freemail.hu>
20760 * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
20761 checking in Array.Set ().
20763 * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
20766 * object.cs (test_0_multi_array_cast): New regression test.
20768 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
20770 * exceptions-ppc.c: fix build on Linux/PPC.
20772 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
20774 * tramp-x86.c (x86_magic_trampoline): Disable code patching when
20775 running under valgrind.
20776 (x86_magic_trampoline): Fix build bustage.
20778 * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
20779 negative values as well. This is needed for the encoding of the line number
20780 info, since sometimes the line numbers are not in increasing order.
20782 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
20784 * cpu-pentium.md (localloc): Increase the size of the localloc
20785 instruction since it is a loop under Win32.
20787 * debug-mini.c (record_line_number): Get rid of unneccesary memory
20790 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
20792 * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c
20793 tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from
20794 Max Horn (max@quendi.de). Fix file names in comments.
20796 2004-01-03 Zoltan Varga <vargaz@freemail.hu>
20798 * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
20799 avoid stack overflow.
20800 (replace_usage): Avoid uninitialized variable warnings.
20802 * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
20803 and taking the address of valuetype variables.
20805 2004-01-03 Patrik Torstensson
20807 * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
20808 for other purposes than FP later on.
20810 2004-01-02 Zoltan Varga <vargaz@freemail.hu>
20812 * mini.c (mono_method_to_ir): Prevent register allocation for arguments
20815 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
20817 * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
20819 2003-12-30 Patrik Torstensson <p@rxc.se>
20821 * mini-x86.h: Decreased number of availiable fp regs.
20822 Solves corner cases with FP spilling.
20824 2003-12-23 Patrik Torstensson <p@rxc.se>
20826 * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
20827 for floating point stack tracking / spilling on x86.
20830 * basic-float.cs: added float mul overflow test.
20832 2003-12-23 Zoltan Varga <vargaz@freemail.hu>
20834 * mini.c (mono_method_to_ir): Add workaround for bug #51126.
20836 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
20838 * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
20839 supports for cond branches that overflow the immediate
20840 overflow offset. mcs can compile simple programs.
20842 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
20844 * exceptions-ppc.c: exception handling support wip:
20845 finally handlers get run on exception.
20847 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
20849 * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while
20852 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
20854 * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
20855 initial support for stack walking and unwinding.
20857 2003-12-18 Zoltan Varga <vargaz@freemail.hu>
20859 * driver.c (mono_main): Make corlib-out-of-sync message more
20860 descriptive. Also remove verify_corlib call.
20862 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
20864 * mini.c: make CEE_NEWARR calls and other emulated opcodes
20865 not overlap with other call's arguments, too.
20867 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
20869 * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c:
20870 move to arch-specific code the choice of arch-specific
20871 intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
20872 * mini.c: ensure emulation calls will not interleave
20875 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
20877 * tramp-ppc.c, basic-calls.cs: rework trampolines so that
20878 the magic trampoline stack frame is dropped before executing
20881 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
20883 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
20884 and integer to fp conversions. Added support for overflowing
20885 arguments on the stack. Reserve a couple more registers as temps.
20886 Added support for aot compilation (as output still needs to be
20889 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
20891 * mini-ppc.c, basic-long.cs: fix jumps to known labels.
20892 Don't overwrite return register in some corner cases.
20894 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
20896 * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
20897 static constructors when AOT compiling.
20899 * driver.c (mono_main): Call mono_check_corlib_version.
20901 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
20903 * cpu-g4.md, basic.cs: fixed div target register.
20905 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
20907 * mini-ppc.c, basic.cs: shl_imm fix with test.
20909 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
20911 * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing
20912 structures by value. Misc fixes.
20913 * objects.cs: more tests.
20915 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
20917 * mini-ppc.c: lconv.ovf.i implemented.
20919 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20922 (mini_init): don't error out if someone already called g_thread_init.
20924 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
20926 * exceptions-x86.c, exceptions-ppc.c: allow the exception object
20927 to be any type per the spec. Fix abnormal memory usage when
20928 the same object is repeatedly thrown.
20930 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
20932 * mini.c: check for overruns in IL code.
20934 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
20936 * TODO: Add/remove some todo entries.
20938 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
20940 * driver.c (mono_main): Call mono_verify_corlib.
20942 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
20944 * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy.
20945 This has been moved to mini.c
20946 * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
20947 type being casted is marshalbyref it could be a proxy, so instead of
20948 emitting the type check code, emit a call to a runtime method that will
20949 perform the check by calling CanCastTo if needed.
20951 2003-12-06 Zoltan Varga <vargaz@freemail.hu>
20953 * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
20954 methods with large stack frames under Win32.
20956 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
20958 * Makefile.am: Distribute regression tests.
20960 * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
20961 at the end instead of inserting each variable into the sorted list.
20963 * linear-scan.c (mono_varlist_sort): New helper function.
20965 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
20967 * mini.c: ensure arguments and locals are within bounds.
20969 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
20971 * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and
20974 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
20976 * mini.c (mono_cprop_copy_values): Fix crash.
20978 * aot.c: Set verbosity back to 0.
20980 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
20982 * regalloc.c: complete memory leak fix by Laurent Morichetti
20985 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
20987 * driver.c (main_thread_handler): Revert the previous patch.
20989 * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
20992 * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
20993 memory from the memory pool.
20995 * driver.c (main_thread_handler): Turn on all optimizations when
20998 * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
20999 an array for better performance.
21001 * regalloc.c (mono_regstate_assign): Fix memory leak.
21003 * debug-mini.c (mono_debug_serialize_debug_info): New function to
21004 serialize the debug info.
21006 * debug-mini.c (mono_debug_add_aot_method): New function to load the
21007 debug info from the serialized representation.
21009 * aot.c: Save debug info into the generated file and load it when
21012 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
21014 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
21016 * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
21017 More FP-related fixes.
21019 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
21021 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
21022 and register allocation buglet. Hello world now runs.
21024 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
21026 * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
21027 * tramp-ppc.c: fixed class init trampoline.
21028 * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
21030 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
21032 * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
21033 mini.c: more ppc changes/fixes.
21035 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
21037 * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
21038 Also optimize the case when the arguments are the same in the caller
21041 * iltests.il: Add tests for tail calls with valuetype arguments.
21043 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
21045 * mini-ppc.c: fixes for struct return type.
21047 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
21049 * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move
21050 mono_spillvar_offset() to arch-specific code.
21052 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
21054 * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
21056 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
21058 * exceptions-x86.c: Fix stack space leaks.
21060 * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
21061 registers from the lmf if the method has save_lmf set.
21063 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
21065 * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
21066 of icall wrappers into InvokeInDomain, since these are now per-domain.
21068 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
21070 * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
21071 make some opcode emulation and intrinsic ops enabled/disabled
21072 according to the architecture. More fixes.
21074 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
21076 * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
21078 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
21080 * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
21081 arch-specific handling for 'this' and struct return type to
21082 arch-specific code.
21084 2003-11-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21086 * aot.c: prevent divide by zero error when reporting (it happened with
21087 Accessibility.dll).
21089 2003-11-25 Zoltan Varga <vargaz@freemail.hu>
21091 * mini.h (inst_switch): Remove unused macro.
21093 2003-11-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21096 (load_aot_module): free 'info->methods' and 'info' properly. No more
21097 "free(): invalid pointer blah" messages when you have an old aot
21100 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
21102 * jit-icalls.c, mini.c: Added support for context static fields.
21104 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
21106 * mini.c (mono_method_blittable): Methods which set LastError are not
21107 blittable either. Fixes #51108.
21109 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
21111 * mini.c: flush icache.
21112 * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
21114 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
21116 * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
21118 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
21120 * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
21123 * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with
21126 * inssel.brg (CEE_MKREFANY): Fix AOT case.
21128 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
21130 * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div
21131 instruction when the result is discarded.
21133 * iltests.il (test_0_div_regalloc): New regression test.
21135 * arrays.cs: Fix compilation error.
21137 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
21139 * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
21140 float rules to inssel-x86.brg: sane architectures with FP registers
21141 don't need to implement these rules.
21143 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
21145 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
21147 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
21149 * mini.h, inssel-long32.brg: fixed endianess issues in int64
21150 implementation of 32 bit systems.
21152 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
21154 * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
21155 (Jeroen Zwartepoorte).
21157 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
21159 * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
21160 the caller and the callee matches.
21162 * mini.c (mono_method_to_ir): Add comment.
21164 * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
21165 signbit is missing on some platforms.
21167 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
21169 * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
21171 * mini.c (setup_jit_tls_data): Call the new function.
21173 * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
21175 * mini-x86.c: Add experimental support for fast access to the lmf
21176 structure under NPTL/Linux 2.6.x.
21178 2003-11-06 Martin Baulig <martin@ximian.com>
21180 * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
21181 `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
21184 2003-11-02 Martin Baulig <martin@ximian.com>
21186 * mini.c (inflate_generic_field): New static method.
21187 (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
21188 generic instance and the field is declared in a generic type, call
21189 inflate_generic_field() to inflate it. Fixes gen-28.cs.
21191 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
21193 * mini.h mini.c (mono_method_same_domain): New function to return
21194 whenever the caller and the callee are in the same domain.
21196 * tramp-x86.c (x86_magic_trampoline): Use the new function.
21198 2003-10-30 Martin Baulig <martin@ximian.com>
21200 * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
21201 similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
21203 (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
21204 MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS().
21206 2003-10-29 Zoltan Varga <vargaz@freemail.hu>
21208 * mini.c mini-ops.h inssel.brg: Implement undeniable exception
21211 * mini.c (sigusr1_signal_handler): Move creation of the thread abort
21212 object here, so it is in the correct appdomain etc.
21214 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
21216 * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
21218 (mono_method_to_ir): Avoid freeing the type created returned from
21219 mono_type_create_from_typespec, since it is put into an internal cache
21220 by the function. Fixes pointer.exe.
21222 * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal
21223 trampolines for icalls and pinvokes as well. Fixes #33569.
21225 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
21227 * mini.c: Update after appdomain changes.
21229 * mini.c (mono_jit_compile_method_inner): Allways compile native
21230 method wrappers in the root domain, since there can only be one
21231 instance of them, whose address is stored in method->info.
21233 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
21235 * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
21236 environment variable. Instead detect automatically whenever running
21237 under valgrind using the magic macro RUNNING_ON_VALGRIND from
21240 2003-10-16 Miguel de Icaza <miguel@ximian.com>
21242 * trace.c, trace.h: New files that implement the new trace option
21245 * driver.c: Document new --trace options.
21247 * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
21250 - if (mono_jit_trace_calls)
21251 + if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
21253 * mini.h: prototypes.
21255 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
21257 * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
21259 * mini.c inssel.brg: Implement typedefbyref opcodes.
21261 * mini.c (mono_jit_compile_method): Remove unused local variable.
21263 * mini.c (mono_jit_compile_method_inner): Ditto.
21265 2003-10-12 Zoltan Varga <vargaz@freemail.hu>
21267 * tramp-x86.c (x86_class_init_trampoline): Fix build.
21269 * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
21271 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
21273 * mini.c (mono_no_aot): Remove unused global variable.
21275 * mini.c: Thread safety fixes.
21277 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
21279 * mini.c (mono_create_class_init_trampoline): Add a lock around
21280 class_init_hash_addr.
21282 * arrays.cs (test_0_newarr_emulation): Add new regression test for
21285 * mini.c: Decompose the NEWARR instruction before decomposing its
21286 arguments. Fixes #30073.
21288 2003-10-08 Zoltan Varga <vargaz@freemail.hu>
21290 * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
21293 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
21295 * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
21297 * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
21299 * driver.c: Add support for compiling icall wrappers to --compile.
21301 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
21303 * inssel.brg: The empty value in class->interface_offsets is -1, not
21306 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
21308 * objects.cs: New test for 'is' operator on an array of interfaces.
21310 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
21312 * tramp-ppc.c: update trampoline code to support jumps
21313 and class initialization.
21315 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
21317 * mini.c (mono_jit_compile_method): Fix reading of freed memory.
21319 * inssel.brg (OP_UNBOXCAST): Fix #46027.
21321 * inssel.brg (OP_UNBOX): Remove unused rule.
21323 * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
21324 region instead of one for each method. Fixes #47813.
21326 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
21328 * exceptions.cs (test_0_nested_finally): New regression test for
21329 nested exception handlers.
21331 * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
21333 * mini.c (mono_method_to_ir): Avoid inlining tail calls.
21335 * mini.c (mono_method_to_ir): Fix tail recursion in the presence of
21338 * mini.c (mono_method_check_inlining): Make the inlining limit
21339 configurable by an environment variable.
21341 * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
21343 * mini.h: Bump AOT file version.
21345 * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a
21346 token, store the image along with the token, since the token might not
21347 refer to the same image as the method containing the relocation,
21348 because of inlining.
21350 2003-09-27 Zoltan Varga <vargaz@freemail.hu>
21352 * mini.c (mono_precompile_assemblies): New function to compile
21353 all methods in all loaded assemblies.
21355 * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
21357 * regalloc.h regalloc.c (MonoRegState): Change the type of
21358 iassign and fassign to int*, since they can contain large negative
21359 values if the register is spilled. Also added some comments. Fixes
21362 * exceptions-x86.c (seh_handler): Fix handling of system exceptions
21363 under Win32. Fixes #42964.
21365 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
21367 * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
21369 * aot.c: Added support for AOT compiling methods which contain calls
21370 to wrappers. Currently, only remoting-invoke-with-check wrappers are
21373 * driver.c (compile_all_methods): Run the compilation in a thread
21374 managed by mono. Fixes #44023.
21376 * mini.c (mono_codegen): Print full method name in verbose output.
21378 * mini-x86.c (mono_arch_patch_code): Fix warning.
21380 * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
21381 jumps, since the method we are jumping to might be domain-specific.
21383 * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
21385 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
21387 * inssel.brg: string chars are unsigned.
21389 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
21391 * TODO: New todo item.
21393 * tramp-x86.c (x86_class_init_trampoline): New trampoline function
21394 which calls mono_runtime_class_init and patches the call site to
21395 avoid further calls.
21396 (mono_arch_create_class_init_trampoline): New arch specific function
21397 to create a class init trampoline.
21398 (create_trampoline_code): Generalized so it can create
21399 class init trampolines as well.
21401 * mini.c (helper_sig_class_init_trampoline): New helper variable.
21402 (mono_create_class_init_trampoline): New function to create and cache
21403 class init trampolines.
21404 (mono_find_class_init_trampoline_by_addr): New function to lookup the
21405 vtable given the address of a class init trampoline. Used by the
21407 (mono_codegen): Generate a call to a trampoline instead of
21408 mono_runtime_class_init in LDSFLD[A].
21409 (mono_codegen): Add relocations for the new trampoline.
21411 * mini.h mini-x86.c aot.c: Added a new relocation type:
21412 MONO_PATCH_INFO_CLASS_INIT.
21414 * mini.h: Bump AOT version number.
21416 * aot.c: Create a copy of the loaded code instead of using the original
21417 so methods which call each other will be close in memory, improving
21420 * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
21421 patch since it breaks the regression tests.
21423 * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
21424 for the register saving instruction sequence since the
21425 frame_state_for function in glibc 2.3.2 don't seem to detect it.
21427 2003-09-14 Zoltan Varga <vargaz@freemail.hu>
21429 * TODO: Fix todo item && remove another.
21431 2003-09-12 Zoltan Varga <vargaz@freemail.hu>
21433 * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
21436 * aot.c: Moved the check for MONO_LASTAOT into the initialization
21437 function of the module.
21439 * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
21440 turning on/off the usage of AOT code. Got rid of mono_no_aot and the
21441 --no-aot command line option.
21443 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
21445 * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
21446 by Bernie Solomon (bernard@ugsolutions.com).
21448 * inssel.brg: Refactor the interface offset table related code into
21449 its separate functions and add support for the AOT case.
21451 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
21453 * aot.c (mono_aot_get_method_inner): Fix memory leak.
21455 * aot.c: Added mono_aot_verbose variable and made all debugging
21456 output depend on the value of this variable.
21458 * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
21459 method_label and info_label.
21461 * mini.h mini-x86.c aot.c: Added a new relocation type
21462 MONO_PATCH_INFO_IID for klass->interface_id.
21464 * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
21465 the MonoJitInfo structure.
21467 * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
21468 a non-root appdomain in shared mode.
21470 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
21472 * aot.c: make aot loader less verbose. Remove free of unused variable.
21474 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
21476 * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
21478 * .cvsignore: Added *.dll.
21480 * mini.c (mono_print_tree_nl): New function callable while debugging.
21482 * mini.c (mono_print_code): Export this.
21484 * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
21487 2003-09-05 Zoltan Varga <vargaz@freemail.hu>
21489 * mini.h (MonoCompile): Added 'jit_info' field.
21491 * mini.c (mini_method_compile): Save the generated MonoJitInfo into
21492 the cfg structure, since it is needed by the AOT compiler.
21494 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
21496 * aot.c: A major rewrite. Changes include:
21497 - save exception tables for methods which have them.
21498 - cache failed lookups in aot_get_method () to avoid the (slow) calls
21499 to g_module_symbol.
21500 - reworked the file format so it is now much smaller and needs
21501 fewer relocation entries.
21503 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
21505 * aot.c (load_aot_module): Fix build bustage on platforms without
21508 2003-09-04 Martin Baulig <martin@ximian.com>
21510 * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
21512 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
21514 * TODO: Some new optimization ideas.
21516 * aot.c: Move AOT module loading logic here from mono_assembly_open.
21518 * aot.c: Save the optimization flags used to compile the code into
21521 * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
21522 support emitting domain specific code.
21524 * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is
21525 no longer domain neutral. It can be made domain neutral by compiling
21526 with --optimize=shared.
21528 * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
21529 between appdomains.
21531 * driver.c mini.h mini.c: New --no-aot debugging option which disables
21532 loading of AOT code.
21534 * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
21536 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
21537 if there is no domain neutrality information.
21539 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
21541 * aot.c (mono_compile_assembly): Emit a symbol containing the file
21542 format version into the generated library.
21544 * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
21545 callee method into the caller since one of them could be shared.
21547 * mini.h mini-x86.c aot.c: Added two new relocations so throwing
21548 system exceptions from AOT code now works.
21550 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling
21551 method if it is domain neutral and the callee is not.
21553 * graph.c (cfg_emit_one_loop_level): Fix warning.
21555 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
21557 * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
21560 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
21562 * mini.c (mini_init): Call mono_marshal_init () explicitly since it
21563 is needed by code which is executed before mono_runtime_init ().
21564 Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
21566 * mini.c (mono_thread_abort): Fix warning.
21567 (mono_jit_compile_method): Call static constructor in the AOT case too.
21569 * aot.c (mono_compile_assembly): Fix warning.
21571 2003-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21573 * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
21575 2003-08-28 Zoltan Varga <vargaz@freemail.hu>
21577 * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
21579 * cpu-pentium.md: Fix the length of call opcodes so they include the
21580 ESP restoring instruction. Fixes #47968.
21582 2003-08-28 Martin Baulig <martin@ximian.com>
21584 * mini-x86.c (mono_arch_call_opcode): Added support for
21585 MONO_TYPE_GENERICINST.
21587 * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.
21589 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
21591 * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
21592 a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
21594 * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
21597 2003-08-26 Martin Baulig <martin@ximian.com>
21599 * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
21600 when reporting an error, set this to the actual error location.
21601 (mono_method_to_ir): Report the correct error location if
21602 get_basic_blocks() returned an error.
21604 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
21606 * mini.c (mono_type_blittable): OBJECT is not blittable.
21607 (mono_method_blittable): Methods which have marshalling descriptors
21608 are not blittable either. Fixes #47842.
21610 2003-08-22 Zoltan Varga <vargaz@freemail.hu>
21612 * driver.c mini.c: Use an environment variable instead of a global
21613 variable. Also fix the build.
21615 * mini.c (mini_init): Call g_thread_init () to make glib thread-safe.
21616 Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
21619 * driver.c mini.c: Added --with-valgrind option to turn off some
21620 code which prevents mono from running under valgrind.
21622 * mini.c (mono_emit_call_args): Fixed warning.
21624 * mini.c (mono_emulate_opcode): Fixed warning.
21626 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21628 * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
21629 * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
21630 regalloc.c, regalloc.h: specify available registers in arch-specific
21631 code and support floats in the regallocator (patch by Laurent Morichetti
21634 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
21636 * mini.c: mono_thread_current() can be called only after
21637 mono_runtime_init(): rearrange code to not call it early on.
21639 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
21641 * mini.c: allocate jump tables in the code mempools.
21643 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21645 * mini.c, mini.h: make sure per-thread data allocated by the jit is
21648 2003-08-10 Miguel de Icaza <miguel@ximian.com>
21650 * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
21651 12 to 16. This fixes bug #47453.
21654 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
21656 * mini-ppc.c: fixed indexed load and unsigned compares.
21658 2003-08-06 Lluis Sanchez Gual <lluis@ximian.com>
21660 * mini.c: reenabled installation of handler for
21661 thread abort signal.
21663 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21665 * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
21666 by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
21667 until it's fixed and actually useful.
21669 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
21671 * inssel-long32.brg: couple more opcodes implemented.
21673 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
21675 * mini-sparc.c: Even more opcodes implemeted.
21677 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
21679 * mini-sparc.c: More opcodes implemented.
21681 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
21683 * mini-sparc.c: More opcodes implemented.
21685 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
21687 * inssel-sparc.brg: Add some needed rules. Direct
21689 * Makefile.am: Use inssel-sparc.brg
21690 * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
21691 an assert happy for now.
21693 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
21695 * mini-sparc.c: Fixed compile errors.
21696 * exceptions-sparc.c: Same. We now produce a mono binary
21697 on sparc-linux. Yea.
21699 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
21701 * mini-sparc.c: Renamed registers. Also some macro cleanups.
21702 * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
21703 They compile, but do not work.
21705 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21707 * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
21708 mini-sparc.h, tramp-sparc.c: Beginning of sparc support
21709 from Mark Crichton <crichton@gimp.org> and Christopher Taylor
21712 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21714 * mini.c: more opcodes implemented and better support for generics.
21716 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
21718 * cpu-g4.md, cpu-pentium.md: updates for new instructions.
21719 * mini.c, mini.h: first cut at generics support: some new instructions
21720 added and changed the behaviour of some of the existing ones.
21722 2003-07-21 Miguel de Icaza <miguel@ximian.com>
21724 * mini.c: Removed definition of metadata_shared mutex here.
21726 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
21728 * mini-x86.c: make vararg calls work for instance methods.
21730 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
21732 * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
21733 returns the arguments in a separte list, now.
21735 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
21737 * aot.c, mini.c: updates for array type representation changes.
21739 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
21741 * mini.c: register function to perform jit shutdown.
21743 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21745 * mini.c: use a faster allocator if possible.
21747 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
21749 * aot.c: some cleanups and portability changes.
21751 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
21753 * mini.c: use faster allocation for CEE_BOX if possible.
21755 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
21757 * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
21758 Moved inlined mempcy code to its own function so that is can be
21759 reused. Added an inline memset function as well (optimized initobj).
21760 * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
21762 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
21764 * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
21766 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
21768 * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
21769 arch code can setup the cpu for CLR execution, if needed.
21770 We use it on x86 to set the precision of FP operations.
21772 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
21774 * mini.c: disable some optimizations if we can guess they'll cost too
21775 much for a given method.
21777 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
21779 * mini.h mini.c: Rework last patch based on suggestions by Paolo.
21781 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
21782 * mini.h mini.c mini-x86.c: Added instruction level coverage
21783 info collection support.
21785 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21787 * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
21788 is now implemented in the profiling API. Get rid of a couple of
21789 unnecessary global variables.
21791 2003-06-15 Nick Drochak <ndrochak@gol.com>
21793 * basic-long.cs: tests for negative values for bigmul, and unsigned.
21794 * cpu-g4.md: add op_bigmul and op_bigmul_un
21795 * cpu_pentium.md: add op_bigmul_un
21796 * inssel-long32.brg: add rule for unsigned bigmul
21797 * mini-ops.h: define OP_BIGMUL_UN
21798 * mini-x86.c: THE BUG: handle (un)signed properly
21799 * mini.c: choose unsigned opcode if needed.
21800 This set of patches fixes bug #44291
21802 2003-06-13 Dietmar Maurer <dietmar@ximian.com>
21804 * mini.c (optimize_branches): improved to handle all kinds of
21805 conditional branches.
21807 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
21809 * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
21810 don't raise exceptions.
21812 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
21814 * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
21815 to arch-specific files.
21817 2003-06-09 Martin Baulig <martin@ximian.com>
21819 * Makefile.am (libs): Added $(LIBGC_LIBS).
21821 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
21823 * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
21824 and OP_ATAN (fixes bug#44293).
21826 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
21828 * Makefile.am, mini-x86.c: rename cpu description array to
21829 pentium_desc, since some compilers define the 'pentium' preprocessor
21832 2003-05-28 Dietmar Maurer <dietmar@ximian.com>
21834 * mini.c (mini_select_instructions): add explicit branch if the
21835 following block is not the false target of a conditional branch -
21836 we need this with any optimization that reorder or remove bblocks
21838 * mini.c (optimize_branches): bug fixes
21840 2003-06-06 Dietmar Maurer <dietmar@ximian.com>
21842 * mini.c (mono_method_to_ir): inline static readonly fields
21844 * ssa.c (fold_tree): start cfold support for long (very simple
21847 * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
21849 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
21851 * inssel.brg: fixed memcpy (bug #44219).
21853 2003-06-05 Dick Porter <dick@ximian.com>
21855 * driver.c: Set the glib log levels to not abort if g_message
21858 g_set_prgname() has to happen before mini_init() so that the
21859 process handle gets the info.
21861 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21863 * driver.c: add intrins to the default optimizations to get wider
21866 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
21868 * mini.h: some large basic blocks will overflow a 16-bit
21869 integers for symbolic registers.
21871 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
21873 * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
21874 (mono_arch_output_basic_block): fix bug 43499
21876 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
21878 * mini.c: kill duplicated definition of mono_debug_format.
21880 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
21882 * mini-x86.c, arrays.cs: fixed register allocation bug.
21884 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
21886 * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
21888 * mini.c (mini_get_opcode_for_method): inline IEEERemainder
21890 2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21893 (print_method_from_ip): also print source location information if
21896 2003-06-02 Dietmar Maurer <dietmar@ximian.com>
21898 * mini.c (mono_find_block_region): bug fix in region code
21899 (mini_method_compile): enable removing unreachable code again, but
21900 only in methods without exception clauses.
21902 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
21904 * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
21905 Implemented arglist opcode and handling of TypedReference type.
21906 Fixed x86 call convention when a structure is returned.
21907 Minimal support for calling static vararg methods.
21909 2003-05-30 Dietmar Maurer <dietmar@ximian.com>
21911 * mini.c (mini_method_compile): always remove unreachable code,
21912 because the code in them may be inconsistent (access to dead
21913 variables for example).
21915 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
21917 * driver.c, debug-mini.c: warning fixes.
21919 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
21921 * Makefile.am, jit.h, mini.h: install header for embedding mono.
21923 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
21925 * mini.c: thread-static fields are registered in mono_class_vtable(),
21926 so ensure the function is called before checking for them.
21928 2003-05-27 Dietmar Maurer <dietmar@ximian.com>
21930 * mini.c (optimize_branches): fix for bug 43586
21932 * jit-icalls.c (mono_llmult_ovf): added an additional check for
21933 overflow (fixes Bug #43639)
21935 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21937 * mini.c, objects.cs: allow the use of stobj for primitive types.
21939 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21941 * mini.c: be less strict about argument checking until we support
21942 running the verifier.
21944 2003-05-27 Nick Drochak <ndrochak@gol.com>
21946 * basic-long.cs: tests for (ulong)int * (ulong)int also
21947 * mini.c: use the same trick for (ulong)int * (ulong)int
21949 2003-05-27 Nick Drochak <ndrochak@gol.com>
21951 * basic-long.cs: add regression test for (long)int * (long)int
21952 * cpu-pentium.md: add op_bigmul specification
21953 * inssel-long32.brg: add OP_BIGMUL rule
21954 * mini-ops.h: add OP_BIGMUL
21955 * mini-x86.c: register allocator: handle case where src1 needs to be
21957 * mini.c: substitute special BIGMUL opcode in the tree for
21958 (long)int * (long)int
21960 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
21962 * jit-icalls.c: call the type ctor on field access if needed.
21964 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
21966 * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
21967 to a method (including results of ldelema, bug#43207).
21969 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
21971 * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
21972 colors to show exception handler blocks.
21974 * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
21975 (fix for pinvoke7.cs).
21977 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21979 * mini.h, mini.c: ensure correct initialization order for types that
21980 require it. Prepare for lazy compilation of jit icall wrappers.
21981 Provide a name for opcode emulation to reduce unneeded mallocing.
21983 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
21985 * mini-x86.c: better register restoring code and profiling
21986 support for tail calls.
21988 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21990 * mini.h, driver.c: prepare for leaf methods optimization.
21992 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
21994 * mini.c: get targets of branches before converting a method.
21996 2003-05-23 Dietmar Maurer <dietmar@ximian.com>
21998 * mini.c (optimize_branches): added some experimental code (disbaled)
22000 2003-05-22 Dietmar Maurer <dietmar@ximian.com>
22002 * mini.c (optimize_branches): fix branch to branch optimization
22004 * exceptions-x86.c (mono_arch_handle_exception): bug fix.
22006 * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
22008 * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
22010 * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
22013 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
22015 * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
22016 enable use of interface variables again.
22018 * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
22019 I1 to registers because there is no simply way to sign extend 8bit
22020 quantities in caller saved registers on x86.
22022 * inssel-float.brg: set costs of some rules to 2 so
22023 that monobure always select the arch. specific ones if supplied,
22024 regardless of the order we pass the files to monoburg.
22026 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
22028 * mini.c, mini-x86.c: since the magic trampoline for jumps
22029 can't patch the code directly, we do it as soon as the
22030 method gets compiled.
22032 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
22034 * mini-x86.c, mini.h: introduce a new patching method
22035 to support CEE_JMP and tail calls.
22036 * mini.c: obey tail.call. Don't precompile methods target
22038 * tramp-x86.c: new trampoline code to handle methods
22039 reached through a jump.
22041 2003-05-20 Dietmar Maurer <dietmar@ximian.com>
22043 * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
22044 bit values to registers
22046 2003-05-19 Dietmar Maurer <dietmar@ximian.com>
22048 * mini.c (mono_compile_get_interface_var): share interface
22049 variables if possible.
22051 2003-05-16 Martin Baulig <martin@ximian.com>
22053 * debug-mini.c (mono_init_debugger): New function to initialize
22054 the debugger. This is not in the debugger since it needs to
22055 access some of mini's internals.
22057 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
22059 * mini.c (mono_method_to_ir): inlining fixes/cleanups
22061 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
22063 * mini.c, mini-opts.h, inssel.brg: inline small memcpy
22064 for value type handling.
22066 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
22068 * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
22069 (mono_method_check_inlining): enable inlining of all kinds of wrappers
22071 2003-05-15 Lluis Sanchez Gual <lluis@ideary.com>
22073 * mini.c: fixed little bug in CEE_NEWOBJ case when calling
22074 the constructor through a proxy.
22076 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
22078 * jit-icalls.c, inssel.brg: fixes to array element address
22081 2003-05-15 Dietmar Maurer <dietmar@ximian.com>
22083 * mini-x86.c (is_regsize_var): allocate pointer to registers
22085 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
22087 * driver.c: fixed typo, added intrins to the set of optimizations
22088 tested with regressions.
22090 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
22092 * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
22093 * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
22096 2003-05-14 Dietmar Maurer <dietmar@ximian.com>
22098 * inssel.brg: remove some common pop instructions without side effects
22100 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
22102 * inssel-x86.brg: fixed thinko in int to double conversions.
22104 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
22106 * mini.c, jit-icalls.c: added runtime thread-static variable support.
22108 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
22110 * inssel-long32.brg: two more missing instructions.
22112 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
22114 * mini.c (mono_emit_call_args): set the cil_code for all arguments
22115 if not already set.
22117 2003-05-12 Zoltan Varga <vargaz@freemail.hu>
22119 * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
22122 * basic-float.cs: Added tests for negative zero.
22124 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
22126 * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
22127 a couple of missing operations for long casts, with test cases.
22129 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22131 * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
22133 2003-05-09 Dietmar Maurer <dietmar@ximian.com>
22135 * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
22136 code size estimation.
22138 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
22140 * mini.c (mono_jit_create_remoting_trampoline): make it work with
22141 abstract methods (fix bug 42542)
22143 * aot.c: add ability to handle array types
22145 2003-05-08 Zoltan Varga <vargaz@freemail.hu>
22147 * mini.c: Call the _specific versions of the object allocation
22148 functions if possible.
22150 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
22152 * driver.c: call setlocale ().
22154 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
22156 * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
22159 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
22161 * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
22163 * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
22164 wrappers (fix bug 42122)
22166 2003-05-04 Martin Baulig <martin@ximian.com>
22168 * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
22170 * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
22171 s/mini_set_defaults/mono_set_defaults/g.
22173 2003-05-04 Martin Baulig <martin@ximian.com>
22175 * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
22177 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22179 * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
22180 (reported by Don Roberts).
22182 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
22184 * mini.c: temporarily work around two bugs for this release.
22186 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
22188 * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
22189 that contains -export-dynamic and it makes using the ld script
22191 * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
22193 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
22195 * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
22198 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
22200 * mini.c: make sure leave calls all the needed finally blocks,
22201 even when the target jumps out of multiple exception clauses.
22203 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
22205 * ldscript, Makefile.am: add linker script to reduce the number of
22206 exported symbols (should also fix the issues with libwine defining
22207 some of the same symbols in io-layer).
22209 2003-05-01 Zoltan Varga <vargaz@freemail.hu>
22211 * driver.c (mini_main): Avoid assertion when no file name is given on
22214 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
22216 * driver.c: added --version/-V command line option.
22217 Added the inline optimization in the regression tests.
22219 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
22221 * mini.c, basic-calls.cs: when inlining, save arguments to locals according
22222 to the type in the method signature (fixes bug#42134).
22224 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
22226 * mini.c: when inlining, check this is not null only when needed (bug #42135).
22228 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
22230 * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
22232 2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22234 * driver.c: fixed bug #42100.
22236 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
22238 * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
22240 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
22242 * mini.c: moved most of the code required to do inlining to its own
22243 function so it can be reused. Inline also ctors if appropriate.
22245 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
22247 * Makefile.am: Link with -export-dynamic so shared libs loaded by
22248 the runtime can call mono API functions.
22250 2003-04-27 Martin Baulig <martin@ximian.com>
22252 * debug-mini.c (mono_debug_init_method): Added
22253 `guint32 breakpoint_id' argument; if the method has a breakpoint,
22254 send a notification to the debugger.
22256 * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
22257 running in the Mono Debugger, just pass the breakpoint number to
22258 mono_debug_init_method().
22260 * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
22262 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
22264 * mini.c: allow some more unsafe compares.
22266 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
22268 * mini-x86.c, Makefile.am: make distcheck works (partially from
22269 a patch by Richard Lee <r.h.lee@attbi.com>).
22270 * regset.c, regset.h: removed, they are unused.
22272 2003-04-25 Dick Porter <dick@ximian.com>
22274 * driver.c: Usage reports the name as 'mono' not 'mini'
22275 * exceptions-x86.c: Build and run on freebsd
22277 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
22279 * Makefile.am: install the program with the 'mono' name and
22280 the library as libmono instead of mini and libmini.
22282 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
22284 * driver.c: provide the APIs for the embedding interface of the old jit.
22286 2003-04-23 Dietmar Maurer <dietmar@ximian.com>
22288 * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
22290 2003-04-23 Martin Baulig <martin@ximian.com>
22292 * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
22294 * driver.c: Added `--debug' command line argument to enable
22297 2003-04-23 Martin Baulig <martin@ximian.com>
22299 * debug.[ch]: Removed. The code is now in
22300 ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
22302 * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
22305 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
22307 * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
22309 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22312 (mini_cleanup): moved mono_runtime_cleanup call after the call to
22313 mono_domain_finalize.
22314 (mini_method_compile): use mono_method_profile* if the the option is
22317 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
22319 * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
22320 methods with their wrapper.
22322 * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
22323 methods with their wrapper.
22325 * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
22328 * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
22331 * mini.c (mono_method_check_inlining): Avoid inlining synchronized
22334 2003-04-17 Dietmar Maurer <dietmar@ximian.com>
22336 * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
22338 2003-04-16 Dietmar Maurer <dietmar@ximian.com>
22340 * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
22341 of the mempool. This is slightly faster and uses less memory
22343 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
22345 * mini.c: avoid O(n) allocation for variables.
22347 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
22349 * mini.c: handle items on the stack after inlining methods.
22351 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
22353 * mini.c: make the method->opcode optimization dependent
22354 on MONO_OPT_INSTRINS and do it lazily.
22356 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
22358 * driver.c: print overall results at the end of regression run.
22360 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
22362 * inssel.brg: don't overwrite symbolic registers.
22364 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
22366 * inssel-x86.brg: fix conversion from long to float.
22368 2003-04-11 Dietmar Maurer <dietmar@ximian.com>
22370 * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
22372 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
22374 * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
22376 * driver.c: Added --print-vtable option as in the old JIT.
22378 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
22380 * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
22382 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
22384 * inssel.brg, basic.cs: fixed checked conversions to byte and short.
22386 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
22388 * mini.c regalloc.c regalloc.h: Fix memory leak.
22390 2003-04-09 Dietmar Maurer <dietmar@ximian.com>
22392 * aot.c (mono_aot_get_method): register all used strings
22394 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
22396 * mini.c: always intern strings references with ldstr at compile time.
22398 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
22400 * Makefile.am: add BUILT_SOURCES.
22402 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
22404 * driver.c: give a better error message when the assembly to execute
22405 doesn't have an entry point.
22407 2003-04-07 Dietmar Maurer <dietmar@ximian.com>
22409 * Makefile.am: added hack for automake
22411 * mono/mini/mini.c (mono_save_args): always copy arguments to keep
22414 * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
22416 22003-04-07 Martin Baulig <martin@ximian.com>
22418 * Makefile.am: Added Makefile.am.
22420 * debugger-main.c: Removed, this is now in the debugger where it
22423 * mini.pc.in: Call this package `mini' for the moment.