1 2010-06-23 Miguel de Icaza <miguel@novell.com>
3 * Makefile.am: Build the mono-sgen binary a Mono VM with the Sgen
4 GC enabled as well as libmono-sgen-2.0 and libomonosgen-static
6 * driver.c: Do not depend on the USED_GC_NAME when using SGen, use
7 it only for Boehm diagnostics.
9 * Makefile.am: Make the file a bit more consistent.
11 * debug-debugger.c: Wrap the entire file with an #ifdef
12 MONO_DEBUGGER_SUPPORTED to simplify the build.
14 * Makefile.am: Fix the opcodes build issue by including the
15 source, not by including the .lo file directly
17 Always bring the MDB sources into the build, to drop the
18 dependency on the AM_CONDITIONAL from configure.in as the hard
19 debugger supports Boehm, but not Sgen, this simplifies the build.
21 * Renamed the *.s files into *.S
23 2010-06-24 Rodrigo Kumpera <rkumpera@novell.com>
25 * method-to-ir.c (mono_emit_wb_aware_memcpy): Don't emit bitmap
26 wb for now on 64bits systems while issues with valuetype returns
29 2010-06-24 Zoltan Varga <vargaz@gmail.com>
31 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add support for using a standard set of
32 passes by calling createStandardFunctionPasses ().
34 2010-06-23 Zoltan Varga <vargaz@gmail.com>
36 * mini.h (MONO_INS_HAS_NO_SIDE_EFFECT): Add OP_LDADDR.
38 2010-06-22 Zoltan Varga <vargaz@gmail.com>
40 * method-to-ir.c (mono_method_to_ir): Don't mark loads from OP_LDADDR with
43 * mini-llvm.c (mono_llvm_emit_method): Recalculate MONO_INST_INDIRECT flags to
44 allow better optimization if the OP_LDADDR which caused the flag to be set was
47 * exceptions-amd64.c (get_throw_trampoline): Align the stack properly.
49 * mini-amd64.c (mono_arch_emit_exceptions): Pass only the type token index, not
52 * mini-llvm.c (emit_entry_bb): Save the this argument only in gshared methods.
54 * mini-llvm.c: Fix a couple memory leaks. Get rid of a few #ifdefs.
56 2010-06-22 Zoltan Varga <vargaz@gmail.com>
58 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Call patch_callsite ()
59 to handle the code sequence generated for non-near calls. Fixes #616056.
61 2010-06-21 Zoltan Varga <vargaz@gmail.com>
63 * exceptions-x86.c (mono_arch_find_jit_info_ext): Adjust eip in the lmf case too.
65 * exceptions-x86.c: Add a resume_unwind trampoline for LLVM.
67 * mini-llvm.c (exception_cb): For nested clauses, add the same try range to the
69 (mono_llvm_check_method_supported): Enable llvm for methods with nested clauses.
70 (mono_llvm_emit_method): Instead of calling 'mono_resume_unwind' directly, call a
71 trampoline which saves the context, so changes made to callee saved registers in
72 finally clauses are visible to a nesting catch clause.
74 * exceptions-amd64.c: Add a resume_unwind trampoline for LLVM.
76 * mini-exceptions.c (mono_handle_exception_internal): Fix support for nested clauses
77 in LLVM compiled code.
78 (mono_handle_exception_internal): Add a 'ctx' argument containing the state after
79 the finally handler has ran.
81 * mini.h (ResumeState): New structure containing information required to resume
82 exception handling after executing LLVM compiled finally clauses.
84 * exceptions-amd64.c (get_throw_trampoline): Clean up the amd64 throw trampolines a
85 bit, by passing all the registers as one argument.
87 2010-06-19 Zoltan Varga <vargaz@gmail.com>
89 * tramp-amd64.c (mono_arch_create_generic_trampoline): Increase the buf len a little,
92 2010-06-18 Zoltan Varga <vargaz@gmail.com>
94 * aot-compiler.c (emit_klass_info): Mark unloadable classes properly.
96 * aot-compiler.c aot-runtime.c: Fix LLVM support.
98 * mini-llvm.c: When emitting OP_CALL_HANDLER, avoid branching directly to the landing
99 pad, branch to a new bblock instead.
101 * aot-compiler.c (emit_method_code): Use cfg->header instead of the header of
104 * exceptions-amd64.c (mono_arch_exceptions_init): Fix fullaot support.
106 * mini-llvm.c (process_bb): Add support for OP_SQRT when using the LLVM mono branch.
108 2010-06-17 Geoff Norton <gnorton@novell.com>
111 * exceptions-arm.c: Move the UCONTEXT macros to mono-sigcontext.h so they
114 2010-06-17 Zoltan Varga <vargaz@gmail.com>
116 * aot-compiler.c (emit_klass_info): Handle type load exceptions.
118 * method-to-ir.c (mono_method_to_ir): Avoid a crash if mono_method_get_header ()
121 * exceptions-x86.c (mono_x86_throw_corlib_exception): Negate the decrement of
122 the ip done by throw_exception (), it is not needed for corlib exceptions.
124 2010-06-17 Rodrigo Kumpera <rkumpera@novell.com>
126 * method-to-ir.c (mono_emit_wb_aware_memcpy): Simplify this function.
127 Call new jit icall mono_gc_wbarrier_value_copy_bitmap for vt wbarrier
128 of size > 5 words. This support fast barriers for value types up to
129 256/512 bytes which beyond that the copying itself is the major issue.
131 * method-to-ir.c (mini_emit_stobj): The intrinsic version is safe
132 for gsharing, so use it.
134 This eliminate all calls to mono_value_copy from managed code in
135 gmcs, fsharp and ipy.
137 This gives a 2% perf boost on ipy and 1% on gmcs over previous patches.
139 Even thou a lot of mono_value_copy calls were eliminated from fsharp,
142 * mini.c (mini_init): Register new icall.
144 2010-06-17 Rodrigo Kumpera <rkumpera@novell.com>
146 * method-to-ir.c (mono_emit_wb_aware_memcpy): Handle nested valuetypes.
147 This eliminates 2% of mono_value_copy calls on ipy and 12% on fsharp.
149 2010-06-17 Rodrigo Kumpera <rkumpera@novell.com>
151 * method-to-ir.c (mini_emit_stobj): Don't call mono_value_copy for small
152 value types as the overhead is huge. Manually expand it up to 5 words to
155 This improves gmcs times by 5% and unmodified binary-tree by 78%. The later
156 is an exception that performance is dominated by mono_value_copy.
158 This puts sgen about 5% ahead of boehm in terms of wall-clock on a Core2Quad.
160 2010-06-17 Zoltan Varga <vargaz@gmail.com>
162 * mini-llvm.c (process_call): Disable LLVM for calls to generic class init
163 trampolines on x86, since those have their own cconv.
165 * exceptions-x86.c (mono_arch_exceptions_init): Implement the llvm throw corlib
166 exception trampolines.
168 * tramp-x86.c: Add xdebug info for a few trampolines.
170 * mini-llvm.c: Set the name of the arguments.
172 * mini-llvm.c (emit_cond_system_exception): Pass the ip of to throw_corlib_trampoline
173 using a block address if using the LLVM mono branch.
175 * exceptions-amd64.c (mono_arch_exceptions_init): Add new LLVM throw corlib exception
178 2010-06-15 Zoltan Varga <vargaz@gmail.com>
180 * mini-ppc.c (mono_arch_get_cie_program): Define this for powerpc too.
182 * mini-llvm.c (process_bb): Add a missing CHECK_FAILURE.
184 * mini.c (mini_init): Remove some of the llvm restrictions, they are no longer needed.
186 * method-to-ir.c (mono_method_to_ir): Enable fast virtual calls when using llvm.
188 * mini-trampolines.c (mono_llvm_vcall_trampoline): Rewrite this to use one vtable
189 trampoline per vtable slot index. The slot, along with the 'this' argument is enough
190 to identify the vtable slot address plus the method which needs to be compiled.
192 * mini.c (mini_get_vtable_trampoline): Use one vtable trampoline per vtable slot when
195 * mini-x86.c (get_call_info_internal): Change the managed calling convention so
196 'this' is always passed as the first argument, before the vtype ret arg. This
197 simplifies get_this_arg_reg () and LLVM integration.
199 * mini-amd64.c (get_call_info): Fix the handling of MONO_TYPE_TYPEDBYREF after
202 * tramp-x86.c (mono_arch_create_generic_trampoline): Emit unwind info for
205 * mini-x86.c (mono_arch_get_cie_program): Implement this for x86.
207 * mini-llvm.c: Fix compilation with llvm 2.6.
209 * mini-amd64.c (CallInfo): Fix the position of the vret_arg_index field.
211 * mini-llvm.c (mono_llvm_emit_method): Fix the build if LLVM_MONO_BRANCH is not
214 * mini-amd64.c (get_call_info): Change the managed calling convention so 'this'
215 is always passed as the first argument, before the vtype ret arg. This simplifies
216 get_this_arg_reg () and LLVM integration.
218 2010-06-14 Rodrigo Kumpera <rkumpera@novell.com>
220 * method-to-ir.c (mono_method_to_ir): Add support for .ctor intrinsics.
222 * method-to-ir.c (mini_emit_inst_for_ctor): New function for .ctor intrinsics.
223 For now just call simd intrinsics. This makes "x[0] = new Vector4f (10)"
224 translate into much nicer code.
226 2010-06-14 Zoltan Varga <vargaz@gmail.com>
228 * mini-llvm.c (sig_to_llvm_sig_full): Add a 'sinfo' out argument which returns
229 parameter index information. Use this to simplify a lot of code.
231 * unwind.c (mono_unwind_decode_fde): Handle augmentions using a loop.
233 2010-06-12 Zoltan Varga <vargaz@gmail.com>
235 * aot-compiler.c (compile_method): Add a 'depth' parameter to add_generic_class too
236 to fix infinite generic recursion. Fixes #612702.
238 2010-06-11 Zoltan Varga <vargaz@gmail.com>
240 * object.c: Use a callback to create IMT trampolines, allowing the usage of one
241 imt trampoline per imt slot when using LLVM.
243 2010-06-10 Jonathan Pryor <jpryor@novell.com>
245 * mini.c (mini_cleanup): Call mono_runtime_shutdown(). Fixes #438454.
247 2010-06-09 Levi Bard <levi@unity3d.com>
249 * debugger-agent.c: Clear unloaded types on appdomain unload.
251 2010-06-08 Zoltan Varga <vargaz@gmail.com>
253 * liveness.c (visit_bb): Make the component vregs of long vars volatile as well.
256 * exceptions.cs: Add a test.
258 2010-06-06 Zoltan Varga <vargaz@gmail.com>
260 * mini-llvm.c (mono_llvm_check_method_supported): Only disable llvm for nested clauses.
262 * mini.c (mini_method_compile): Move the LLVM checks to a function in mini-llvm.c.
264 * mini.c (mono_jit_runtime_invoke): Initialize *exc to NULL before calling the wrapper,
265 so it doesn't have to do it.
267 * helpers.c (mono_disassemble_code): Flush stdout, so the output from the spawned
268 process does not mix with ours.
270 * mini-llvm.c (mono_llvm_emit_method): Refactor this giant function into smaller
273 * mini-llvm.c method-to-ir.c ir-emit.h: When using the llvm mono branch, allow
274 loads/stores which can throw exceptions inside clauses.
276 2010-06-05 Zoltan Varga <vargaz@gmail.com>
278 * mini-llvm.c (mono_llvm_emit_method): Fix support for finally clauses with more than
281 * mini.c (mini_init): Register mono_resume_unwind as an icall.
283 2010-06-03 Zoltan Varga <vargaz@gmail.com>
285 * dwarfwriter.c: Update after the mono_debug_lookup_locals () changes.
287 * debugger-agent.c (method_commands_internal): Ditto. Return scope information for
290 2010-06-03 Zoltan Varga <vargaz@gmail.com>
292 * debugger-agent.c (appdomain_unload): Clear all breakpoint instances in the dying
295 2010-06-02 Zoltan Varga <vargaz@gmail.com>
297 * method-to-ir.c (set_rgctx_arg): New helper function to remove some duplicate code.
298 Use a separate generic class init trampoline for llvm, since it needs a different
301 * unwind.c (mono_unwind_decode_fde): Make this decode the mono specific LSDA which
302 includes the location of this/rgctx.
304 * mini-llvm.c aot-runtime.c: Enable generic sharing for llvm if using the LLVM mono
307 2010-06-01 Zoltan Varga <vargaz@gmail.com>
309 * mini.c (mini_method_compile): Enable llvm+exceptions on LLVM SVN.
311 * mini-llvm.c (emit_cond_system_exception): Disable llvm when this occurs in a
314 2010-05-31 Zoltan Varga <vargaz@gmail.com>
316 * unwind.c (mono_unwind_decode_fde): The FDE only has an augmention if the CIE
319 * aot-runtime.c (decode_eh_frame): Fix an assert condition.
321 * aot-compiler.c (patch_to_string): New debugging helper function.
323 2010-05-30 Zoltan Varga <vargaz@gmail.com>
325 * exceptions-amd64.c (get_throw_trampoline): Fix the xdebug name of the corlib
328 * exceptions-x86.c (mono_arch_exceptions_init): Create an llvm rethrow trampoline too.
330 * mini-llvm.c (mono_llvm_emit_method): Implement OP_RETHROW.
332 * method-to-ir.c (mono_method_to_ir): Emit a OP_NOT_REACHED after a rethrow.
334 * mini-llvm.c (emit_call): Compute the containing try clause correctly for nested
337 * mini.c (create_jit_info): Print EH clause info for LLVM too.
339 2010-05-28 Mark Probst <mark.probst@gmail.com>
341 * method-to-ir.c (mono_method_to_ir): Emit a write barrier for
342 cpobj with reference types.
344 2010-05-28 Mark Probst <mark.probst@gmail.com>
346 * method-to-ir.c (mono_method_to_ir): Only explicitly add the
347 write barrier for reference types.
349 2010-05-27 Zoltan Varga <vargaz@gmail.com>
351 * mini-s390x.c (mono_arch_output_basic_block): Applied patch from Aurelien Minvielle
352 . Fix OP_ATOMIC_EXCHANGE_I4 on s390x. Fixes #609023.
354 2010-05-31 Martin Baulig <martin@ximian.com>
358 * debugger-agent.c (breakpoints_cleanup): Iterate over `event_requests', call
359 clear_breakpoint() on all breakpoint events and remove them from the list.
361 2010-05-27 Martin Baulig <martin@ximian.com>
365 * debugger-agent.c (method_commands, type_commands): Temporarily
366 set the appdomain while executing this method; do all metadata
367 calls in the debuggee's appdomain where user assemblies are loaded.
369 2010-05-27 Zoltan Varga <vargaz@gmail.com>
371 * mini-s390x.c (mono_arch_get_delegate_invoke_impls): Fix the s390x build.
373 2010-05-26 Rodrigo Kumpera <rkumpera@novell.com>
375 * method-to-ir.c (mono_method_to_ir): Add missing write barrier to stobj.
377 2010-05-26 Zoltan Varga <vargaz@gmail.com>
379 * method-to-ir.c: Instead of freeing method headers immediately, save them in a list in
380 MonoCompile, and free them in mono_destroy_compile (), since the MonoType's in them could
381 be referenced even after the header is freed.
383 * aot-runtime.c: Remove the half finished support for decoding the .arm_exidx
386 2010-05-25 Zoltan Varga <vargaz@gmail.com>
388 2010-05-25 Bill Holmes <billholmes54@gmail.com>
390 * genmdesc.c (main): Fixing the detection of the nacl switch.
392 Code is contributed under MIT/X11 license.
394 2010-05-25 Zoltan Varga <vargaz@gmail.com>
396 * exceptions-amd64.c (mono_arch_find_jit_info_ext): Adjust the ip for LMF frames too.
398 * mini-llvm.c aot-compiler.c: More LLVM 2.8 updates.
400 * mini.h (LLVM_CHECK_VERSION): New helper macro.
402 2010-05-25 Miguel de Icaza <miguel@novell.com>
404 * genmdesc.pl (build_spec): Add support for nacl: keyword also to
407 * genmdesc.c: Added support for nacl: key on the machine
408 description files to support the extra space required by Google
411 2010-05-23 Zoltan Varga <vargaz@gmail.com>
413 * mini.c (mono_jit_compile_method_inner): Propagate exceptions in one more place.
415 2010-05-23 Zoltan Varga <vargaz@gmail.com>
417 * mini.c (mono_jit_compile_method_inner): Propagate exceptions from
418 mono_runtime_class_init_full ().
419 (mono_jit_runtime_invoke): Ditto. Fixes #608073.
421 2010-05-22 Zoltan Varga <vargaz@gmail.com>
423 * mini-llvm.c mini-llvm-cpp.cpp: Update after LLVM 2.8 changes.
425 2010-05-21 Zoltan Varga <vargaz@gmail.com>
427 * mini-ppc.c (mono_arch_output_basic_block): Use ins->inst_c1 instead of p1, the
428 two are not the same on ilp32.
430 2010-05-21 Zoltan Varga <vargaz@gmail.com>
432 * mini.c (mono_jit_compile_method_inner): Remove a DISABLE_JIT block which was
435 * mini-ppc.c: Fix the DISABLE_JIT build.
437 2010-05-20 Zoltan Varga <vargaz@gmail.com>
439 * aot-runtime.c (decode_resolve_method_ref): Rename this from decode_method_ref_2.
440 (make_writable): Remove this unused function.
442 2010-05-20 Zoltan Varga <vargaz@gmail.com>
444 * aot-compiler.c: Collect all information about a PLT entry into a separate MonoPltEntry
445 structure. Make the labels to plt entries local symbols instead of assembler local
446 labels, since tha latter causes problems for the iphone linker.
448 2010-05-19 Zoltan Varga <vargaz@gmail.com>
450 * mini-ppc.c (mono_ppc_is_direct_call_sequence): Handle one more case with ilp32.
452 2010-05-17 Zoltan Varga <vargaz@gmail.com>
454 * mini-ppc.c (mono_ppc_is_direct_call_sequence): Handle ilp32.
455 (ppc_patch_full): Ditto.
457 * mini-arm.c (mono_arch_build_imt_thunk): Fix the fail_tramp case.
459 * method-to-ir.c (mono_method_to_ir): Use fast generic virtual method invocation
460 if gshared is enabled, to avoid asserts in the trampoline code.
462 * mini-ia64.c (mono_arch_build_imt_thunk): Implement generalized imt thunks
465 2010-05-15 Geoff Norton <gnorton@novell.com>
467 * dwarfwriter.c, xdebug.c: Fix a pretty large leak when running in
470 2010-05-14 Geoff Norton <gnorton@novell.com>
472 * exceptions-x86.c: Fix the alignment of this trampoline so we dont get a
473 misaligned stack on darwin.
475 2010-05-14 Zoltan Varga <vargaz@gmail.com>
477 * mini-arm.c aot-compiler.c: Implement support for generalized imt thunks on
480 2010-05-14 Zoltan Varga <vargaz@gmail.com>
482 * xdebug.c: Fix ARM support.
484 2010-05-13 Zoltan Varga <vargaz@gmail.com>
486 * exceptions-x86.c (mono_arch_handle_exception): Resume from the signal handler
487 and do most of the work on the normal stack.
488 (mono_x86_get_signal_exception_trampoline): New x86 specific trampoline function.
490 2010-05-13 Zoltan Varga <vargaz@gmail.com>
492 * aot-compiler.c: Put non-code data into the .rodata section on linux.
494 2010-05-13 Zoltan Varga <vargaz@gmail.com>
496 * exceptions-arm.c (mono_arch_handle_exception): Fix the cross-compile case.
498 2010-05-13 Zoltan Varga <vargaz@gmail.com>
500 * exceptions-arm.c (mono_arch_handle_exception): Resume from the signal handler
501 and do most of the work on the normal stack.
503 2010-05-13 Zoltan Varga <vargaz@gmail.com>
505 * exceptions-amd64.c (mono_arch_handle_exception): Resume from the signal handler
506 and do most of the work on the normal stack even if sigaltstack is disabled.
508 2010-05-12 Zoltan Varga <vargaz@gmail.com>
510 * exceptions-amd64.c (mono_arch_sigctx_to_monoctx): Simplify this now that
511 UCONTEXT_REG_ constants are available on linux as well.
512 (mono_arch_monoctx_to_sigctx): Ditto.
513 (mono_arch_ip_from_context): Ditto.
515 2010-05-12 Zoltan Varga <vargaz@gmail.com>
517 * debugger-agent.c (set_breakpoint): Fix setting of pending breakpoints in
520 2010-05-11 Zoltan Varga <vargaz@gmail.com>
522 * aot-compiler.c (emit_plt): Don't align the plt to a pagesize on x86, it is
525 2010-05-10 Zoltan Varga <vargaz@gmail.com>
527 * debugger-agent.c (insert_breakpoint): Print a more descriptive error message
528 if a breakpoint cannot be inserted.
530 2010-05-08 Zoltan Varga <vargaz@gmail.com>
532 * aot-compiler.c (emit_and_reloc_code): Fix a warning.
534 2010-05-07 Zoltan Varga <vargaz@gmail.com>
536 * debugger-agent.c (frame_commands): Return an error instead of asserting if
537 no JIT info is found for the method.
539 2010-05-05 Jonathan Chambers <joncham@gmail.com>
541 * debugger-agent.c (mono_debugger_agent_thread_interrupt): Protect against a NULL sigctx
544 2010-05-05 Zoltan Varga <vargaz@gmail.com>
546 * mini-amd64.c (mono_arch_get_trampolines): New arch specific function returning
547 a list of arch specific trampolines.
549 * aot-compiler.c (emit_trampolines): Use it.
551 2010-05-05 Zoltan Varga <vargaz@gmail.com>
553 * tramp-<ARCH>.c exceptions-<ARCH>.c mini-trampolines.c mini-exceptions.c
554 aot-compiler.c: Use the _full trampoline creation functions on all platforms,
555 get rid of the _full from their name.
557 2010-05-05 Zoltan Varga <vargaz@gmail.com>
559 * tramp-x86.c (mono_arch_create_generic_trampoline): Call
560 get_nullified_class_init_trampoline to remove some code duplication.
562 2010-05-03 Zoltan Varga <vargaz@gmail.com>
564 * mini-x86.c (mono_arch_emit_prolog): Fix full-aot support for thread
567 2010-05-01 Zoltan Varga <vargaz@gmail.com>
569 * mini-amd64.c (mono_arch_emit_load_aotconst): New arch-specific function.
571 * tramp-amd64.c: Use emit_load_aotconst to remove some code duplication.
573 * aot-runtime.c (init_plt): Make the default entries point to the AOT trampoline,
574 there is no need to jump through the first plt entry.
576 * aot-runtime.c (mono_aot_get_named_code): Rename to mono_aot_get_trampoline.
578 * aot-runtime.c (mono_aot_get_plt_entry): Move the arch specific parts to an
579 arch-specific function.
580 (mono_aot_get_plt_info_offset): Ditto.
582 * aot-runtime.c (mono_aot_register_jit_icall): New helper function called from
583 mono_arch_init () to register jit icalls called from full-aot trampolines.
584 (load_function): Get rid of the arch specific #ifdefs, move the relevant code
587 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception_full): Get rid of
588 the specialized throw corlib exception trampoline, use a variant of the normal
589 trampoline along with a new C function which does the call to
590 mono_exception_from_token (), just like on x86.
592 2010-05-01 Zoltan Varga <vargaz@gmail.com>
594 * mini-trampolines.c aot-compiler.c tramp-<ARCH>.c exceptions-<ARCH>.c:
595 Reorganize the full aot trampoline creation functions, instead of taking a bunch
596 of out arguments, they will now take a MonoTrampInfo** out argument. Simplify
597 some code in aot-compiler.c because of this. Remove the non-full aot trampoline
598 creation functions on architectures which have the full-aot ones.
600 2010-05-01 Zoltan Varga <vargaz@gmail.com>
602 * mini-ppc.c (mono_arch_decompose_long_opts): Fix LNEG.
604 2010-05-01 Zoltan Varga <vargaz@gmail.com>
606 * mini-ppc.c (mono_arch_emit_exceptions): Initialize exc_throw_pos/found
607 explicitly, this seems to be required by some gcc versions at -O2.
611 2010-05-01 Zoltan Varga <vargaz@gmail.com>
613 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Fix full-aot support for
614 has_target delegate invokes.
616 2010-05-01 Zoltan Varga <vargaz@gmail.com>
618 * mini.h (MonoAotTrampInfo): Rename this to MonoTrampInfo, add patches/unwind
621 * aot-compiler.c (mono_aot_tramp_info_create): Rename to mono_tramp_info_create,
622 add patches/unwind info arguments, move to mini.c.
624 * mini-<ARCH>.c aot-compiler.c: Update after the above changes.
626 2010-04-30 Zoltan Varga <vargaz@gmail.com>
628 * debugger-agent.c (type_commands): Add a new CMD_TYPE_GET_SOURCE_FILES_2
629 command which returns full path names.
631 2010-04-29 Zoltan Varga <vargaz@gmail.com>
633 * tramp-x86.c (mono_arch_create_generic_class_init_trampoline_full): Set the
634 code_size output variable.
636 * mini-x86.c (mono_arch_emit_prolog): Compute the GOT addr before calling
639 2010-04-29 Zoltan Varga <vargaz@gmail.com>
641 * mini-x86.c (mono_arch_emit_prolog): Remove a disable_aot which is not needed.
642 (mono_arch_cpu_optimizazions): Make this a no-op when running with full aot.
643 (mono_arch_cpu_enumerate_simd_versions): Ditto.
645 2010-04-29 Zoltan Varga <vargaz@gmail.com>
647 * image-writer.c (asm_writer_emit_alignment): Use ilog2 for alignments for the
650 2010-04-29 Zoltan Varga <vargaz@gmail.com>
652 * mini-x86.c (mono_arch_emit_prolog): Avoid an assert in full-aot mode.
654 2010-04-29 Zoltan Varga <vargaz@gmail.com>
656 * aot-runtime.c (load_function): Use TARGET_X86 instead of __i386__.
658 2010-04-28 Zoltan Varga <vargaz@gmail.com>
660 * aot-compiler.c (emit_got_info): Double the buffer size to avoid an assert.
662 2010-04-27 Zoltan Varga <vargaz@gmail.com>
664 * dwarfwriter.c (emit_line_number_info): Get rid of the usage of GArray, so
665 line number support works with eglib.
667 2010-04-27 Miguel de Icaza <miguel@novell.com>
669 * driver.c, mini.c: Since linking with LLVM makes the default Mono
670 dirty an extra 70kb pages on startup we are now going to choose a
671 different strategy: ship mono and mono-llvm binaries, with the
672 second being the one that links with LLVM and defaults to LLVM
675 2010-04-27 Zoltan Varga <vargaz@gmail.com>
677 * tramp-x86.c exceptions-x86.c mini-x86.c aot-compiler.c aot-runtime.c:
678 Implement full-aot support on x86.
680 * method-to-ir.c: Always use a got var on x86 too, just like on ppc, because the
681 trampolines depend on it. Use MONO_ARCH_GOT_REG as the got register, instead of
682 the first register returned by get_global_int_regs ().
684 * cpu-x86.md: Fix the length of insertx_u1_slow.
686 * iltests.il.in: Disable tail call tests when running with full-aot.
688 2010-04-26 Zoltan Varga <vargaz@gmail.com>
690 * method-to-ir.c (mono_op_to_op_imm_noemul): Fix a warning.
692 2010-04-24 Mark Probst <mark.probst@gmail.com>
694 * mini.c, driver.c: Initialize mono_use_llvm in mono_main(), not
695 in the initializer, because it's non-constant.
697 2010-04-23 Miguel de Icaza <miguel@novell.com>
699 * mini.c: Use MONO_USE_LLVM as an environment flag to turn the use
700 of LLVM on by default. Used for buildbots and other setups.
702 2010-04-24 Zoltan Varga <vargaz@gmail.com>
704 * mini.c: Set mono_use_llvm to FALSE even if mono is compiled with LLVM.
706 2010-04-23 Kornel Pal <kornelpal@gmail.com>
708 * method-to-ir.c (mono_method_to_ir): Enable inlining of pointer-sized unmanaged
709 initonly static fields when using moving GC.
711 Contributed under MIT/X11 license.
713 2010-04-23 Geoff Norton <gnorton@novell.com>
715 * mini-amd64.h: Darwin x86_64 support.
717 2010-04-20 Jonathan Pryor <jpryor@novell.com>
719 * exceptions-arm.c: Remove platform checks in favor of configure checks.
721 2010-04-19 Jonathan Pryor <jpryor@novell.com>
723 * exceptions-arm.c: Add Android support for sigcontext structure.
725 2010-04-16 Zoltan Varga <vargaz@gmail.com>
727 * mini.c (mono_jit_compile_method_inner): Implement the check for native func
728 wrappers correctly now that their wrapper info is NULL.
730 2010-04-16 Zoltan Varga <vargaz@gmail.com>
732 * mini.c (mono_jit_compile_method_inner): Avoid calling
733 mono_marshal_method_from_wrapper () for native func wrappers. Fixes #597189.
735 2010-04-16 Zoltan Varga <vargaz@gmail.com>
737 * genmdesc.c (inst_name): Define this as a copy of mono_inst_name in helpers.c,
738 so the latter can be #ifndef DISABLE_JIT-ed.
740 * helpers.c: Comment out the opstr array if DISABLE_JIT is set.
742 2010-04-16 Zoltan Varga <vargaz@gmail.com>
744 * method-to-ir.c driver.c: Disable a few more things when DISABLE_JIT is set.
746 2010-04-16 Zoltan Varga <vargaz@gmail.com>
748 * mini-llvm.c (emit_entry_bb): Fix support for simd arguments passed on the
751 2010-04-15 Zoltan Varga <vargaz@gmail.com>
753 * debugger-agent.c (type_commands): Call mono_class_setup_methods () before
754 calling mono_class_num_methods (). Fixes #592244.
756 2010-04-14 Zoltan Varga <vargaz@gmail.com>
758 * mini-x86.c (mono_arch_get_llvm_call_info): Handle empty structures correctly.
760 * mini-llvm.c: Disable LLVM for calls with non-default calling conventions.
762 2010-04-14 Zoltan Varga <vargaz@gmail.com>
764 * method-to-ir.c (handle_box_inst): Merge into handle_box, simplify the merged
766 * (handle_alloc): Ditto.
767 (mono_method_to_ir): Remove the constrained call restriction added by a previous
768 change, its not needed anymore.
770 2010-04-12 Zoltan Varga Kumpera <rkumpera@novell.com>
772 * mini-posix.c (sigusr1_signal_handler): Fix build on
773 non x86/amd64 systems.
775 2010-04-13 Zoltan Varga <vargaz@gmail.com>
777 * method-to-ir.c (mono_method_to_ir): Disable generic sharing for constrained
778 calls where the constrained class needs a context. Fixes #595863.
780 * iltests.il.in: Add a test.
782 2010-04-13 Zoltan Varga <vargaz@gmail.com>
784 * mini.c (mini_method_compile): Disable llvm+methods with clauses again, llvm
785 2.6/SVN seems to have broken support for them.
787 2010-04-13 Zoltan Varga <vargaz@gmail.com>
789 * mini-llvm.c: Fix support for LLVM 2.6.
791 2010-04-10 Zoltan Varga <vargaz@gmail.com>
793 * debugger-agent.c (thread_commands): Add a GET_ID command to get the
794 MonoInternalThread belonging to the thread.
796 Fri Apr 9 15:28:01 CEST 2010 Paolo Molaro <lupus@ximian.com>
798 * driver.c, optflags-def.h, ir-emit.h: introduce an unsupported
799 unsafe optimization that will remove bound checks.
801 2010-04-08 Kornel Pal <kornelpal@gmail.com>
803 * method-to-ir.c (mini_emit_inst_for_method): Fix a typo that caused
804 CompareExchange not to be inlined for I8.
806 Contributed under MIT/X11 license.
808 2010-04-07 Rodrigo Kumpera <rkumpera@novell.com>
810 * array.cs: Add tests for cast between primitive array types.
812 2010-04-07 Andreia Gaita <avidigal@novell.com>
814 * Makefile.am: create a convenience library for moon to link with
816 2010-04-07 Paolo Molaro <lupus@ximian.com>
818 * method-to-ir.c: optimize array accesses from generic interfaces.
820 2010-04-06 Zoltan Varga <vargaz@gmail.com>
822 * mini-llvm.c: Update after the memset/memcpy intrinsics changes in LLVM SVN.
824 2010-04-05 Rodrigo Kumpera <rkumpera@novell.com>
826 * method-to-ir.c (mono_method_to_ir): Handle call to virtual final methods
827 of marshalbyref classes.
831 2010-04-05 Rodrigo Kumpera <rkumpera@novell.com>
833 * aot-compiler.c (emit_exception_debug_info): Encode try holes
836 * aot-runtime.c (decode_exception_debug_info): Decode try holes
839 * mini.h: Increase AOT version.
841 2010-04-04 Andreas Faerber <andreas.faerber@web.de>
843 * mini-x86.h: Only enable soft debugger when using sigaction or on
844 Windows. Fixes build on Haiku (lacks siginfo_t).
846 Code is contributed under MIT/X11 license.
848 2010-04-02 Andreas Faerber <andreas.faerber@web.de>
850 * mini.h, mini-x86.h: Suppress sigaction for Haiku, add support for
851 BeOS-style signal handlers.
853 Code is contributed under MIT/X11 license.
855 2010-04-02 Zoltan Varga <vargaz@gmail.com>
857 * mini-posix.c (sigusr1_signal_handler): Fix openbsd support.
859 2010-04-01 Rodrigo Kumpera <rkumpera@novell.com>
861 * mini-exceptions.c: Fix win32 build.
863 2010-04-01 Mark Probst <mark.probst@gmail.com>
865 * mini.c, driver.c: Call mono_gc_base_init() before
868 2010-04-01 Sebastien Pouliot <sebastien@ximian.com>
870 * method-to-ir.c (ensure_method_is_allowed_to_[access_field|
871 call_method]): Delegate the actual work in security-core-clr.c
872 to ease code sharing.
874 2010-04-01 Zoltan Varga <vargaz@gmail.com>
876 * decompose.c (mono_decompose_opcode): Set the cfg exception if the unsupported
877 float conv.ovf.un opcodes are encountered, instead of asserting later.
880 2010-04-01 Zoltan Varga <vargaz@gmail.com>
882 * decompose.c (mono_decompose_opcode): Add OP_ICONV_TO_U4_UN as a no-op.
884 * iltests.il.in: Add a test.
886 2010-04-01 Zoltan Varga <vargaz@gmail.com>
888 * mini-amd64.c (mono_arch_emit_call): Fail compilation if an argument is too
889 large. Fixes #567040.
891 * method-to-ir.c: Call CHECK_CFG_EXCEPTION after emitting a call.
893 2010-04-01 Zoltan Varga <vargaz@gmail.com>
895 * method-to-ir.c (handle_ccastclass): Call save_cast_details (). Fixes
898 2010-03-31 Rolf Bjarne Kvinge <RKvinge@novell.com>
900 * mini-trampolines.c: Surround mono_handler_block_guard_trampoline and
901 mono_create_handler_block_trampoline with the proper #ifdef so that it
904 2010-03-30 Rodrigo Kumpera <rkumpera@novell.com>
906 * mini-exceptions.c: Introduce mono_walk_stack_full, which
907 allows to select if it's new or old context that is passed to
910 * mini-exceptions.c (mono_handle_exception_internal): Handle the
911 case when executing a guarded handler from the EH machinery.
913 * mini-exceptions.c (mono_install_handler_block_guard): New function
914 responsible for checking for handler blocks, installing the guard and
915 clearing abort state.
917 * mini-posix.c (sigusr1_signal_handler): Call mono_install_handler_block_guard
918 to check for handler blocks and skip interruption logic if one was found.
920 * mini-trampolines.c (mono_handler_block_guard_trampoline): Function called
921 by the handler block guard trampoline. Resumes interruption by raising the
922 pending ThreadAbortException.
924 * mini.c (create_jit_info): Calculate the end address of a finally block.
926 * mini-x86.c (mono_arch_install_handler_block_guard): Patch the return address
927 of a finally block to a specified address and return the old one.
929 * tramp-x86.c (mono_arch_create_handler_block_trampoline): The handler block
930 trampoline patches the original return address and calls the trampoline function.
932 2010-03-30 Zoltan Varga <vargaz@gmail.com>
934 * mini-trampolines.c (mono_aot_trampoline): Remove some dead code.
936 * aot-runtime.c (mono_aot_patch_plt_entry): New helper function, which only
937 does the patching if the callee is in the same domain.
939 * aot-runtime.c mini-trampolines.c: Call mono_aot_patch_plt_entry instead
940 of mono_arch_patch_plt_entry ().
942 2010-03-30 Rodrigo Kumpera <rkumpera@novell.com>
944 * mini.c (create_jit_info): Fix try block hole length encoding.
946 2010-03-30 Rodrigo Kumpera <rkumpera@novell.com>
948 * mini.c (create_jit_info): Emit saner debug spew. Now it doesn't
949 duplicate information and print offsets instead of absolute addresses.
951 2010-03-29 Zoltan Varga <vargaz@gmail.com>
953 * debugger-agent.c (jit_end): Send type loads for types loaded before the VMStart
954 event is sent. Fixes #591733.
956 2010-03-26 Zoltan Varga <vargaz@gmail.com>
958 * mini-posix.c (SIG_HANDLER_SIGNATURE): Handle the case when ctx is NULL on
961 2010-03-26 Zoltan Varga <vargaz@gmail.com>
963 * debugger-agent.c (mono_debugger_agent_init): Set the GC type of the
964 thread_to_tls hash table.
966 * image-writer.c (bin_writer_emit_writeout): Fix the size of the got.plt
967 section. Fixes #591000.
969 2010-03-26 Andreas Faerber <andreas.faerber@web.de>
971 * Makefile.am (version.h): Check for pure .git directory only,
972 fixes SVN revision when using git without git-svn.
974 Contributed under MIT/X11 license.
976 2010-03-26 Zoltan Varga <vargaz@gmail.com>
978 * aot-runtime.c: Apply some openbsd changes from openbsd ports.
980 2010-03-24 Rodrigo Kumpera <rkumpera@novell.com>
982 * basic-simd.cs: Test for vector x scalar binary operators.
984 2010-03-24 Rodrigo Kumpera <rkumpera@novell.com>
986 * simd-intrincs.c (simd_intrinsic_emit_binary): Support binary
987 intrinsics with expanded scalar arguments.
989 2010-03-24 Rodrigo Kumpera <rkumpera@novell.com>
991 * mini-exceptions.c (get_exception_catch_class): Non catch clauses
992 don't have an exception class, so don't decode it. This would crash
995 2010-03-24 U-anarquia\miguel <miguel@anarquia>
997 Make sure that trunk builds with DISABLE_JIT, an update to the
1000 * mini.c (mini_get_shared_method): this code seems to be necessary
1001 regardless of whether DISABLE_JIT has been defined.
1003 (mono_jit_compile_method_inner): it seems that this method is
1004 required even in full AOT mode, so ifdef out only the pieces that
1005 try to genrate code (the body of code that applies patches to the
1008 (mini_method_compile): do not compile when using DISABLE_JIT.
1010 * mini-ppc.c (mono_arch_get_allocatable_int_vars)
1011 (mono_arch_output_basic_block, mono-arch_emit_exceptions): Do not
1012 compile when DISABLE_JIT is set.
1014 2010-03-24 Mark Probst <mark.probst@gmail.com>
1016 * mini.c (mono_create_tls_get): Only create a TLS operation if the
1017 arch really supports it.
1019 2010-03-24 Mark Probst <mark.probst@gmail.com>
1021 * mini-x86.c, mini-x86.h, mini.c: CEE_MONO_TLS support for Darwin/x86.
1023 2010-03-23 Neale Ferguson <neale@sinenomine.net>
1025 * exceptions-s390x.c: Add support for
1026 mono_arch_get_throw_corlib_exception and fix throw by name.
1028 * mini-s390x.c: Add IMT support; Fix stack parameter passing
1029 logic (especially for varargs); Correct localloc sizing; Add
1030 mono_arch_get_this_arg_from_call and
1031 mono_arch_get_this_arg_from_call.
1033 * mini-s390x.h: Add support for facility list extraction;
1034 Correct/update MONO_ARCH_xxx settings.
1036 * mini-s390.c: Minor corrections to instruction output for
1037 varargs. No IMT implementation - I think it's time to deprecate
1038 s390 and just leave s390x.
1040 * tramp-s390x.c: Correct creation of trampoline instruction
1043 * cpu-s390x.md: Update some instruction lengths
1045 2010-03-23 Zoltan Varga <vargaz@gmail.com>
1047 * mini-generic-sharing.c (fill_in_rgctx_template_slot): Remove an assert which
1048 can be hit with partial sharing.
1050 * mini-generic-sharing.c (get_shared_class): Handle partially shared methods
1051 in non-shared classes correctly.
1052 (generic_inst_is_sharable): Allow all primitive types in partial sharing.
1053 Turn on partial sharing.
1055 2010-03-23 Zoltan Varga <vargaz@gmail.com>
1057 * mini-amd64.h: Put back MONO_ARCH_NOMAP32BIT for OpenBSD which was removed
1060 2010-03-23 Zoltan Varga <vargaz@gmail.com>
1062 * method-to-ir.c (mono_method_to_ir): Handle the failure of
1063 mono_method_signature ().
1065 * mini-trampolines.c (mono_delegate_trampoline): Ditto.
1067 * mini.c (mini_method_compile): Get the signature of cfg->method early with
1068 error checking, so later calls do not need error checking.
1070 2010-03-22 Zoltan Varga <vargaz@gmail.com>
1072 * exceptions-amd64.c: Add support for OpenBSD which has no UCONTEXT_GREGS.
1074 * mini-amd64.h: Enable MONO_ARCH_USE_SIGACTION on OpenBSD as well.
1076 2010-03-22 Rodrigo Kumpera <rkumpera@novell.com>
1078 * mini-exceptions.c (mono_handle_exception_internal): Don't
1079 check try_end for archs different than s390.
1081 * mini.c (create_jit_info): Don't crash if the finallt block is the
1084 2010-03-22 Rodrigo Kumpera <rkumpera@novell.com>
1086 * driver.c (mono_main): Don't free global codeman under linux since
1087 glic now peeks at code on stack for more archs than just amd64.
1089 Mon Mar 22 18:09:09 CET 2010 Paolo Molaro <lupus@ximian.com>
1091 * mini.c, method-to-ir.c: changes to support compressed interface
1094 2010-03-22 Zoltan Varga <vargaz@gmail.com>
1096 * mini-x86.h: Applied patch from Robert Nagy (Robert@openbsd.org).
1097 Use sigaction on OpenBSD too.
1099 2010-03-22 Zoltan Varga <vargaz@gmail.com>
1101 * debugger-agent.c (event_req_matches_assembly): Handle request modifiers too.
1103 2010-03-21 Andreas Faerber <andreas.faerber@web.de>
1105 * debugger-agent.c: #include sys/select.h for fd_set.
1107 Code is contributed under MIT/X11 license.
1109 2010-03-21 Zoltan Varga <vargaz@gmail.com>
1111 * mini.c (SIG_HANDLER_SIGNATURE): Fix the build on platforms without sigaction
1114 2010-03-21 Zoltan Varga <vargaz@gmail.com>
1116 * mini-ppc.c (mono_arch_emit_exceptions): Avoid an assert in ppc_patch () for
1117 some large methods with lots of exception handlers. Fixes #440924.
1119 Sat Mar 20 11:56:24 CET 2010 Paolo Molaro <lupus@ximian.com>
1121 * method-to-ir.c: remove code duplication for interface checks.
1123 2010-03-19 Zoltan Varga <vargaz@gmail.com>
1125 * debugger-agent.c (clear_event_requests_for_assembly): New helper function.
1126 (assembly_unload): Clear all event requests referencing the to-be unloaded
1130 Fri Mar 19 16:45:20 CET 2010 Paolo Molaro <lupus@ximian.com>
1132 * mini.h, mini-exceptions.c: restore the state of the stack
1133 guard page permissions.
1135 2010-03-19 Zoltan Varga <vargaz@gmail.com>
1137 * mini-trampolines.c (common_call_trampoline): Remove the condition guarding the
1138 call site patching code, it doesn't appear to be needed.
1140 2010-03-19 Zoltan Varga <vargaz@gmail.com>
1142 * mini-generic-sharing.c: Add infrastructure for partial sharing, ie.
1143 sharing generic methods whose type arguments are a mix of reference and
1144 non-reference types. Not yet turned on.
1146 * mini.c (mini_get_shared_method): New helper function to return
1147 the method which will be compiled/registered in the JIT tables when doing
1149 (mono_domain_lookup_shared_generic): Moved to mini.c from mini-generic-sharing.c,
1150 use mini_get_shared_method ().
1152 * mini.c (mini_method_compile): Register the same method which is compiled when
1153 doing generic sharing.
1155 * mini.c aot-compiler.c aot-runtime.c: Add support for partial sharing.
1157 * generics.cs: Add partial sharing tests.
1159 2010-03-17 Jerry Maine <crashfourit@gmail.com>
1161 * mini.h : Changed the SIMD_VERSION* enum values to match those in Mono.Simd.AccelMode.
1162 Add an enum value that or's all possable values together. Add an enum value
1163 that marks the end of the used bit indexes.
1165 * mini-amd64.c : Make changes to match the changes in mini.h
1167 * mini-x86.c : Make changes to match the changes in mini.h
1169 * simd-intrinsics.c : Reorder the SimdIntrinsc struct to add more bits to
1170 simd_version to support more simd versions. Changed the name of
1171 simd_version to simd_version_flags to make it more intuitive that
1172 it now contains bit flags. Reordered the *_intrinsics arrays to
1173 match the changes above. Changed emit_intrinsics() to use the new
1174 setup mentioned above.
1176 Code is contributed under MIT/X11 license.
1178 2010-03-17 Rodrigo Kumpera <rkumpera@novell.com>
1180 * mini-*.c (mono_arch_output_basic_block): Record try block holes on all
1181 remaining archs. Alpha and hppa maintainers, please stand up.
1183 2010-03-17 Zoltan Varga <vargaz@gmail.com>
1185 * mini-ppc.c (mono_arch_build_imt_thunk): Always save and restore r11 since it
1186 is needed even when fail_tramp!=NULL.
1188 2010-03-17 Zoltan Varga <vargaz@gmail.com>
1190 * debugger-agent.c (insert_breakpoint): Write a log message.
1192 2010-03-16 Rodrigo Kumpera <rkumpera@novell.com>
1194 * iltests.il.in: Add a few tests for LEAVE going over multiple
1197 2010-03-16 Rodrigo Kumpera <rkumpera@novell.com>
1199 * mini-x86.c (mono_arch_output_basic_block): Record try block holes.
1201 2010-03-16 Rodrigo Kumpera <rkumpera@novell.com>
1203 * mini.h (MonoBasicBlock): Add native_length field.
1204 * mini.h (MonoCompile): Add try_block_holes field.
1205 * mini.h (MonoInst): Add exception_clause pointer to
1208 * mini.c (mono_codegen): Calculate MonoBasicBlock::native_length.
1209 * mini.c (mono_cfg_add_try_hole): New function to register possible
1210 holes in try blocks.
1211 * mini.c (create_jit_info): Fill in the holes information.
1213 * mini-exceptions.c: Verify for holes when checking if an IP is covered
1216 * method-to-ir.c: Add the EH clause to the CALL_HANDLE instruction.
1218 Tue Mar 16 13:16:16 CET 2010 Paolo Molaro <lupus@ximian.com>
1220 * jit-icalls.c: adjusted for the array API changes.
1222 2010-03-16 Zoltan Varga <vargaz@gmail.com>
1224 * iltests.il.in: Disable the fconv_to_i test on sparc too.
1226 2010-03-16 Zoltan Varga <vargaz@gmail.com>
1228 * debugger-agent.c: Simplify the way breakpoints are processed by removing
1229 the 'pending' flag. This fixes support for appdomains too.
1232 Mon Mar 15 18:25:49 CET 2010 Paolo Molaro <lupus@ximian.com>
1234 * mini-amd64.c, mini-ia64.c: remove direct access to method->header.
1236 2010-03-12 Zoltan Varga <vargaz@gmail.com>
1238 * simd-intrinsics.c (simd_intrinsic_emit_getter): Don't emit shuffle opcodes
1239 when using LLVM, LLVM generates it itself when needed.
1241 * mini-llvm-cpp.cpp (mono_llvm_build_aligned_load): New helper function.
1243 * mini-llvm.c: Use an unaligned load for OP_LOADX_MEMBASE. Add zero extension
1244 to some OP_EXTRACT_ opcodes. Fix the naming of some sse intrinsics. Fix
1245 OP_ANDNPS/OP_ANDNPD.
1247 2010-03-11 Zoltan Varga <vargaz@gmail.com>
1249 * tramp-x86.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code' for
1250 the pc instead of 'buf'. Fix the call to mono_arch_flush_icache ().
1251 (mono_arch_create_monitor_exit_trampoline_full): Ditto.
1253 2010-03-11 Martin Baulig <martin@ximian.com>
1255 * debugger-agent.c (type_commands): Add NULL check to
1256 `CMD_TYPE_GET_SOURCE_FILES'.
1258 2010-03-09 Zoltan Varga <vargaz@gmail.com>
1260 * mini-ppc.c (mono_arch_decompose_opts): Fix OP_ICONV_TO_R_UN when cross-compiling.
1262 2010-03-09 Zoltan Varga <vargaz@gmail.com>
1264 * mini-codegen.c (mono_peephole_ins): Fix the OP_FMOVE optimization. Fixes
1267 * iltests.il.in: Add a test.
1269 2010-03-05 Martin Baulig <martin@ximian.com>
1271 Add support for aborting invocations.
1274 (InvokeData): Added `InvokeData *last_invoke'.
1275 (DebuggerTlsData): Renamed `invoke' into `pending_invoke' and
1276 added a new `invoke' field to keep the `InvokeData *' throughout
1278 (ErrorCode): Added `ERR_NO_INVOCATION'.
1279 (CmdVM): Added `CMD_VM_ABORT_INVOKE'.
1280 (mono_debugger_agent_handle_exception): Don't report any exception
1281 if an abort was requested.
1282 (invoke_method): Store the `InvokeData *' in `tls->invoke'; reset
1283 a thread abort if necessary.
1284 (vm_commands): Implement `CMD_VM_ABORT_INVOKE'.
1286 2010-03-08 Rodrigo Kumpera <rkumpera@novell.com>
1288 * method-to-ir.c: Store the initial basic block returned by mono_basic_block_split
1289 so we can release the whole list and not just the first one. Free
1290 it in more places as well.
1292 2010-03-08 Rodrigo Kumpera <rkumpera@novell.com>
1294 * method-to-ir.c: Revert r153222 as it doesn't belong here.
1296 Mon Mar 8 17:58:26 CET 2010 Paolo Molaro <lupus@ximian.com>
1298 * mini.h, *.c: prepare for MonoMethodHeader to become a transient entity.
1300 Mon Mar 8 17:35:26 CET 2010 Paolo Molaro <lupus@ximian.com>
1302 * driver.c: report also other misc build options.
1304 2010-03-07 Rodrigo Kumpera <rkumpera@novell.com>
1306 * method-to-ir.c: Generate better code for the NewObject
1309 2010-03-07 Zoltan Varga <vargaz@gmail.com>
1311 * branch-opts.c (mono_if_conversion): Disable one of the cases when deadce
1312 is disabled. Fixes #582322.
1314 * iltests.il.in: Add a test.
1316 2010-03-06 Zoltan Varga <vargaz@gmail.com>
1318 * tramp-amd64.c (mono_arch_create_monitor_exit_trampoline_full): Delegate
1319 the handling of obj->synchronization == null and owner != current thread to
1320 mono_monitor_exit ().
1322 * tramp-x86.c (mono_arch_create_monitor_exit_trampoline_full): Ditto.
1325 Sat Mar 6 18:14:15 CET 2010 Paolo Molaro <lupus@ximian.com>
1327 * mini.c: change the way emulated opcode info is stored and save about
1328 4 KB of runtime memory.
1330 2010-03-04 David S. Miller <davem@davemloft.net>
1332 * mini-sparc.h: Always use MONO_ARCH_USE_SIGACTION. Linux kernels
1333 that don't provide the siginfo in the second signal handler argument
1334 are buggy, and this has been fixed for years.
1335 * mini.h (GET_CONTEXT): Remove __sparc__ special case.
1336 (SIG_HANDLER_SIGNATURE, SIG_HANDLER_PARMS): Likewise.
1338 2010-03-04 Zoltan Varga <vargaz@gmail.com>
1340 * aot-runtime.c (find_symbol): Fix a leak.
1341 (decode_patch): Ditto.
1343 2010-03-04 Zoltan Varga <vargaz@gmail.com>
1345 * mini.h (MONO_INST_IS_TEMP): Kill this unused define.
1347 2010-03-04 Zoltan Varga <vargaz@gmail.com>
1349 * mini.c (mono_resolve_patch_target): Fix an uninitialized variable.
1351 Wed Mar 3 19:19:21 CET 2010 Paolo Molaro <lupus@ximian.com>
1353 * method-to-ir.c: MONO_PROFILE_STRING_ALLOC is dead.
1355 2010-03-03 Rodrigo Kumpera <rkumpera@novell.com>
1357 * method-to-ir.c (mono_method_to_ir): Don't create a runtime vtable
1358 to check for errors, it's enough to create the metadata open.
1362 2010-03-03 Rolf Bjarne Kvinge <RKvinge@novell.com>
1365 * mini-exceptions.c: Add support for printing stack traces when handling
1366 exceptions, and when printing exceptions thrown while tracing also print
1367 the exception message.
1369 2010-03-03 Rolf Bjarne Kvinge <RKvinge@novell.com>
1371 * trace.c: We need to parse exclude tokens ('-') before string tokens,
1372 since the exclude token is a valid string character.
1374 2010-03-02 Levi Bard <levi@unity3d.com>
1376 * debugger-agent.c: Invalidate thread stacks on domain unload.
1378 2010-03-02 Mark Probst <mark.probst@gmail.com>
1380 * method-to-ir.c: Emit dummy_use for stored reference after write
1381 barriers to make sure the object is pinned if the GC interrupts
1382 before the write barrier is done.
1384 2010-03-02 Zoltan Varga <vargaz@gmail.com>
1386 * cpu-<ARCH>.md: dummy_use was missing src1:i.
1388 2010-03-01 Zoltan Varga <vargaz@gmail.com>
1390 * debugger-agent.c: Add a log message printing the protocol version.
1392 2010-03-01 Zoltan Varga <vargaz@gmail.com>
1394 * debugger-agent.c: Add a new command to communicate the protocol version used
1395 by the client. This could be used to allow newer runtimes to communicate with
1398 2010-03-01 Zoltan Varga <vargaz@gmail.com>
1400 * debugger-agent.c (domain_commands): Add a new command to create a boxed value.
1402 2010-03-01 Zoltan Varga <vargaz@gmail.com>
1404 * debugger-agent.c (type_commands): Fix the setting of fields with a reference
1407 Mon Mar 1 15:20:44 CET 2010 Paolo Molaro <lupus@ximian.com>
1409 * mini-arm.c: make the arm cpu arch configurable with the
1410 MONO_CPU_ARCH env var (for example: "armv4 thumb").
1413 Mon Mar 1 14:48:35 CET 2010 Paolo Molaro <lupus@ximian.com>
1415 * mini.c, mini.h, driver.c: added the --jitmap option to enable
1416 support for the perf tool on Linux.
1418 Mon Mar 1 14:43:55 CET 2010 Paolo Molaro <lupus@ximian.com>
1420 * method-to-ir.c: make string.InsertenalSetChar() specialization
1423 2010-03-01 Robert Jordan <robertj@gmx.net>
1425 * Makefile.am: fix the non-static build.
1427 2010-02-26 Zoltan Varga <vargaz@gmail.com>
1429 * mini-generic-sharing.c: Move the contents of ../metadata/generic-sharing.c
1432 2010-02-26 Robert Jordan <robertj@gmx.net>
1434 * tasklets.c (continuation_store): Return from an error condition
1437 2010-02-26 Martin Baulig <martin@ximian.com>
1439 * debug-debugger.c (MonoDebuggerInfo): Added `abort_runtime_invoke'.
1442 (MonoDebuggerThreadInfo): Added `internal_flags'.
1443 (MonoDebuggerInternalThreadFlags): New enum.
1444 (_mono_debugger_throw_exception): Don't signal the debugger if a
1445 type abort was requested.
1446 (_mono_debugger_unhandled_exception): Likewise.
1447 (mono_debugger_abort_runtime_invoke): New method to abort an invocation.
1448 (mono_debugger_runtime_invoke): If the debugger requested a thread
1449 abort during the invocation, reset it here.
1451 2010-02-26 Martin Baulig <martin@ximian.com>
1453 * debug-mini.c (MonoDebuggerThreadInfo): Use `MonoInternalThread *'
1454 instead of `MonoThread *'.
1456 2010-02-25 Zoltan Varga <vargaz@gmail.com>
1458 * aot-runtime.c (mono_aot_find_jit_info): Use a merge sort for sorting the
1459 code offsets table, as it is mostly sorted.
1461 2010-02-25 Zoltan Varga <vargaz@gmail.com>
1463 * debugger-agent.c (do_invoke_method): Fix invoking of static methods on vtypes.
1466 2010-02-25 Zoltan Varga <vargaz@gmail.com>
1468 * driver.c (mono_main): Get rid of mono_setup_vtable_in_class_init.
1470 Wed Feb 24 15:58:03 CET 2010 Paolo Molaro <lupus@ximian.com>
1472 * Makefile.am: build the new ABI version of the libmono library.
1473 * debugger-agent.c, mini.c: fix warnings with the new API.
1474 * jit.h: don't depend on glib.h being included.
1476 2010-02-24 Zoltan Varga <vargaz@gmail.com>
1478 * method-to-ir.c (mono_method_to_ir): Implement AOT support for fast TLS access.
1480 2010-02-24 Zoltan Varga <vargaz@gmail.com>
1482 * method-to-ir.c (mono_method_to_ir): Implement support for fast access to
1483 ThreadStatic variables.
1485 2010-02-24 Zoltan Varga <vargaz@gmail.com>
1487 * debugger-agent.c (notify_thread): Skip terminated threads, since their tls
1488 data is not freed yet. Fixes #582460.
1490 2010-02-23 Zoltan Varga <vargaz@gmail.com>
1492 * debugger-agent.c: Add support for the caught/uncaught flags on exception
1493 event requests. Bump protocol minor version.
1495 2010-02-22 Zoltan Varga <vargaz@gmail.com>
1497 * decompose.c (mono_decompose_long_opts): Handle OP_LCONV_TO_OVF_I8 here too.
1499 2010-02-22 Zoltan Varga <vargaz@gmail.com>
1501 * decompose.c (mono_decompose_opcode): Handle OP_LCONV_TO_OVF_I8. Fixes
1504 * iltests.il.in: Add a test.
1506 2010-02-22 Rodrigo Kumpera <rkumpera@novell.com>
1508 * mini.c (inline_method): Check for loader errors.
1510 2010-02-22 Rodrigo Kumpera <rkumpera@novell.com>
1512 * mini.c (mono_method_check_inlining): Use !mono_method_get_header_summary
1513 instead of mono_method_get_header as it doesn't decode locals
1514 so the called method can have unresolved dependencies that will only
1515 be satisfied after the current method is JIT'd.
1519 2010-02-22 Zoltan Varga <vargaz@gmail.com>
1521 * basic.cs (test_0_div_opt): Speed this up a bit.
1523 2010-02-20 Zoltan Varga <vargaz@gmail.com>
1525 * mini-amd64.c: Fix DISABLE_JIT support after the latest changes.
1527 * mini.c (mono_jit_create_remoting_trampoline): Call
1528 mono_create_specific_trampoline () instead of
1529 mono_arch_create_specific_trampoline ().
1531 * mini-trampolines.c tramp-arm.c: Disable more stuff when DISABLE_JIT is set.
1533 2010-02-20 Zoltan Varga <vargaz@gmail.com>
1535 * unwind.c (mono_unwind_get_cie_program): New function, moved here from
1536 aot-compiler.c, so it can be found even if DISABLE_JIT is set.
1538 * aot-compiler.c xdebug.c: Update callers of mono_arch_unwind_get_cie_program ().
1540 * mini-amd64.c: Fix DISABLE_JIT support.
1542 2010-02-20 Geoff Norton <gnorton@novell.com>
1544 * aot-runtime.c: Ensure we dont leak a held lock when unwinding exceptions.
1546 2010-02-20 Zoltan Varga <vargaz@gmail.com>
1548 * debugger-agent.c (mono_debugger_agent_handle_exception): Receive two contexts,
1549 one for the throw and one for the catch. Mark uncaught exceptions by a NULL
1550 CATCH_TXT. Send normal exception events for unhandled exceptions too.
1551 (mono_debugger_agent_handle_unhandled_exception): Remove this, merged into
1554 2010-02-18 Zoltan Varga <vargaz@gmail.com>
1556 * exceptions-x86.c (mono_arch_get_restore_context): Changes this so it restores
1557 edx/ecx too. This is needed to support OP_SEQ_POINT.
1559 2010-02-18 Zoltan Varga <vargaz@gmail.com>
1561 * exceptions-amd64.c (get_throw_trampoline): Add xdebug info.
1563 * method-to-ir.c (mono_method_to_ir): Fix SIZEOF in dynamic methods.
1565 2010-02-16 Zoltan Varga <vargaz@gmail.com>
1567 * mini-llvm.c aot-compiler.c aot-runtime.c unwind.c: Finish support
1568 LLVM+AOT+exceptions, not enabled yet.
1570 2010-02-15 Zoltan Varga <vargaz@gmail.com>
1572 * mini.c (SIG_HANDLER_SIGNATURE): Fix the windows build.
1574 2010-02-15 Zoltan Varga <vargaz@gmail.com>
1576 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Emit
1577 xdebug info for these.
1579 * mini-trampolines.c (common_call_trampoline): Use mini_jit_info_table_find ()
1582 * mini.c (mini_get_vtable_trampoline): Make this take a 'slot_index' argument,
1585 2010-02-13 Zoltan Varga <vargaz@gmail.com>
1587 * aot-compiler.c (load_profile_files): Update after the profiler changes.
1589 2010-02-13 Zoltan Varga <vargaz@gmail.com>
1591 * mini.c (mono_jit_compile_method_inner): Avoid passing icall wrappers to
1592 mono_profiler_method_end_jit, since the profiler has no way to process wrappers.
1594 * aot-runtime.c mini.c: Resurrect the aot pagefault profiling stuff, it is useful
1597 2010-02-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
1599 * debugger-agent.c: handle incomplete reads and EINTR in
1600 recv()/send(). This could have been causing random
1603 2010-02-13 Zoltan Varga <vargaz@gmail.com>
1605 * aot-runtime.c (decode_exception_debug_info): Fix aot support for sequence
1608 * mini-arm.c (mono_arch_allocate_vars): Allocate the seq point related vars first
1609 so they have small offsets. Fixes #566311.
1611 2010-02-12 Rodrigo Kumpera <rkumpera@novell.com>
1613 * method-to-ir.c (mono_method_check_inlining): Check for loader errors.
1615 2010-02-11 Zoltan Varga <vargaz@gmail.com>
1617 * mini-amd64.c: Remove the special casing of byref in a few places now that
1618 mini_type_get_underlying_type () handles it.
1620 * mini-generic-sharing.c (mini_type_get_underlying_type): Handle byref as well
1621 by returning native int. Fixes #577984.
1623 2010-02-11 Zoltan Varga <vargaz@gmail.com>
1625 * method-to-ir.c (handle_isinst): Factor out the is_complex_isinst check into
1628 * mini-llvm.c (exception_cb): Put the clause index into the type info instead
1629 of putting the clause itself.
1631 * mini-arm.c mini.c linear-scan.c: Disable more stuff when DISABLE_JIT is used.
1633 2010-02-09 Zoltan Varga <vargaz@gmail.com>
1635 * unwind.c (mono_unwind_frame): Use read32 for reading a 32 bit value, since it
1638 2010-02-10 Geoff Norton <gnorton@novell.com>
1640 * aot-compiler.c: Make the number of IMT trampolines configurable as well.
1642 2010-02-08 Zoltan Varga <vargaz@gmail.com>
1644 * aot-compiler.c (emit_code): Create the ut trampolines here, so they work for
1647 * aot-compiler.c (emit_code): Don't add the llvm label prefix to 'methods', since
1648 it is not an LLVM generated symbol.
1650 * mini-llvm.c (emit_entry_bb): Fix the handling of simd types.
1652 * method-to-ir.c (handle_castclass): Turn off the more efficient isinst/castclass
1653 implementation in gshared mode because it causes regressions.
1655 * mini-trampolines.c: Add a stat for the number of calls to trampolines.
1657 * image-writer.c (asm_writer_emit_global): Don't prepend the global prefix, it
1658 should be done by the caller.
1660 * mini-llvm.c (mono_llvm_emit_method): Don't make the debug symbols global.
1662 * aot-compiler.c (emit_code): Add the llvm label prefix before 'methods'.
1664 * mini-exceptions.c (mini_jit_info_table_find): Search the root domain as well,
1665 since mono_jit_info_table_find () doesn't do it anymore.
1667 * mini-generic-sharing.c debugger-agent.c: Call mini_jit_info_table_find ()
1668 instead of mono_jit_info_table_find ().
1670 2010-02-07 Zoltan Varga <vargaz@gmail.com>
1672 * aot-compiler.c aot-runtime.c: Add support for MONO_WRAPPER_WRITE_BARRIER.
1674 * aot-compiler.c (encode_method_ref): Update after the removal of
1675 mono_gc_get_managed_allocator_type ().
1677 * method-to-ir.c (mono_method_to_ir): Place a seq point just before a RET.
1680 2010-02-06 Zoltan Varga <vargaz@gmail.com>
1682 * method-to-ir.c (handle_castclass): Use the icall for classes with variant
1683 generic params as well.
1684 (handle_isinst): Ditto.
1686 * method-to-ir.c: Make isninst/castclass checks in gshared code more efficient
1687 instead of always calling an icall.
1689 * aot-compiler.c (emit_llvm_file): Take into account trampolines etc when
1690 computing the size of the got.
1692 * aot-compiler.c (emit_code): Change the way the 'methods' symbol is emitted
1693 when using LLVM. Instead of emitting it as an LLVM method, emit it using
1694 the assembly directive '.set' so it points to the first LLVM emitted method.
1696 2010-02-04 Rodrigo Kumpera <rkumpera@novell.com>
1698 * mini.c (mini_method_verify): Report the method which failed to verify.
1700 2010-02-04 Rodrigo Kumpera <rkumpera@novell.com>
1702 * method-to-ir.c (mono_method_to_ir): Use the new basic block formation pass
1703 to avoid JIT'ng dead basic blocks. This is the same behavior as the
1704 runtime MS verifier.
1706 2010-02-04 Zoltan Varga <vargaz@gmail.com>
1708 * debugger-agent.c (decode_value): Fix decoding of vtype instances. Fixes
1711 2010-02-04 Zoltan Varga <vargaz@gmail.com>
1713 * mini-llvm.c: Init the jit module only when first JITting.
1715 * aot-compiler.c (emit_plt): Fix the naming of plt entries of llvm+darwin.
1717 * mini-llvm.c (get_plt_entry): Make the plt entries have hidden visibility.
1719 * mini-llvm.c (mono_llvm_emit_aot_module): Remove the dummy got after it is
1720 replaced with the real got.
1722 * debugger-agent.c (type_commands): Return the enumness if the type as well.
1724 * image-writer.c: Reduce the amount of #ifdefs a bit.
1726 * aot-compiler.c: Reduce the amount of #ifdefs. Add beginnings of support for
1729 * aot-compiler.c (mono_compile_assembly): Handle asmonly+llvm mode.
1731 * mini-llvm.c (mono_llvm_emit_method): Don't make the 'type_info' symbols
1734 2010-02-02 Zoltan Varga <vargaz@gmail.com>
1736 * mini-llvm.c (mono_llvm_emit_method): Add support for unaligned loads.
1737 (mono_llvm_emit_method): Fix unaligned stores too.
1739 * mini-amd64.c (mono_arch_emit_prolog): Initialize lmf->rsp in the prolog too
1740 so async stack walks don't crash.
1742 2010-02-02 Zoltan Varga <vargaz@gmail.com>
1744 * mini-trampolines.c (common_call_trampoline): Fix a problem where the callsite
1745 was not patched if the callee needed an rgctx trampoline.
1747 2010-02-01 Zoltan Varga <vargaz@gmail.com>
1749 * mini-ppc.c (mono_arch_get_global_int_regs): Reserve r29 for holding the
1750 vtable address in AOT code.
1752 2010-02-01 Zoltan Varga <vargaz@gmail.com>
1754 * mini-codegen.c: Remove support for CEE_ opcodes which cannot occur in
1757 Mon Feb 1 16:29:10 CET 2010 Paolo Molaro <lupus@ximian.com>
1759 * genmdesc.pl: remove dependency on external cpp.
1761 2010-02-01 Zoltan Varga <vargaz@gmail.com>
1763 * method-to-ir.c (mini_emit_ldelema_1_ins): Avoid emitting an OP_SEXT_I4 when
1764 using LLVM, its not needed, and abcrem can't handle it.
1766 Mon Feb 1 14:29:43 CET 2010 Paolo Molaro <lupus@ximian.com>
1768 * genmdesc.c, genmdesc.pl, cpu-x86.md: introduced templates to make
1769 it easier to group instructions and reduce duplication.
1771 2010-02-01 Zoltan Varga <vargaz@gmail.com>
1773 * decompose.c: Move the array/soft float decompose routines here from
1776 * method-to-ir.c: Export a few functions so they can be used from decompose.c.
1778 2010-01-31 Zoltan Varga <vargaz@gmail.com>
1780 * mini-llvm.c (mono_llvm_emit_method): Add a call to llvm.invariant.start
1781 to tell LLVM that the got is constant, not used yet.
1783 * aot-compiler.c: Pass more optimization flags to llvm's 'opt'.
1785 2010-01-30 Zoltan Varga <vargaz@gmail.com>
1787 * mini-ppc.c (mono_arch_emit_prolog): Fix full aot support for native to
1790 2010-01-30 Zoltan Varga <vargaz@gmail.com>
1792 * aot-compiler.c (add_wrappers): Commit the hack which generates
1793 native-to-managed wrappers for methods decorated with the MonoPInvokeCallback
1796 2010-01-29 Zoltan Varga <vargaz@gmail.com>
1798 * mini.h (MONO_INST_FAULT): New instruction flag for loads which can cause
1799 a fault, only used by the LLVM backend.
1801 * ir-emit.h: Add _FAULT variants of the LOAD_MEMBASE macros. Mark
1802 OP_CHECK_THIS with OP_IMPLICIT_EXCEPTION.
1804 * method-to-ir.c: Use the new LOAD_MEMBASE_FAULT opcodes, get rid of the
1805 calls to MONO_EMIT_NULL_CHECK which is automatically done by the new macros.
1807 * mini-llvm.c: Only generate volatile loads from load instructions which have
1808 the MONO_INST_FAULT flag set.
1810 2010-01-29 Zoltan Varga <vargaz@gmail.com>
1812 * unwind.c (mono_unwind_decode_fde): Fix the decoding of the LSDA offset on
1815 2010-01-28 Zoltan Varga <vargaz@gmail.com>
1817 * mini.c (mono_save_seq_point_info): Fix the handling of bblocks without
1818 sequence points. Fixes #571236.
1820 2010-01-28 Zoltan Varga <vargaz@gmail.com>
1822 * debugger-agent.c (mono_debugger_agent_init): Call appdomain_unload at the
1823 end of the appdomain unload process, after assemblies have been unloaded.
1826 2010-01-27 Zoltan Varga <vargaz@gmail.com>
1828 * abcremoval.c (process_block): Fix the if (region) check so abcrem actually
1831 * mini-amd64.c: Make the soft debugger work on platforms without MAP_32BIT.
1834 2010-01-26 Zoltan Varga <vargaz@gmail.com>
1836 * dwarfwriter.c (emit_type): Treat MONO_TYPE_PTR as 'I' not 'I4'.
1838 2010-01-26 Geoff Norton <gnorton@novell.com>
1840 * aot-compiler.c: Fix a logic error introduced when guarding against enums
1841 with struct marshalability.
1843 2010-01-24 Zoltan Varga <vargaz@gmail.com>
1845 * mini.c (mini_method_compile): Improve the processing MONO_VERBOSE_METHOD so
1846 it supports class names as well.
1848 * mini.h (MonoCompile): Add a few flags to control JIT behavior which are
1849 needed by the GC map code.
1851 * mini.c (mini_method_compile): Call a function in mini-gc.c to set the new
1854 * method-to-ir.c (mono_method_to_ir): Emit initialization code for ref variables
1855 if cfg->init_ref_vars is set.
1857 * liveness.c (optimize_initlocals): Disable the initlocals opt for ref vars if
1858 cfg->disable_initlocals_op_refs is set.
1860 * method-to-ir.c (mono_spill_global_vars): Compute more precise live ranges
1861 using liveness info if cfg->compute_precise_live_ranges is set.
1863 * mini-gc.c: Ongoing work. Improve logging and debugging support. Handle
1864 volatile variables correctly. Add comments about the live ranges. Not enabled
1867 2010-01-24 Zoltan Varga <vargaz@gmail.com>
1869 * mini.h (MonoDebugOptions): Add an option to init stack frames by writing
1870 0x2a into them in method prologs.
1872 * mini-amd64.c (mono_arch_emit_prolog): Implement it.
1874 2010-01-22 Zoltan Varga <vargaz@gmail.com>
1876 * mini-llvm-cpp.cpp: Remove uses of dynamic_cast, it no longer works with llvm
1877 classes, since llvm is compiled with -fno-rtti.
1879 * mini.h (COMPILE_SOFT_FLOAT): New macro, similar to COMPILE_LLVM.
1881 * method-to-ir.c ir-emit.h: Use if (COMPILE_SOFT_FLOAT) in a few places since
1882 llvm does not require it.
1884 * aot-runtime.c (load_method): Print the full name of the last aot method.
1886 2010-01-21 Zoltan Varga <vargaz@gmail.com>
1888 * exceptions-amd64.c (mono_arch_notify_pending_exc): Avoid a crash if the
1889 thread has not fully started yet.
1891 2010-01-21 Zoltan Varga <vargaz@gmail.com>
1893 * aot-compiler.c (can_marshal_struct): Allow marshalling enums.
1895 2010-01-21 Miguel de Icaza <miguel@novell.com>
1897 * driver.c: Do not abort if LLVM is not supported, print a
1898 warning and add the information to the Mono JIT information.
1900 2010-01-21 Zoltan Varga <vargaz@gmail.com>
1902 * ir-emit.h (MONO_EMIT_NULL_CHECK): Don't emit an OP_IMPLICIT_EXCEPTION when
1903 using explicit null checks.
1905 2010-01-20 Zoltan Varga <vargaz@gmail.com>
1907 * xdebug.c: New file extracted from aot-compiler.c, containing the XDEBUG
1910 * aot-compiler.c (encode_method_ref): Use mono_marshal_wrapper_info_from_wrapper
1912 (mono_aot_wrapper_name): Remove the special handling of delegate invoke wrappers,
1913 its no longer needed.
1915 * method-to-ir.c (mono_method_to_ir): Fix a warning.
1917 * exceptions-<ARCH>.c: Introduce a MONO_ARCH_HAVE_THROW_EXCEPTION_BY_NAME
1918 define for platforms still using it (s390). Get rid of the
1919 mono_arch_get_throw_exception_by_name () routines on all other platforms.
1921 * exceptions-x86.c: Rework the throw trampolines so there is only one function
1922 which can generate throw/rethrow/corlib trampolines for llvm/not llvm code.
1924 * exceptions-x86.c: Add LLVM specific throw trampolines which doesn't assume
1925 the caller pushed the arguments.
1927 * mini-llvm.c: Enable throwing exceptions on x86.
1929 * mini-posix.c (SIG_HANDLER_SIGNATURE): Avoid
1930 "Thread (nil) may have been prematurely finalized" messages if this is called
1931 on a thread not registered with the runtime.
1933 * mini-exceptions.c (mono_handle_native_sigsegv): Ditto.
1935 2010-01-19 Zoltan Varga <vargaz@gmail.com>
1937 * jit-icalls.c (mono_array_new_3): New jit icall.
1939 * aot-compiler.c aot-runtime.c: Add support for ElementAddr wrappers.
1941 * arrays.cs: Add a test for 3 dimensional arrays.
1943 2010-01-19 Zoltan Varga <vargaz@gmail.com>
1945 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Emit xdebug info.
1946 (mono_arch_find_jit_info_ext): Disable the popping of arguments when LLVM is
1949 * mini-llvm.c (emit_cond_system_exception): Abort when an implicit exception is
1952 * unwind.c (mono_unwind_decode_fde): Fix an assert on x86.
1954 * mini-x86.h (MONO_CONTEXT_SET_LLVM_EXC_REG): Define this for x86.
1956 * mini-llvm.c: Disable OP_THROW on x86, it doesn't work yet.
1958 2010-01-18 Bill Holmes <billholmes54@gmail.com>
1960 * debugger-agent.c : Changing the PLATFORM_WIN32 preprocessor check to
1961 HOST_WIN32. Also including winsock2. to define struct in_addr.
1963 * mini-amd64.h : Changing the PLATFORM_WIN32 preprocessor check to HOST_WIN32.
1965 * mini-x86.h : Changing the PLATFORM_WIN32 preprocessor check to HOST_WIN32.
1967 Code is contributed under MIT/X11 license.
1969 2010-01-18 Zoltan Varga <vargaz@gmail.com>
1971 * mini.h (MonoCompile): Add 'disable_out_of_line_bblocks' flag.
1973 * branch-opts.c (mono_optimize_branches): Honor the new flag.
1975 * mini.c (mini_method_compile): Set the new flag when running under the
1978 2010-01-18 Zoltan Varga <vargaz@gmail.com>
1980 * mini-gc.c: Change the GC map to use a ref/noref/pin value instead of just
1981 a ref/noref value + a global pin flag, so parts of stack frames can still be
1982 precisely marked even if they include stuff which needs pinning. Improve logging.
1983 Fix many bugs. Not enabled yet.
1985 * gc-test.cs: Add a few tests.
1987 * liveness.c (mono_analyze_liveness): Make the debug output controllable by
1988 the normal -v options. Avoid propagating liveness information through bblocks
1989 which end with a NOT_REACHED opcode.
1991 * mini.c (mono_jit_compile_method_inner): Avoid reading cfg->prof_options
1992 after cfg has been freed.
1994 2010-01-17 Zoltan Varga <vargaz@gmail.com>
1996 * branch-opts.c (mono_branch_optimize_exception_target): Stop the optimization
1997 if a clause is skipped because it uses the exception object, since it could
1998 have caught the exception.
2000 * exceptions.cs: Add a test.
2002 2010-01-16 Zoltan Varga <vargaz@gmail.com>
2004 * mini-trampolines.c (mono_create_static_rgctx_trampoline): Add an assert.
2006 * aot-runtime.c (mono_aot_get_method): Handle ftnptr's correctly for the
2007 ICollection<T> wrappers.
2009 2010-01-16 Zoltan Varga <vargaz@gmail.com>
2011 * debugger-agent.c (decode_value): Fix the decoding of I/U/PTR.
2013 2010-01-16 Zoltan Varga <vargaz@gmail.com>
2015 * mini-amd64.c (emit_call_body): Always use near calls when AOTing even if
2016 NOMAP32BIT or optimize_for_xen is set.
2018 2010-01-16 Zoltan Varga <vargaz@gmail.com>
2020 * aot-compiler.c aot-runtime.c: Get rid of mono_aot_str_hash (), use
2021 mono_metadata_str_hash () instead.
2023 2010-01-15 Zoltan Varga <vargaz@gmail.com>
2025 * ir-emit.h (MONO_EMIT_NEW_ICOMPARE_IMM): Use sizeof (mgreg_t) instead of
2028 * unwind.c (mono_unwind_frame): Use mgreg_t instead of gssize.
2030 2010-01-15 Zoltan Varga <vargaz@gmail.com>
2032 * ir-emit.h (MONO_EMIT_NEW_CHECK_THIS): Emit an explicit null check if the
2035 * mini-ppc.c (mono_arch_emit_exceptions): Compute the size of the exception
2036 throwing code correctly.
2038 * mini.h (MONO_AOT_FILE_VERSION): Bump this because of the IMT hashing changes.
2040 2010-01-15 Zoltan Varga <vargaz@gmail.com>
2042 * aot-runtime.c (mono_aot_plt_resolve): Reenable the previous assert for
2043 ftnptrs created by us, handle RGCTX_FETCH correctly.
2044 (mono_aot_get_lazy_fetch_trampoline): Add an ftnptr.
2046 * mini-trampolines.c (mono_create_generic_class_init_trampoline): Remove the
2047 ftnptr added by mono_aot_get_named_code ().
2049 2010-01-14 Zoltan Varga <vargaz@gmail.com>
2051 * mini-arm.c: Fix a few LLVM problems.
2053 * mini-llvm.c (simd_class_to_llvm_type): Fix compilation on !x86/amd64.
2055 2010-01-13 Mark Probst <mark.probst@gmail.com>
2057 * method-to-ir.c (mini_emit_stobj): Use EMIT_NEW_CLASSCONST when
2060 Wed Jan 13 15:54:53 CET 2010 Paolo Molaro <lupus@ximian.com>
2062 * jit.h, method-to-ir.c: added ability to set the policy for
2063 inserting breakpoints from the break IL instruction or the
2064 Debugger.Break () API call.
2066 2010-01-13 Zoltan Varga <vargaz@gmail.com>
2068 * aot-runtime.c (load_aot_module): Add more comments to explain why referenced
2069 assemblies need to be eagerly loaded.
2071 2010-01-12 Zoltan Varga <vargaz@gmail.com>
2073 * dwarfwriter.c (emit_line_number_info): Fix the eglib case so it doesn't crash.
2075 2010-01-11 Zoltan Varga <vargaz@gmail.com>
2077 * debugger-agent.c (mono_debugger_agent_parse_options): Allow onthrow without
2078 an argument which matches any exception.
2080 2010-01-10 Zoltan Varga <vargaz@gmail.com>
2082 * method-to-ir.c (mono_emit_method_call_full): Avoid the virt->nonvirt
2083 optimization if the called method is gshared and marshalbyref, since gshared
2084 methods can' have wrappers. Fixes #569390.
2086 * generics.cs: Add a test.
2088 2010-01-10 Zoltan Varga <vargaz@gmail.com>
2090 * mini-exceptions.c (mono_print_thread_dump_from_ctx): New helper function
2093 2010-01-10 Zoltan Varga <vargaz@gmail.com>
2095 * mini.c (mono_print_method_from_ip): Fix the lookup of trampolines.
2097 2010-01-09 Zoltan Varga <vargaz@gmail.com>
2099 * debugger-agent.c (transport_connect): comment out freeaddrinfo calls under win32,
2100 since it is not supported in win2000.
2102 2010-01-08 Zoltan Varga <vargaz@gmail.com>
2104 * aot-runtime.c (load_image): Add a SET_ERROR argument to set the loader
2105 error if loading an assembly fails.
2106 (mono_aot_plt_resolve): Return NULL instead of asserting if loading fails.
2108 * mini-trampolines.c (mono_aot_plt_trampoline): Throw a pending loader error
2111 * aot-runtime.c (decode_exception_debug_info): Set jinfo->from_llvm for LLVM
2114 * mini-llvm-cpp.cpp: Remove the unused ctx variable.
2116 * mini-llvm.c (mono_llvm_emit_method): Add some comments about why aot+clauses
2117 is not supported yet.
2119 * unwind.c (DW_EH_PE_absptr): Add more DW_EH_PE_ constants.
2121 2010-01-07 Rodrigo Kumpera <rkumpera@novell.com>
2123 * method-to-ir.c: All types with variant arguments must fallback to the
2124 slow path. This makes cast of variant delegates work.
2126 * mini-trampolines.c (mono_get_vcall_slot_addr): Add new variance_used out
2127 argument that is set to TRUE is the returned vtable slot is for a variant
2128 interface. Changed a g_print + g_assert_not_reached to a g_error.
2130 * mini-trampilines.c (common_call_trampoline): Handle variant interfaces in
2131 a similar fashion of generic virtual methods.
2133 2010-01-07 Rodrigo Kumpera <rkumpera@novell.com>
2135 * helpers.c (mono_disassemble_code): Fix a g_hash_table warning
2138 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Convert a given
2139 method using a variance aware function.
2141 * mini-x86.c: Add support for dumping IMT thunks if DEBUG_IMT is defined.
2143 2010-01-07 Rodrigo Kumpera <rkumpera@novell.com>
2145 * method-to-ir.c (mono_method_to_ir): Casts to variant interfaces
2146 do an icall for now.
2148 2010-01-07 Zoltan Varga <vargaz@gmail.com>
2150 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add an ugly hack to fix #564695.
2151 If LLVM decides to set the code model to Large, reset it to Default.
2153 2010-01-07 Zoltan Varga <vargaz@gmail.com>
2155 * aot-compiler.c (mono_xdebug_flush): Export it so it is present in
2156 stripped binaries as well.
2158 2010-01-07 Zoltan Varga <vargaz@gmail.com>
2160 * mini-trampolines.c (common_call_trampoline): Add an rgctx trampoline if a shared
2161 method is called from LLVM compiled code, as that code can't pass an rgctx arg.
2163 * mini-llvm.c (mono_llvm_emit_method): Enable calls to methods needing an rgctx
2166 2010-01-06 Zoltan Varga <vargaz@gmail.com>
2168 * mini.c (mini_method_compile): Extract the JIT info creation code into a
2171 * mini-llvm.c (mono_llvm_emit_method): Pass the info in MonoExceptionClause
2172 as the type info to llvm.eh.selector.
2173 (exception_cb): Use the type info for filling out some fields of
2174 MonoJitExceptionInfo like the flags and the exception class. This is needed
2175 because the LLVM produced exception handling clauses might not match the original
2176 IL clauses, i.e. there might be more than one LLVM clause for one IL clause.
2178 * unwind.c (mono_unwind_decode_fde): Extract the LSDA decoding code into a
2179 separate function. Add an extra argument which returns the type infos
2180 corresponding to the exception clauses.
2182 * mini.c (mini_method_compile): Enable LLVM compilation of methods having
2183 exception handling clauses.
2185 2010-01-04 Zoltan Varga <vargaz@gmail.com>
2187 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
2188 mono_method_get_vtable_slot () instead of accessing imt_method->slot directly,
2191 2010-01-04 Rodrigo Kumpera <rkumpera@novell.com>
2193 * mini.c (mono_compile_is_broken): Skip methods from serialization's
2196 2010-01-04 Zoltan Varga <vargaz@gmail.com>
2198 * mini.c (mini_method_compile): Fix a few memory leaks introduced by the
2201 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
2203 * mini.c (mini_method_compile): Verify the method before calling
2204 mono_compile_create_vars as this might crash since it uses method
2209 2010-01-04 Zoltan Varga <vargaz@gmail.com>
2211 * method-to-ir.c (mono_method_to_ir): Avoid calling mono_class_vtable () in
2212 one case if AOTing, since the class might not be a concrete class.
2214 2010-01-03 Zoltan Varga <vargaz@gmail.com>
2216 * mini-codegen.c abcremoval.c: Remove the duplicate g_slist_append_mempool
2217 functions which are now defined in mempool-internals.h.
2219 * mini.c (mini_free_jit_domain_info): Free the seq point hash tables.
2221 * mini-llvm.c (mono_llvm_emit_method): Handle OP_ABS.
2223 2009-12-30 Rodrigo Kumpera <rkumpera@novell.com>
2227 * mini-*.c: Properly handle generic enums.
2231 2009-12-28 Zoltan Varga <vargaz@gmail.com>
2233 * method-to-ir.c (mono_method_to_ir): Handle the failure of mono_class_vtable ()
2234 in a few more places.
2236 2009-12-27 Zoltan Varga <vargaz@gmail.com>
2238 * aot-compiler.c (add_wrappers): Don't use dyn runtime invoke for methods with
2239 nullable parameters. Fixes #567351.
2241 2009-12-26 Rodrigo Kumpera <rkumpera@novell.com>
2243 * mini-trampolines.c (common_call_trampoline): Add assert for NULL resolved generic method.
2245 2009-12-26 Zoltan Varga <vargaz@gmail.com>
2247 * mini-trampolines.c: Use mono_arch_get_this_arg_from_call () to avoid the slow
2248 mono_get_generic_context_from_code () call.
2250 * mini-<ARCH>.c: Get rid of mono_arch_find_this_arg (), it is no longer used.
2252 2009-12-25 Zoltan Varga <vargaz@gmail.com>
2254 * aot-runtime.c (decode_klass_ref): Don't call mono_class_init (), its not
2257 2009-12-24 Sebastien Pouliot <sebastien@ximian.com>
2259 * method-to-ir.c (mono_method_to_ir): Avoid SIGSEGV when
2260 mono_method_get_signature returns NULL. Fix #567084
2262 2009-12-25 Zoltan Varga <vargaz@gmail.com>
2264 * aot-runtime.c (find_extra_method): Call mono_aot_wrapper_name only once,
2265 instead of once for each module.
2267 2009-12-22 Zoltan Varga <vargaz@gmail.com>
2269 * debugger-agent.c (ss_start): Implement step over for the last sequence
2272 * mini.c (mono_save_seq_point_info): Don't link sequence points which don't
2273 have the STEP_LOC flag set.
2275 * aot-runtime.c (decode_klass_ref): Avoid a crash if a decode_klass_ref () call
2276 fails. Fixes #566689.
2278 2009-12-21 Zoltan Varga <vargaz@gmail.com>
2280 * mini.c (mono_add_seq_point): New helper function.
2281 (mono_save_seq_point_info): New function to save sequence point info, extracted
2282 from mini_method_compile ().
2284 * mini-<ARCH>.c: Call mono_add_seq_point to remember sequence points.
2286 * mini.h (MonoSeqPointInfo): New structure containing information about
2287 the sequence points of a JITted method.
2288 (MonoBasicBlock): Add 'seq_points' and 'last_seq_point' fields. Remove unused
2291 * mini.c debugger-agent.c aot-compiler.c aot-runtime.c: Change the way sequence
2292 point information is stored, use a MonoSeqPointInfo structure instead of a
2293 GPtrArray. For each seq point, compute a list of successor seq points.
2295 * debugger-agent.c: Use the successor list to implement step-over more
2296 efficiently: instead of single stepping until a different line/IL offset is
2297 reached, place breakpoints into all successor seq points.
2299 * mini.h: Bump AOT file format version.
2301 2009-12-21 Zoltan Varga <vargaz@gmail.com>
2303 * Makefile.am (AM_CFLAGS): Include LLVM_CFLAGS.
2305 * mini-llvm.c: Avoid defining the __STDC_... macros if already defined.
2307 2009-12-21 Zoltan Varga <vargaz@gmail.com>
2309 * exceptions-ppc.c (mono_ppc_set_func_into_sigctx): Fix the cross-compiler
2312 2009-12-18 Zoltan Varga <vargaz@gmail.com>
2314 * mini-x86.c (mono_arch_get_argument_info): Allocate memory for CallInfo using
2315 alloca as g_malloc is not signal safe.
2317 2009-12-18 Zoltan Varga <vargaz@gmail.com>
2319 * tramp-x86.c (mono_arch_patch_callsite): Fix the call to
2320 VALGRIND_DISCARD_TRANSLATIONS.
2322 * *.c: Include mono/utils/memcheck.h, and remove #ifdef HAVE_VALGRIND_MEMCHECK_H
2323 checks, they are no longer needed.
2325 * exceptions-ppc.c (mono_ppc_set_func_into_sigctx): New helper function to set
2326 a function into a sigctx which can handle function pointers.
2328 * mini-ppc.c: Implement soft debugger support on ppc64.
2330 * mini-ppc.c: Implement soft debugger support.
2332 2009-12-17 Zoltan Varga <vargaz@gmail.com>
2334 * mini-llvm.c: Handle OP_LADD_OVF_UN. Place all alloca's into the entry bb.
2336 2009-12-17 Marek Habersack <mhabersack@novell.com>
2338 * mini.c (mono_get_runtime_build_info): include Mono version in
2341 * driver.c (mono_main): VERSION is now included in the string
2342 returned from mono_get_runtime_build_info()
2344 2009-12-17 Zoltan Varga <vargaz@gmail.com>
2346 * method-to-ir.c (mono_method_to_ir): Add support for CALLI with unmanaged
2347 signatures. Fixes #565143.
2349 * jit-icalls.c (mono_get_native_calli_wrapper): New JIT icall.
2351 2009-12-16 Zoltan Varga <vargaz@gmail.com>
2353 * aot-compiler.c (arch_emit_autoreg): Align code to 4 in the ppc case.
2355 2009-12-16 Rodrigo Kumpera <rkumpera@novell.com>
2357 * mini-x86.h: Forgot to add a 0x to MONO_ARCH_MAX_FRAME_SIZE define
2358 making max stack 10x smaller.
2360 2009-12-16 Zoltan Varga <vargaz@gmail.com>
2362 * mini.c (mono_resolve_patch_target): Comment out an assert which could be hit.
2364 2009-12-15 Rodrigo Kumpera <rkumpera@novell.com>
2366 * method-to-ir.c (mini_emit_memcpy): Assert if size is too big.
2368 2009-12-15 Rodrigo Kumpera <rkumpera@novell.com>
2370 * mini-x86.c (mono_arch_allocate_vars): Fail compilation if the frame size is
2371 bigger than MONO_ARCH_MAX_FRAME_SIZE.
2373 * mini-x86.c (mono_arch_emit_prolog): Handle huge frames.
2375 * mini-x86.h: Define MONO_ARCH_MAX_FRAME_SIZE to be 1Mb.
2377 * mini-amd64.c / mini-amd64.h: Same fixes as of above.
2379 * mini.c (mini_method_compile): Check if mono_arch_allocate_vars failed
2382 2009-12-14 Miguel de Icaza <miguel@novell.com>
2384 * method-to-ir.c (mono_method_to_ir): CEE_UNUSUED opcodes now
2385 raise an invalid program exception.
2387 For other opcodes that we might not handle use a g_warning and
2388 raise the exception. Beats termination.
2392 2009-12-14 Zoltan Varga <vargaz@gmail.com>
2394 * method-to-ir.c (mono_emit_rgctx_method_call_full): Fix a warning.
2396 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix the LLVM support
2397 by merging the LLVM and !MAP_32BIT cases.
2399 2009-12-13 Jonathan Chambers <joncham@gmail.com>
2401 * debugger-agent.c (mono_debugger_agent_thread_interrupt): Handle a NULL
2402 sigctx being passed in, as we have no CONTEXT available in the APC.
2404 (mono_debugger_agent_cleanup): Use explicit cond wait implementation
2407 Code contributed under MIT/X11 license.
2409 2009-12-13 Zoltan Varga <vargaz@gmail.com>
2411 * method-to-ir.c mini-llvm.c: Fix support for monitor enter/exit trampolines
2412 in the LLVM backend on AMD64.
2414 * aot-runtime.c (decode_eh_frame): Initialize the clauses from the info in the
2417 * unwind.c (mono_unwind_decode_fde): Implement decoding of a couple more formats.
2419 * mini-llvm.c: Export mono_personality for AOT.
2421 * mini.c (mini_method_compile): Fix some problems with llvm+aot+clauses.
2423 * mini-ops.h (OP_IMPLICIT_EXCEPTION): New opcode marking the place where an
2424 implicit exception can occur.
2426 * ir-emit.h (MONO_EMIT_NEW_IMPLICIT_EXCEPTION): New macro to emit an
2427 OP_IMPLICIT_EXCEPTION instruction.
2429 * ir-emit.h (MONO_EMIT_NEW_CHECK_THIS): New macro.
2431 * method-to-ir.c: Use MONO_EMIT_NEW_CHECK_THIS in a few places.
2433 * mini-llvm.c: Handle OP_IMPLICIT_EXCEPTION by disabling llvm if it occurs
2434 inside a protected block.
2436 * mini-llvm.c: Revert the last change, the signature of monitor entry/exit
2437 trampolines doesn't include the argument.
2439 * mini-llvm.c (mono_llvm_emit_method): Enable calls to monitor entry/exit
2440 trampolines on amd64.
2442 * mini-amd64.h (MONO_ARCH_MONITOR_OBJECT_REG): Use MONO_AMD64_ARG_REG1 instead
2445 * mini.c (mini_method_compile): Add some comments as to why LLVM is currently
2446 disabled for methods with clauses.
2448 * mini-llvm.c: Enable support for catch clauses.
2450 * mini-exceptions.c (mono_resume_unwind): New function to resume unwinding at the
2451 end of an LLVM compiled finally clause.
2452 (mono_handle_exception_internal): Save the exception handling state in TLS
2453 before calling an LLVM compiled finally clause, so mono_resume_unwind () can
2454 resume unwinding from that point.
2456 * unwind.c (mono_unwind_get_ops_from_fde): Rename this to
2457 mono_unwind_decode_fde, decode the Language Specific Data Area (LSDA) too,
2458 to obtain the addresses of the exception handling regions.
2460 * mini-llvm.c: Add beginnings of support for exception handling, currently only
2461 finally clauses are supported.
2463 * mini.c (mini_method_compile): Add support for LLVM code with exception
2466 2009-12-12 Zoltan Varga <vargaz@gmail.com>
2468 * mini-llvm.c (mono_llvm_emit_method): Allocate the 'pindexes' array with the
2471 2009-12-12 Zoltan Varga <vargaz@gmail.com>
2473 * debugger-agent.c: Encode the this argument of vtype methods as a struct, not
2474 as a primitive type.
2476 2009-12-11 Zoltan Varga <vargaz@gmail.com>
2478 * driver.c: Applied patch from Matt McClellan (matt@mc-c.net). Add a check
2479 for 2 parameter sched_setaffinity in older glibc versions. Fixes
2482 2009-12-11 Marek Habersack <mhabersack@novell.com>
2484 * method-to-ir.c (mini_redirect_call): do not redirect the
2485 InternalAllocateStr internal call if string profiling is enabled.
2487 2009-12-10 Zoltan Varga <vargaz@gmail.com>
2489 * aot-compiler.c (add_wrappers): Avoid generating synchronized wrappers for
2492 * unwind.h: Rename this to mini-unwind.h to avoid conflicts with the gcc
2493 unwind.h header file.
2495 * tramp-x86.c (mono_arch_patch_callsite): Patch the code when using valgrind,
2496 newer valgrind versions seems to handle this fine.
2498 2009-12-09 Zoltan Varga <vargaz@gmail.com>
2500 * debugger-agent.c (start_runtime_invoke): Fix a crash if this is called
2501 on the debugger thread.
2503 2009-12-08 Zoltan Varga <vargaz@gmail.com>
2505 * mini-llvm.c (mono_llvm_emit_method): Add more SIMD opcodes.
2507 * mini.c (mono_print_method_from_ip): Fix the lookup of trampolines.
2509 * mini-codegen.c (mono_local_regalloc): Allow non-call opcodes with cloc:c.
2511 * cpu-<ARCH>.md: Make call_handler clob:c.
2513 * mini.c: Reenable SSA for methods with clauses.
2515 * mini.c (mini_method_compile): Disable SSA for now for methods with clauses,
2516 as it causes failures on x86.
2518 2009-12-08 Sebastien Pouliot <sebastien@ximian.com>
2520 * driver.c: Fail gracefully with --compile-all if mono_method_signature
2521 returns NULL (e.g. a bad assembly).
2523 2009-12-08 Geoff Norton <gnorton@novell.com>
2525 * debugger-agent.c: Refactor the mono_runtime_invoke guarding against
2526 stepping out into native code. There were issues with nested invokes
2529 2009-12-07 Zoltan Varga <vargaz@gmail.com>
2531 * mini.c (mini_method_compile): Do the disable_llvm checks early
2532 and avoid the LLVM compile pass if the checks fail.
2534 * mini.c ssa.c abcremoval.c: Enable SSA for methods with exception clauses.
2536 * mini-llvm.c: Put our methods/globals into the 'llvm.used' array, so the
2537 LLVM optimizations don't try to remove them.
2539 * aot-compiler.c (emit_llvm_file): Save the result of opt into a
2540 different file so the original remains.
2542 2009-12-06 Zoltan Varga <vargaz@gmail.com>
2544 * mini-llvm.c mini.c: Fix alignment issues with SIMD vars.
2546 * aot-runtime.c (decode_arm_exidx): Handle most descriptors created by gas.
2548 * aot-runtime.c (decode_arm_exidx): Refactor this into two functions, add
2549 support for non-inline unwind descriptors.
2551 2009-12-07 Geoff Norton <gnorton@novell.com>
2553 * debugger-agent.c: Darwin can colesce signals, so we need to handle
2554 the interrupt_count slightly differently. Native threads were never
2557 2009-12-05 Zoltan Varga <vargaz@gmail.com>
2559 * aot-runtime.c (decode_arm_exidx): New function to initialize a MonoJitInfo
2560 based on the contents of the ARM .exidx section. Not yet used since llvm doesn't
2561 yet generate this info.
2563 * mini-llvm.c: Fix the conversion of call results if they are unsigned.
2565 * debugger-agent.c (buffer_add_value): Treat I/U as a valuetype, so the
2566 client can distinguish between intptrs and longs.
2568 2009-12-05 Zoltan Varga <vargaz@gmail.com>
2570 * aot-compiler.c (emit_trampoline): Emit the trampoline info into the global
2573 * aot-runtime.c (load_function): Update after the change above.
2575 * mini.h: Bump AOT file format version.
2577 * method-to-ir.c (mono_method_to_ir): Disallow the delegate optimization
2578 if the delegate class is dynamic.
2580 * method-to-ir.c (handle_delegate_ctor): Allow the method_code optimization
2581 in gshared code too using the new rgctx info type
2582 MONO_RGCTX_INFO_METHOD_DELEGATE_CODE.
2584 2009-12-04 Geoff Norton <gnorton@novell.com>
2586 * debugger-agent.c: When doing a func-eval invoke on a suspended runtime,
2587 we need to track the original suspend count so the thread properly
2588 wakes up in resume_thread.
2590 2009-12-04 Zoltan Varga <vargaz@gmail.com>
2592 * method-to-ir.c (handle_delegate_ctor): Add support for using this from gshared
2595 * generics.cs: Add a test.
2597 * method-to-ir.c (emit_get_rgctx_method): Make this work even if context_used
2598 is 0. Simplify a lot of code using this.
2600 * mini-trampolines.c (mono_delegate_trampoline): Call
2601 mono_create_static_rgctx_trampoline () before saving the final address in
2602 delegate->method_code, to avoid calling it each time a delegate is first called.
2604 * method-to-ir.c (mono_method_to_ir): Allow fast delegate creation for methods
2605 which need static rgctx trampolines.
2607 * mini-trampolines.c (mono_create_static_rgctx_trampoline): Use a cache
2608 keyed on the method+addr pair, since addr could be either the method addr or
2609 an unbox trampoline in the AOT case. Fixes #560246.
2611 2009-12-03 Zoltan Varga <vargaz@gmail.com>
2613 * mini.c (mini_method_compile): Call handle_exception_clauses () in the same
2614 place it was called before too.
2616 2009-12-03 Zoltan Varga <vargaz@gmail.com>
2618 * mini.c (mono_jit_runtime_invoke): Avoid the call to mono_class_setup_vtable ()
2619 if no security manager is present, to speed up the AOT case. Call
2620 mono_class_vtable () full with raise_on_error == TRUE instead.
2622 2009-12-03 Zoltan Varga <vargaz@gmail.com>
2624 * mini.c (mini_method_compile): Call handle_exception_clauses earlier so
2625 the local optimization passes can take its result into account. Fixes
2628 * exceptions.cs: Add a test.
2630 2009-01-24 Steven Munroe <munroesj@us.ibm.com>
2632 This patch is contributed under the terms of the MIT/X11 license
2634 * cpu-ppc64.md (load_memindex): Add loadi8_memindex.
2636 2009-12-03 Zoltan Varga <vargaz@gmail.com>
2638 * mini.h (MonoInst): Remove unused 'ssa_op' field.
2640 * debugger-agent.c: Rework the handling of stack traces of running threads to
2641 avoid crashes if compute_frames () tries to walk the stack of running thread.
2643 * mini.c (mono_print_method_from_ip): Use mini_jit_info_table_find.
2645 * mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): Set frame->lmf.
2647 * mini.h (StackFrameInfo): Add an 'lmf' field.
2649 2009-12-02 Zoltan Varga <vargaz@gmail.com>
2651 * debugger-agent.c (suspend_current): Always set really_suspended.
2653 * debugger-agent.c (clear_event_request): Clear method entry/exit requests too.
2655 * exceptions-x86.c (mono_arch_get_restore_context): Restore EAX too.
2657 2009-12-01 Zoltan Varga <vargaz@gmail.com>
2659 * debugger-agent.c (vm_commands): Don't allow invokes on threads which are not
2662 2009-12-01 Zoltan Varga <vargaz@gmail.com>
2664 * cpu-ppc64.md (store_memindex): Add storei8_memindex.
2666 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
2668 * mini-trampolines.c: Fix MSVC build.
2670 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
2672 * mini-trampolines.c: Check for mono_method_get_vtable_slot failures.
2674 2009-11-30 Zoltan Varga <vargaz@gmail.com>
2676 * mini-arm.c (mono_arch_lowering_pass): Fix an assert which is hit when
2677 the instruction following an OP_FCOMPARE is optimized away.
2679 2009-11-30 Zoltan Varga <vargaz@gmail.com>
2681 * aot-compiler.c (arch_emit_autoreg): Extract the auto-registration code from
2682 emit_autoreg () into this arch-specific function.
2684 * aot-compiler.c (emit_exception_debug_info): Don't emit the length of the
2685 code, it is no longer needed.
2687 * aot-runtime.c (decode_exception_debug_info): Don't read the code length.
2689 * mini.h: Bump AOT file format version.
2691 * aot-runtime.c (mono_aot_find_jit_info): Compute the length of the method
2692 using the sorted_code_offsets array, instead of reading it from the
2693 exception debug info.
2694 (load_method): Call mono_aot_find_jit_info instead of
2695 decode_exception_debug_info ().
2697 * aot-compiler.c (emit_exception_debug_info): Emit whenever the method was
2698 LLVM compiled as a flag.
2700 2009-11-29 Zoltan Varga <vargaz@gmail.com>
2702 * debugger-agent.c (resume_thread): Fix a warning.
2704 * aot-compiler.c: Add an option to set the number of static rgctx trampolines
2707 2009-11-28 Zoltan Varga <vargaz@gmail.com>
2709 * aot-compiler.c aot-runtime.c: Get rid of a few global symbols, move their
2710 contents to MonoAotFileInfo.
2712 2009-11-27 Zoltan Varga <vargaz@gmail.com>
2714 * aot-compiler.c aot-runtime.c: Reorganize the AOT file format once again.
2715 Put all binary data into a giant blob, similarly to the way .net assemblies
2716 store binary data. Emit offset tables in a compact form to reduce their size.
2718 * mini.h: Bump AOT file format version.
2720 * aot-compiler.c (emit_globals_table): Use temp_prefix instead of .L in a few
2723 * aot-compiler.c (emit_globals_table): Emit a hash table for the globals, to
2724 avoid linear searches at runtime.
2726 * aot-runtime.c (find_symbol): Update this to use the hash.
2728 * mini.h: Bump AOT file format version.
2730 2009-11-26 Zoltan Varga <vargaz@gmail.com>
2732 * aot-compiler.c (emit_klass_info): Save whenever the class has a generic
2735 * aot-runtime.c (decode_cached_class_info): Set the is_generic_container field
2738 * aot-compiler.c (mono_compile_assembly): Add a 'stats' option to print out
2739 the distribution of got slot types.
2741 * mini.h (MonoDebugOptions): Add 'explicit_null_checks' option.
2743 * method-to-ir.c: Add support for generating explicit null checks.
2745 2009-11-25 Zoltan Varga <vargaz@gmail.com>
2747 * debugger-agent.c (vm_commands): Implement EXIT by invoking Environment.Exit ()
2748 on a random thread if possible.
2750 * aot-runtime.c (mono_aot_plt_resolve): Clean up the handling of function
2751 descriptors a bit, add comments, handle RGCTX_FETCH/GENERIC_CLASS_INIT_TRAMPOLINE
2754 * exceptions-ppc.c (mono_arch_find_jit_info_ext): Use mgreg_t as the type of
2755 regs. Pass the real size of the regs array to mono_unwind_frame ().
2757 * unwind.c (mono_unwind_frame): Remove an incorrect assert, add more correct
2760 2009-11-24 Geoff Norton <gnorton@novell.com>
2762 * mini-darwin.c: Work around apple bug rdar://7209349 See
2763 http://openradar.appspot.com/7209349 for details. Synopsis,
2764 CoreFoundation SIGTRAP's if you dlopen it off the main thread if its
2765 never been initialized before.
2767 2009-11-24 Zoltan Varga <vargaz@gmail.com>
2769 * tramp-arm.c: Use blx instead of mov pc, reg to improve support for thumb.
2771 * mini-arm.c (mono_arm_thumb_supported): New helper function.
2773 2009-11-24 Zoltan Varga <vargaz@gmail.com>
2775 * cfold.c (mono_constant_fold_ins): Fix a problem in the previous change,
2776 OP_SHL_IMM is not 32 bit.
2778 2009-11-24 Zoltan Varga <vargaz@gmail.com>
2780 * aot-compiler.c (encode_patch): Fix the encoding of R8 on big-endian systems.
2782 2009-11-24 Zoltan Varga <vargaz@gmail.com>
2784 * aot-compiler.c: Avoid infinite recursion when generic virtual recursion is
2787 * debugger-agent.c (resume_vm): Signal the suspend_cond even if suspend_count
2788 > 0 since some threads can resume if their resume_count is > 0.
2789 (invoke_method): Avoid reading freed memory.
2791 * debugger-agent.c (process_suspend): Extract the suspend code from
2792 process_single_step_inner () to a separate function. Rework the code to prevent
2793 races between this function and thread interrupts.
2795 * debugger-agent.c (suspend_current): Check the resume_count field instead
2796 of resume_one so suspends+resumes during single threaded invokes work
2799 2009-11-23 Zoltan Varga <vargaz@gmail.com>
2801 * aot-compiler.c (emit_llvm_file): Enable some llvm optimizations which seem
2802 to make the generated code smaller.
2804 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Add a code
2805 sequence generated by recent LLVM versions.
2807 * mini-llvm.c: Add support for a few simple cases which weren't supported
2810 * mini-trampolines.c (mono_magic_trampoline): Don't call
2811 mono_arch_get_vcall_slot () when llvm is enabled.
2813 * aot-compiler.c (emit_llvm_file): Add code to run the 'opt' llvm tool.
2815 * mini-trampolines.c (mono_magic_trampoline): Extract the bulk of this function
2816 into a new function called common_call_trampoline () which is used by the
2817 llvm vcall trampoline as well.
2819 * debugger-agent.c: Implement single threaded invokes.
2821 * debugger-agent.c: Revert change which broke the agent on linux.
2823 * method-to-ir.c (inline_method): Prevent infinite recursion. Fixes
2826 * generics.cs: Add a test.
2828 2009-11-22 Zoltan Varga <vargaz@gmail.com>
2830 * debugger-agent.c: Fix the cygwin build.
2832 2009-11-21 Zoltan Varga <vargaz@gmail.com>
2834 * cprop.c: Remove this unused file.
2836 2009-11-21 Zoltan Varga <vargaz@gmail.com>
2838 * cfold.c (mono_constant_fold_ins): Fix constant folding of shr_imm. Fixes
2841 * basic.cs: Add a test.
2843 2009-11-21 Zoltan Varga <vargaz@gmail.com>
2845 * method-to-ir.c (mono_method_to_ir): Use mono_use_llvm instead of ENABLE_LLVM
2848 2009-11-20 Zoltan Varga <vargaz@gmail.com>
2850 * mini.c mini-trampolines.c driver.c: Add a 'mono_use_llvm' flag to control
2851 whenever the runtime uses LLVM code. Add a '--llvm' command line option to set
2852 it. Use this flag to control llvm related code paths instead of #ifdef
2853 ENABLE_LLVM, so a runtime configured without --enable-llvm can use LLVM compiled
2856 * aot-runtime.c aot-compiler.c: Add a 'flag' field to MonoAotFileInfo.
2858 * mini.h: Bump AOT file format version.
2860 * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline_full): These
2861 receive their argument in MONO_ARCH_VTABLE_REG, not in the first argument reg.
2863 * debugger-agent.c (create_event_list): Fix a crash if an empty assembly list
2864 was used as an assembly filter.
2866 2009-11-19 Zoltan Varga <vargaz@gmail.com>
2868 * unwind.c: Fix support for ppc.
2870 * exceptions-ppc.c (mono_arch_find_jit_info): Change this to use dwarf frame
2871 unwind info. Change to the mono_arch_find_jit_info_ext () interface.
2873 2009-11-19 Zoltan Varga <vargaz@gmail.com>
2875 * mini-ppc.c (mono_arch_emit_prolog): Fix a copy-paste error to fix the ppc64
2877 (mono_arch_cpu_init): Don't set cpu_hw_flags to 0 at the end, this was somehow
2878 added by the ps3 changes.
2880 2009-11-19 Zoltan Varga <vargaz@gmail.com>
2882 * mini-gc.c: Resurrect this, so at least it compiles.
2884 * debugger-agent.c (assembly_commands): Implement GET_NAME command.
2886 2009-11-18 Zoltan Varga <vargaz@gmail.com>
2888 * debugger-agent.c (mono_debugger_agent_handle_exception): Pass a MonoJitInfo to
2889 create_event_list () so assembly filters can be used.
2891 * exceptions-ppc.c (mono_arch_find_jit_info): Fix the restoration of registers
2894 2009-11-17 Zoltan Varga <vargaz@gmail.com>
2896 * debugger-agent.c (mono_debugger_agent_breakpoint_hit): Fix a warning.
2897 (mono_debugger_agent_thread_interrupt): Make this return FALSE if the agent
2900 * aot-compiler.c (add_generic_instances): Emit instances of common generic
2901 classes for char/bool too.
2903 * debugger-agent.c (DebuggerTlsData): Honor the DISABLE_SOFT_DEBUG option.
2905 * debugger-agent.c (DebuggerTlsData): Add a 'really_suspended' flag, not yet
2908 * debugger-agent.c: Add some definitions to make backporting to 2.6 easier.
2911 2009-11-15 Andreas Faerber <andreas.faerber@web.de>
2913 * debugger-agent.c (mono_debugger_agent_thread_interrupt): Signature fix.
2915 Code contributed under MIT/X11 license.
2917 2009-11-14 Zoltan Varga <vargaz@gmail.com>
2919 (mono_debugger_agent_thread_interrupt): Save the context so stacktraces for
2920 threads in native code work.
2922 * debugger-agent.c: Pass the 'flags' argument to VM_INVOKE_METHOD earlier in
2923 the parameter list, so it can be acted upon by vm_commands (). Bump protocol
2926 2009-11-13 Jonathan Chambers <joncham@gmail.com>
2928 * debugger-agent.c: Implementation for Windows platform.
2930 * mini-x86.c: Add support for Windows. Use mono-* synchronization
2931 primitives. Use SEH to implement breakpoints and single stepping.
2933 * mini-x86.h: Enable soft debugger on Windows.
2935 Code contributed under MIT/X11 license.
2937 2009-11-13 Zoltan Varga <vargaz@gmail.com>
2939 * mini-amd64.c (emit_call_body): Disable usage of near calls when running
2940 under XEN. Fixes #522894.
2942 * patch-info.h: Add LLVM_IMT_TRAMPOLINE.
2944 * mini-llvm.c aot-compiler.c aot-runtime.c mini.c: Add support for making
2945 interface calls in LLVM AOT code.
2947 * aot-compiler.c mini-llvm.c: Abort llvm compilation if a non-encodable patch
2950 * mini-llvm.c: Add support for OP_VPHI.
2952 * objects.cs: Add a test.
2954 2009-11-13 Zoltan Varga <vargaz@gmail.com>
2956 * debugger-agent.c (mono_debugger_agent_single_step_event): Avoid a crash if
2957 this is called on the debugger thread.
2959 2009-11-12 Zoltan Varga <vargaz@gmail.com>
2961 * mini-llvm.c: Add soft-float support.
2963 * method-to-ir.c (mono_decompose_soft_float): Restart after decomposing an
2964 FCALL which returns an R4.
2966 * driver.c (mono_main): Add a missing '\n'.
2968 * mini-trampolines.c (mono_create_llvm_imt_trampoline): Fix the build on
2969 platforms which doesn't support the LLVM IMT trampoline.
2971 2009-11-11 Zoltan Varga <vargaz@gmail.com>
2973 * mini-llvm.c (mono_llvm_emit_method): Fix LOCALLOC.
2975 * mini-llvm-cpp.cpp: Update to latest LLVM SVN.
2977 * mini-llvm.c (mono_llvm_emit_method): Avoid creating plt entries for
2980 * aot-runtime.c: Don't define HAVE_DL_ITERATE_PHDR, configure now does that.
2982 2009-11-10 Zoltan Varga <vargaz@gmail.com>
2984 * aot-compiler.c aot-runtime.c: Change how mono_arch_find_jit_info () works.
2985 Instead of emitting a method_order table, sort the contents of the code_offsets
2986 table and do a binary search in the sorted table. The previous approach doesn't
2987 work with LLVM which emits methods in a arbitrary order.
2989 * aot-runtime.c: Add support for creating MonoJitInfo structures by searching
2990 in the .eh_frame section in ELF files.
2992 * mini.h: Bump corlib file format version.
2994 * mini-llvm.c aot-compiler.c: Add support for AOT to the LLVM back end.
2996 * exceptions-arm.c (mono_arch_get_call_filter_full): Update after the
2997 LDMIA->LDM macro name change.
2999 2009-11-09 Zoltan Varga <vargaz@gmail.com>
3001 * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Fix and enable this for
3004 * mini-llvm-cpp.cpp (JITMemoryManager): Fix compilation with LLVM 2.7
3007 * aot-compiler.c: Ditto.
3009 * mini-arm.c (mono_arch_allocate_vars): Fix the previous change by passing
3010 &align to mini_type_stack_size_full ().
3012 * mini-arm.c (mono_arch_emit_prolog): Implement support for varargs.
3014 * mini-ops.h: Add documentation for the OP_ARGLIST opcode.
3016 2009-11-08 Zoltan Varga <vargaz@gmail.com>
3018 * mini-arm.c: Compute the stack space used by arguments using
3019 mini_type_stack_size_full ().
3021 2009-11-08 Zoltan Varga <vargaz@gmail.com>
3023 * optflags-def.h: Remove dead TREEPROP optimization.
3025 2009-11-08 Rodrigo Kumpera <rkumpera@novell.com>
3027 * mini-ppc.h: Make mono compiler under FreeBSD/ppc64.
3029 Patch by Justin Hibbits <chmeeedalf@gmail.com>.
3031 2009-11-07 Zoltan Varga <vargaz@gmail.com>
3033 * driver.c (mono_jit_parse_options): New public API function to parse options
3034 as done by the runtime executable.
3036 * debugger-agent.c (buffer_add_cattrs): Fix reading an uninitialized variable
3037 when handling named arguments.
3039 2009-11-07 Zoltan Varga <vargaz@gmail.com>
3041 * mini-arm.c: Implement support for returning vtypes in registers, fix support
3042 for passing small vtypes in registers, make the CallInfo structures more
3043 similar to the code on the other platforms.
3045 * mini-arm.c (mono_arch_allocate_vars): Align small vtypes to 4 bytes too since
3046 the code in the prolog requires it.
3048 2009-11-06 Zoltan Varga <vargaz@gmail.com>
3050 * mini-arm.c debugger-agent.c: Android changes from Koushik K. Dutta
3051 (koush@koushikdutta.com).
3053 * mini-arm.c (handle_thunk): Add a domain argument to control the domain
3054 where the thunk memory should be allocated from. Fixes appdomain unloading
3057 2009-11-06 Zoltan Varga <vargaz@gmail.com>
3059 * mini-arm.c exceptions-arm.c: Make ctx->regs map directly to the 16 hardware
3060 registers, instead of r4..r11,ip,lr. Make restore_context () restore r0..r3 too.
3062 2009-11-05 Zoltan Varga <vargaz@gmail.com>
3064 * mini-amd64.c (mono_arch_output_basic_block): Don't allow OP_SEQ_POINT in
3065 AOT, as it is not implemented yet.
3067 * mini-x86.c (mono_arch_output_basic_block): Ditto.
3069 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
3071 * debugger-agent.c: Fix windows build.
3073 2009-11-05 Zoltan Varga <vargaz@gmail.com>
3075 * debugger-agent.c (debugger_thread): Call mono_set_is_debugger_attached ()
3076 after the client connects/disconnects.
3078 * debugger-agent.c: Add an 'onthrow' option to start the debugger agent
3079 when an exception of a given type is thrown.
3081 * debugger-agent.c: Add a 'onuncaught' option to start the debugger agent
3082 only on an uncaught exception.
3084 * mini-exceptions.c: Notify the debugger agent on an uncaught exception.
3086 * debugger-agent.c: Add a 'launch' option.
3088 2009-11-05 Zoltan Varga <vargaz@gmail.com>
3090 * debugger-agent.c: Add a 'timeout' option.
3092 2009-11-05 Zoltan Varga <vargaz@gmail.com>
3094 * debugger-agent.c: Implement the 'server' and 'suspend' options supported by
3097 2009-11-05 Zoltan Varga <vargaz@gmail.com>
3099 * debugger-agent.c (set_breakpoint): Emit a log message.
3101 2009-11-04 Zoltan Varga <vargaz@gmail.com>
3103 * mini-arm.c: Fix the arm build.
3105 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
3107 * aot-compiler.c: don't leak the value returned from
3108 mono_type_full_name().
3110 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
3112 * debugger-agent.c: defer including mono-mutex.h until we know the
3115 2009-11-04 Jonathan Chambers <joncham@gmail.com>
3117 * debugger-agent.c: Changes to build on windows. Use mono-mutex instead
3118 of pthreads directly.
3120 * mini.c (mono_sigfpe_signal_handler): Changed signature of Windows
3121 exception handlers. Pass info argument.
3123 * mini.h: Adjust signatures of soft debugger functions to pass void*
3124 instead of siginfo_t. Adjust SIG_HANDLER_SIGNATURE on Windows.
3126 * mini-amd64.c (mono_arch_is_single_step_event): Adjust signature to pass void*
3127 instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
3128 (mono_arch_is_breakpoint_event): Adjust signature to pass void*
3129 instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
3131 * mini-amd64.h: Adjust MonoW32ExceptionHandler signature.
3133 * mini-x86.c (mono_arch_is_single_step_event): Adjust signature to pass void*
3134 instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
3135 (mono_arch_is_breakpoint_event): Adjust signature to pass void*
3136 instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
3138 * mini-x86.h: Adjust MonoW32ExceptionHandler signature.
3140 * exceptions-x86.c: Adjust W32_SEH_HANDLE_EX for new signature.
3142 * exceptions-amd64.c: Adjust W32_SEH_HANDLE_EX for new signature.
3144 * mono-semaphore.h: Skeleton implementation for Windows.
3146 Code contributed under MIT/X11 license.
3148 2009-11-04 Jonathan Chambers <joncham@gmail.com>
3150 * simd-intrinsics.c (simd_intrinsic_emit_setter): Unfix my fix.
3152 Code contributed under MIT/X11 license.
3154 2009-11-04 Jonathan Chambers <joncham@gmail.com>
3156 * simd-intrinsics.c (simd_intrinsic_emit_setter): Fix windows build.
3158 Code contributed under MIT/X11 license.
3160 2009-11-04 Zoltan Varga <vargaz@gmail.com>
3162 * aot-compiler.c (mono_save_xdebug_info): Bump the threshold for flushing
3163 debug info to 100 because 10 still slows down gdb too much.
3165 * method-to-ir.c (mono_method_to_ir): Avoid rethrowing thread abort exceptions
3166 inside runtime invoke wrappers. This avoids the need to call ResetAbort () on
3167 them in the wrappers.
3169 2009-11-03 Zoltan Varga <vargaz@gmail.com>
3171 * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
3173 * simd-intrinsics.c (simd_intrinsic_emit_setter): Fix a warning.
3175 * aot-runtime.c (mono_aot_get_method): Refactor some code into a new helper
3176 function mono_aot_get_array_helper_from_wrapper ().
3178 * aot-compiler.c (add_generic_class): Refactor the code a bit, really emit
3179 array helper methods.
3181 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
3183 * simd-intrinsics.c (load_simd_vreg): Add extra argument to signal if
3184 the value was loaded from memory.
3186 * simd-intrinsics.c (simd_intrinsic_emit_setter): Store back to memory if
3187 the value was loader from there.
3189 * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Fail correctly for Shuffle
3190 without constant swizzle.
3192 2009-11-02 Jonathan Chambers <joncham@gmail.com>
3194 * mini-amd64.c: Put soft debugger functions behind a
3195 #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED.
3197 * mini-amd64.h: disable the soft debugger in windows.
3199 Code contributed under MIT/X11 license.
3201 2009-11-02 Jonathan Chambers <joncham@gmail.com>
3203 * mini-x86.c: Put soft debugger functions behind a
3204 #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED.
3206 Code contributed under MIT/X11 license.
3208 2009-11-02 Jonathan Chambers <joncham@gmail.com>
3210 * exceptions-x86.c (win32_handle_stack_overflow): Fix parameters
3211 to mono_arch_find_jit_info_ext.
3213 Code contributed under MIT/X11 license.
3215 2009-11-03 Zoltan Varga <vargaz@gmail.com>
3217 * debugger-agent.c: Include netinet/in.h to fix the bsd build.
3219 * debugger-agent.c: Add support for filtering events by assemblies.
3221 * debugger-agent.c (mono_debugger_agent_thread_interrupt): Return false if
3222 the agent is not enabled.
3224 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
3226 * exceptions-x86.c: hopefully last change to fix the windows build.
3227 This one courtesy of Jonathan Chambers.
3229 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
3231 * debugger-agent.c: remove unused function.
3233 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
3235 * debugger-agent.c: add #ifdefs for a few header files.
3236 * mini-x86.h: disable the soft debugger in windows.
3237 Step 1 of 2 to make this compile on windows with gcc.
3239 2009-11-02 Zoltan Varga <vargaz@gmail.com>
3241 * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Comment this out for now
3242 as it breaks the build.
3244 2009-07-01 Zoltan Varga <vargaz@gmail.com>
3246 Merge the soft debugger branch.
3248 * debugger-agent.h debugger-agent.c: New files containing the soft
3249 mode debugger module.
3251 * method-to-ir.c (mono_method_to_ir): Generate OP_SEQ_POINT opcodes
3252 at the appropriate locations.
3254 * mini-<ARCH>.c (mono_arch_output_basic_block): Handle OP_SEQ_POINT
3257 * mini-<ARCH>.c: Add new arch-specific functions to set/clear breakpoints,
3258 enable/disable single stepping.
3260 * exceptions-<ARCH>.c (mono_arch_find_jit_info_ext): New stack unwinding api
3261 which returns all information in a StackFrameInfo structure, and can handle the
3262 LMF frames added by the debugger.
3264 * mini-<ARCH>.h (MonoLMFExt): New structure containing additional information
3267 * mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): New stack
3268 walker function which works on a specific thread and passes a StackFrameInfo
3269 structure to its callback.
3271 * mini.c (mini_init): Initialize the debugger agent.
3273 * aot-compiler.c aot-runtime.c: Add soft-debug support.
3275 * mini-ops.h: Add OP_SEQ_POINT opcode.
3277 * driver.c (mono_main): Add new '--debugger-agent' option for passing
3278 arguments to the debugger agent.
3280 2009-11-02 Zoltan Varga <vargaz@gmail.com>
3282 * mini.c (mini_method_compile): Disable llvm for methods with an lmf here to
3285 * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOCALLOC.
3287 * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Implement this for x86.
3289 * mini.c (mini_init): Avoid using the IMT trampoline in the LLVM case.
3291 * mini-trampolines.c (mono_llvm_vcall_trampoline): Add a static rgctx trampoline
3293 (mono_create_llvm_imt_trampoline): New function to create a trampoline which
3294 sets the IMT argument and makes a virtual call.
3296 * mini-llvm.c: Enable interface calls using the llvm imt trampoline.
3298 2009-11-01 Zoltan Varga <vargaz@gmail.com>
3300 * Makefile.am (llvm_sources): Enable the llvm option since it no longer breaks
3303 2009-10-30 Zoltan Varga <vargaz@gmail.com>
3305 * mini.c (mini_cleanup): Call profiler shutdown before shutting down the
3306 runtime. Fixes #551228.
3308 2009-10-29 Zoltan Varga <vargaz@gmail.com>
3310 * mini-x86.c (mono_arch_output_basic_block): Fix % 1. Fixes #550970.
3312 * basic.cs: Add a test.
3314 * method-to-ir.c (mono_method_to_ir): Use EMIT_NEW_LOAD_MEMBASE_TYPE to
3315 load vtypes instead if OP_LOADV_MEMBASE in the implementation of
3316 CONSTRAINED. Fixes #550964.
3318 * generics.cs: Add a test.
3320 2009-10-28 Mark Probst <mark.probst@gmail.com>
3322 * mini-posix.c (add_signal_handler): Use
3323 mono_gc_get_suspend_signal() instead of GC_get_suspend_signal().
3325 2009-10-28 Jerry Maine <crashfourit@gmail.com>
3327 Contributed under the terms of the MIT/X11 license by
3328 Jerry Maine <crashfourit@gail.com>.
3330 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
3331 sse4a for simd intrinsics.
3333 * mini-amd64.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
3334 sse4a for simd intrinsics.
3336 2009-10-27 Zoltan Varga <vargaz@gmail.com>
3338 * ir-emit.h method-to-ir.c: Change a few _IMM macros to assign to inst_imm
3339 instead of inst_p1 which is not the same on ILP32 platforms.
3341 2009-10-24 Zoltan Varga <vargaz@gmail.com>
3343 * mini-ppc.c (mono_arch_emit_prolog): Load the current got address,
3344 not the mscorlib one before calling mono_get_lmf_addr.
3346 * tramp-ppc.c (mono_arch_create_trampoline_code_full): Fix the storing
3347 of the ip to the LMF.
3349 * method-to-ir.c (mono_method_to_ir): Fix the handling of the
3350 immediate in the op->op_imm optimization.
3352 * mini-ppc.c: Add a 'vtregs' field to ArgInfo to make the code easier to
3353 understand. VTypes now work, but are not abi compliant, as they are
3354 split into 4 byte parts instead of 8.
3355 (emit_memcpy): Fix the unrolled case to work on the PS3.
3357 * mini-ppc.c (get_delegate_invoke_impl): Fix this for the PS3.
3359 * aot-compiler.c (mono_compile_assembly): Make the autoreg option
3360 the default when static linking.
3362 * mini-ppc.c (mono_arch_emit_prolog): Fix handling of I8 arguments.
3364 * aot-compiler.c: Add an autoreg option to automatically register
3365 statically linked aot modules using ELF .ctors.
3367 * genmdesc.pl: Add __ppc64__ to allowed defines.
3369 2009-10-25 Zoltan Varga <vargaz@gmail.com>
3371 * mini-posix.c (add_signal_handler): Delay the GC suspend signal while
3372 executing a SIGSEGV handler on an altstack, since libgc can't handle that.
3374 2009-10-24 Mark Probst <mark.probst@gmail.com>
3376 * exceptions-x86.c (mono_arch_find_jit_info): Fix build.
3378 2009-10-24 Zoltan Varga <vargaz@gmail.com>
3380 * mini-exceptions.c (mini_jit_info_table_find): Add an 'out_domain' argument
3381 which will contain the domain where the method was found.
3383 * exceptions-<ARCH>.c mini-exceptions.c: Update callers of
3384 mini_jit_info_table_find ().
3386 * aot-compiler.c (xdebug_end_emit): Remove so stray debug code.
3388 * branch-opts.c (mono_if_conversion): Avoid running deadce if it is disabled.
3390 2009-10-22 Zoltan Varga <vargaz@gmail.com>
3392 * mini-x86.c (mono_arch_emit_prolog): Disable aot for methods with save_lmf
3393 set, its not supported yet.
3395 2009-10-22 Zoltan Varga <vargaz@gmail.com>
3397 * aot-runtime.c (mono_aot_get_method): Avoid asserting if a array generic
3398 iface wrapper is not found.
3399 (mono_aot_get_method): Ditto for GetGenericValueImpl.
3401 2009-10-21 Zoltan Varga <vargaz@gmail.com>
3403 * aot-runtime.c (mono_aot_get_method): Fix support for the IList<T> wrappers,
3404 which have a different name.
3406 * aot-runtime.c (mono_aot_get_method): Special case the array generic iface
3407 wrappers and Array.GetGenericValueImpl ().
3409 * aot-compiler.c: Avoid emitting some wrappers which are not needed anymore
3410 because of the change above.
3412 * generics.cs: Add a test for full aot + generic array ifaces.
3414 2009-10-19 Sebastien Pouliot <sebastien@ximian.com>
3416 * aot-compiler.c (emit_plt): Remove duplicate 'debug_sym' variable
3417 that hides the previous one.
3419 2009-10-18 Zoltan Varga <vargaz@gmail.com>
3421 * aot-compiler.c (can_marshal_struct): Allow some System.dll structs to be
3422 marshalled. Fixes #541623.
3424 2009-10-16 Zoltan Varga <vargaz@gmail.com>
3426 * aot-compiler.c (emit_extra_methods): Remove some asserts which are not needed.
3428 2009-10-15 Zoltan Varga <vargaz@gmail.com>
3430 * mini.c (mono_op_imm_to_op): Handle OP_AND/OR/XOR_IMM.
3432 2009-10-14 Massimiliano Mantione <massi@ximian.com>
3434 * mini-posix.c (sigprof_signal_handler):
3435 Implemented support for building stat call chans in different ways.
3437 2009-10-14 Massimiliano Mantione <massi@ximian.com>
3439 * mini-exceptions.c (mono_find_jit_info):
3440 Also check that a jit info has been found (fixes a profiler crash).
3442 2009-10-14 Massimiliano Mantione <massi@ximian.com>
3444 * mini.c (mono_codegen):
3445 Call mono_profiler_code_buffer_new with correct code address.
3447 2009-10-14 Zoltan Varga <vargaz@gmail.com>
3449 * driver.c (mono_main): Change the date in the copyright.
3451 2009-10-14 Mark Probst <mark.probst@gmail.com>
3453 * method-to-ir.c (mono_method_to_ir): Don't use a managed array
3454 allocator in shared generic code for open classes, because we
3455 can't get those classes' vtables. We need to make managed
3456 allocators not depend on the vtable at compile-time to solve this.
3458 2009-10-13 Martin Baulig <martin@ximian.com>
3460 * debug-mini.c (mono_debugger_trampoline_compiled): Add
3461 `const guint8 *trampoline' argument; send both the old and the new
3464 2009-09-30 Zoltan Varga <vargaz@gmail.com>
3466 * aot-compiler.c (add_wrappers): Add a runtime invoke wrapper which is used by
3467 mono_runtime_capture_context () without calling mono_runtime_invoke ().
3468 (can_marshal_struct): Skip structures with auto layout.
3470 * tramp-arm.c (GEN_TRAMP_SIZE): Increase this by 4.
3472 2009-10-02 Zoltan Varga <vargaz@gmail.com>
3474 * mini-sparc.c (mono_arch_emit_setret): Emit long return values using OP_LMOVE.
3475 (mono_arch_create_vars): Instead of allocating a stack slot by hand, allocate
3476 a variable to hold the stack slot used by the int<->float conversion opcodes.
3478 * mini-sparc.c (mono_arch_build_imt_thunk): Implement support for fail_tramp.
3480 2009-10-04 Zoltan Varga <vargaz@gmail.com>
3482 * aot-compiler.c (add_generic_class): Only add GetGenericValueImpl wrappers
3483 when using full-aot.
3485 2009-10-06 Zoltan Varga <vargaz@gmail.com>
3487 * aot-compiler.c (add_generic_class): Add an instance of GenericComparer<T> for
3488 each instance of Comparer<T>.
3490 * generics.cs: Add a new test.
3492 2009-10-09 Zoltan Varga <vargaz@gmail.com>
3494 * driver.c (parse_debug_options): Add a 'gdb' option.
3496 * mini.c (mini_parse_debug_options): Add a 'gdb' option.
3498 * image-writer.c: Add support for emitting the image into a memory buffer.
3500 * dwarfwriter.c: Add support for sharing one IL file between multiple images.
3502 * aot-compiler.c: Add support for registering debug info with GDB using the
3503 new JIT debugging interface in GDB 7.0. It can be turned on by setting
3504 MONO_XDEBUG to 'gdb'.
3506 2009-10-10 Zoltan Varga <vargaz@gmail.com>
3508 * aot-compiler.c (mono_save_trampoline_xdebug_info): Implement this for the
3511 2009-10-11 Zoltan Varga <vargaz@gmail.com>
3513 * aot-compiler.c (mono_save_xdebug_info): Emit a symbol for the method which
3514 can be used to set breakpoints in gdb.
3516 * image-writer.c (bin_writer_emit_writeout): Add support for setting the text
3517 segment to an absolute address.
3519 2009-10-13 Mark Probst <mark.probst@gmail.com>
3521 * method-to-ir.c: Use the managed array allocator method if
3524 2009-10-13 Bill Holmes <billholmes54@gmail.com>
3526 * aot-compiler.c : Fix the MSVC builds
3528 Code is contributed under MIT/X11 license.
3530 2009-10-13 Zoltan Varga <vargaz@gmail.com>
3532 * aot-compiler.c (mono_save_xdebug_info): Group methods into groups of 10 to
3533 avoid registering 1 symbol file per method with gdb.
3535 2009-09-29 Zoltan Varga <vargaz@gmail.com>
3537 * mini-sparc.c: Fix the handling of enums with base type long.
3539 * mini-sparc.c (mono_arch_output_basic_block): Fix IREM_UN_IMM.
3541 * mini-sparc.c (mono_arch_allocate_vars): Use mono_class_from_mono_type ()
3542 instead of using type->data.klass as the later doesn't work with generics.
3544 2009-09-25 Mark Probst <mark.probst@gmail.com>
3546 * method-to-ir.c, mini.h, mini-alpha.c, mini-amd64.c, mini-arm.c,
3547 mini-hppa.c, mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c,
3548 mini-s390x.c, mini-sparc.c, mini-x86.c: Thread.get_CurrentThread
3549 works differently now and we don't handle it in the JIT anymore.
3551 * mini.c, mini-exceptions.c, mini-posix.c, debug-debugger.c,
3552 debug-mini.c, tramp-amd64.c, tramp-x86.c: Changes resulting from
3553 the Thread class split.
3555 2009-09-25 Zoltan Varga <vargaz@gmail.com>
3557 * driver.c: Don't run tests with the obsolete treeprop optimization.
3559 * mini-sparc.c (mono_arch_create_vars): Make the component vars of a long ret
3560 variable volatile. Fixes #541577.
3562 * basic-calls.cs: Add a new test.
3564 * basic-long.cs: Remove tests which are now in basic-calls.cs.
3566 2009-09-24 Zoltan Varga <vargaz@gmail.com>
3568 * dwarfwriter.c (emit_debug_info_end): Disable this as it doesn't seem to
3569 work/required with recent iphone sdk versions.
3571 * aot-compiler.c (add_wrappers): Generate PtrToStructure wrappers for more
3574 * decompose.c (mono_decompose_vtype_opts): Avoid reading uninitialized memory
3575 in the VCALL decomposition code.
3577 2009-09-22 Zoltan Varga <vargaz@gmail.com>
3579 * mini-ia64.c (mono_arch_output_basic_block): Fix ISHR/ISHR_IMM.
3581 * basic.cs: Add a test.
3583 * mini-ia64.c (mono_arch_build_imt_thunk): Implement support the virtual
3586 * mini-exceptions.c (mini_jit_info_table_find): New helper function which
3587 searches all the domains of the current thread.
3589 * exceptions-<ARCH>.c: Use it. Fixes #539394.
3591 2009-09-21 Zoltan Varga <vargaz@gmail.com>
3593 * exceptions-arm.c (mono_arm_throw_exception): Set ctx->ebp to fp instead of sp
3594 so catching exceptions thrown in the same method works. Fixes exception17.exe.
3596 * tramp-arm.c (mono_arch_create_trampoline_code_full): Store NULL into lmf->method
3597 for non-jit trampolines.
3599 * mini.c (mono_jit_runtime_invoke): Allow string ctors with dyn runtime invoke.
3601 * aot-compiler.c (add_wrappers): Ditto.
3603 * mini-arm.c: Implement support for passing vtypes and floats, and increase
3604 the size of the param area used by dyn_call to 6 which covers the majority of
3607 * mini.c aot-compiler.c: Allow dyn_call for string methods except ctors.
3609 * mini-arm.c: Implement support for passing/receiving
3610 longs and receiving floats in the dyn_call code.
3612 * mini-amd64.c: Implement support for receiving vtypes in registers in
3615 * mini.c mini-amd64.c: Implement partial support for passing vtypes in
3618 2009-09-20 Zoltan Varga <vargaz@gmail.com>
3620 * mini-arm.c (get_call_info): Return more precise information in
3622 (dyn_call_supported): Use the information in CallInfo.
3624 * mini-arm.c: Enable support for returning vtypes in the dyn_call code.
3626 * mini.c mini-amd64.c: Enable support for returning vtypes in the dyn_call
3629 * mini-arm.c: Update after the dyn_call api changes.
3631 * mini.c (mini_create_jit_domain_info): Register a destructor function
3632 for the runtime_invoke_hash.
3634 * mini-amd64.c (mono_arch_get_dyn_call_args): Rename this to
3635 'mono_arch_dyn_call_start'. Pass the pointer to the return value buffer to
3637 (mono_arch_get_dyn_call_ret): Rename this to 'mono_arch_dyn_call_finish'.
3638 (dyn_call_supported): Simplify this by using get_call_info ().
3639 (mono_arch_dyn_call_free): New destructor function.
3641 * generics.cs: Remove a printf.
3643 * method-to-ir.c (mono_method_to_ir): Allocate some param area for DYN_CALL.
3645 * mini-arm.c: Add support for enum return values and passing a few arguments
3648 * mini.c (mono_jit_runtime_invoke): Add support for enum return values to
3651 * mini-amd64.c (mono_arch_get_dyn_call_ret): Ditto.
3653 * aot-compiler.c (add_wrappers): Add a few restrictions for the use of
3654 the dynamic invoke wrappers.
3656 * mini-arm.c: Implement OP_DYN_CALL for arm.
3658 * aot-compiler.c (add_wrappers): Avoid aot-ing runtime invoke wrappers
3659 supported by the dynamic runtime invoke wrapper.
3661 * aot-compiler.c aot-runtime.c: Add support for encoding the dynamic
3662 runtime invoke wrapper.
3664 * mini.c (mono_jit_runtime_invoke): Use the dynamic runtime invoke wrappers
3665 if possible when running with full-aot.
3667 * mini-ops.h: Add OP_DYN_CALL opcode.
3669 * mini-amd64.c method-to-ir.c: Add infrastructure for making method calls
3670 with dynamic arguments lists similar to libffi.
3672 2009-09-19 Zoltan Varga <vargaz@gmail.com>
3674 * method-to-ir.c: Fix the previous change on 64 bit platforms.
3676 * method-to-ir.c: Applied patch from Rodrigo Kumpera. Allow an i8 argument
3679 * iltests.il.in: Add a new test.
3681 2009-09-18 Zoltan Varga <vargaz@gmail.com>
3683 * aot-compiler.c (add_generic_instances): Add more instances of
3684 GenericEqualityComparer.
3686 2009-09-18 Rodrigo Kumpera <rkumpera@novell.com>
3688 * mini.c: Add asserts for mono_class_vtable calls that are not meant to fail.
3690 2009-09-18 Rodrigo Kumpera <rkumpera@novell.com>
3692 * method-to-ir.c: Handle failures from mono_class_vtable. Added some
3693 comments on some functions that now can fail.
3695 2009-09-17 Andrew Jorgensen <ajorgensen@novell.com>
3697 * Makefile.am: Add Info.plist to EXTRA_DIST
3699 2009-09-16 Zoltan Varga <vargaz@gmail.com>
3701 * method-to-ir.c (mono_method_to_ir): Allow AOT for CEE_LDTOKEN in
3702 static synchronized wrappers. Fixes #539500.
3704 2009-09-14 Rodrigo Kumpera <rkumpera@novell.com>
3706 * jit-icalls.c (mono_class_static_field_address): handle vtable failure
3709 2009-09-16 Zoltan Varga <vargaz@gmail.com>
3711 * mini-exceptions.c (mono_handle_exception_internal): Store the computed
3712 lmf before calling filter clauses as well. Fixes #539550.
3714 * exceptions.cs: Add a test.
3716 2009-09-14 Zoltan Varga <vargaz@gmail.com>
3718 * aot-compiler.c (add_generic_class): Add instances of
3719 Array.GetGenericValueImpl as well.
3721 * Makefile.am (fullaotcheck): Copy and aot more assemblies so linq
3724 * generics.cs: Add a fullaot linq test.
3726 2009-09-10 Zoltan Varga <vargaz@gmail.com>
3728 * aot-compiler.c (arch_emit_static_rgctx_trampoline): Don't clobber argument
3731 2009-09-10 Bill Holmes <billholmes54@gmail.com>
3733 * mini-trampolines.c (mono_delegate_trampoline) : Call
3734 mono_cominterop_get_invoke if the delegate target object
3737 Code is contributed under MIT/X11 license.
3739 2009-09-09 Sebastien Pouliot <sebastien@ximian.com>
3741 * method-to-ir.c: For CoreCLR throw a SecurityException if an
3742 internal call is defined outside platform code. Reduce code
3743 duplication with existing [Method|Field]AccessException
3745 2009-09-08 Rodrigo Kumpera <rkumpera@novell.com>
3747 * mini-x86.c (mono_arch_emit_call): Don't reduce stack usage by 4
3748 if the return value is a small struct passed on regs.
3750 2009-09-09 Zoltan Varga <vargaz@gmail.com>
3752 * cpu-arm.md mini-arm.c: Remove unused opcodes.
3754 * mini-codegen.c: Enable the cpu description validation for arm.
3756 2009-09-08 Zoltan Varga <vargaz@gmail.com>
3758 * basic-calls.cs: Move the test_0_float_load_and_store_with_big_offset ()
3759 test which depends on structs to objects.cs.
3761 * basic-calls.cs: Remove calls to Console.WriteLine and throws, since those
3762 require object model related stuff working.
3764 * cpu-x86.md mini-x86.c: Remove more unused opcodes.
3766 * mini-ops.h: Fix OP_BIGMUL instruction descriptions.
3768 * mini-codegen.c (mono_local_regalloc): Validate the cpu description
3769 against the instruction metadata in mini-ops.h. amd64 only for now.
3771 * mini-ops.h: Fix some instruction descriptions.
3773 * mini-ops.h mini-x86.c mini-amd64.c cpu-<ARCH>.md: Remove some
3774 unused instructions.
3776 2009-09-06 Zoltan Varga <vargaz@gmail.com>
3778 * exceptions.cs: Add a new test.
3780 2009-09-05 Rodrigo Kumpera <rkumpera@novell.com>
3782 * mini-x86.c (needs_stack_frame): OSX requires full frames to keep proper alignment.
3784 2009-09-06 Zoltan Varga <vargaz@gmail.com>
3786 * mini-llvm.c (mono_llvm_emit_method): Add a few more missing casts,
3787 skip empty phi opcodes.
3789 * mini-llvm.c (mono_llvm_emit_method): Handle unsigned volatile variables
3790 correctly by zero extending after loads. Skip methods containing calls
3791 to the monitor enter/exit trampolines.
3793 * tramp-x86.c (mono_arch_create_trampoline_code): Align the stack
3794 when calling mono_thread_force_interruption_checkpoint ().
3796 * mini.c (mini_method_compile): Disable llvm when AOT compiling.
3798 * tramp-amd64.c (mono_arch_patch_callsite): Add support for 32 bit ->
3800 (mono_arch_nullify_class_init_trampoline): Read 'buf' instead of 'code'.
3802 * mini-llvm.c (mono_llvm_emit_method): Add a few missing conversions so a
3803 bootstrap could run.
3805 2009-09-04 Zoltan Varga <vargaz@gmail.com>
3807 * mini.c (mini_init): Set callbacks.get_runtime_build_info ().
3809 2009-09-03 Zoltan Varga <vargaz@gmail.com>
3811 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass the start
3813 mono_breakpoint_clean_code () when using LLVM as the prologues generated by
3814 LLVM might be very short.
3816 * mini-x86.c (mono_arch_output_basic_block): Maintain stack alignment
3817 in OP_THROW/RETHROW.
3819 * exceptions-x86.c: Rewrite the throw trampolines so they maintain stack
3822 2009-09-03 Zoltan Varga <vargaz@gmail.com>
3824 * mini-amd64.c (mono_arch_get_vcall_slot): Pass the start of the method to
3825 mono_breakpoint_clean_code () when using LLVM as the prologues generated by
3826 LLVM might be very short.
3828 2009-09-01 Zoltan Varga <vargaz@gmail.com>
3830 * exceptions-x86.c (throw_exception): Fix the previous change by substracting
3831 the alignment for the value of sp.
3833 2009-09-01 Geoff Norton <gnorton@novell.com>
3835 * mini.c (mono_get_lmf_addr): Fix jit_thread_attach for native to
3836 managed wrappers in full aot.
3838 2009-08-31 Zoltan Varga <vargaz@gmail.com>
3840 * exceptions-x86.c (get_throw_exception): Align the stack on osx.
3842 2009-08-28 Zoltan Varga <vargaz@gmail.com>
3844 * mini-llvm-cpp.cpp mini-llvm.c: Update to latest llvm api.
3846 2009-08-25 Zoltan Varga <vargaz@gmail.com>
3848 * aot-compiler.c (emit_exception_debug_info): Emit ei->flags too.
3850 * aot-runtime.c (decode_exception_debug_info): Decode ei->flags from the
3853 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3855 * aot-runtime.c aot-compiler.c: Emit exception causes fully so we don't
3856 depend on the info MonoMethodHeader which could be missing in IL stripped
3859 2009-08-25 Zoltan Varga <vargaz@gmail.com>
3861 * mini-arm.c (add_general): Fix the passing of 64 bit values on darwin, where
3862 they are only 4 byte aligned.
3864 2009-08-21 Zoltan Varga <vargaz@gmail.com>
3866 * mini-arm.c (mono_arch_allocate_vars): Use FP as the frame pointer as
3867 was done previously, since using SP causes too many problems.
3869 * exceptions-arm.c: Fix the handling of sp/fp so unwinding through
3870 frames without a frame pointer works.
3872 * mini-arm.c (mono_arch_get_global_int_regs): Avoid using V5 as a
3873 global register in methods with calls, since the calls can go through
3874 a static rgctx trampoline which doesn't save it.
3876 2009-08-19 Zoltan Varga <vargaz@gmail.com>
3878 * mini-arm.c (mono_arch_context_get_int_reg): Handle SP as well.
3880 2009-08-18 Zoltan Varga <vargaz@gmail.com>
3882 * aot-compiler.c (add_generic_instances): Fix the net 1.1 build.
3884 2009-08-18 Christian Hergert <chris@dronelabs.com>
3886 * method-to-ir.c: Fix warnings for uninitialized variables.
3888 2009-08-18 Christian Hergert <chris@dronelabs.com>
3890 * mini-exceptions.c:
3891 * aot-compiler.c: Fix printf warnings.
3893 2009-08-18 Zoltan Varga <vargaz@gmail.com>
3895 * aot-compiler.c (add_generic_instances): Add string[] wrapper methods.
3896 Add GetGenericValueImpl<string>.
3898 * aot-compiler.c (add_generic_instances): Add instances of
3899 GenericEqualityComparer<T> for primitive types. Only emit the array
3900 wrappers into the mscorlib image.
3902 2009-08-15 Zoltan Varga <vargaz@gmail.com>
3904 * aot-runtime.c (load_method): Rename 'aot_module' -> 'amodule'. Allocate
3905 the methods_loaded array using amodule->info->nmethods.
3907 * mini.h (MonoAotFileInfo): Add an 'nmethods' field.
3908 (MONO_AOT_FILE_VERSION): Bump this.
3910 * aot-compiler.c: Emit more generic instances allowing some parts of linq
3913 * aot-runtime.c (mono_aot_get_unwind_info): Handle the case when the
3914 MonoJitInfo doesn't belong to its methods aot image.
3916 2009-08-14 Zoltan Varga <vargaz@gmail.com>
3918 * mini-arm.c (mono_arch_allocate_vars): Use SP as the default frame reg.
3920 * mini-arm.c: Fix warnings.
3922 * mini-arm.c (mono_arm_emit_load_imm): Only emit a movt if needed.
3924 * mini-arm.c (mono_arm_emit_load_imm): Use movt/movw if the cpu
3927 2009-08-12 Zoltan Varga <vargaz@gmail.com>
3929 * aot-compiler.c (arch_emit_imt_thunk): Rework the arm code to
3930 avoid clobbering IP.
3932 * mini-trampolines.c (mono_magic_trampoline): Allocate a local to
3933 hold the trampoline argument, so its initial value is available during
3936 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3939 * exceptions-hppa.c:
3941 * exceptions-s390x.c:
3942 * exceptions-mips.c:
3944 * exceptions-sparc.c:
3945 * exceptions-alpha.c:
3947 * mini-trampolines.c:
3949 * exceptions-s390.c: add and use #define's instead of sizeof()
3950 for MonoJitInfo and MonoJitInfoTable.
3952 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
3957 * tramp-x86.c: use a #define instead of sizeof() for a few
3958 structures that use a zero-length array.
3960 2009-08-07 Rodrigo Kumpera <rkumpera@novell.com>
3962 * method-to-ir.c (mono_method_to_ir/CEE_CONSTRAINED_): Handle the
3963 case when the method is dynamic. Fixes #529238.
3965 2009-08-06 Zoltan Varga <vargaz@gmail.com>
3967 * mini.c (mono_jit_compile_method_inner): Throw an exception instead
3968 of asserting when a method is JIT compiled in full-aot mode.
3970 2009-08-03 Jerry Maine <crashfourit@gmail.com>
3972 Contributed under the terms of the MIT/X11 license by
3973 Jerry Maine <crashfourit@gail.com>.
3975 * fixed wrong dates in changelog.
3977 2009-08-03 Jerry Maine <crashfourit@gmail.com>
3979 Contributed under the terms of the MIT/X11 license by
3980 Jerry Maine <crashfourit@gail.com>.
3982 * basic-simd.cs: added test for packed double square root.
3983 * cpu-amd64.md: added opcode info for packed double square root.
3984 * cpu-x86.md: added opcode info for packed double square root.
3985 * mini-ops.h: added IR opcode for packed double square root.
3986 * mini-x86.c: added IR to native translation code for packed double square root.
3987 * mini-amd64.c: removed todo for packed double square root.
3988 * simd-intrinsics.c: added method to IR opcode converstion for
3989 packed double square root.
3991 2009-08-03 Jerry Maine <crashfourit@gmail.com>
3993 Contributed under the terms of the MIT/X11 license by
3994 Jerry Maine <crashfourit@gail.com>.
3996 * mini-amd64.c: Added a change to help tell the difference as
3997 to what perpose the xmm register is being used--mainly to help
3999 * mini-amd64.h: Changed callee regs to use 15 out of 16
4000 (one used for special cases) xmm registers for both fp
4001 and simd ops. Added define to turn on new feature in the regalloc
4002 that allows fp and simd ops to share the xmm regs happily.
4003 * codegen.c: Added code to detect for which perpose an xmm reg is
4004 being used (fp or simd) and to translate back and forth to the
4005 correct logical reg bank (fp or simd) for 'spill load's.
4007 2009-08-03 Jerry Maine <crashfourit@gmail.com>
4009 Contributed under the terms of the MIT/X11 license by
4010 Jerry Maine <crashfourit@gail.com>.
4012 * basic-simd.cs: Added tests for stressing the regalloc when running with
4013 16 simd regs and when simd and fp ops share the same reg bank.
4015 2009-08-01 Mark Probst <mark.probst@gmail.com>
4017 * method-to-ir.c (mini_emit_stobj): If we call mono_value_copy()
4018 in shared generic code, we might have to look up the class in the
4019 RGCTX. If we use the class directly, compute its GC descriptor.
4021 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
4023 * mini.c (mono_jit_runtime_invoke): Fix a warning.
4025 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
4027 * mini.c (mono_jit_runtime_invoke): Initialize the class and
4028 check for errors. Fixed the case when the class with the Main
4031 2009-07-31 Jerry Maine <crashfourit@gmail.com>
4033 Contributed under the terms of the MIT/X11 license by
4034 Jerry Maine <crashfourit@gail.com>.
4036 * cpu-amd64.md: Fixed simple bug in machine discrition file.
4038 2009-07-31 Zoltan Varga <vargaz@gmail.com>
4040 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_IREM_UN_IMM.
4042 2009-08-30 Rodrigo Kumpera <rkumpera@novell.com>
4044 * method-to-ir.c: Fix naming of stelem and ldelem.
4046 2009-07-30 Zoltan Varga <vargaz@gmail.com>
4048 * driver.c (main_thread_handler): Check that the assembly loaded
4049 matches the filename when doing AOT.
4051 2009-07-30 Mark Probst <mark.probst@gmail.com>
4053 * mini.c: get_ip_from_sigctx installer has been removed, so don't
4056 * mini-x86.h, mini-amd64.h, mini-ppc.h: UCONTEXT macros moved (to
4057 utils/mono-sigcontext.h).
4059 * exceptions-amd64.c: Use the UCONTEXT_GREGS macro instead of an
4062 2009-07-29 Massimiliano Mantione <massi@ximian.com>
4064 * mini.c (mono_codegen):
4065 Call profiler hook to keep track of method code buffers.
4067 2009-07-27 Mark Probst <mark.probst@gmail.com>
4069 * method-to-ir.c: Invoke write barriers for the
4070 Interlocked.(Compare)Exchange JIT intrinsics.
4072 2009-07-26 Raja R Harinath <harinath@hurrynot.org>
4074 * Makefile.am (version.h): Fix issues when built out of tree.
4075 Remove some redundant 'grep's piped through 'sed's.
4077 Fri Jul 24 17:28:37 CEST 2009 Steven Munroe <munroesj@us.ibm.com>
4079 This patch is contributed under the terms of the MIT/X11 license
4081 * mini-ppc.c (mono_arch_output_basic_block):
4082 (OP_STOREI1_MEMBASE_REG): Handle 32-bit offsets combining addis
4083 for bits 32-47 with signed load/store diplacements for bits
4084 48-63. Use prefered base/offset order for indexed form.
4085 (OP_STOREI2_MEMBASE_REG, OP_STORE_MEMBASE_REG): Same.
4086 (OP_LOAD_MEMBASE, OP_LOADI4_MEMBASE, OP_LOADU4_MEMBASE,
4087 OP_LOADI1_MEMBASE, OP_LOADU1_MEMBASE, OP_LOADU2_MEMBASE,
4088 OP_LOADI2_MEMBASE): Same.
4089 (OP_STORER8_MEMBASE_REG, OP_LOADR8_MEMBASE,
4090 OP_STORER4_MEMBASE_REG, OP_LOADR4_MEMBASE): Same.
4091 (OP_STOREI1_MEMINDEX): Use prefered base/offset order for
4093 (OP_STOREI2_MEMINDEX, OP_STORE_MEMINDEX): Same.
4094 (OP_LOAD_MEMINDEX, OP_LOADI4_MEMINDEX, OP_LOADU4_MEMINDEX,
4095 OP_LOADU2_MEMINDEX, OP_LOADI2_MEMINDEX, OP_LOADU1_MEMINDEX,
4096 OP_LOADI1_MEMINDEX): Same
4097 (OP_LOADR4_MEMINDEX, OP_LOADR8_MEMINDEX, OP_STORER4_MEMINDEX,
4098 OP_STORER8_MEMINDEX): Same
4099 (OP_JMP): Use addis/addi sequence for int cfg->stack_usage
4101 (mono_arch_emit_prolog): Handle 32-bit offsets combining addis
4102 for bits 32-47 with signed load/store diplacements for bits
4103 48-63. Use prefered base/offset order for indexed form.
4105 Fri Jul 24 16:57:12 CEST 2009 Steven Munroe <munroesj@us.ibm.com>
4107 This patch is contributed under the terms of the MIT/X11 license
4109 * mini-ppc.c: Define PPC_MOVE_FPR_GPR and PPC_ISA_64.
4110 (mono_arch_get_vcall_slot): Fx pointer to int cast warning.
4111 (mono_arch_decompose_opts): Make OP_ICONV_TO_R4 and
4112 OP_ICONV_TO_R8 decompose conditional on !PPC_ISA_64.
4113 (mono_arch_output_basic_block) [OP_JMP]: Use ppc_load32 for
4114 cfg->stack_usage to avoid size warnings.
4115 (mono_arch_output_basic_block) [__mono_ppc64__]: Replace
4116 store/load sequence with mffgpr if PPC_MOVE_FPR_GPR is true.
4117 (mono_arch_output_basic_block) [!__mono_ppc64__]: For
4118 OP_ICONV_TO_R4 or OP_ICONV_TO_R8 and PPC_ISA_64 use fcfid
4120 (mono_arch_emit_prolog): Move mono_emit_unwind_op_def_cfa
4121 after code varible is initialized.
4122 Add g_assert ppc_is_imm16 for ainfo->offset. Handle
4123 ainfo->size == 8 when ainfo->offset !ppc_is_imm16.
4124 (mono_arch_emit_epilog):
4125 Move Use ppc_load32 for cfg->stack_usage to avoid size
4128 2009-07-24 Mark Probst <mark.probst@gmail.com>
4130 * method-to-ir.c: The write barrier doesn't do the store anymore,
4131 so we have always to emit it. Also, emit the wbarrier after the
4134 2009-07-24 Zoltan Varga <vargaz@gmail.com>
4136 * mini-arm.c (mono_arch_get_delegate_invoke_impls): Add a trampoline
4137 for argument count 3 too.
4139 2009-07-23 Zoltan Varga <vargaz@gmail.com>
4141 * mini.c (mono_jit_compile_method_with_opt): Add an 'ex' argument to let
4142 the caller handle the exceptions.
4143 (mono_jit_runtime_invoke): Handle exceptions thrown while compiling the
4144 method. Fixes #524498.
4146 2009-07-22 Geoff Norton <gnorton@novell.com>
4148 * mini-exceptions.c: Fix build on ia64.
4150 2009-07-22 Mark Probst <mark.probst@gmail.com>
4152 * mini-exceptions.c (ves_icall_get_frame_info): Use write
4155 2009-07-21 Zoltan Varga <vargaz@gmail.com>
4157 * mini-arm.c (mono_arch_emit_prolog): Fix thread attaching in aot
4160 2009-07-20 Zoltan Varga <vargaz@gmail.com>
4162 * basic-simd.cs (Main): Pass args to the test driver.
4164 2009-07-20 Geoff Norton <gnorton@novell.com>
4166 * mini-x86.h: Fix the x86 version guards to use Apple's
4167 properly defined macros.
4169 2009-07-20 Geoff Norton <gnorton@novell.com>
4171 * mini-x86.c: Fix --trace on darwin-x86 and other systems which require
4174 2009-07-20 Zoltan Varga <vargaz@gmail.com>
4176 * mini.c (mono_jit_runtime_invoke): Speed this up by adding a hash to
4177 MonoJitDomainInfo which maps MonoMethod's to a structure containing all
4178 the information which is needed for invokes, so only one locking+hash table
4181 * aot-compiler.c: Add a 'tool-prefix' option to be used when cross-compiling.
4183 * aot-compiler.c (add_generic_instances): Emit instances of
4184 GenericComparer<T> for primitive types.
4186 2009-07-19 Rodrigo Kumpera <rkumpera@novell.com>
4188 * mini-posix.c: Fix linux build.
4190 2009-07-19 Geoff Norton <gnorton@novell.com>
4192 * mini.h: Add prototypes for mono_runtime_syscall_fork and
4193 mono_gdb_render_native_backtraces
4194 * mini-darwin.c: Apple's syscall(SYS_fork) is very weird on x86,
4195 so we implement the sane semantics to the runtime here
4196 (mono_gdb_render_native_backtraces). Apple also uses an ancient gdb
4197 so we need to call it differently (mono_gdb_render_native_backtraces)
4198 * mini-posix.c: Move the old semantics from mini.c to the prototypes
4199 here for default implementations.
4200 * mini.c: Refactor mono_handle_native_sigsegv so that we can properly
4201 support Apple's weird syscall (SYS_fork) implementation and not busy
4202 loop in abort() on native crashes on OSX anymore.
4204 2009-07-18 Zoltan Varga <vargaz@gmail.com>
4206 * aot-runtime.c (load_method): Change the handling of the
4207 MONO_LASTAOT env variable so MONO_LASTAOT=0 means that no aot methods
4210 * mini.c (mono_patch_info_equal): Really fix the handling of RGCTX_FETCH.
4212 2009-07-17 Zoltan Varga <vargaz@gmail.com>
4214 * mini.c (mono_patch_info_equal): Revert the last change for now as it
4215 seems to break the aot tests.
4217 * mini.c (mono_patch_info_equal): Fix the handling of
4218 MONO_PATCH_INFO_RGCTX_FETCH.
4220 2009-07-16 Zoltan Varga <vargaz@gmail.com>
4222 * unwind.c: Use TARGET_AMD64 instead of __x86_64__.
4224 * mini.c (mono_patch_info_hash): Fix the handling of
4225 MONO_PATCH_INFO_INTERNAL_METHOD.
4226 (mono_patch_info_equal): Ditto.
4228 2009-07-16 Zoltan Varga <vargaz@gmail.com>
4230 * mini-llvm.c (mono_llvm_emit_method): Use module instead of ctx->module
4233 * mini-llvm.c: Add some infrastructure for AOT support.
4235 2009-07-15 Zoltan Varga <vargaz@gmail.com>
4237 * mini-llvm-cpp.c: Update to the latest llvm api.
4239 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Set the EnablePrettyStackTrace
4240 option to false to prevent llvm from installing signal handlers which
4243 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
4246 * cpu-amd64.md: Revert previous change as those instructions
4247 take 2 separate arguments. Remember to read the arch docs more
4248 carefully next time.
4250 2009-07-15 Zoltan Varga <vargaz@gmail.com>
4252 * mini-llvm-cpp.cpp (mono_llvm_build_alloca): Update to latest llvm api.
4254 Wed Jul 15 17:20:27 CEST 2009 Paolo Molaro <lupus@ximian.com>
4256 * mini-ppc.c: exploit multiple load/store units if available (rest of
4257 the change from Steven Munroe (<munroesj@us.ibm.com>) first patch at
4258 http://bugzilla.novell.com/show_bug.cgi?id=487846).
4260 Wed Jul 15 16:24:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
4262 * mini-ppc.c: integrate most of Steven Munroe (<munroesj@us.ibm.com>)
4263 first patch at http://bugzilla.novell.com/show_bug.cgi?id=487846.
4265 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
4267 * cpu-x86.md: Fix missing clobbering from trancendental simd
4270 * cpu-amd64.md: Same.
4272 2009-07-14 Jerry Maine <crashfourit@gmail.com>
4274 Contributed under the terms of the MIT/X11 license by
4275 Jerry Maine <crashfourit@gail.com>.
4277 * basic-simd.cs: Added tests for single and doulble indexers.
4279 * cpu-amd64.md: Added simd opcode information.
4281 * mini-amd64.c: Added IR to native simd generation code.
4282 Added simd register names and function that returns them.
4284 * mini-amd64.h: Added marcos to turn on simd code compilation in
4285 amd64. Added max simd register count marco. Added caller/callee
4286 register mask marcos. Added marcos to use simd register bank.
4288 * mini.h: Added helper marco for shufling dwords and simple
4291 2009-07-14 Zoltan Varga <vargaz@gmail.com>
4293 * mini-llvm-cpp.cpp: Update to latest llvm SVN api.
4295 * Makefile.am (mono_LDADD): Pass LLVM_LDFLAGS to the linked.
4297 * unwind.c (mono_unwind_get_ops_from_fde): Make this return
4298 the length of the native code as well.
4300 * basic-simd.cs: Add a test for #521662.
4302 Mon Jul 13 17:58:50 CEST 2009 Paolo Molaro <lupus@ximian.com>
4304 * mini-ppc.c: fixed bug introduced by Steven's TLS changes.
4306 2009-07-13 Mark Probst <mark.probst@gmail.com>
4308 * mini.c: Register function for getting the IP from a signal
4309 context with metadata.
4311 2009-07-13 Zoltan Varga <vargaz@gmail.com>
4313 * method-to-ir.c (mono_method_to_ir): When calling a gshared method,
4314 call a generic class init trampoline if needed. Fixes #519336.
4316 * generics.cs: Add a test.
4318 2009-07-09 Mark Probst <mark.probst@gmail.com>
4320 * method-to-ir.c: When doing a call which might be remote from
4321 shared generic code to other shared code with open type arguments,
4322 get the remoting invoke wrapper from the RGCTX and do an indirect
4325 2009-07-03 Zoltan Varga <vargaz@gmail.com>
4327 * mini-trampolines.c (get_unbox_trampoline): Add an rgctx trampoline
4328 after the unbox trampoline in the full-aot case.
4330 2009-07-02 jonas echterhoff <jonas@unity3d.com>
4332 * mini.c: Move initialization of jit_mutex before debugger initialization
4337 * Info.plist: added Info.plist and link flag to enable the mono executable
4338 to access other processes. Requires codesigning of the executable to work.
4340 * mdb-debug-info32-darwin.s: The same as mdb-debug-info32.s, changed to
4345 2009-06-30 Zoltan Varga <vargaz@gmail.com>
4347 * driver.c (mini_regression): Handle loading errors. Fixes #508869.
4349 2009-06-29 Zoltan Varga <vargaz@gmail.com>
4351 * mini-exceptions.c (get_generic_context_from_stack_frame): Fix the case
4352 when the generic instance is an instantiation of a subclass of the
4353 methods class. Fixes #517166.
4355 2009-06-26 Zoltan Varga <vargaz@gmail.com>
4357 * mini-amd64.c (mono_arch_emit_prolog): Fix thread attaching in AOTed
4360 * mini.c (mono_jit_thread_attach): Allow domain to be NULL for calls from
4363 * CMakeLists.txt: Add minimal support for installation.
4365 2009-06-25 Zoltan Varga <vargaz@gmail.com>
4367 * aot-compiler.c (emit_and_reloc_code): Factor out the code to
4368 determine whenever a method is directly callable to a separate function.
4370 * mini-<ARCH>.c tramp-<ARCH>.c: Remove needless casts and add new
4371 needed ones as a result of the previous change.
4373 * mini-<ARCH>.c tramp-<ARCH>.c: Use mgreg_t* as the
4374 type of register arrays.
4376 * mini-trampolines.c tramp-<ARCH>.c aot-runtime.c: Use mgreg_t* as the
4377 type of register arrays.
4379 2009-06-24 Jerry Maine <crashfourit@gmail.com>
4381 Contributed under the terms of the MIT/X11 license by
4382 Jerry Maine <crashfourit@gail.com>.
4384 * mini-amd64.c: Added code to convert simd IR to native amd64 sse.
4386 2009-06-24 Zoltan Varga <vargaz@gmail.com>
4388 * aot-compiler.c (emit_plt): Define debug labels for most plt entries.
4390 2009-06-24 Neale Ferguson <neale@sinenomine.net>
4392 * mini-s390x.c: Correct LCONV_TO_Ix and ICONV_TO_Ix routines. Fix leave_method
4393 dump of structure return value. Fix some formatting.
4394 * cpu-s390x.md: Fix lengths of instruction sequences.
4395 * mini-s390.c: Minor formatting changes.
4397 2009-06-24 Zoltan Varga <vargaz@gmail.com>
4399 * mini-x86.h: Applied patch from Romain Tartiere (romain@blogreen.org).
4400 Use sigaction on freebsd as well.
4402 2009-06-23 Zoltan Varga <vargaz@gmail.com>
4404 * mini.h: Don't define MONO_ARCH_HAVE_TLS_GET to 0, as some code
4407 * mini.c (mini_init): Revert a change which breaks cross-compilation.
4409 2009-06-22 Mark Probst <mark.probst@gmail.com>
4411 * mini-ppc.c, cpu-ppc.md: Enable TLS on Darwin/G4.
4413 2009-06-22 Mark Probst <mark.probst@gmail.com>
4415 * mini.c, mini.h: Tell the runtime whether we support MONO_TLS.
4417 2009-06-20 Martin Baulig <martin@ximian.com>
4420 (MonoDebuggerThreadFlags): New enum typedef.
4421 (MonoDebuggerThreadInfo): Added `guint32 thread_flags'.
4422 (mono_debugger_thread_created): Added `gpointer func' argument;
4423 initialize the new `thread_flags' field.
4425 2009-06-18 Martin Baulig <martin@ximian.com>
4427 * debug-debugger.h (MonoDebuggerRuntimeFlags): New enum typedef.
4428 (MonoDebuggerInfo): Renamed the `dummy' field info `runtime_info'.
4431 (mini_debugger_set_attach_ok): New function; sets the attach-ok
4432 flag in `MONO_DEBUGGER__info.runtime_info'.
4435 (mono_main): Call mini_debugger_set_attach_ok() if generics
4436 sharing is disabled.
4438 2009-06-22 Zoltan Varga <vargaz@gmail.com>
4440 * aot-compiler.c (add_wrappers): Fix a warning.
4442 * mini-ppc.c tramp-ppc.c exceptions-ppc.c aot-compiler.c: Update after
4443 the ppc load/store macro changes.
4445 2009-06-21 Zoltan Varga <vargaz@gmail.com>
4447 * tramp-ppc.c (mono_arch_patch_plt_entry): Implement this.
4449 * aot-compiler.c (mono_compile_assembly): Sanitize the plt symbol too,
4450 not just the got symbol.
4452 * mini-ppc.c aot-compiler.c unwind.c: Implement generation of unwind info
4455 * aot-compiler.c unwind.c: Add infrastructure for unwind support on
4458 * aot-compiler.c: Remove some fixmes.
4460 * driver.c (mono_main): Print a helpful message when cross-compiling.
4462 * mini.c (mini_init): Disable signal handlers when cross-compiling.
4464 * method-to-ir.c (initialize_array_data): Do the optimization if the
4465 target byte order is little endian, instead of the host byte order.
4467 * aot-compiler.c: Emit sizes for most symbols, only emit runtime-invoke
4468 wrappers into the mscorlib image, Emit a unique plt symbol for each
4469 image, emit symbols for plt entries.
4471 * image-writer.c (img_writer_emit_symbol_size): New function to emit
4474 2009-06-20 Zoltan Varga <vargaz@gmail.com>
4476 * aot-compiler.c (add_wrappers): Avoid calling
4477 mono_marshal_get_type_info () since it can assert for some types.
4479 * method-to-ir.c (mono_method_to_ir): Disable aot when some forms of
4480 ldtoken are used inside wrappers.
4482 * helpers.c: Add support for prefixing tools with the arch name.
4484 * mini.h (OP_LOADR_MEMBASE): New opcodes to load/store pointer sized
4485 quantities when using ilp32.
4487 * mini-codegen.c: Use OP_LOADR_MEMBASE/OP_STORER_MEMBASE for loading/storing
4488 spill slots. Use sizeof(mgreg_t) for the spill slot size.
4490 * image-writer.c: Use .long on ilp32.
4492 * aot-compiler.c: Use 32 bit loads on ilp32.
4494 2009-06-19 Zoltan Varga <vargaz@gmail.com>
4496 * tramp-ppc.c (mono_arch_create_trampoline_code): Fix the ppc build.
4498 * mini-ops.h: Use TARGET_POWERPC define for consistency.
4500 * patch-info.h: Add 'MSCORLIB_GOT_ADDR' patch type.
4502 * aot-compiler.c aot-runtime.c: Put the mscorlib got address into the
4503 second got slot of every aot image.
4505 * aot-compiler.c aot-runtime.c mini-trampolines.c: Add support for
4506 aot on platforms with function pointers.
4508 * mini-ppc.h mini-ppp.c cpu-ppc.md exceptions-ppc.c tramp-ppc.c: Add
4509 support for aot/full aot on ppc/ppc64.
4511 * tramp-<ARCH>.c (mono_arch_patch_plt_entry): Add 'got' and 'regs'
4512 arguments which are needed on ppc.
4514 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Add 'regs'
4517 * mini-trampolines.c aot-runtime.c: Update after the above changes.
4519 * liveness.c (BITS_PER_CHUNK): Use MONO_BITSET_BITS_PER_CHUNK.
4521 * regalloc2.c (BITS_PER_CHUNK): Ditto.
4523 * aot-compiler.c (emit_got_info): Fix reading unused memory.
4525 * ir-emit.h (alloc_dreg): Add a 'return -1' to quiet some compilers.
4527 2009-06-17 Geoff Norton <gnorton@novell.com>
4529 * aot-compiler.c: Ensure we dont try to close a null dwarf writer.
4531 2009-06-17 Zoltan Varga <vargaz@gmail.com>
4533 * dwarfwriter.c (mono_dwarf_writer_create): Add an 'appending' parameter
4534 to control whenever the dwarf writer is in xdebug or aot mode.
4535 (emit_class_dwarf_info): Use a separate abbrev for structures without
4538 * aot-compiler.c: Pass the appending parameter to
4539 mono_dwarf_writer_create ().
4541 * branch-opts.c (mono_merge_basic_blocks): Fix the case when bbn
4542 falls through to its next bblock. Fixes #513931.
4544 * iltests.il: Add a test.
4546 * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Emit some line number
4547 infor even if emit_line is FALSE, as the apple linker seems to require it.
4549 * image-writer.c (asm_writer_emit_symbol_diff): Call get_label ().
4551 * dwarfwriter.c (emit_cie): Emit a separate symbol for the cie start, as
4555 2009-06-15 Zoltan Varga <vargaz@gmail.com>
4557 * exceptions-mips.c (mono_arch_get_throw_exception_by_name): Fix the
4560 2009-06-13 Zoltan Varga <vargaz@gmail.com>
4562 * mini.h (struct MonoBasicBlock): Add 'has_jump_table' and
4563 'has_call_handler' fields.
4565 * method-to-ir.c (mono_method_to_ir): Set them if needed.
4567 * branch-opts.c (mono_merge_basic_blocks): Avoid iterating through the
4568 first bblock if not needed. Fixes #512790.
4570 2009-06-11 Zoltan Varga <vargaz@gmail.com>
4572 * aot-compiler.c (mono_compile_assembly): Fix a warning.
4574 * aot-compiler.c (add_wrappers): Don't emit remoting-invoke-with-check
4577 * aot-runtime.c (mono_aot_get_method): Use the original method's code for
4578 remoting-invoke-with-check wrappers, which are not needed when running with
4579 full-aot, since it doesn't support remoting.
4581 2009-06-10 Zoltan Varga <vargaz@gmail.com>
4583 * aot-compiler.c (emit_got_info): Don't emit offsets for the plt got entries.
4585 * aot-compiler.c aot-runtime.c: Don't emit the first got offset in the
4586 method info, it is not used anymore.
4588 * mini.h: Bump AOT file format version.
4590 * aot-compiler.c (arch_emit_plt_entry): Make the arm plt entries one
4593 * aot-runtime.c (mono_aot_get_plt_info_offset): Update after the
4596 * tramp-arm.c (mono_arch_patch_plt_entry): Ditto.
4598 * mini.h: Bump AOT file format version.
4600 2009-06-10 Zoltan Varga <vargaz@gmail.com>
4602 * image-writer.c (asm_writer_emit_symbol_diff): Disable the
4603 TARGET_ASM_APPLE stuff for now, as it doesn't seem to work on the
4606 * mini-arm.c (mono_arch_output_basic_block): Fix the implementation
4607 of CKFINITE and FBGE for VFP.
4609 2009-06-09 Zoltan Varga <vargaz@gmail.com>
4611 * aot-compiler.c: Don't align code to 16 bytes on arm.
4613 * aot-compiler.c (emit_method_code): Emit the unbox trampolines right
4614 before the methods they belong to.
4616 * aot-runtime.c (mono_aot_plt_resolve): Avoid creating trampolines in
4617 the full-aot case if possible, since the trampoline will be called right
4620 * aot-compiler.c (mono_compile_assembly): Decrease the number of full aot
4621 trampolines to 1024 after the change above.
4623 * aot-compiler.c (arch_emit_specific_trampoline): Rework the arm
4624 trampoline to save 8 bytes per trampoline.
4626 * tramp-arm.c (mono_arch_create_trampoline_code_full): Update after the
4629 2009-06-08 Zoltan Varga <vargaz@gmail.com>
4631 * aot-compiler.c: Use acfg->temp_prefix instead of .L to prefix labels.
4633 2009-06-08 Martin Baulig <martin@ximian.com>
4636 (MonoDebuggerExceptionAction): Moved into debug-mini.h.
4637 (_mono_debugger_throw_exception): Don't make this static.
4638 (_mono_debugger_unhandled_exception): Likewise.
4639 (mono_debugger_handle_exception): Moved to mini-exceptions.c
4642 (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
4643 (_mono_debugger_throw_exception): Add function prototype.
4644 (_mono_debugger_unhandled_exception): Likewise.
4647 (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
4648 arg; return the first exception handler if the exception is caught
4649 and we're running inside the debugger.
4650 (mono_debugger_handle_exception): Moved here from debug-mini.c;
4651 improve exception handle inside runtime-invoke, check whether the
4652 exception is actually caught in the method being invoked and not
4653 by the runtime-invoke-wrapper.
4655 2009-06-08 Zoltan Varga <vargaz@gmail.com>
4657 * image-writer.c: Improve support for the osx assembler.
4659 * dwarfwriter.c: Avoid the usage of subsections if the assembler doesn't
4662 2009-06-08 Martin Baulig <martin@ximian.com>
4665 (MonoDebuggerExceptionAction): Moved into debug-mini.h.
4666 (_mono_debugger_throw_exception): Don't make this static.
4667 (_mono_debugger_unhandled_exception): Likewise.
4668 (mono_debugger_handle_exception): Moved to mini-exceptions.c
4671 (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
4672 (_mono_debugger_throw_exception): Add function prototype.
4673 (_mono_debugger_unhandled_exception): Likewise.
4676 (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
4677 arg; return the first exception handler if the exception is caught
4678 and we're running inside the debugger.
4679 (mono_debugger_handle_exception): Moved here from debug-mini.c;
4680 improve exception handle inside runtime-invoke, check whether the
4681 exception is actually caught in the method being invoked and not
4682 by the runtime-invoke-wrapper.
4684 2009-06-07 Zoltan Varga <vargaz@gmail.com>
4686 * image-writer.c (append_subsection): Don't align subsections of the
4687 debug_line section as a workaround.
4689 * dwarfwriter.c: Emit line number info in the AOT case as well.
4691 2009-06-06 Steven Munroe <munroesj@us.ibm.com>
4693 This patch is contributed under the terms of the MIT/X11 license
4695 * mini-ppc.c (mono_arch_emit_exceptions): Change assert to
4696 code_len <= code_size
4698 2009-06-06 Zoltan Varga <vargaz@gmail.com>
4700 * mini-mips.c (mips_emit_exc_by_name): Fix the mips build.
4702 2009-06-04 Zoltan Varga <vargaz@gmail.com>
4704 * aot-compiler.c aot-runtime.c: Delete references to static rgctx
4705 invoke wrappers, we now use trampolines instead.
4707 2009-06-04 Mark Probst <mark.probst@gmail.com>
4709 * mini-darwin.c: The exception thread must not be registered with
4712 2009-06-04 Mark Probst <mark.probst@gmail.com>
4714 * mini-gc.c: Disable the code because it makes SGen crash.
4716 2009-06-03 Zoltan Varga <vargaz@gmail.com>
4718 * aot-compiler.c (mono_compile_assembly): Handle file open errors gracefully
4719 instead of asserting.
4721 2009-05-31 Zoltan Varga <vargaz@gmail.com>
4723 * aot-compiler.c (mono_compile_assembly): Move the creation of the
4724 output file after the code has been compiled.
4726 2009-05-30 Zoltan Varga <vargaz@gmail.com>
4728 * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Fix 64 bit support.
4730 2009-05-31 Zoltan Varga <vargaz@gmail.com>
4732 * aot-compiler.c aot-runtime.c: Get rid of the shared/non-shared got
4733 entries distinction to simplify the code.
4735 * mini.h: Bump AOT file format version.
4737 2009-05-28 Zoltan Varga <vargaz@gmail.com>
4739 * objects.cs: Fix the signature of one of the tests.
4741 * mini.c (mini_create_ftnptr): New helper function, moved here from
4743 (mini_get_addr_from_ftnptr): Ditto.
4744 (mini_init): Install the new helpers.
4746 2009-05-28 Martin Baulig <martin@ximian.com>
4748 Correctly initialize the debugger when embedding Mono.
4750 * mdb-debug-info32.s, mdb-debug-info64.s: Add a global variable
4751 `MONO_DEBUGGER__using_debugger' to the `.mdb_debug_info' section;
4752 see documentation in mini_debug_running_inside_mdb().
4755 (mini_debug_running_inside_mdb): New function to check whether
4756 we're running inside mdb.
4758 * mini.c (mini_init): Call mini_debugger_init() if we're running
4759 inside the debugger.
4761 * driver.c (mono_main): Moved the call to mini_debugger_init()
4762 into mini_init() to make this work when embedding Mono.
4764 * debug-debugger.c (mini_debugger_init): Warn about duplicate
4765 calls to mini_debugger_init().
4767 * mini.h: Rename mono_debugger_init() -> mini_debugger_init(),
4768 mono_debugger_main() -> mini_debugger_main() and put them inside a
4769 `MONO_DEBUGGER_SUPPORTED' conditional.
4771 2009-05-26 Rodrigo Kumpera <rkumpera@novell.com>
4773 * mini-trampolines.c: Kill mono_find_delegate_trampoline_by_addr as
4774 this is no longer in use.
4777 2009-05-26 Zoltan Varga <vargaz@gmail.com>
4779 * mini-sparc.c (add_outarg_load): Fix the sparc build.
4781 * aot-compiler.c (emit_method_code): Always write out C style symbols for
4784 2009-05-27 Martin Baulig <martin@ximian.com>
4786 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
4788 * mini-x86.c (mono_arch_output_basic_block): Fix the precision of
4789 long_conv_to_r_un to 64 bits.
4791 * cpu-x86.md: Increase the instruction size due to the changes.
4793 * iltests.il.in: Add regression test.
4797 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
4799 * objects.cs: Move the previous test from basic.cs to here.
4801 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
4803 * basic.cs: Add regression test for #506915.
4805 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
4807 * method-to-ir.c (mono_method_to_ir): When doing the ldobj+stobj
4808 optimization we must check the bb of the first byte of stobj as
4809 it's the only one set in cil_offset_to_bb.
4813 2009-05-25 Zoltan Varga <vargaz@gmail.com>
4815 * image-writer.c: Fix pointer directive on ppc64.
4817 2009-05-24 Zoltan Varga <vargaz@gmail.com>
4819 * image-writer.c (asm_writer_emit_section_change): Avoid using
4820 .bss subsections on ppc too.
4822 2009-05-23 Zoltan Varga <vargaz@gmail.com>
4824 * image-writer.c: Fix the definition of TARGET_ASM_....
4826 * image-writer.c: Fix the emission of assembler directives in the last
4829 * mini-ppc.c (mono_arch_emit_exceptions): Increase the size of the
4830 exception throwing code to accomodate ppc64.
4832 * tramp-ppc.c (mono_arch_get_nullified_class_init_trampoline): Increase the
4833 size to work on ppc64 too.
4835 * mini-ppc.h (MonoCompileArch): Enable static rgctx trampolines on ppc64
4838 * image-writer.c: Clean up the #ifdef hell a bit by adding defines for
4839 the assembler dialect instead of using platform specific defines.
4841 2009-05-22 Geoff Norton <gnorton@novell.com>
4843 * mini-arm.c (get_call_info): If a structure is split between the stack
4844 and argument registers, we should not advance the stack pointer by the entire
4845 native size, but just by the amount that spilled.
4847 2009-05-22 Zoltan Varga <vargaz@gmail.com>
4849 * mini-arm.c (get_call_info): Handle structures with alignment requirements
4852 2009-05-21 Zoltan Varga <vargaz@gmail.com>
4854 * aot-compiler.c (emit_extra_methods): Encode direct runtime invoke
4857 * aot-compiler.c (add_extra_method): Fix up the collection of extra
4858 methods so wrapper don't get added twice.
4859 (add_generic_instances): Don't add methods of arrays.
4861 * generics.cs: Mark one test as !FULLAOT.
4863 2009-05-21 Rodrigo Kumpera <rkumpera@novell.com>
4865 * mini-x86.c (emit_move_return_value): Remove unused vars.
4867 2009-05-21 Rodrigo Kumpera <rkumpera@novell.com>
4869 * mini-x86.c (mono_arch_emit_call): The decompose code now supports
4870 decomposing 8 bytes structs into a LCALL.
4872 * mini-x86.c (emit_move_return_value): We no longer push the vtype
4873 pointer for where to store the returned regs.
4875 * decompose.c (mono_decompose_vtype_opts): Fix the comment to properly
4878 Fixes #471747, #471751 and #4734530 (in fact, it's a bunch of dups).
4880 2009-05-20 Miguel de Icaza <miguel@novell.com>
4882 * aot-runtime.c (mono_aot_init): Use g_getenv to work on systems
4885 2009-05-21 Zoltan Varga <vargaz@gmail.com>
4887 * aot-compiler.c (add_wrappers): Add StructureToPtr/PtrToStructure wrappers.
4889 * basic.cs: Move the test_2_cprop_bug () test to generics.cs as it involves
4892 2009-05-20 Rodrigo Kumpera <rkumpera@novell.com>
4894 * local-propagation.c (mono_local_cprop): Avoid local propagation
4895 across paired add/sub if the first instruction dest reg is it's
4896 source reg. For example:
4898 int_add_imm R12 <- R12 [1] clobbers: 1
4899 int_sub_imm R42 <- R12 [1] clobbers: 1
4901 The cprop pass would wrongly const prop + 1 to int_sub_imm which doesn't
4902 maintain the math identify.
4906 2009-05-20 Andreia Gaita <avidigal@novell.com>
4908 * Makefile.am: avoid going on the network just to get the revision,
4911 2009-05-19 Massimiliano Mantione <massi@ximian.com>
4913 Fixed estimate for short branches on amd64 (they were off mark, and
4914 enabling call prolog-epilog instrumentations caused assertions).
4915 * mini.h (struct MonoBasicBlock): added max_length field to hold the
4916 estimate for the maximum length of this basic block.
4918 - mono_arch_emit_prolog: compute max_length for each basic block
4919 (instead of max_offset), and inflate size estimate also for entry bb
4920 in case of code instrumentation.
4921 - mono_arch_output_basic_block: get rid of "cpos" (the current
4922 estimated "position" in the code), and always use "offset" instead,
4923 which is accurate; at the beginning of the function quickly recompute
4924 max_offset for all the remaining blocks, starting from the current
4925 cfg->code_len (which is correct, and not estimated) and using the
4926 estimated block lengths computed previously.
4928 2009-05-17 Zoltan Varga <vargaz@gmail.com>
4930 * exceptions-ppc.c: Remove the caching from the trampoline creation
4931 functions, it is already done in the caller.
4933 * mini-trampolines.c (mono_llvm_vcall_trampoline): Fix the llvm build.
4935 * mini-ppc.h mini-arm.h mini-x86.h mini-amd64.h: Add
4936 MONO_ARCH_GSHARED_SUPPORTED define.
4938 * mini.c (mini_init): Use the MONO_ARCH_GSHARED_SUPPORTED define.
4940 * mini-arm.c mini.c: Get rid of the unused mono_arch_fixup_jinfo ()
4943 2009-05-16 Zoltan Varga <vargaz@gmail.com>
4945 * jit-icalls.c (mono_helper_compile_generic_method): Get rid of the
4946 call to mono_marshal_get_rgctx_invoke ().
4948 * mini.c method-to-ir.c mini-trampolines.c: Get rid of the usage of
4949 mono_marshal_get_static_rgctx_invoke (), all platforms which support
4950 gshared use the static rgctx trampolines now.
4952 * mini.c (mini_init): Call mono_set_generic_sharing_supported () if the
4953 platform supports it.
4955 2009-05-15 Zoltan Varga <vargaz@gmail.com>
4957 * mini-arm.c (mono_arch_allocate_vars): Correctly save R5 when using AOT.
4959 * aot-compiler.c (emit_method_code): Avoid duplicate labels for methods.
4961 2009-05-15 Zoltan Varga <vargaz@gmail.com>
4963 * mini-ppc.c (mono_arch_emit_exceptions): Nullify the processed patches.
4965 * tramp-ppc.c (mono_arch_nullify_class_init_trampoline): Implement this
4968 2009-05-15 Massimiliano Mantione <massi@ximian.com>
4970 Made it possible for mono_arch_instrument_epilog to preserve
4971 argument registers, otherwise instrumenting the "epilogue" before
4972 a tail call would clobber them.
4973 * mini.h: Added "mono_arch_instrument_epilog_full" prototype, which
4974 if like mono_arch_instrument_epilog but with an additional parameter
4975 that states if argument registers must be preserved.
4976 * mini.c: implemented mono_arch_instrument_epilog as a call to
4977 mono_arch_instrument_epilog_full without asking to preserve argument
4978 registers (this makes the existing code work as usual).
4980 - mono_arch_instrument_epilog: add parameter to transform it into
4981 mono_arch_instrument_epilog_full, and preserve argument registers
4983 - mono_arch_output_basic_block, OP_TAILCALL case: call
4984 mono_arch_instrument_epilog_full.
4985 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
4986 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-x86.c:
4987 only transformed mono_arch_instrument_epilog into
4988 mono_arch_instrument_epilog_full.
4990 2009-05-15 Geoff Norton <gnorton@novell.com>
4992 * mini-darwin.c: This works on arm now.
4994 2009-05-14 Geoff Norton <gnorton@novell.com>
4996 * jit.h, driver.c: Allow full-aot to be decided programatically by the
4999 2009-05-15 Zoltan Varga <vargaz@gmail.com>
5001 * aot-compiler.c (emit_method_code): Skip a few more characters in the debug
5004 * mini-trampolines.c (mono_magic_trampoline): Handle static rgctx invoke
5005 wrappers during full aot mode correctly.
5007 * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle shared generic
5010 * aot-compiler.c (mono_aot_method_hash): Use our internal version of
5011 mono_metadata_type_hash ().
5013 2009-05-14 Massimiliano Mantione <massi@ximian.com>
5015 * mini.h, mini-codegen.c, mini-alpha.c, mini-amd64.c, mini-arm.c,
5016 mini-hppa.h, mini-hppa.c, mini-ia64.c, mini-mips.h, mini-mips.c,
5017 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-886.c:
5018 Removed MONO_INST_BRLABEL from the instruction flags, and the
5019 remaining code that used it, because we do not support branches inside
5020 basic blocks (and branch target labels) anymore.
5021 * Makefile.am: As part of the above cleanup, remove reference to
5022 BURG files which don't exist anymore.
5024 2009-05-14 Zoltan Varga <vargaz@gmail.com>
5026 * image-writer.c (asm_writer_emit_local_symbol): Make this a nop on
5029 * mini-mips.c mini-mips.h exceptions-mips.c: Transition the mips backend
5030 to use mono_arch_throw_corlib_exception.
5032 * mini-ppc.c mini-ppc.h exceptions-ppc.c: Use
5033 mono_arch_throw_corlib_exception for throwing corlib exceptions.
5035 * aot-runtime.c (decode_patch): Allocate the data for R4/R8 from the
5038 * mini.c (mono_patch_info_dup_mp): Copy the table of switch targets too.
5040 * aot-compiler.c: Emit a local symbol prefixed with the assembly name
5041 for the got to make debugging easier and to avoid confusing it with the
5044 * aot-compiler.c (emit_method_code): Emit a C style symbol for each
5045 method so a breakpoint can be set when using gdb.
5047 2009-05-13 Zoltan Varga <vargaz@gmail.com>
5049 * aot-compiler.c (mono_aot_method_hash): Implement this properly based
5050 on mono_method_get_imt_slot ().
5052 * aot-runtime.c (find_extra_method_in_amodule): Get rid of the
5053 num_decodes variables.
5055 * aot-compiler.c (mono_aot_method_hash): Revert part of the last
5056 change as it doesn't seem to work.
5058 * aot-compiler.c (mono_aot_method_hash): Improve the hashing of
5061 2009-05-12 Zoltan Varga <vargaz@gmail.com>
5063 * aot-compiler.c mini.c mini-amd64.h mini-arm.h: Kill
5064 MONO_ARCH_FULL_AOT_IMT_SUPPORTED define, both platforms now support imt.
5066 * mini.c (mini_init): Install mono_aot_get_imt_thunk as the IMT thunk
5067 builder when using full aot.
5069 * mini-amd64.c (mono_arch_build_imt_thunk): Don't handle the full-aot case
5070 here, it is already handled.
5072 * mini-arm.c (mono_arch_emit_imt_argument): Pass the dynamic imt arg
5075 * aot-compiler.c (arch_emit_imt_thunk): Implement this for ARM.
5077 * mini-arm.h: Enable IMT for full aot.
5079 * aot-compiler.c (mono_compile_assembly): Don't emit imt thunk if the
5080 arch doesn't support it.
5082 * mini.c (mini_init): Don't disable IMT for full aot if the
5083 architecture supports it.
5085 * mini.h (MonoAotTrampoline): New enum containing the different types
5086 of 'numerous' trampolines.
5087 (MONO_AOT_FILE_VERSION): Bump this.
5089 * aot-compiler.c aot-runtime.c: Unify the handling of specific and
5090 static rgctx trampolines. Add support for full-aot IMT thunks.
5092 * mini-amd64.h: Enable IMT for full aot.
5094 * TestDriver.cs: Add a CategoryAttribute class and an --exclude option
5095 to exclude tests belonging to a category.
5097 * generics.cs: Mark some tests with a !FULLAOT category.
5099 * Makefile.am (fullaotcheck): Run tests with --exclude !FULLAOT. Include
5102 2009-05-11 Zoltan Varga <vargaz@gmail.com>
5104 * aot-compiler.c (emit_and_reloc_code): Move the implementation of
5105 MONO_PATCH_INFO_GOT_OFFSET to a separate arch-specific function.
5106 (emit_plt): Fix a warning.
5108 2009-05-10 Zoltan Varga <vargaz@gmail.com>
5110 * aot-compiler.c aot-runtime.c: Fix the build by moving is_shared_got_patch
5111 back into aot-compiler.c to a place where the other functions shared by
5112 the runtime and aot compiler are.
5114 * aot-compiler.c aot-runtime.c: Emit the got addr using a separate symbol,
5115 as done previously, instead of in MonoAotFileInfo, since pointers might have
5116 alignment requirements.
5118 * mini.h: Bump AOT file format version.
5120 2009-05-10 Miguel de Icaza <miguel@novell.com>
5122 * aot-runtime.c (mono_aot_is_shared_got_patch): Move this routine
5123 that is used at runtime from the aot-compiler.c, this makes it
5124 work on setups that remove the AOT compiler from the output
5127 2009-05-09 Zoltan Varga <vargaz@gmail.com>
5129 * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Implement this for
5132 * mini-ppc.h: Enable static rgctx trampolines for ppc.
5134 * mini-<ARCH>.h: Kill the MONO_ARCH_ENABLE_EMIT_STATE_OPT define.
5136 * decompose.c (mono_decompose_long_opts): Move the ppc/sparc specific
5137 stuff to mono_arch_decompose_long_opts ().
5138 (mono_decompose_opcode): Remove some dead code.
5140 2009-05-08 Rodrigo Kumpera <rkumpera@novell.com>
5142 * method-to-ir.c (mono_method_to_ir): Fix boostrap of non amd64 builds
5143 cmethod can be null for quite a some reasons.
5145 2009-05-08 Rodrigo Kumpera <rkumpera@novell.com>
5147 * method-to-ir.c (mono_method_to_ir): Fix non amd64 builds.
5149 2009-05-08 Zoltan Varga <vargaz@gmail.com>
5151 * aot-compiler.c (arch_emit_got_access): Fix the aot-not-supported build.
5153 2009-05-08 Zoltan Varga <vargaz@gmail.com>
5155 * method-to-ir.c (mono_emit_call_args): Add a 'tail' flag argument.
5156 (mono_method_to_ir): Use MONO_ARCH_USE_OP_TAIL_CALL macro to determine
5157 whenever to make tail calls using OP_TAIL_CALL. Enable support for tail
5158 calls returning structures by addr on amd64.
5160 * mini-amd64.h (MONO_ARCH_USE_OP_TAIL_CALL): New arch-specific macro.
5162 * iltests.il.in: Restructure the tail call tests a bit.
5164 2009-05-07 Zoltan Varga <vargaz@gmail.com>
5166 * aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
5167 for virtual methods too.
5169 2009-05-06 Raja R Harinath <harinath@hurrynot.org>
5171 * method-to-ir.c (mono_method_to_ir): Revert change of 2009-05-02
5172 due to regression in verifying System.dll.
5174 2009-05-06 Zoltan Varga <vargaz@gmail.com>
5176 * debug-mini.c (mono_debugger_method_has_breakpoint): Allow breakpoints
5179 * dwarfwriter.c (emit_class_dwarf_info): Add support for generic
5182 * aot-compiler.c aot-runtime.c: Use our own hash function instead of
5183 g_str_hash () which can change.
5185 * driver.c (mini_regression): Disable optimizations not supported by
5186 the cpu. Fixes #500019.
5188 * aot-runtime.c (mono_aot_get_unwind_info): Fix the --enable-minimal=aot
5191 2009-05-06 Zoltan Varga <vargaz@gmail.com>
5193 * mini-llvm.c (mono_llvm_emit_method): Update the OP_TLS_GET implementation
5194 to the latest LLVM code.
5196 2009-05-05 Zoltan Varga <vargaz@gmail.com>
5198 * genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.
5200 2009-05-04 Zoltan Varga <vargaz@gmail.com>
5202 * mini-llvm.c (mono_llvm_emit_method): Implement TLS support on
5205 * aot-compiler.c (encode_patch_list): Simplify this considerably as we are
5206 no longer saving offsets, so just save the patch types along with the other
5208 * aot-runtime.c (load_patch_info): Update after the changes to
5209 encode_patch_list ().
5210 (decode_got_entry): Removed, merged into load_patch_info ().
5211 (is_shared_got_patch): Removed, call the same function from
5214 * mini.h: Bump aot file format version.
5216 * aot-compiler.c aot-runtime.c: Resurrect static linking support. Kill the
5217 half-finished no-dlsym code.
5219 * aot-runtime.c (load_method): Kill the old and bit-rotten use_loaded_code
5222 * mini-<ARCH>.h mini-trampolines.c aot-runtime.c: Kill the
5223 MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN define.
5225 2009-05-02 Zoltan Varga <vargaz@gmail.com>
5227 * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Increase the
5228 buffer length to work with AOT code.
5230 * method-to-ir.c (mono_method_to_ir): Handle loading errors in the
5231 ldfld/stfld opcodes.
5233 * exceptions-x86.c (mono_arch_get_throw_exception_by_name): Simplify this
5236 * mini-llvm.c mini-x86.c: Implement 32 bit and x86 support.
5238 * ssa.c (mono_ssa_compute): Don't skip I8 values when using LLVM.
5240 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Update to the latest
5243 * mini.c (mini_method_compile): Set the from_llvm flag in MonoJitInfo
5244 if needed. Don't decompose long operations when using llvm.
5246 2009-05-01 Zoltan Varga <vargaz@gmail.com>
5248 * aot-compiler.c aot-runtime.c: Use mono_pagesize () instead of the
5251 * aot-runtime.c (load_aot_module): Get rid of another mprotect call.
5253 2009-05-03 Martin Baulig <martin@ximian.com>
5255 * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
5256 mono_debugger_insert_method_breakpoint() since the class init
5257 handler we're inserting at the top of the method already gives us
5260 2009-04-30 Zoltan Varga <vargaz@gmail.com>
5262 * decompose.c (mono_decompose_long_opts): Move the implementation of LNEG
5263 to mono_arch_decompose_long_opts () for x86 and arm.
5265 2009-04-29 Zoltan Varga <vargaz@gmail.com>
5267 * mini-codegen.c (mono_regstate_alloc_int): Use __x86_64__ instead of
5270 2009-04-28 Zoltan Varga <vargaz@gmail.com>
5272 * *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in the
5275 2009-04-26 Zoltan Varga <vargaz@gmail.com>
5277 * aot-runtime.c (mono_aot_create_specific_trampoline): Add a stat for the
5278 number of trampolines used in full-aot mode.
5280 * aot-compiler.c: Add an ntrampolines option to set the number of
5281 trampolines emitted in full-aot mode.
5283 2009-04-27 Zoltan Varga <vargaz@gmail.com>
5285 * mini-llvm.c (mono_llvm_emit_method): Implement OP_CHECK_THIS using
5286 a volatile load. Get rid of get_tempname (), llvm assigns names
5289 * mini-llvm-cpp.cpp (mono_llvm_build_volatile_load): New instruction
5292 * mini-llvm.c (mono_llvm_emit_method): Don't call LLVMGetParam on
5295 * abcremoval.c (REPORT_ABC_REMOVAL): Don't output messages at verbose
5298 * mini-codegen.c (mono_local_regalloc): Prevent sreg1/dreg to be allocated
5299 to the same register as a fixed sreg2. Fixes #497271.
5301 * iltests.il.in: Add a new test.
5303 2009-04-26 Zoltan Varga <vargaz@gmail.com>
5305 * mini-amd64.c: Use moves instead of pushes for passing arguments on the
5306 stack, since pushes complicate exception handling.
5308 * exceptions-amd64.c (mono_arch_find_jit_info): Don't pop the arguments of
5309 the stack if they are passed using moves.
5311 * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
5313 * method-to-ir.c (mono_method_to_ir): Disable fast virtual generic methods
5316 * mini-llvm.c (mono_llvm_emit_method): Call jit icall wrappers, not the
5317 icalls themselves. Convert arguments of FCOMPARE. Convert the destination
5318 of FMOVE if it is an R4.
5320 2009-04-25 Zoltan Varga <vargaz@gmail.com>
5322 * mini-ops.h: Add OP_LLVM_OUTARG_VT opcode.
5324 * mini.h (LLVMCallInfo): New structure to store calling convention
5325 information for the LLVM back end similar to the CallInfo structures in
5328 * mini-amd64.c (mono_arch_get_llvm_call_info): New arch function to return
5329 call information in a format usable by LLVM.
5330 (mono_arch_emit_call): Move the LLVM handling code to mono_llvm_emit_call ().
5332 * method-to-ir.c (mono_emit_call_args): Emit calls using
5333 mono_llvm_emit_call () when compiling using LLVM.
5335 * mini-llvm.c: Implement support for passing/receiving valuetypes. Add
5336 comments to all functions. Fix memory leaks. Add a public init/cleanup
5339 * mini.c: Call the llvm init/cleanup functions in mini_init()/cleanup().
5341 * method-to-ir.c (handle_array_new): Disable llvm when calling the vararg
5342 mono_array_new_va () jit icall.
5344 Fri Apr 24 16:44:08 CEST 2009 Paolo Molaro <lupus@ximian.com>
5346 * Makefile.am, genmdesc.c, genmdesc.pl: tiny refactor to allow
5347 multiple machine description files to be specified.
5348 * mini-ops.h: fixes for cross-compilation.
5350 2009-04-22 Miguel de Icaza <miguel@novell.com>
5352 * aot-runtime.c (make_writable): Use mono_mprotect to simplify
5355 2009-04-22 Zoltan Varga <vargaz@gmail.com>
5357 * method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
5358 to prevent asserts in various passes. Fixes #497220.
5360 2009-04-21 Zoltan Varga <vargaz@gmail.com>
5362 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove
5365 * aot-compiler.c aot-runtime.c: Emit the unwind info into a separate
5366 table to avoid duplicates.
5368 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5370 * aot-compiler.c (emit_method_code): Avoid writing symbols if the nodebug
5373 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
5375 * mini.c (mini_method_verify): Fail fulltrust code if the exception
5376 is for method or field access.
5378 2009-04-20 Zoltan Varga <vargaz@gmail.com>
5380 * mini-llvm-cpp.cpp (mono_llvm_dump_value): New helper function to print
5383 * mini-llvm.c (mono_llvm_emit_method): Use it.
5385 * mini-llvm.c (type_to_llvm_type): Fix the mapping of enums.
5386 (mono_llvm_emit_method): Add support for CAS. Fix handling of CSET opcodes
5389 * mini-trampolines.c (mono_llvm_vcall_trampoline): Add support for
5390 synchronized methods.
5392 * mini.c (mini_method_compile): Disable LLVM for dynamic methods.
5394 * mini.c (mini_method_compile): Enable ABCREM when running with LLVM.
5396 * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOADI4_MEM/
5399 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add a MONO_LLVM env variable
5400 allowing some options to be set dynamically.
5402 2009-04-19 Zoltan Varga <vargaz@gmail.com>
5404 * mini-llvm.c (mono_llvm_emit_method): Handle compares followed by an
5405 unconditional branch.
5407 * mini.h (MonoTrampolineType): Add new trampoline type
5408 'MONO_TRAMPOLINE_LLVM_VCALL' which handles virtual calls made from LLVM
5411 * mini-trampolines.c (mono_llvm_vcall_trampoline): New C trampoline
5414 * mini-trampolines.c (mono_create_llvm_vcall_trampoline): New trampoline
5417 * mini.c (mini_init): Avoid using the common vtable trampoline when LLVM
5418 is enabled. Instead, use the llvm vcall trampoline.
5420 * mini-trampolines.c (mono_get_vcall_slot_addr): New helper function.
5422 * mini-trampolines.c tramp-amd64.c tramp-x86.c: Use it.
5424 * mini-<ARCH>.c: Get rid of the identical mono_arch_get_vcall_slot_addr ()
5427 * mini-<ARCH>.h mini-trampolines.c mini.c: Get rid of
5428 MONO_ARCH_COMMON_VTABLE_TRAMPOLINE, it is supported by all archs.
5430 * mini-ia64.c (mono_arch_lowering_pass): Null out the sregs of the
5431 OP_IA64_CSET opcode.
5433 * mini.c: Fix a warning.
5435 * mini-llvm.c (mono_llvm_emit_method): Convert arguments of SWITCH and
5436 THROW to the appropriate llvm type.
5438 2009-04-18 Zoltan Varga <vargaz@gmail.com>
5440 * mini.c (mini_method_compile): Add statistics for methods JITted
5443 2009-04-17 Zoltan Varga <vargaz@gmail.com>
5445 * method-to-ir.c: Fix the computation of ins_sreg_counts for ia64
5446 OP_IA64_CMP_<cond>_IMM opcodes.
5448 2009-04-17 Zoltan Varga <vargaz@gmail.com>
5450 * mini-llvm.c (emit_cond_system_exception): Implement throwing of
5453 * dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
5456 * mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
5459 2009-04-17 Atsushi Enomoto <atsushi@ximian.com>
5461 * mini-exceptions.c : add thread id to EXCEPTION trace message.
5463 2009-04-17 Zoltan Varga <vargaz@gmail.com>
5465 * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Fix AOT
5468 * tramp-x86.c (mono_arch_get_unbox_trampoline): Implement static
5469 rgctx invoke trampolines for x86.
5471 * mini-x86.c (mono_arch_output_basic_block): Add a few nops before
5472 indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
5473 (mono_arch_get_vcall_slot): Simplify this.
5475 2009-04-16 Zoltan Varga <vargaz@gmail.com>
5477 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Move the calls to
5478 mono_debug_add_delegate_trampoline () to get_delegate_invoke_impl ().
5480 2009-04-14 Zoltan Varga <vargaz@gmail.com>
5482 * aot-compiler.c tramp-arm.c mini-arm.c: Implement static rgctx
5483 trampolines for ARM. Add full-aot support for delegate invokes for ARM.
5485 * mini-trampolines.c (mono_magic_trampoline): Fix the build.
5487 * liveness.c (visit_bb): Remove a needless assert.
5489 2009-04-13 Zoltan Varga <vargaz@gmail.com>
5491 * mini-trampolines.c (mono_create_delegate_trampoline): Delegate the
5492 full aot support to the arch specific code.
5494 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Add full-aot support.
5496 * aot-compiler.c (emit_trampolines): Emit delegate invoke impl trampolines.
5498 * aot-compiler.c (emit_named_code): Rename this to 'emit_trampoline'.
5500 * mini-amd64.c (mono_arch_get_delegate_invoke_impls): New function to
5501 collect information about the delegate invoke impl trampolines.
5503 * mini.h (MonoAotTrampInfo): New structure collecting the information needed
5504 to save trampolines during full-aot mode.
5506 * mini-trampolines.c (mono_create_static_rgctx_trampoline): New trampoline
5507 creation function which returns a trampoline which sets the rgctx
5509 (mono_magic_trampoline): Use the rgctx trampoline instead of an rgctx
5510 wrapper if possible.
5511 (mono_delegate_trampoline): Ditto.
5513 * mini.c (mono_jit_runtime_invoke): Ditto.
5515 * tramp-amd64.c: Add an implemention of static rgctx trampolines for AMD64.
5517 * aot-compiler.c aot-runtime.c: Add support for static rgctx trampolines.
5519 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5521 2009-04-12 Zoltan Varga <vargaz@gmail.com>
5523 * mini-ia64.c (mono_arch_lowering_pass): Use NULLIFY_INS instead of
5524 just setting the opcode to OP_NOP.
5526 2009-04-11 Zoltan Varga <vargaz@gmail.com>
5528 * mini.c (mini_method_compile): Put the last change inside an
5529 #ifdef MONO_ARCH_HAVE_LIVERANGE_OPS.
5531 * mini.c (mini_method_compile): Disable sharing of stack slots/registers
5532 and extend live ranges to cover the whole method when using xdb.
5534 * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
5535 do it in the trampolines.
5537 * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
5540 * mini-trampolines.c (mono_delegate_trampoline): Ditto.
5542 * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
5543 call code in full-aot mode since IMT is disabled there.
5544 (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
5545 new JIT no longer has that restriction.
5547 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5549 * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
5550 a more compact format.
5551 (mono_aot_wrapper_name): New function to return a unique name for a
5552 wrapper method, also used by the AOT runtime.
5554 * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
5557 * aot-compiler.c (add_generic_class): Add the helper methods from T[]
5558 when a ICollection<T> etc is encountered.
5559 (add_generic_instances): Process method arguments/locals too.
5560 (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
5563 * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
5565 2009-04-10 Zoltan Varga <vargaz@gmail.com>
5567 * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
5569 * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
5571 * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
5572 representing the result of the decomposition. Nullify instructions
5573 instead of setting them to OP_NOP since nops can't have registers
5576 2009-04-09 Zoltan Varga <vargaz@gmail.com>
5578 * aot-compiler.c (mono_compile_assembly): Split this huge function into
5579 smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
5580 info. Strip 'mapping symbols' on ARM.
5582 * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
5584 * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
5585 this with the native genmdesc.
5587 2009-04-08 Bill Holmes <billholmes54@gmail.com>
5589 * aot-runtime.c: Fixing the MSVC build.
5591 Code is contributed under MIT/X11 license.
5593 2009-04-08 Zoltan Varga <vargaz@gmail.com>
5595 * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since
5596 JITted code depends on it.
5598 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
5600 * aot-compiler.c: Use new MonoGenericParam accessors.
5602 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
5604 Reduce memory usage and improve correctness wrt MonoGenericParam
5605 * aot-runtime.c (decode_klass_ref): Simplify generic parameter
5606 handing. Avoid allocating MonoGenericParams, but use the ones in
5607 the container itself.
5609 2009-04-07 Miguel de Icaza <miguel@novell.com>
5611 * tasklets.c: Return exceptions in the out argument.
5613 2009-04-08 Zoltan Varga <vargaz@gmail.com>
5615 * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
5616 opcode. Use pointer types in more places instead of casting them to
5619 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
5621 (mono_llvm_optimize_method): New helper function to optimize a method.
5623 * method-to-ir.c (mono_emit_widen_call_res): Extract the call result
5624 widening code so it could be called from more places.
5625 (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
5626 code paths in the call opcodes.
5628 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
5630 * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
5632 2009-04-06 Zoltan Varga <vargaz@gmail.com>
5634 * dwarfwriter.c: Use _ to separate class name
5635 components as gdb can't handle '.'. Represent reference variables
5638 * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
5640 * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
5642 * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
5644 * gc-test.cs: New file with GC stack marking tests.
5646 * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
5647 negative numbers for vfp.
5649 * basic-float.cs: Add a test.
5651 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
5653 * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
5655 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
5657 * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
5658 part of tasklet/continuation support.
5660 2009-04-05 Zoltan Varga <vargaz@gmail.com>
5662 * mini-llvm.c (mono_llvm_emit_method): Move the handling of
5663 amd64 opcodes inside an ifdef.
5665 * dwarfwriter.c: Emit inheritance information for classes, emit fields
5668 * dwarfwriter.c (emit_type): Emit the class info for classes.
5670 2009-04-04 Zoltan Varga <vargaz@gmail.com>
5672 * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
5674 * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
5676 * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
5678 * ssa.c (mono_ssa_compute): Fix some memory leaks.
5680 2009-04-03 Zoltan Varga <vargaz@gmail.com>
5682 * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
5684 * mini-llvm.c: Update comments.
5686 * mini.h (COMPILE_LLVM): New macro.
5688 * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
5690 * ssa.c (mono_ssa_compute): Ditto.
5692 * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
5693 the unwind ops from a DWARF FDE.
5695 * mini-llvm.c: Implement generation of unwind info for LLVM compiled
5696 methods by extracting the dwarf unwind ops from the unwind info generated
5699 * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
5702 * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
5705 2009-04-02 Zoltan Varga <vargaz@gmail.com>
5707 * Makefile.am (llvm_sources): Enable this.
5709 * mini.c (mini_method_compile): Add support for compiling with LLVM,
5710 failing back to the JIT if something cannot be handled.
5712 * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
5713 compiling with LLVM.
5715 * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
5716 compiling with LLVM.
5718 * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when
5719 compiling with LLVM.
5721 * mini-ops.h: Add a few opcodes needed by LLVM.
5723 * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
5726 * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
5729 * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
5731 * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
5733 2009-04-01 Mark Probst <mark.probst@gmail.com>
5735 * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
5736 ridiculously large methods.
5738 2009-03-31 Martin Baulig <martin@ximian.com>
5740 * debug-debugger.c (debugger_remove_breakpoint): Call
5741 mono_debugger_remove_class_init_callback ().
5743 2009-03-31 Zoltan Varga <vargaz@gmail.com>
5745 * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
5746 right before emitting code, not at the start.
5748 * mini.c (mono_postprocess_patches): Extract this into a separate function
5749 from mono_codegen ().
5751 * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
5752 byref types correctly.
5754 2009-03-30 Zoltan Varga <vargaz@gmail.com>
5756 * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
5759 2009-03-29 Zoltan Varga <vargaz@gmail.com>
5761 * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before
5762 indirect calls, this avoids problems where get_vcall_slot () would get
5763 confused by the native code for the instruction preceeding the call.
5764 (mono_arch_get_vcall_slot): Simplify this.
5765 (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
5767 * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
5768 register allocator now seems to depend on them instead of the data in
5771 * mini.c (mini_method_compile): Throw the correct type of exception if
5772 mono_method_get_header () fails because of a loading error.
5774 2009-03-28 Zoltan Varga <vargaz@gmail.com>
5776 * mini.c (mini_method_compile): Clear the loader error if the method
5777 header cannot be decoded.
5779 * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual
5780 interface methods on proxies correctly.
5782 * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
5783 this argument for vtype methods. Add precise liveness info for arguments.
5785 * mini-codegen.c (mono_print_ins_index): Print the vreg of the
5786 LIVERANGE_START/END opcodes.
5788 * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
5789 for arguments and values in registers.
5791 2009-03-27 Zoltan Varga <vargaz@gmail.com>
5793 * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
5794 return a valuetype. Fixes #487518.
5796 * iltests.il: Add a test.
5798 * aot-compiler.c: Use mono_thread_create () to create helper threads.
5800 * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
5801 closed over a null reference correctly.
5803 2009-03-26 Zoltan Varga <vargaz@gmail.com>
5805 * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
5807 2009-03-25 Mark Probst <mark.probst@gmail.com>
5809 * mini-codegen.c (mono_local_regalloc): Don't let sregs get
5810 allocated to the same registers as fixed sregs.
5812 2009-03-24 Mark Probst <mark.probst@gmail.com>
5814 * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
5817 * method-to-ir.c: Handle more cases for
5818 Interlocked.CompareExchange.
5820 * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
5821 mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
5822 ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
5824 2009-03-23 Zoltan Varga <vargaz@gmail.com>
5826 * aot-runtime.c (decode_method_ref): Fix a warning.
5828 * unwind.c (mono_unwind_frame): Ditto.
5830 2009-03-22 Zoltan Varga <vargaz@gmail.com>
5832 * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
5833 (mono_compile_assembly): Enable the binary writer for full-aot as well.
5835 * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
5836 fix the handling of large values in the ALU_PC_G0_NC relocation.
5838 2009-03-22 Zoltan Varga <vargaz@gmail.com>
5840 * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
5842 2009-03-22 Mark Probst <mark.probst@gmail.com>
5844 * method-to-ir.c (mono_spill_global_vars): Support for ternary
5847 2009-03-22 Mark Probst <mark.probst@gmail.com>
5849 * method-to-ir.c: MINI_OP3 needs a comma.
5851 * method-to-ir.c, mini.h, mini.c: Remove
5852 mono_init_op_sreg_counts ().
5854 2009-03-22 Zoltan Varga <vargaz@gmail.com>
5856 * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
5859 * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
5862 * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
5864 * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
5867 2009-03-21 Mark Probst <mark.probst@gmail.com>
5869 * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
5870 liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
5871 mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
5874 2009-03-20 Zoltan Varga <vargaz@gmail.com>
5876 * driver.c: Change location of gc_wrapper.h.
5878 * method-to-ir.c (mono_find_block_region): Handle try clauses nested
5879 inside finally clauses correctly. Fixes #485721.
5881 * mini.c (mono_find_spvar_for_region): This needs to handle try regions
5882 after the change above.
5884 * exceptions.cs: Add a test.
5886 2009-03-19 Zoltan Varga <vargaz@gmail.com>
5888 * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
5890 * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
5891 into cfg->used_int_regs, it is not needed with the dwarf unwinder.
5892 (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
5894 * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
5895 the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
5897 2009-03-19 Sebastien Pouliot <sebastien@ximian.com>
5899 * method-to-ir.c: Allow CoreCLR to throw FieldAccessException.
5900 Simplify logic for ensure_method_is_allowed_to_call_method.
5901 Handle wrappers on callers.
5903 2009-03-19 Zoltan Varga <vargaz@gmail.com>
5905 * Makefile.am (fullaotcheck): Don't run the generics tests, some of
5908 * basic-simd.cs: Fix the names of some test methods.
5910 2009-03-18 Geoff Norton <gnorton@novell.com>
5912 * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
5914 2009-03-18 Zoltan Varga <vargaz@gmail.com>
5916 * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
5918 2009-03-17 Jb Evain <jbevain@novell.com>
5920 * driver.c: remove now uneeded call to mono_gc_base_init before
5923 2009-03-17 Jb Evain <jbevain@novell.com>
5925 * dwarfwriter.c (token_handler): handle more cases.
5927 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
5929 * method-to-ir.c: Remove more dead code (that was required only
5930 because of method_is_safe). Fix compiler warnings.
5932 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
5934 * method-to-ir.c: Remove unneeded/useless method_is_safe
5935 http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
5937 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
5939 * mini.c (mini_method_compile): Print the method been compiled with
5940 verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
5941 for people not familiar with the runtime.
5943 2009-03-17 Zoltan Varga <vargaz@gmail.com>
5945 * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
5946 a managed object which is later put into a GList. Return its class instead.
5948 * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
5949 stack slots when using sgen.
5951 2009-03-16 Zoltan Varga <vargaz@gmail.com>
5953 * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
5955 2009-03-14 Zoltan Varga <vargaz@gmail.com>
5957 * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
5958 > so it works on the first vreg as well.
5960 2009-03-13 Zoltan Varga <vargaz@gmail.com>
5962 * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
5965 * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
5967 * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
5970 2009-03-12 Zoltan Varga <vargaz@gmail.com>
5972 * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
5973 native->IL offset mapping.
5975 2009-03-11 Zoltan Varga <vargaz@gmail.com>
5977 * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
5979 * basic.cs: Add a test.
5981 2009-03-11 Mark Probst <mark.probst@gmail.com>
5983 * mini-x86.c (mono_arch_output_basic_block): Use different
5984 registers in case the ones we want to overwrite are used by the
5985 other operand. Fixes regression in #480807.
5987 2009-03-10 Zoltan Varga <vargaz@gmail.com>
5989 * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
5991 * dwarfwriter.c (emit_line_number_info): The line number info for
5992 IL code was off by one. Fix that.
5994 * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
5997 2009-03-09 Mark Probst <mark.probst@gmail.com>
5999 Contributed under the terms of the MIT/X11 license by Steven
6000 Munroe <munroesj@us.ibm.com>.
6002 * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
6005 2009-03-08 Zoltan Varga <vargaz@gmail.com>
6007 * dwarfwriter.c (token_handler): Decode method references in non-wrappers
6010 2009-03-06 Zoltan Varga <vargaz@gmail.com>
6012 * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
6013 the delegate ctor handling code. Fixes #482638.
6015 * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
6018 * iltests.il.in: Add a test.
6020 * mini-darwin.c (mono_chain_signal): Remove this, it is already in
6023 2009-03-05 Mark Probst <mark.probst@gmail.com>
6025 * mini-trampolines.c (mono_create_jump_trampoline): If the method
6026 is shared generic code, return the trampoline, even if the method
6027 has already been compiled. Fixes #479763.
6029 * mini.c, mini.h: New function
6030 mono_jit_find_compiled_method_with_jit_info() which is the same as
6031 mono_jit_find_compiled_method() but also returns the jit info.
6033 2009-03-05 Mark Probst <mark.probst@gmail.com>
6035 * method-to-ir.c (mono_method_to_ir): Only force the vtable var
6036 for methods which actually have one. For all other methods, make
6037 sure the this argument var is live the whole method.
6039 * mini.c (mini_method_compile): Every shared method has a
6040 this/vtable/mrgctx info. Fixes #480807.
6042 2009-03-05 Mark Probst <mark.probst@gmail.com>
6044 * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
6045 generic/imt thunks where some entries branch through the vtable,
6046 while other entries branch directly.
6048 2009-03-05 Zoltan Varga <vargaz@gmail.com>
6050 * mini-darwin.c (mono_chain_signal): Define this to fix the build.
6052 * mini-windows.c: Ditto.
6054 * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
6057 2009-03-04 Zoltan Varga <vargaz@gmail.com>
6059 * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
6062 2009-03-04 Mark Probst <mark.probst@gmail.com>
6064 * method-to-ir.c: Don't inline methods that use JMP. Fixes
6067 2009-03-04 Mark Probst <mark.probst@gmail.com>
6069 * exceptions-x86.c: Include debug-mini.h - fixes build.
6071 2009-03-04 Martin Baulig <martin@ximian.com>
6073 * debug-mini.c: Clean up the exception API and add documentation.
6074 (mono_debugger_handle_exception): New public method; this is
6075 called when throwing an exception or encountering an unhandled one.
6076 (mono_debugger_call_exception_handler): Formerly known as
6077 mono_debugger_handle_exception(); this is used to tell the
6078 debugger that we're about to invoke an exception handler.
6080 2009-03-04 Martin Baulig <martin@ximian.com>
6082 * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
6083 ../metadata/mono-debug-debugger.c; save and reset exception state.
6085 2009-03-02 Martin Baulig <martin@ximian.com>
6087 * debug-mini.c: Moved the debugger exception handling here from
6088 ../metadata/mono-debug-debugger.c.
6091 (MonoDebuggerExceptionAction): New exception typedef.
6094 (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
6096 * exceptions-amd64.c
6097 (mono_amd64_throw_exception): Use the new debugger exception
6101 (mono_handle_exception_internal): Don't call
6102 mono_debugger_unhandled_exception() here.
6104 2009-03-03 Zoltan Varga <vargaz@gmail.com>
6106 * mini.c aot-compiler.c: Update after the changes to
6107 mono_marshal_get_runtime_invoke ().
6109 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot):
6110 Virtual generic methods might not have method->slot set, work around
6113 * generics.cs: Add a test.
6115 2009-03-02 Geoff Norton <gnorton@novell.com>
6118 * driver.c: Allow signal chaining of SIGFPE as well.
6120 2009-03-02 Zoltan Varga <vargaz@gmail.com>
6122 * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
6123 this since it now receives the method not its generic context in the
6126 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
6127 generic/imt thunks where some entries branch through the vtable, while
6128 other entries branch directly.
6130 * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
6132 * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call
6133 support for interface methods as well.
6135 * mini-trampolines.c: Add support for virtual generic methods in interfaces
6136 using the normal IMT thunks.
6138 generics.cs: Add new tests.
6140 * method-to-ir.c (mono_method_to_ir): Pass the method instead of
6141 the generic inst to the generic imt thunks. This fixes AOT support,
6142 improves consistency with the normal IMT thunks, and makes it easier to
6143 add support for interface generic virtual methods later.
6145 * mini-trampolines.c (mono_magic_trampoline): Ditto.
6147 2009-02-28 Zoltan Varga <vargaz@gmail.com>
6149 * driver.c (mono_set_signal_chaining): New public API function to enable
6150 signal chaining on POSIX platforms.
6152 * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland
6153 (si@lindenlab.com) to implement signal chaining. The original patch was
6154 contributed under the MIT X/11 license:
6155 https://bugzilla.novell.com/show_bug.cgi?id=318894
6157 2009-02-27 Zoltan Varga <vargaz@gmail.com>
6159 * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
6160 too until it can be made to run on amd64.
6162 2009-02-26 Zoltan Varga <vargaz@gmail.com>
6164 * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
6165 to get_generic_context_from_code () + get_call_info () if possible.
6167 2009-02-25 Zoltan Varga <vargaz@gmail.com>
6169 * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
6170 suspend-on-sigsegv functionality.
6172 * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
6173 to suspend when a native SIGSEGV is received. This is useful for debugging
6174 crashes which don't happen under gdb, since a live process contains more
6175 information than a core file.
6177 * mini-exceptions.c (mono_print_thread_dump): Use
6178 MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
6180 * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
6182 * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
6184 * basic-float.cs: Disable the tests which currently fail on amd64.
6186 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null
6187 value to mono_arch_patch_callsite () to fix crashes.
6189 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
6191 2009-02-23 Zoltan Varga <vargaz@gmail.com>
6193 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
6194 nop code by patching the call address to point to the nullified class init
6195 trampoline, as the former does not seem to be safe on SMP machines.
6197 2009-02-23 Mark Probst <mark.probst@gmail.com>
6199 * mini-ops.h: Fix the argument types for a few x86 opcodes where
6202 2009-02-23 Zoltan Varga <vargaz@gmail.com>
6204 * basic-float.cs basic-calls.cs: Fix warnings.
6206 2009-02-22 Mark Probst <mark.probst@gmail.com>
6208 * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
6209 correct frame pointer in the LMF. Should fix #478394.
6211 2009-02-22 Zoltan Varga <vargaz@gmail.com>
6213 * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
6215 * image-writer.c: Make the binary writer less verbose.
6217 2009-02-21 Zoltan Varga <vargaz@gmail.com>
6219 * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
6220 are called from runtime invoke wrappers.
6222 2009-02-20 Zoltan Varga <vargaz@gmail.com>
6224 * cpu-ppc.md (store_memindex): Increase the size of this.
6226 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
6228 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
6230 * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
6232 * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
6235 Last fix for of #467201.
6238 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
6240 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
6242 * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
6243 and long_conv_to_r8_2:
6245 Fixed part of #467201.
6247 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
6249 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
6251 * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
6252 conversion to 32 bits.
6254 * cpu-x86.md: Increase the size of int_conv_to_r4.
6256 * basic-float.cs: Add a test for this.
6258 Fixed part of #467201.
6260 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
6262 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
6264 * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
6265 conversion to 64 bits.
6267 * basic-float.cs: Add a test for this.
6269 Fixed part of #467201.
6271 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
6273 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
6275 * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
6276 This behavior is compatible with MS.
6278 * iltest.il.in: Add a test for this.
6280 Fixed part of #467201.
6282 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
6284 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
6286 * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
6287 change the precision of the value.
6289 * cpu-x86.md: Define len for float_conv_to_r4.
6291 * basic-float.cs: Add a test for this.
6293 Fixed part of #467201.
6295 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
6297 * mini.c: Adjust locking order to the new semantics where the loader lock
6300 2009-02-18 Rodrigo Kumpera <rkumpera@novell.com>
6309 * mini-trampolines.c:
6322 * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
6324 2009-02-18 Zoltan Varga <vargaz@gmail.com>
6326 * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
6329 2009-02-17 Zoltan Varga <vargaz@gmail.com>
6331 * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
6332 for cctors if needed.
6334 2009-02-17 Mark Probst <mark.probst@gmail.com>
6336 * mini-ppc.c: Fix build on Darwin.
6338 2009-02-17 Zoltan Varga <vargaz@gmail.com>
6340 * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
6341 version instead of 3 as valgrind doesn't like version 3.
6343 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
6345 * aot-compiler.c (mono_aot_method_hash): New function to return a hash
6346 usable for hashing methods.
6347 (emit_extra_methods): Use the new hash to avoid putting every method in the
6350 * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
6352 * aot-runtime.c (can_method_ref_match_method): New function to quickly check
6353 whenever a method ref could match a method.
6355 * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
6358 * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded
6361 * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
6363 * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
6364 the encoding buffer.
6366 * method-to-ir.c (mono_method_check_inlining): Avoid calling
6367 mono_method_get_header () on inflated methods as an optimization.
6369 2009-02-16 Zoltan Varga <vargaz@gmail.com>
6371 * ssa.c (fold_ins): Fix another crash if the instruction following the
6372 switch was optimized away.
6374 2009-02-16 Mark Probst <mark.probst@gmail.com>
6376 Contributed under the terms of the MIT/X11 license by Steven
6377 Munroe <munroesj@us.ibm.com>.
6379 * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
6381 2009-02-16 Zoltan Varga <vargaz@gmail.com>
6383 * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
6384 around the mono_domain_alloc calls, it is now done by the functions
6387 * aot-compiler.c (compile_method): Only add wrappers referenced by
6388 the method if compiling with full AOT.
6389 (mono_compile_assembly): Error out if --aot=full is specified on
6390 a platform where it is not supported.
6392 * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
6395 * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
6398 * aot-runtime.c (load_named_code): Handle
6399 mono_arm_throw_exception_by_token.
6401 * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
6403 * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
6406 * Makefile.am (fullaotcheck): Exit if a test fails.
6408 * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
6410 (mono_compile_assembly): Handle the assembler failing.
6412 * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
6413 accepting subsections of .bss.
6415 * ssa.c (visit_inst): Fix a crash if the instruction following a switch
6418 * aot-compiler.c: Remove some unused includes.
6420 * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
6421 now in MonoImageWriter.
6423 * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
6424 code sequence which matches a non-virtual call. Fixes #472654.
6426 2009-02-15 Zoltan Varga <vargaz@gmail.com>
6428 * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
6431 * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
6432 use the image/dwarf writers directly.
6434 * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
6437 * aot-compiler.c (MonoAotCompile): Remove fields which are now in
6440 * image-writer.h: Fix some typos.
6442 * dwarfwriter.h dwarfwriter.c: New files.
6444 * aot-compiler.c: Extract the DWARF info writing functionality into a
6447 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
6448 argument to return unwind info.
6450 * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
6452 * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
6454 * aot-runtime.c (decode_method_ref): Add a case for
6455 MONO_AOT_METHODREF_WRAPPER_NAME.
6457 * mini.h: Add constants for the magic numbers used in encode_method_ref ()
6460 * aot-compiler.c (encode_method_ref): Use the new constants.
6462 * aot-runtime.c (decode_method_ref): Ditto.
6464 * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
6465 be compiled, not the icall itself.
6467 2009-02-14 Zoltan Varga <vargaz@gmail.com>
6469 * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
6470 using decode_method_ref ().
6472 * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
6473 convert it to an in32. Fixes #475859.
6475 * arrays.cs: Add a test.
6477 2009-02-12 Zoltan Varga <vargaz@gmail.com>
6479 * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in
6482 * basic-long.cs: Add a test.
6484 2009-02-12 Mark Probst <mark.probst@gmail.com>
6486 * mini-x86.c, mini-x86.h: Very simple frame pointer removal. We
6487 remove the frame pointer in leaf methods which don't receive any
6488 arguments, don't throw exceptions and don't do dynamic stack
6491 2009-02-12 Zoltan Varga <vargaz@gmail.com>
6493 * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
6494 the fail_tramp changes. Hopefully fixes #475132.
6496 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6498 * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
6499 instead of mono_metadata_signature_dup_full.
6501 2009-02-12 Zoltan Varga <vargaz@gmail.com>
6503 * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
6504 for processing jump tables. Fixes #473787.
6506 2009-02-11 Mark Probst <mark.probst@gmail.com>
6508 * mini-generic-sharing.c: mini_method_get_context() just calls
6509 mono_method_get_context_general() now.
6511 * mini.c, mini.h: Moved get_object_generic_inst(),
6512 construct_object_context_for_method() and
6513 mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
6515 2009-02-11 Zoltan Varga <vargaz@gmail.com>
6517 * branch-opts.c (mono_if_conversion): Handle the case where the merged
6518 basic block fell through to its successor bblock without a branch. Fixes
6521 * iltests.il.in: Add a test.
6523 * aot-compiler.c (encode_method_ref): Encode methods of array types.
6524 (can_encode_patch): We can now handle arrays of generic parameters and
6527 * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
6529 * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
6530 the AOT file to avoid some #ifdefs in aot-runtime.c
6532 * mini.h: Bump AOT file format version.
6534 2009-02-10 Zoltan Varga <vargaz@gmail.com>
6536 * Makefile.am (fullaotcheck): Make this run the tests.
6538 * aot-compiler.c: Make the printing of skipped methods runtime configurable.
6540 2009-02-10 Mark Probst <mark.probst@gmail.com>
6542 * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
6543 individually. Fixes #473482.
6545 2009-02-10 Zoltan Varga <vargaz@gmail.com>
6547 * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
6549 2009-02-09 Jeffrey Stedfast <fejj@novell.com>
6551 * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
6552 (mono_compile_assembly): Hush compile warnings about
6553 uninitialized [tmp_]outfile_name variables in the !use_bin_writer
6556 2009-02-10 Zoltan Varga <vargaz@gmail.com>
6558 * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
6560 * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
6562 * aot-compiler.c: Fix arm support.
6564 * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
6565 img_writer_emit_unset_mode () function.
6567 * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
6568 (mono_unwind_get_dwarf_pc_reg): Ditto.
6570 * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
6571 Move almost all platform specific code to a set of arch_ functions,
6572 and document them to ease porting.
6574 * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
6576 * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
6578 * aot-compiler.c: Extract the image writing functionality into a separate
6579 module to reduce the size of this file.
6581 2009-02-09 Geoff Norton <gnorton@novell.com>
6583 * mini-s390.c: Fix the signature of emit_sig_cookie.
6585 2009-02-09 Zoltan Varga <vargaz@gmail.com>
6587 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
6589 * aot-runtime.c (is_shared_got_patch): Ditto.
6591 * aot-runtime.c (load_named_code): Cope with the fact that
6592 decode_got_entry () won't decode the patch fully if its corresponding got
6593 entry is already filled.
6595 * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full):
6597 (mono_arch_create_monitor_exit_trampoline_full): Ditto.
6599 * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
6600 as the moving pointer instead of 'buf' for consistency with the rest of the
6602 (mono_arch_create_monitor_exit_trampoline): Ditto.
6604 * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
6605 generic_class_init trampolines.
6606 (add_generic_class): Extract some code from add_generic_instances () into a
6607 separate function so it can be called from other places too.
6608 (compile_method): Call add_generic_class () for the classes of inflated methods
6609 referenced by the method.
6610 (can_encode_patch): Allow references to generic parameters.
6612 * aot-runtime.c: Add support the patches required by the new trampolines.
6614 * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
6617 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
6620 * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
6621 this from get_throw_pending_exception, make the signature full aot compatible.
6623 * Makefile.am (fullaotcheck): New target to run full-aot tests.
6625 * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
6627 * exceptions.cs: Add a test.
6629 2009-02-07 Zoltan Varga <vargaz@gmail.com>
6631 * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
6632 use the DWARF_DATA_ALIGN constant instead.
6634 * exception-<ARCH>.c: Update after the above change.
6636 * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
6639 * mini-arm.c: Enable the dwarf unwinder.
6641 * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
6642 instead of mono_class_setup_vtable ().
6644 2009-02-07 Zoltan Varga <vargaz@gmail.com>
6646 * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
6649 * mini-x86.h: Enable the dwarf unwinder.
6651 2009-02-06 Raja R Harinath <harinath@hurrynot.org>
6653 Fix mcs/tests/test-7.cs
6654 * mini-amd64.c (mono_arch_allocate_vars): Revert change from
6657 2009-02-06 Zoltan Varga <vargaz@gmail.com>
6659 * mini.c (print_jit_stats): Remove some unused statistics.
6661 2009-02-05 Zoltan Varga <vargaz@gmail.com>
6663 * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
6665 2009-02-05 Mark Probst <mark.probst@gmail.com>
6667 * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
6668 the method we get from mono_object_get_virtual_method() because
6669 that function does it properly, now.
6671 2009-02-05 Zoltan Varga <vargaz@gmail.com>
6673 * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
6674 opcodes. Fixes #472775.
6676 2009-02-05 Mark Probst <mark.probst@gmail.com>
6678 * mini-exceptions.c (ves_icall_get_frame_info): Account for the
6679 fact that mono_find_jit_info() sometimes returns the context
6680 corresponding to the jit info in new_ctx. Fixes #472600.
6682 2009-02-05 Zoltan Varga <vargaz@gmail.com>
6684 * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
6685 mini-s390.c: Use mono_class_enum_basetype () instead of accessing
6686 klass->enum_basetype directly.
6688 * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
6691 * unwind.c: Avoid 0 sized arrays.
6693 2009-02-04 Zoltan Varga <vargaz@gmail.com>
6695 * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
6696 size on systems with 64k pages. Fixes #471389.
6698 2009-02-04 Mark Probst <mark.probst@gmail.com>
6700 Contributed under the terms of the MIT/X11 license by Steven
6701 Munroe <munroesj@us.ibm.com>.
6703 * mini-ppc.c (mono_arch_output_basic_block): Generate better code
6704 for LOADI4_MEMBASE. Use addi instead of addic if it's not
6707 2009-02-04 Mark Probst <mark.probst@gmail.com>
6709 Contributed under the terms of the MIT/X11 license by Steven
6710 Munroe <munroesj@us.ibm.com>.
6712 * exceptions-ppc.c (mono_arch_get_restore_context): Code size
6715 * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
6716 The trampoline can be longer on PPC64.
6718 2009-02-04 Mark Probst <mark.probst@gmail.com>
6720 Contributed under the terms of the MIT/X11 license by Steven
6721 Munroe <munroesj@us.ibm.com>.
6723 * mini-ppc.c: Compiler warning fixes and trivial code
6726 2009-02-04 Zoltan Varga <vargaz@gmail.com>
6728 * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
6729 ins->dreg which could be a hardware register, not a vreg.
6731 * aot-compiler.c (emit_method_dwarf_info): Ditto.
6733 * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
6734 (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
6736 * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
6738 * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
6739 ->dreg, that is not the vreg we are looking for.
6741 * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
6743 * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
6746 * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
6749 2009-02-03 Zoltan Varga <vargaz@gmail.com>
6751 * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
6753 * aot-compiler.c (emit_line_number_info): Fix line number emission when
6756 * aot-compiler.c: Add xdebug support on x86.
6758 * unwind.c: Add x86 support.
6760 * aot-compiler.c (emit_exception_debug_info): Control the emission of
6761 unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
6763 * mini.c (mini_method_compile): Ditto.
6765 * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
6768 * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
6769 which mimic .push_section/.pop_section in GAS.
6771 * aot-compiler.c: Emit precise live range information for variables.
6773 * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
6775 * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
6776 the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
6779 * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
6780 the live ranges of variables.
6782 * mini.h (struct MonoMethodVar): Add two fields containing the live range
6783 of the variable in terms of native offsets.
6785 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
6787 * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
6789 2009-02-02 Mark Probst <mark.probst@gmail.com>
6791 Contributed under the terms of the MIT/X11 license by Steven
6792 Munroe <munroesj@us.ibm.com>.
6794 * exceptions-ppc.c (restore_regs_from_context): Correct operand
6795 order (offset then base reg) for ppc_load_multiple_regs.
6796 (emit_save_saved_regs) Correct operand order for
6797 ppc_store_multiple_regs.
6798 (mono_arch_get_call_filter): Correct operand order for
6799 ppc_load_multiple_regs.
6801 * mini-ppc.c (emit_memcpy): Fix operand order for
6802 ppc_load_reg_update and ppc_store_reg_update.
6803 (mono_arch_output_basic_block): Correct operand order for ppc_lha.
6804 (mono_arch_emit_epilog): Correct operand order for
6805 ppc_load_multiple_regs.
6807 * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
6808 order for ppc_store_multiple_regs and ppc_load_multiple_regs.
6810 2009-02-02 Mark Probst <mark.probst@gmail.com>
6812 * cpu-ppc64.md: Fixed storer4_memindex length.
6814 2009-02-02 Zoltan Varga <vargaz@gmail.com>
6816 * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
6819 * aot-compiler.c (emit_line_number_info): Optimize this.
6821 2009-02-01 Zoltan Varga <vargaz@gmail.com>
6823 * aot-compiler.c: Disassemble tokens in the IL disassembly.
6825 * aot-compiler.c: Add debug info for methods without debug info by
6826 emitting an IL file and having the line number info referencing that file.
6828 * aot-compiler.c: Optimize the size of the generated line number info.
6830 * aot-compiler.c: Emit line number info in xdebug mode.
6832 * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
6835 2009-01-31 Zoltan Varga <vargaz@gmail.com>
6837 * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
6839 * driver.c (mono_main): Enable debugging support automatically if XDEBUG
6842 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
6844 * basic-calls.cs: Test for the weird crash found on arm.
6846 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
6848 * cpu-arm.md: Increase the size of storer8_membase_reg and
6849 loadr8_membase_reg to 24 bytes to accomodate the extra add.
6851 * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
6852 OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
6853 reg to LR otherwise we'll be loading/storing from just the offset.
6855 2009-01-30 Miguel de Icaza <miguel@novell.com>
6857 Question: if we are storing gint32's inside the "*native_offset",
6858 should we change the signature to "gint32 *native_offset" to
6859 ensure that we do not have type definition problems?
6861 * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
6862 an int * as this is what the other function expects, causes
6863 problems with Freescale's compiler that defined int32_t to be a
6864 long and makes int incompatible
6866 2009-01-30 Miguel de Icaza <miguel@novell.com>
6868 * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
6869 filename conflict with bjam.
6871 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
6873 * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
6874 as it might use decomposed ops.
6876 2009-01-30 Zoltan Varga <vargaz@gmail.com>
6878 * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
6880 * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
6883 * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
6885 * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
6888 * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
6889 way registers are stored in MonoContext on arm.
6891 * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
6892 instead of locking so mono_get_cached_unwind_info () becomes signal safe.
6894 * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
6896 * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
6898 * mini.c (mini_init): Register mono_isfinite.
6900 * jit-icalls.c (mono_isfinite): New jit icall.
6902 * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
6904 * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
6905 set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
6908 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
6910 * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
6911 separate frame and stack pointers, so we must use FP to find the register
6913 The FP reg is retrieved from the MonoContext::regs array.
6915 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
6917 * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
6920 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
6922 * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
6923 return R4 and R8 when not running under softfloat.
6925 Fixes basic-calls.exe
6927 2009-01-30 Zoltan Varga <vargaz@gmail.com>
6929 * mini-arm.c: Implement some overflow opcodes.
6931 2009-01-29 Miguel de Icaza <miguel@novell.com>
6933 * ssa.c: handle another alloca.h
6935 * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
6936 PLATFORM_WIN32 for detecting if we have sigaction. Instead use
6937 MONO_ARCH_USE_SIGACTION.
6939 * aot-runtime.c, mini-exceptions.c: Replace platform define with
6942 * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
6944 * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
6945 PPC targets as sigaction does not exist on all platforms, define
6946 this on a per-platform basis.
6948 Instead of erroring out if the platform is not defined, include
6949 mini-ppc-os.h, and expect that the OS specific setting provides
6950 the required information.
6952 2009-01-30 Zoltan Varga <vargaz@gmail.com>
6954 * aot-compiler.c: Fix --enable-minimal=aot.
6956 2009-01-30 Zoltan Varga <vargaz@gmail.com>
6958 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
6961 2009-01-29 Zoltan Varga <vargaz@gmail.com>
6963 * exceptions-arm.c: Fix warnings.
6965 * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
6968 * mini-x86.c: Fix --enable-minimal=jit build.
6970 * mini.c: Really fix --enable-minimal=jit build.
6972 * mini.c (construct_object_context_for_method): Move this outside
6973 the DISABLE_JIT block to fix the --enable-minimal=jit build.
6975 "Backported" of r124984 from 2.0 branch.
6977 * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
6979 "Backport" of r124977 + r124978 from 2.0 branch.
6981 * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
6982 to avoid calling mono_exception_from_token () from the throw trampoline.
6983 (mono_arch_get_throw_exception_generic): call throw_exception_by_token
6984 for throwing corlib exceptions, this fixes full-aot support for corlib
6987 * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
6989 2009-01-29 Miguel de Icaza <miguel@novell.com>
6991 * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
6992 part of the changes to split the code in mini into operating
6993 system specific files.
6995 This patch was done by copying mini.c to the respective files to
6996 preserve SVN history.
6998 2009-01-29 Zoltan Varga <vargaz@gmail.com>
7000 * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
7002 2009-01-28 Zoltan Varga <vargaz@gmail.com>
7004 * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
7005 remoting-invoke-with-check wrappers of shared methods.
7007 * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
7009 2009-01-27 Mark Probst <mark.probst@gmail.com>
7011 * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
7012 optimization if the top of stack is the last instruction in the
7013 bblock. Otherwise it might have been used after its definition.
7016 2009-01-27 Zoltan Varga <vargaz@gmail.com>
7018 * mini-trampolines.c (mono_magic_trampoline): Print out the caller
7019 method as well when get_vcall_slot () fails to match a code sequence.
7021 * mini-arm.c: Fix the android build, which doesn't have
7024 2009-01-26 Zoltan Varga <vargaz@gmail.com>
7026 * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
7029 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
7031 * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
7033 2009-01-26 Zoltan Varga <vargaz@gmail.com>
7035 * mini.c (mini_method_compile): Save the unwind info generated by the JIT
7036 and put its id into jinfo->used_regs. This is only used on amd64,
7037 which is currently the only platform generating unwind info.
7039 * exceptions-amd64.c: Instead of unwinding based on a register mask, use
7040 the dwarf unwinder. This is required to correctly handle async exceptions
7041 like thread abort and stack overflows, which can happen while a method
7042 is in the middle of its prolog or epilog.
7044 * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
7045 the unwind info belonging to an AOTed method.
7047 * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
7048 into cfg->unwind_ops.
7050 * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
7052 * mini.c (mini_init): Call mono_unwind_init ().
7053 (mini_cleanup): Call mono_unwind_cleanup ().
7055 * unwind.c: Add functions for managing a set of unwind info entries, allowing
7056 unwind info to be shared between methods.
7058 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
7061 * exceptions-amd64.c (mono_arch_exceptions_init): Call
7062 get_throw_pending_exception () to avoid initialization races.
7064 * mini-exceptions.c (mono_exceptions_init): Call an arch specific
7065 mono_arch_exceptions_init () function.
7067 * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
7069 2009-01-25 Zoltan Varga <vargaz@gmail.com>
7071 * mini.c (mono_get_domain_intrinsic): New helper function.
7072 (mono_get_thread_intrinsic): Ditto.
7074 * mini-arm.c mini-ia64.c: Use the new helper functions.
7076 * method-to-ir.c (mono_method_to_ir): Fix the comment for
7077 the last constrained_call change, since it is needed in the non-AOT
7080 * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
7082 * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of
7083 mono_get_lmf_addr () on arm eabi linux.
7085 2009-01-24 Zoltan Varga <vargaz@gmail.com>
7087 * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
7088 code sequence which matches a non-virtual call.
7090 2009-01-23 Mark Probst <mark.probst@gmail.com>
7092 * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
7095 2009-01-23 Zoltan Varga <vargaz@gmail.com>
7097 * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
7098 runtime-invoke wrappers, since they are also shared based on signature.
7100 2009-01-22 Mark Probst <mark.probst@gmail.com>
7102 * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
7103 info from the (correct) context.
7105 2009-01-22 Zoltan Varga <vargaz@gmail.com>
7107 * unwind.c (mono_unwind_frame): Remove a stray g_free ().
7109 * unwind.c (mono_unwind_frame): New function to unwind through a frame
7110 using dwarf unwinding info. Not yet used.
7112 * mini.c (mini_init): When using xdebug, disable freeing of domains.
7114 2009-01-21 Mark Probst <mark.probst@gmail.com>
7116 * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
7119 * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
7120 special case and handle mono_arch_delegate_invoke_impl() returning
7121 function descriptors.
7123 * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
7124 trampolines return function descriptors, too.
7126 2009-01-21 Zoltan Varga <vargaz@gmail.com>
7128 * method-to-ir.c (handle_alloc): Avoid generic instances in the
7129 out_of_line optimization.
7131 2009-01-21 Martin Baulig <martin@ximian.com>
7134 (MonoCompile): Added `disable_deadce_vars' to disable removing
7138 (mini_method_compile): Set `cfg->disable_deadce_vars' when running
7139 inside the debugger.
7141 * liveness.c (mono_analyze_liveness): Don't remove any unused
7142 variables if `cfg->disable_deadce_vars' is set.
7144 2009-01-21 Mark Probst <mark.probst@gmail.com>
7146 * method-to-ir.c: Only apply exception constructor optimization if
7147 the the method actually belongs to an exception class. Fixes
7150 2009-01-21 Zoltan Varga <vargaz@gmail.com>
7152 * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
7153 change inside a #ifdef __mono_ppc64__.
7155 * aot-compiler.c (compile_method): Remove the previous limitation.
7157 * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
7158 on type variables in AOTed code.
7160 * aot-compiler.c (compile_method): Skip generic methods having type
7161 constraints on their generic parameters.
7163 * aot-compiler.c (compile_method): Check for methods which cannot be
7164 encoded inside RGCTX_FETCH patches as well.
7166 * mini-exceptions.c (mono_print_thread_dump): Fix the windows
7169 2009-01-20 Mark Probst <mark.probst@gmail.com>
7171 * method-to-ir.c: Force the vtable variable in shared generic code
7172 for the case that they might show up on a stack trace where they
7175 * mini-exceptions.c: Save and use generic sharing info as well as
7176 IP in stack traces to resolve shared generic instantiations.
7178 2009-01-20 Zoltan Varga <vargaz@gmail.com>
7180 * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
7181 added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
7183 2009-01-20 Mark Probst <mark.probst@gmail.com>
7185 * method-to-ir.c: Do generic sharing for array constructors.
7187 2009-01-20 Rodrigo Kumpera <rkumpera@novell.com>
7189 * mini-exceptions.c (mono_print_thread_dump): Add information
7190 about the thread state using wapi_current_thread_desc.
7192 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
7194 * basic-simd.cs: Tests for the new constructors.
7196 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
7198 * mini-ops.h: Added OP_EXPAND_*
7202 * mini-x86.c (mono_arch_output_basic_block): Same.
7204 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
7206 2009-01-19 Zoltan Varga <vargaz@gmail.com>
7208 * iltests.il.in: Add a test for #467385.
7210 2009-01-18 Rodrigo Kumpera <rkumpera@novell.com>
7212 * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
7213 thread been cleaned up is not the same currently in execution.
7215 Fixes appdomain-unload crashes on windows, osx and linux variants
7216 without the __thread keyword.
7218 2009-01-18 Zoltan Varga <vargaz@gmail.com>
7220 * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
7221 (koush@koushikdutta.com). Implement this for android.
7223 * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
7224 begins with a digit.
7226 * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
7227 mono_marshal_get_write_barrier ().
7229 2009-01-17 Rodrigo Kumpera <rkumpera@novell.com>
7231 * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
7232 of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
7233 that pass them on a register pair.
7235 This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
7236 test was crashing due to that.
7238 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
7240 * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
7241 trampoline code. Include ucontext.h only if available.
7243 2009-01-15 Mark Probst <mark.probst@gmail.com>
7245 * mini.c: mono_domain_lookup_shared_generic() takes an open method
7246 and doesn't check whether it's sharable, like it was before
7247 removing the shared generics hash. This brings IronPython
7248 performance back to what it was before that change.
7250 2009-01-14 Mark Probst <mark.probst@gmail.com>
7252 * method-to-ir.c: Handle delegate invocation optimization earlier,
7253 otherwise it would be handled (much more slowly) by the
7254 final/sealed optimization.
7256 2009-01-13 Zoltan Varga <vargaz@gmail.com>
7258 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
7259 domain is not set. Fixes #465864.
7261 2009-01-12 Mark Probst <mark.probst@gmail.com>
7263 * method-to-ir.c: Don't stop sharing of generic methods with catch
7264 clauses - we already handle those.
7266 2009-01-12 Mark Probst <mark.probst@gmail.com>
7268 * mini.c, mini.h: lookup_generic_method() is now
7269 mono_domain_lookup_shared_generic() and uses the jit_code_hash,
7270 making the shared_generics_hash obsolete.
7272 2009-01-12 Mark Probst <mark.probst@gmail.com>
7274 * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
7275 use the red zone. Make room on the stack first and then use it,
7276 not the other way around.
7278 2009-01-12 Zoltan Varga <vargaz@gmail.com>
7280 * mini.c (mini_init): Call mono_xdebug_init ().
7282 * aot-compiler.c (mono_xdebug_init): Make this non-static.
7284 2009-01-11 Zoltan Varga <vargaz@gmail.com>
7286 * TestDriver.cs: Add an --iter argument to run tests multiple times.
7288 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
7291 * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
7292 debug+unwind info for trampolines.
7294 * mini.c (mono_create_unwind_op): New helper function.
7296 * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
7298 2009-01-10 Zoltan Varga <vargaz@gmail.com>
7300 * aot-compiler.c: Fix the build.
7302 2009-01-09 Zoltan Varga <vargaz@gmail.com>
7304 * Makefile.am: Update dtrace-prelink.sh location.
7306 2009-01-08 Zoltan Varga <vargaz@gmail.com>
7308 * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr
7309 optimization. Fixes #464520.
7311 2009-01-07 Bill Holmes <billholmes54@gmail.com>
7313 * mini-amd64.c : Adding code to save/restore non-volatile registers
7316 * exceptions-amd64.c : Adding code to save/restore non-volatile
7317 registers on Winx64.
7319 Contributed under MIT/X11 license.
7321 2009-01-07 Zoltan Varga <vargaz@gmail.com>
7323 * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
7324 __GNUC_MINOR__ which can break when the major version changes.
7326 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
7328 * basic-simd.cs: Add tests for usage of the sizeof opcode.
7330 2009-01-07 Geoff Norton <gnorton@novell.com>
7332 * helpers.c: Allow mono -v -v -v to work on darwin.
7334 2009-01-05 Bill Holmes <billholmes54@gmail.com>
7336 * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
7339 Contributed under MIT/X11 license.
7341 2009-01-05 Zoltan Varga <vargaz@gmail.com>
7343 * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
7344 instead of directly accessing type->data.klass. Fixes #462016.
7345 (mono_allocate_stack_slots_full): Ditto.
7347 * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio
7348 <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
7350 * aot-compiler.c (emit_plt): Fix ARM build.
7352 2009-01-04 Zoltan Varga <vargaz@gmail.com>
7354 * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
7356 * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
7359 * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
7360 instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
7363 * iltests.il.in: Add a regression test.
7365 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
7367 * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
7369 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
7371 * basic-simd.cs: Add a regression test for #462457.
7373 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
7375 * mini-ops.h: Add a definition of XPHI.
7377 * mini.h (MONO_IS_PHI): Make is aware of simd instrincs.
7379 * ssa.c (op_phi_to_move): Handle XPHI.
7381 * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
7385 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
7387 * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
7389 2008-12-31 Geoff Norton <gnorton@novell.com>
7391 * mini-ppc.c: The prolog size allocated can be too small for darwin
7392 ppc32 under certain circumstances. Also fix a small logic bug.
7394 2008-12-29 Zoltan Varga <vargaz@gmail.com>
7396 * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
7397 while loading AOT methods.
7399 * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
7400 since only the former is nulled out after a successful cast. This prevents
7401 crashes with rethrown exceptions when using --debug=casts.
7403 2008-12-24 Mark Probst <mark.probst@gmail.com>
7405 * mini.h: New macro for checking whether a method is final,
7406 i.e. whether the method or its class is marked final.
7408 * method-to-ir.c: Use the new macro for all final-checks
7409 consistently. Fixes the crash in the System.ServiceModel tests.
7411 2008-12-23 Mark Probst <mark.probst@gmail.com>
7413 * mini-exceptions.c (get_exception_catch_class): Corrected another
7414 overly strict assertion.
7416 2008-12-23 Mark Probst <mark.probst@gmail.com>
7418 * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
7419 Clobbering it is not allowed because the caller might use it as
7420 the vtable register in the interface call.
7422 2008-12-19 Mark Probst <mark.probst@gmail.com>
7424 * mini-exceptions.c (get_exception_catch_class): Corrected an
7425 overly strict assertion.
7427 2008-12-18 Mark Mason <mmason@upwardaccess.com>
7429 * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
7431 * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
7433 * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
7435 * cpu-mips.md: correct lengths for certain long_ opcodes.
7437 * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
7439 * 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().
7441 2008-12-17 Mark Mason <mmason@upwardaccess.com>
7443 * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
7445 2008-12-17 Mark Mason <mmason@upwardaccess.com>
7447 * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
7449 2008-12-16 Rodrigo Kumpera <rkumpera@novell.com>
7451 * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
7454 2008-12-16 Mark Mason <mmason@upwardaccess.com>
7456 * 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
7458 * 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)
7460 2008-12-15 Mark Mason <mmason@upwardaccess.com>
7462 * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
7464 2008-12-14 Zoltan Varga <vargaz@gmail.com>
7466 * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
7467 gshared code. Fixes #458947.
7469 * generics.cs: Add a test.
7471 2008-12-12 Mark Mason <mmason@upwardaccess.com>
7473 * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7475 * mini-mips.c: first pass n32 code generation.
7477 * mini-mips.h: datatypes and defines for n32 support.
7479 * exceptions-mips.c: first pass n32 code generation.
7481 * tramp-mips.c: first pass n32 code generation.
7483 * cpu-mips.md: add long_ opcodes.
7485 2008-12-12 Mark Mason <mmason@upwardaccess.com>
7487 * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7489 * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7491 * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7493 * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7495 * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7497 * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7499 * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7501 * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7503 * helpers.c: for mips/n32, don't pass -mips32 to objdump
7505 2008-12-12 Zoltan Varga <vargaz@gmail.com>
7507 * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
7509 2008-12-12 Andres G. Aragoneses <aaragoneses@novell.com>
7511 * driver.c: Sync --help-trace with man page (EXPR,EXPR).
7513 2008-12-12 Mark Probst <mark.probst@gmail.com>
7515 * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
7516 descriptors for helper functions directly in front of the code.
7518 2008-12-11 Mark Probst <mark.probst@gmail.com>
7520 * method-to-ir.c: Removed an unnecessary assertion.
7522 2008-12-10 Zoltan Varga <vargaz@gmail.com>
7524 * method-to-ir.c: Merge SGEN changes from the old JIT.
7526 2008-12-10 Zoltan Varga <vargaz@gmail.com>
7528 * driver.c (compile_all_methods_thread_main): Handle failure of
7531 2008-12-10 Mark Probst <mark.probst@gmail.com>
7533 * mini-ppc.c: Merged with mini-ppc64.c.
7535 * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
7537 * Makefile.am: Use the same sources for PPC and PPC64.
7539 * mini-ppc64.c: Removed.
7541 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
7543 * branch-opts.c (remove_block_if_useless): Extract fall through detection
7544 code to mono_bb_is_fall_through.
7546 * branch-opts.c (mono_remove_critical_edges): Same.
7548 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
7550 * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
7551 expect that an OP_BR_REG will be there.
7553 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
7555 * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
7556 for the many branch ops. The original check miss OP_BR_REG.
7560 2008-12-09 Mark Mason <mmason@upwardaccess.com>
7562 * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
7564 2008-12-09 Zoltan Varga <vargaz@gmail.com>
7566 * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
7567 while holding the aot lock.
7569 2008-12-09 Mark Mason <mmason@upwardaccess.com>
7571 * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
7573 2008-12-09 Bill Holmes <billholmes54@gmail.com>
7575 * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws
7576 to release all runtime callable wrappers held by the runtime.
7578 Contributed under MIT/X11 license.
7580 2008-12-09 Bill Holmes <billholmes54@gmail.com>
7582 * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
7585 Contributed under MIT/X11 license.
7587 2008-12-09 Zoltan Varga <vargaz@gmail.com>
7589 * aot-runtime.c (decode_exception_debug_info): Acquire the domain
7590 lock when calling mono_domain_alloc (). Hopefully fixes #415608.
7592 2008-12-09 Mark Mason <mmason@upwardaccess.com>
7594 * cpu-mips.md: fix ckfinite length
7596 * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
7597 (mono_arch_lowering_pass): cleanup, rearrange for clarity
7598 (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
7600 2008-12-08 Mark Mason <mmason@upwardaccess.com>
7602 * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
7604 2008-12-08 Geoff Norton <gnorton@novell.com>
7606 * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
7607 size by 8 bytes as well.
7609 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
7611 * basic-simd.cs: Fix method names for Vector16b.
7613 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
7615 * basic-simd.cs: Fix method names for Vector16sb.
7617 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
7619 * basic-simd.cs: Fix method names for Vector8us.
7621 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
7623 * basic-simd.cs: Fix method names for Vector8s.
7625 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
7627 * basic-simd.cs: Fix method names for Vector4ui.
7629 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
7631 * basic-simd.cs: Fix method names for Vector2l.
7633 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
7635 * basic-simd.cs: Fix method names for Vector2d.
7637 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
7639 * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
7640 that are extension methods.
7642 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
7644 * basic-simd.cs: Fix method names for Vector4f.
7646 2008-12-08 Zoltan Varga <vargaz@gmail.com>
7648 * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
7649 as such. Fixes #456669.
7651 2008-12-07 Mark Mason <mmason@upwardaccess.com>
7653 * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
7655 2008-12-07 Mark Mason <mmason@upwardaccess.com>
7657 * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
7658 (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
7659 (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
7660 (mips_adjust_stackframe): handle FP spills
7662 * mini-ops.h: add mips_mtc1_s2
7664 * cpu-mips.md: add mips_mtc1_s2
7666 2008-12-07 Zoltan Varga <vargaz@gmail.com>
7668 * unwind.c: New file, move the unwind info encoding functions here from
7669 aot-compiler.c, so they could be used at runtime too.
7671 2008-12-05 Mark Mason <mmason@upwardaccess.com>
7673 * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
7674 (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
7676 2008-12-05 Mark Mason <mmason@upwardaccess.com>
7678 * mini-mips.c: cleanup warnings
7679 (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
7680 (mips_adjust_stackframe): handle case of taking the address of stack locals
7682 2008-12-05 Zoltan Varga <vargaz@gmail.com>
7684 * aot-compiler.c: Implement a few functions missing from the asm writer.
7685 (emit_method_code): Only write symbols for methods when using the bin
7686 writer, since the assembler can't deal with the characters in our method
7689 * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
7691 * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
7694 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
7695 a bit to also restore %rax.
7697 2008-12-05 Mark Probst <mark.probst@gmail.com>
7699 * mini-ppc.c: Some simple merges from mini-ppc64.c.
7701 2008-12-05 Zoltan Varga <vargaz@gmail.com>
7703 * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
7706 2008-12-05 Mark Probst <mark.probst@gmail.com>
7708 * exceptions-ppc.c: Merged with exceptions-ppc64.c.
7710 * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
7711 MONO_ARCH_FRAME_ALIGNMENT. Struct for PPC64 function descriptors.
7713 * exceptions-ppc64.c: Removed.
7715 * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
7717 2008-12-05 Mark Probst <mark.probst@gmail.com>
7719 * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
7722 * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
7724 * tramp-ppc64.c: Removed.
7726 2008-12-05 Zoltan Varga <vargaz@gmail.com>
7728 * aot-compiler.c (add_generic_instances): Skip non-generic classes in
7731 2008-12-05 Mark Probst <mark.probst@gmail.com>
7733 * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
7735 * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
7736 mini-ppc.h instead of mini-ppc64.h.
7738 * mini-ppc64.h: Removed.
7740 2008-12-04 Mark Mason <mmason@upwardaccess.com>
7742 * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
7744 * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
7746 2008-12-05 Mark Probst <mark.probst@gmail.com>
7748 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
7749 Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
7752 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
7754 * basic-simd.cs: Tests for operator == and != on Vector8us and Vector16b.
7756 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
7758 * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
7760 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
7762 * basic-simd.cs: Tests for operator == and != on Vector4f.
7764 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
7766 * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
7768 * simd-intrinsics.c: Kill useless enum.
7770 2008-12-04 Mark Mason <mmason@upwardaccess.com>
7772 * cpu-mips.md: add long_conv_to_ovf_i4_2
7773 * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
7775 2008-12-04 Mark Mason <mmason@upwardaccess.com>
7777 * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
7779 * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
7781 2008-12-04 Mark Mason <mmason@upwardaccess.com>
7783 * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
7785 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
7787 * basic-simd.cs: Add tests for new methods.
7789 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
7791 * simd-intrinsics.c: Add support for operator == and !=
7794 * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
7796 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
7798 * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
7800 2008-12-04 Zoltan Varga <vargaz@gmail.com>
7802 * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
7804 * mini.c (mono_resolve_patch_target): Allow pinvoke methods in
7805 MONO_PATCH_INFO_ICALL_ADDR.
7807 * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
7809 * aot-compiler.c: Resurrect full-aot support.
7811 2008-12-04 Mark Mason <mmason@upwardaccess.com>
7813 * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
7815 2008-12-04 Mark Mason <mmason@upwardaccess.com>
7817 * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
7819 2008-12-03 Rodrigo Kumpera <rkumpera@novell.com>
7821 * basic-simd.cs: Fix tests to work under ppc.
7822 Remove tests for methods that will be removed.
7824 2008-12-03 Mark Probst <mark.probst@gmail.com>
7826 * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
7827 generic type (via a typedef or typeref) correctly.
7829 2008-12-03 Zoltan Varga <vargaz@gmail.com>
7831 * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
7832 diagnose an assertion failure.
7834 2008-12-02 Mark Probst <mark.probst@gmail.com>
7836 * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
7837 Fix trampoline size.
7839 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
7840 conversion opcodes are implemented natively instead via emulation.
7842 2008-12-01 Mark Mason <mmason@upwardaccess.com>
7844 * cpu-mips.md: remove mips_xori
7846 * mini-ops.h: remove mips_xori
7848 * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
7850 * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
7852 * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
7854 2008-12-01 Mark Mason <mmason@upwardaccess.com>
7856 * cpu-mips.md: fix instruction lengths.
7858 * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
7860 * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
7862 * mini-ops.h: fix slti / sltiu op profiles.
7864 2008-12-02 Martin Baulig <martin@ximian.com>
7866 * method-to-ir.c (mono_method_to_ir): Disable debugging
7867 information for the init locals block to make the debugger stop
7868 after all locals have been initalized.
7870 2008-12-02 Martin Baulig <martin@ximian.com>
7872 * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
7873 running inside the debugger.
7875 2008-12-01 Zoltan Varga <vargaz@gmail.com>
7877 * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
7880 * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the
7881 alu->alu imm optimization which only shows if deadce is disabled.
7883 * aot-compiler.c: Rename the function names for the binary and asm writers
7884 so they can coexist in the same process. Rework the xdebug code to use the
7885 asm writer. This avoids the need to call into the runtime to dump the
7886 debugging info. Add more debugging info for types.
7888 * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
7890 * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
7891 cpu description tables, they can't occur in cpu-<ARCH>.md.
7893 * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
7894 the stack in CEE_LDFLDA. Fixes #450542.
7896 * generics.cs: Add a new test.
7898 2008-12-01 Mark Mason <mmason@upwardaccess.com>
7900 * mini-ops.h: updated MIPS opcodes
7901 * mini-mips.c: decompose long opts
7902 * mini-mips.h: decompose long opts
7904 2008-11-29 Mark Mason <mmason@upwardaccess.com>
7906 * cpu-mips.md: fix length on int_rem_un
7907 * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
7909 2008-11-29 Zoltan Varga <vargaz@gmail.com>
7911 * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
7913 * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
7915 2008-11-29 Martin Baulig <martin@ximian.com>
7917 * mini-exceptions.c (mono_handle_native_sigsegv): Check
7918 mono_debug_using_mono_debugger() in addition to the
7919 `no_gdb_backtrace' flag in the `MonoDebugOptions'.
7921 2008-11-28 Mark Mason <mmason@upwardaccess.com>
7923 * mini-ops.h: updated more MIPS opcodes
7924 * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
7925 * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
7927 2008-11-28 Mark Probst <mark.probst@gmail.com>
7929 * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
7931 2008-11-28 Mark Mason <mmason@upwardaccess.com>
7933 * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
7934 * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
7935 * mini-ops.h: correct selected mips opcode entries
7937 2008-11-28 Mark Probst <mark.probst@gmail.com>
7939 * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
7942 2008-11-28 Mark Probst <mark.probst@gmail.com>
7944 * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
7946 2008-11-28 Mark Mason <mmason@upwardaccess.com>
7948 * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
7949 * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
7950 * mini-mips.h: disable IMT
7951 * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
7953 2008-11-28 Mark Probst <mark.probst@gmail.com>
7955 * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
7957 2008-11-28 Mark Probst <mark.probst@gmail.com>
7959 * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
7961 2008-11-28 Zoltan Varga <vargaz@gmail.com>
7963 * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
7966 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
7968 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
7969 for Set/GetVector aligned versions.
7971 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
7973 * basic-simd.cs: Add tests for Get/SetVector.
7975 2008-11-27 Mark Probst <mark.probst@gmail.com>
7977 * mini.c: Removed g_slist_append_mempool(). Now in
7980 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
7982 * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
7983 size properly and make the bounds check optional.
7985 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
7986 for SetVector and IsAligned.
7988 2008-11-27 Zoltan Varga <vargaz@gmail.com>
7990 * mini.c: Remove unused mono_normalize_opcodes () function.
7992 2008-11-26 Mark Probst <mark.probst@gmail.com>
7994 * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
7995 using the new atomic add ops now.
7997 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
8000 2008-11-26 Mark Probst <mark.probst@gmail.com>
8002 * mini-ppc64.c: Several fixes.
8004 2008-11-25 Mark Mason <mmason@upwardaccess.com>
8006 * cpu-mips.md: added jump_table
8007 * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.
8009 2008-11-25 Mark Mason <mmason@upwardaccess.com>
8011 * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
8013 2008-11-25 Mark Mason <mmason@upwardaccess.com>
8015 * mini-ops.h: corrected a handful of MIPS opcodes.
8017 2008-11-25 Mark Mason <mmason@upwardaccess.com>
8019 * aot-compiler.c: MIPS to use ELF writer
8021 2008-11-25 Mark Mason <mmason@upwardaccess.com>
8023 * mini-codegen.c: remove MIPS specific assert.
8025 2008-11-25 Mark Probst <mark.probst@gmail.com>
8027 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
8028 fixes. PPC64 now passes most of the runtime regressions.
8030 2008-11-24 Zoltan Varga <vargaz@gmail.com>
8032 * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
8033 volatile intervals a bit.
8035 2008-11-24 Mark Probst <mark.probst@gmail.com>
8037 * basic-long.cs: New test case.
8039 2008-11-23 Zoltan Varga <vargaz@gmail.com>
8041 * mini.c (mini_method_compile): Disable globalra for large methods for
8044 * regalloc2.c (order_moves): Add fp support.
8046 * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
8047 source bblock ends with an OP_BR_REG.
8049 * ratests.cs: Add a new test.
8051 2008-11-23 Mark Probst <mark.probst@gmail.com>
8053 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
8054 sharing. PPC64 now passes generics.exe.
8056 2008-11-23 Mark Probst <mark.probst@gmail.com>
8058 * mini-ppc64.c: Several fixes. PPC64 now runs iltests.exe.
8060 2008-11-23 Zoltan Varga <vargaz@gmail.com>
8062 * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
8063 memory when mono_jit_info_table_find () can't find the method in the
8066 * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
8069 * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
8072 2008-11-23 Mark Probst <mark.probst@gmail.com>
8074 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
8075 Several fixes. PPC64 now runs exceptions.exe and
8076 devirtualization.exe.
8078 2008-11-22 Mark Probst <mark.probst@gmail.com>
8080 * mini-ppc64.c, tramp-ppc64.c: Small fixes. PPC64 now runs
8081 arrays.exe and basic-math.exe.
8083 2008-11-22 Mark Probst <mark.probst@gmail.com>
8085 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
8086 cpu-ppc64.md: Several fixes. PPC64 now runs objects.exe.
8088 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
8090 * simd-intrinsics.c: Add support ArrayExtension intrinsics.
8092 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
8094 * method-to-ir.c: Move bounds checking macros to ir-emit.h
8096 * ir-emit.h: Move macros from method-to-ir.c to here.
8098 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
8100 * mini-ops.h: Correct the long simd ops to use LREG.
8102 2008-11-21 Zoltan Varga <vargaz@gmail.com>
8104 * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
8106 * mini-ops.h: Correct the dreg type of a few long opcodes.
8108 * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
8111 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
8113 * mini-ppc.c: remove negative stack references in epilog
8114 for platforms that don't support the red zone.
8116 2008-11-21 Mark Probst <mark.probst@gmail.com>
8118 * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
8119 point regs. Now PPC64 passes basic-calls.exe.
8121 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
8123 * basic-simd.cs: Add tests for accessors of Vector2l.
8125 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
8127 * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
8129 * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
8131 * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
8133 2008-11-21 Mark Probst <mark.probst@gmail.com>
8135 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes. Now
8136 PPC64 passes basic-long.exe.
8138 2008-11-20 Mark Probst <mark.probst@gmail.com>
8140 * decompose.c: Decompose carry and overflow add on PPC64 like on
8141 other 64 bit archs. Don't decompose sub at all on PPC64.
8143 * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
8144 Several fixes and new opcodes. Now PPC64 runs (but doesn't pass)
8147 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
8149 * basic-simd.cs: Add tests for accessors of Vector2d.
8151 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
8153 * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
8157 * mini-x86.c (mono_arch_output_basic_block): Same.
8159 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
8161 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
8163 * basic-simd.cs: Add tests for accessors of Vector4f.
8165 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
8167 * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
8171 * mini-x86.c (mono_arch_output_basic_block): Same.
8173 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
8175 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
8177 * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
8179 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
8181 * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
8185 * mini-x86.c (mono_arch_output_basic_block): Same.
8187 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
8189 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
8191 * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
8193 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
8195 * simd-intrinsics.c: Enable setters for Vector16sb.
8197 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
8199 * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
8203 * mini-x86.c (mono_arch_output_basic_block): Same.
8205 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
8207 2008-11-19 Rodrigo Kumpera <rkumpera@novell.com>
8209 * simd-intrinsics.c: Implement setter for Vector8us.
8211 2008-11-19 Zoltan Varga <vargaz@gmail.com>
8213 * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
8216 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
8218 * mini-ppc.c: remove references to the red zone in the prolog
8219 (for systems that don't support it).
8221 2008-11-19 Mark Probst <mark.probst@gmail.com>
8223 * cpu-ppc64.md: Fixed a few instruction lengths.
8225 * mini-ppc64.c: Don't emit SETLRET. PPC64 passes basic-float.exe,
8228 2008-11-19 Mark Probst <mark.probst@gmail.com>
8230 * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes. PPC64 passes
8233 2008-11-19 Zoltan Varga <vargaz@gmail.com>
8235 * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
8237 2008-11-18 Rodrigo Kumpera <rkumpera@novell.com>
8239 * mini-ops.h: Added OP_INSERT_I2.
8243 * mini-x86.c (mono_arch_output_basic_block): Same.
8245 * simd-intrinsics.c: Implement setter for Vector8s.
8247 * simd-methods.h: Add the names of get setters of Vector8s.
8249 2008-11-18 Zoltan Varga <vargaz@gmail.com>
8251 * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
8253 * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
8256 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
8258 2008-11-18 Mark Probst <mark.probst@gmail.com>
8260 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
8261 for PPC64. An empty program runs now.
8263 2008-11-18 Zoltan Varga <vargaz@gmail.com>
8265 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
8267 * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
8268 a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
8269 info for JITted code is emitted into a shared library, loadable into gdb.
8271 2008-11-18 Mark Probst <mark.probst@gmail.com>
8273 * Makefile.am: Changes to build PPC64.
8275 * mini-arch.h: Include mini-ppc64.h on PPC64.
8277 2008-11-18 Mark Probst <mark.probst@gmail.com>
8279 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
8280 in PPC code up to r119147.
8282 2008-11-18 Mark Probst <mark.probst@gmail.com>
8284 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
8285 cpu-ppc64.md: Changes for PPC64.
8287 Based on code submitted by andreas.faerber@web.de at
8288 https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
8291 2008-11-18 Mark Probst <mark.probst@gmail.com>
8293 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
8294 cpu-ppc64.md: Copied from the corresponding PPC files from
8297 2008-11-18 Scott Peterson <lunchtimemama@novell.com>
8299 * mini-ops.h: Added OP_ROUND.
8301 * cpu-x86.md: Added round.
8303 * mini-x86.c: Added support for intrinsicing Math.Round (double).
8305 * basic-math.cs: Added test_0_round to test rounding.
8307 Contributed under MIT/X11 license.
8309 2008-11-17 Bill Holmes <billholmes54@gmail.com>
8311 * aot-compiler.c : Fix the Winx64 build.
8313 Contributed under MIT/X11 license.
8315 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
8317 * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
8318 in OP_EXTRACT_R8 to avoid possible stack corruption.
8320 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
8322 * mini-ops.h: Added OP_EXTRACT_R8/I8.
8324 * cpu-x86.md: Added extract_r8.
8326 * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
8328 * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
8329 a couple of OP_EXTRACT_I4.
8331 * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
8333 * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
8335 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
8337 * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
8340 2008-11-17 Zoltan Varga <vargaz@gmail.com>
8342 * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
8343 trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
8345 * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
8346 are not needed any more.
8348 * mini.h: Remove the unused INS_LIST macros.
8350 * mini.c (mini_method_compile): Remove a disable globalra case which is no
8353 * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
8356 * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
8357 mono_alloc_ireg () instead.
8359 * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
8362 * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
8365 * aot-runtime.c (load_aot_module): Disable AOT when running under
8368 * mini-amd64.h: Change the monitor fastpath defines to check for
8369 !PLATFORM_WIN32 so they work on *bsd too.
8371 * mini.h mini.c mini-hhpa.c: Remove more unused code.
8373 * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
8375 * mini.h (MonoCompile): Remove new_ir flag.
8377 * regalloc.h regalloc.c: Remove unused code.
8379 * cpu-*.md: Remove more unused opcodes.
8381 * simple-cee-ops.h simple-mini-ops.h: Removed.
8383 * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
8385 2008-11-17 Zoltan Varga <vargaz@gmail.com>
8387 * aliasing.h: Removed.
8389 * *.c: Remove references to aliasing.h and inssel.h.
8391 * mini.c: Remove additional unused functions.
8393 * mini-ops.h cpu-*.md: Remove unused opcodes.
8395 2008-11-16 Zoltan Varga <vargaz@gmail.com>
8397 Remove the old JIT code.
8399 * inssel*.brg: Removed.
8401 * ssa.c abcremoval.c aliasing.c: Removed.
8403 * ssa2.c: Renamed to ssa.c.
8405 * abcremoval2.c: Renamed to abcremoval.c.
8407 * *.c: Removed all !cfg->new_ir code.
8409 * mini-<ARCH>.c: Removed mono_arch_call_opcode (),
8410 mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
8412 * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
8414 2008-11-16 Zoltan Varga <vargaz@gmail.com>
8416 * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
8417 to simplify the code and cut back on the number of global symbols in the AOT
8420 * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
8422 2008-11-15 Zoltan Varga <vargaz@gmail.com>
8424 * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
8425 with the got/got_info tables.
8427 * mini.h: Bump AOT file format version.
8429 * unwind.h: New file, contains definitions for stack unwinding.
8431 * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
8434 * aot-compiler.c: Generalize the emitting of unwind information to use the
8435 information in cfg->unwind_ops.
8437 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
8439 * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
8440 AOT method frames. Enable writing symbols for methods by default.
8442 2008-11-14 Rodrigo Kumpera <rkumpera@novell.com>
8444 * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
8445 and make it work with vectors of element sizes 1, 2 and 4.
8447 * simd-intrinsics.c: Enable getter for all vectors with element size
8450 * simd-methods.h: Add the names of other getters.
8452 * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
8458 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
8460 * mini-ppc.h: portability fix.
8462 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
8464 * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
8465 buggy and will overwrite it.
8467 2008-11-14 Zoltan Varga <vargaz@gmail.com>
8469 * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
8470 Use it to emit local symbols for all methods so AOTed methods show up with
8471 their full name in gdb/valgrind output.
8473 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
8475 * mini-ppc.c: portability fixes.
8477 2008-11-14 Zoltan Varga <vargaz@gmail.com>
8479 * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
8480 entries out of the if (!generic_shared...) code so it is always done.
8481 (mono_class_init_trampoline): Do the patching when running under valgrind
8482 too, newer versions of valgrind have no problems with it.
8484 2008-11-13 Zoltan Varga <vargaz@gmail.com>
8486 * aot-compiler.c (emit_writeout): Rework this to make it easier to add
8489 2008-11-13 Mark Probst <mark.probst@gmail.com>
8491 * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
8494 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
8496 * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui.
8498 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
8500 * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
8506 * simd-intrinsics.c: Same.
8508 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
8510 * simd-intrinsics.c: Enable constructor intrinsics for all types.
8512 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
8514 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
8515 to work with more Vector types.
8517 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
8519 * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
8520 store the elemens directly instead of using and intermediate.
8522 2008-11-13 Zoltan Varga <vargaz@gmail.com>
8524 * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
8526 * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
8527 to preserve %eax for aot plt trampolines.
8529 * aot-compiler.c (compile_method): Don't skip synchronized methods.
8530 (encode_method_ref): Flag synchronized methods so they won't go through
8533 * aot-compiler.c: Additional work to support AOTing synchronized methods/
8536 * cpu-ia64.md (jmp): Increase max length.
8538 2008-11-12 Zoltan Varga <vargaz@gmail.com>
8540 * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
8541 open generic classes.
8543 * aot-compiler.c: Enable the ELF writer on ELF platforms.
8545 * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
8546 box+brtrue optimization since it causes test failures on x86.
8548 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
8550 * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
8556 * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
8557 for simd ctor values.
8559 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
8560 instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
8562 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
8564 * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
8567 * simd-instrincs.c: Same.
8569 * basic-simd.cs: Same.
8571 2008-11-12 Zoltan Varga <vargaz@gmail.com>
8573 * ratests.cs: Add more tests.
8575 * regalloc2.c (add_spill_code): Handle more corner cases.
8577 2008-11-11 Zoltan Varga <vargaz@gmail.com>
8579 * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
8580 (update_liveness): Avoid holes in the liveness ranges of hregs if they are
8581 both the source an destination of an instruction.
8583 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
8585 * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
8586 wapihandles.c: more portability changes.
8588 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
8590 * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
8591 * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
8592 safe to execute in a signal handler and the kernel provides better
8593 the info in /proc/self/smaps. Avoid the assert on sigaction during
8596 2008-11-11 Zoltan Varga <vargaz@gmail.com>
8598 * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
8599 do the bblock linking hack if it is actually needed.
8601 * Makefile.am (patch-libtool): New helper target to patch libtool to speed
8604 * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
8605 crash problem is fixed.
8607 * branch-opts.c (mono_remove_critical_edges): Link up newly added
8610 * mini.c (mini_method_compile): Compute unreachable bblocks properly even
8612 (mini_method_compile): Set the starting value of next_vreg to
8613 MAX_IREGS + MAX_FREGS when using globalra.
8615 * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
8616 filter clauses with BB_EXCEPTION_HANDLER.
8618 * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
8620 2008-11-10 Mark Probst <mark.probst@gmail.com>
8622 * mini-x86.c (mono_arch_get_argument_info): Don't align argument
8623 space for stdcall. Fixes regressions on Win32.
8625 2008-11-10 Zoltan Varga <vargaz@gmail.com>
8627 * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
8629 (linear_scan): Remove an assert which doesn't seem to be needed.
8631 * local-propagation.c (mono_local_deadce): Avoid a call to
8632 MONO_DELETE_INS which would screw up the instruction linking.
8634 * mini.c (mono_decompose_op_imm): Make this work with globalra.
8636 * regalloc2.c: Upgrade to work the current JIT code.
8638 2008-11-09 Zoltan Varga <vargaz@gmail.com>
8640 * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
8643 * aot-runtime.c: Remove some dead code.
8645 * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
8647 (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
8649 * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
8650 trampolines using sscanf since atoi doesn't work on large unsigned values.
8652 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full):
8653 Initialize code_size.
8655 2008-11-08 Mark Probst <mark.probst@gmail.com>
8657 * method-to-ir.c (mini_emit_inst_for_method): Make
8658 Interlocked.CompareExchange work for Int arguments on 32 bit
8661 2008-11-07 Mark Probst <mark.probst@gmail.com>
8663 * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
8665 2008-11-06 Bill Holmes <billholmes54@gmail.com>
8667 * main.c Fix MSVC build.
8669 Contributed under MIT/X11 license.
8671 2008-11-06 Mark Probst <mark.probst@gmail.com>
8673 * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
8674 alignment larger than 8 bytes are aligned correctly, too.
8676 * mini.c: Honor the min_align field of MonoClass when laying out
8679 2008-11-06 Zoltan Varga <vargaz@gmail.com>
8681 * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
8683 * aot-compiler.c (emit_plt): Fix a warning.
8685 * aot-compiler.c: Implement ARM support in the binary writer.
8687 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
8689 * basic-simd.cs: Add test for getter with byref arg.
8690 Fix the naming of a few tests.
8691 Add missing checks to a test.
8693 2008-11-05 Zoltan Varga <vargaz@gmail.com>
8695 * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
8697 * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
8698 most of the full-aot support for monitor enter/exit trampolines.
8700 * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
8701 enter/exit trampoline creation functions.
8703 * Makefile.am: Fix the generation of buildver.h so it is not invoked during
8706 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
8708 * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
8709 incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
8710 implement the needed functionality without adding crap to the runtime.
8712 2008-11-05 Zoltan Varga <vargaz@gmail.com>
8714 * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
8717 * mini.c (mono_build_date): New global version holding the build date in
8720 * Makefile.am (buildver.c): Generate a file containing the build date.
8722 * main.c: Set the build date from the generated file.
8724 * mini.c (mono_get_runtime_build_info): New helper function returning build
8725 information in a string format.
8727 * driver.c (mono_main): Print the build date in --version.
8729 * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
8730 file when the bind-to-runtime-version option is used.
8732 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
8734 * simd-intrinsics.c: Fix bug when using getters and byref args.
8736 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
8738 * simd-methods.h: Rename prefetch methods.
8740 * simd-intrinsics.c: Same.
8742 2008-11-05 Mark Probst <mark.probst@gmail.com>
8744 * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
8747 2008-11-04 Zoltan Varga <vargaz@gmail.com>
8749 * aot-compiler.c: Use the bundled elf header files instead of depending on
8752 * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
8755 * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
8758 2008-11-04 Rodrigo Kumpera <rkumpera@novell.com>
8760 * cpu-x86.md: Add store nta ops.
8766 * mini.h: Add an enum for simd prefetch modes.
8768 * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
8769 of store. Use the changed code to support store nta.
8771 * simd-intrinsics.c: Add prefetch ops for all vector types.
8773 2008-11-04 Zoltan Varga <vargaz@gmail.com>
8775 * aot-compiler.c: Add an option for JIT compiling the methods by multiple
8778 * aot-compiler.c: Use statically allocated buffers for constructing symbol
8781 * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
8784 2008-11-04 Mark Probst <mark.probst@gmail.com>
8786 * mini-x86.c: Fixed commit.
8788 2008-11-04 Zoltan Varga <vargaz@gmail.com>
8790 * aot-compiler.c (emit_plt): Align the plt section only on x86.
8792 2008-11-04 Mark Probst <mark.probst@gmail.com>
8794 * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
8795 and MONITOR_EXIT, for the ASM fastpaths.
8797 * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
8800 * mini.c, patch-info.h: Signature and patch infos for
8801 Monitor.Enter/Exit trampolines.
8803 * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
8805 * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
8806 Monitor.Enter/Exit ASM fastpath for Linux.
8808 2008-11-04 Zoltan Varga <vargaz@gmail.com>
8810 * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
8812 * objects.cs: Add a new test.
8814 * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
8816 * aot-runtime.c (load_method): Run class initialization in the PLT case even
8817 if MONO_LOG_LEVEL is set.
8819 * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
8821 * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
8823 * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
8825 * aot-compiler.c: Change the relocation code to use virtual addresses instead
8826 of file offsets. Align the sections belonging to the data segment to
8829 2008-11-03 Zoltan Varga <vargaz@gmail.com>
8831 * aot-compiler.c: Simplify the elf writer by depending on the definitions in
8832 elf.h. Port it to amd64.
8834 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
8836 * driver.c: Enable SIMD by default.
8838 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
8840 * cpu-x86.md: Add prefetch op.
8846 * mini.h: Add an enum for simd prefetch modes.
8848 * simd-methods.h: Add prefetch function names.
8850 * simd-intrinsics.c: Add prefetch ops for all vector types.
8852 2008-11-03 Zoltan Varga <vargaz@gmail.com>
8854 * aot-compiler.c (emit_bytes): Speed this up a little.
8856 2008-11-02 Zoltan Varga <vargaz@gmail.com>
8858 * aot-compiler.c: Add JIT time etc. statistics.
8860 * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
8862 * mini.h (MonoCompile): Add 'got_offset' field.
8864 * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
8865 method_got_offsets array.
8867 * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
8870 * aot-compiler.c (compile_method): Add generic method instances referenced
8871 by the method to the list of methods to be compiled, this is required so if
8872 A<T> references B<T>, and another assembly references A<int>, then it will
8873 also get a copy of B<int>.
8875 * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
8876 when checking for monitor enter/exit.
8878 2008-10-30 Mark Probst <mark.probst@gmail.com>
8880 * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
8881 for Monitor.Enter and Monitor.Exit if enabled.
8883 * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
8886 2008-10-30 Zoltan Varga <vargaz@gmail.com>
8888 * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
8889 of an OP_MOVE. Fixes #440046.
8891 * basic-long.cs: Add a new test.
8893 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
8895 * mini.h: Add synchronization note for the managed counter-part.
8897 * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
8898 returns the simd caps of the current cpu.
8900 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
8902 * basic-simd.cs: Remove Console.WriteLine.
8904 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
8906 * basic-simd.cs: New tests for Vector2ul.
8908 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
8910 * simd-intrinsics.c: Add new vector type Vector2ul.
8912 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
8914 * basic-simd.cs: New tests for Vector2l.
8916 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
8918 * cpu-x86.md: Add long version of most packed int ops.
8924 * simd-intrinsics.c: Add new vector type Vector2l.
8926 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
8928 * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
8930 * simd-methods.h: Remove SN_op_BitwiseXor.
8932 2008-10-28 Zoltan Varga <vargaz@gmail.com>
8934 * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
8937 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
8939 * basic-simd.cs: Test for Vector2d.
8941 * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
8944 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
8946 * cpu-x86.md: Add double version of all packed float ops.
8952 * simd-intrinsics.c: Add new vector type Vector2d.
8954 * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
8956 * simd-methods.h: Add Duplicate.
8958 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
8960 * basic-simd.cs: Test for packing with signed saturation.
8962 2008-10-28 Zoltan Varga <vargaz@gmail.com>
8964 * aot-compiler.c (add_generic_instances): Add all methods of generic instances
8965 found in the TYPESPEC table.
8967 2008-10-26 Zoltan Varga <vargaz@gmail.com>
8969 * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
8972 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8974 * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
8975 instead of the RVA, since the RVA can be changed by tools like the cil
8978 * method-to-ir.c (mono_method_to_ir2): Ditto.
8980 * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
8981 (deserialize_variable): Ditto.
8983 2008-10-25 Martin Baulig <martin@ximian.com>
8985 * debug-mini.c (write_variable): Use
8986 `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
8988 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
8990 * cpu-x86.md: Add unsigned variants of packd and packw.
8994 * mini-x86.h: Emit the right instruction for packd and packw.
8995 Add unsigned variants of packd and packw.
8997 * simd-intrinsics.c: Packd and packw were used in place of their
8998 unsigned variants. Change that.
8999 Add intrinsics for (Signed)PackWithSignedSaturation.
9001 * simd-methods.h: Add (Signed)PackWithSignedSaturation.
9003 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
9005 * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
9007 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
9009 * mini-ops.h: Remove dword packed add/sub with saturation ops.
9011 * cpu-x86.md: Remove dword packed add/sub with saturation ops.
9013 * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
9016 * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
9018 2008-10-24 Mark Probst <mark.probst@gmail.com>
9020 * method-to-ir.c, mini.c: Special casing for the synchronized
9021 wrapper for the ldtoken+GetTypeFromHandle case.
9023 2008-10-24 Zoltan Varga <vargaz@gmail.com>
9025 * mini.c (mono_replace_ins): Move this to branch-opts.c.
9027 * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
9028 created/split bblocks.
9030 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
9032 * mini-ops.h: Add packed signed mul high.
9036 * mini-x86.c (mono_arch_output_basic_block): Same.
9038 * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
9040 * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
9042 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
9044 * basic-simd.cs: Tests for Vector16sb.
9046 2008-10-24 Zoltan Varga <vargaz@gmail.com>
9048 * inssel.brg (stmt): Fix OP_HARD_NOP rule.
9050 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
9052 * mini-ops.h: Add packed signed min, max and compare greater.
9056 * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
9059 * simd-methods.h: Add CompareGreaterThan.
9061 * simd-methods.h: Remove CompareEquals.
9063 * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
9065 * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
9067 * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
9070 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
9072 * basic-simd.cs: Fix tests due to change in the API.
9074 2008-10-21 Zoltan Varga <vargaz@gmail.com>
9076 * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
9078 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
9080 * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
9082 * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
9083 inst_offset as this has invalid values for LDADDR.
9085 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
9087 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
9089 * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
9091 2008-10-21 Zoltan Varga <vargaz@gmail.com>
9093 * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
9094 for accessing field->data.
9096 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
9098 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
9100 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
9102 * simd-methods.h: Add SignedPackWithUnsignedSaturation.
9104 * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
9106 2008-10-21 Zoltan Varga <vargaz@gmail.com>
9108 * dominators.c (mono_compute_natural_loops): Allocate GList enties
9109 from the cfg mempool.
9111 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
9113 * basic-simd.cs: Tests for new methods in Vector8us.
9115 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
9117 * mini-ops.h: Add multiply and store high.
9121 * mini-x86.c (mono_arch_output_basic_block): Same.
9123 * simd-methods.h: Same.
9125 * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
9128 2008-10-19 Zoltan Varga <vargaz@gmail.com>
9130 * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
9131 mono_class_setup_vtable ().
9133 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
9134 mono_class_get_vtable_entry () for accessing klass->vtable.
9136 * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
9138 * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
9141 * method-to-ir.c (mono_save_token_info): Don't save references made from
9144 * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
9145 of generic instances.
9147 * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
9149 2008-10-19 Mark Probst <mark.probst@gmail.com>
9151 * cpu-ppc.md, mini-ppc.c: The length of the code generated for
9152 OP_JMP depends on the method signature. Calculate it properly.
9154 2008-10-19 Zoltan Varga <vargaz@gmail.com>
9156 * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
9159 * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
9161 (emit_extra_methods): Add another table mapping method indexes to
9162 offsets in the extra_method_info table.
9164 * mini.h: Bump AOT file format version.
9166 * aot-runtime.c: Merge most of the code from mono_aot_get_method
9167 and mono_aot_get_method_from_token () into one function.
9169 2008-10-19 Mark Probst <mark.probst@gmail.com>
9171 * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
9174 2008-10-18 Zoltan Varga <vargaz@gmail.com>
9176 * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
9179 * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
9182 * mini.c (mono_patch_info_equal): Compare the generic context as well.
9184 * mini.h: Bump aot file format version.
9186 * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
9187 AOT file can contain native code for methods which are not in the METHOD
9188 table. Generate code for non-sharable generic instances of generic methods
9189 found in the METHODSPEC table.
9191 * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
9192 encoding generic type handles.
9194 * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
9195 (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
9197 * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
9198 macros + MONO_ADD_INS.
9200 * mini.c (mono_jump_info_token_new2): New function which takes a generic
9203 * mini.h (MonoJumpInfoToken): Include fields for a generic context.
9205 * mini.h: Bump aot file format version.
9207 * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
9209 2008-10-17 Mark Probst <mark.probst@gmail.com>
9211 * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
9212 platforms, with definable stack alignment value. Set to 16 now
9215 * mini.c, mini.h, driver.c: Command line option for disabling
9218 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
9220 * basic-simd.cs: Tests for new methods in Vector4ui.
9222 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
9224 * mini-ops.h: Add packed int shuffle.
9228 * mini-x86.c (mono_arch_output_basic_block): Same.
9230 * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
9231 extract mask, max, min, shuffle.
9233 * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
9235 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
9237 * basic-simd.cs: Tests for new methods in Vector8us.
9239 2008-10-17 Mark Probst <mark.probst@gmail.com>
9241 * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
9242 RuntimeTypeHandle, not a TypedReference.
9244 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
9246 * simd-intrinsics.c: remove relocations.
9248 2008-10-17 Zoltan Varga <vargaz@gmail.com>
9250 * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM
9251 optimizations from the x86 backend.
9253 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
9255 * simd-methods.h, simd-intrinsics.c: debloat method names and
9256 prepare for no relocations.
9258 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
9260 * mini-ops.h: Add packed min/equal and sum of absolute differences.
9264 * mini-x86.c (mono_arch_output_basic_block): Same.
9266 * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
9267 extract mask, max, min and sum of absolute differences.
9269 * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
9272 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
9274 * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
9275 Renamed one test for consistency.
9277 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
9279 * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
9280 fix to the code that deal with other blocks.
9282 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
9284 * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
9286 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
9288 * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
9289 that deals with vreg interference. Explicitly check for OP_LDADDR to be
9290 able to process the source reg.
9292 2008-10-16 Martin Baulig <martin@ximian.com>
9294 * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
9296 * inssel.brg: Add `OP_HARD_NOP'.
9298 * mini.h (MonoCompile): Added `keep_cil_nops' flag.
9300 * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
9301 `OP_HARD_NOP' instruction when running inside the debugger.
9303 * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
9304 `OP_HARD_NOP' instruction when running inside the debugger.
9306 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
9308 * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
9309 now works. The issue with the regalloc tripping up no longer
9312 * simd-intrinsics.c (load_simd_vreg): Same.
9314 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
9316 * basic-simd.cs: Tests for new Vector8ui methods.
9318 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
9320 * simd-intrinsics.c (get_simd_vreg): Simplify code and test
9321 only for type. This fixes crashes where MonoInst::klass is checked
9322 for ops of type != VTYPE or OBJ.
9324 * simd-intrinsics.c (load_simd_vreg): Same.
9326 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
9328 * mini-ops.h: Add ops for packed shuffle/max/avg and
9333 * mini-x86.c (mono_arch_output_basic_block): Same.
9335 * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
9338 * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
9339 to emit extract mask op.
9341 * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
9342 to emit word shuffles.
9344 2008-10-15 Mark Probst <mark.probst@gmail.com>
9346 * mini.c (mono_allocate_stack_slots_full): Align stack frame to
9347 the largest alignment needed by a variable, but at least
9350 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
9352 * basic-simd.cs: Tests for the fixes in the last commit.
9354 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
9356 * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
9357 no longer handles STACK_PTR input.
9359 * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
9361 * simd-intrinsics.c (load_simd_vreg): New function that works like
9362 get_simd_vreg but handles STACK_PTR input.
9364 * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
9365 as the input can be an arbitrary pointer.
9367 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
9368 LDADDR local optimization directly otherwise use a store op.
9370 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
9372 * basic-simd.cs: Tests for dup low and dup high.
9374 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
9376 * mini-ops.h: Add dup low and dup high ops.
9380 * mini-x86.c (mono_arch_output_basic_block): Same.
9382 * simd-intrinsics.c (vector4f_intrinsics): Same.
9384 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
9386 * basic-simd.cs: Tests for recently added functionality.
9388 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
9390 * mini-ops.h: Add remaining sse1 fp ops.
9392 * cpu-x86.md: Add remaining sse1 fp ops.
9394 * mini-x86.c (mono_arch_output_basic_block): Same.
9396 * mini.h: Add enum for simd FP compare conditions.
9398 * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
9400 * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
9401 so the backed can generate the appropriate op.
9403 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
9404 This patch squeese one more byte from the SimdIntrinsc struct.
9406 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
9407 a a shift amount intead of simply or'ing it.
9409 * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
9411 * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
9412 byte so we can have an aditional flags field without increasing struct size.
9414 * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
9415 against the simd_supported_versions bitmask.
9417 * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
9419 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
9421 * mini.c: remove rawbuffer code (the only use here is unsafe because
9422 it takes locks during signal handling and the kernel now provides much
9423 better info in proc/pid/smaps these days).
9425 2008-10-13 Zoltan Varga <vargaz@gmail.com>
9427 * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
9428 OP_X86_PUSH_OBJ. Fixes #434620.
9430 * objects.cs: Add a test.
9432 2008-10-12 Rodrigo Kumpera <rkumpera@novell.com>
9434 * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
9435 that the packuswb/packusdw don't work with unsigned numbers for what
9436 would be negative numbers in signed format.
9438 * cpu-x86.md: Add doubleword forms of many ops and packing ones.
9439 Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
9441 * mini-ops.h: Add doubleword forms of many ops and packing ones.
9443 * mini-x86.c: Emit doubleword forms of many ops and packing ones.
9445 * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
9447 * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
9449 * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
9452 * simd-intrinsics.c (simd_version_name): New function, returns the name of the
9453 version as the enum in mini.h.
9455 * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
9456 for sse3 ops, check the simd_version field if present. This way the code
9457 works with all versions of sse.
9459 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
9461 * simd-intrinsics.c: Fixed intrinsic name typo.
9463 * mini.h: Added missing simd exported function.
9465 * basic-simd.cs: Added tests for Vector4ui.
9466 Fixed broken test for Vector16b.
9468 2008-10-10 Zoltan Varga <vargaz@gmail.com>
9470 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
9471 the max length to 64.
9473 2008-10-10 Mark Probst <mark.probst@gmail.com>
9475 * method-to-ir.c: Only do the fast virtual generic method call for
9476 non-wrapper methods.
9478 * mini.h, mini-trampolines.c: The new generic virtual remoting
9479 trampoline handles virtual method calls via the vtable (as done by
9480 the fast virtual generic method calls) to remoting proxies.
9482 * mini.c (mono_jit_create_remoting_trampoline): For generic
9483 methods reate a generic virtual remoting trampoline.
9485 * mini-amd64.h: Enable fast virtual generic method calls again.
9487 2008-10-10 Mark Probst <mark.probst@gmail.com>
9489 * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
9490 restore registers when doing tail calls.
9492 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
9494 * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
9497 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
9499 * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
9501 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
9503 * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
9505 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
9507 * basic-simd.cs: Retrofit for API changes.
9509 2008-10-10 Mark Probst <mark.probst@gmail.com>
9511 * mini-ppc.c: Handle integer stack arguments for tail calls.
9513 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
9515 * optflags-def.h: Removed sse3 optimization.
9519 * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
9522 * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
9524 * mini.h: Added enumeration with simd versions.
9526 * simd-intrinsics.c (emit_intrinsics): Use the new static var
9529 * simd-intrinsics.c: Added mono_simd_intrinsics_init.
9531 * mini.c (mini_init): Call mono_simd_intrinsics_init.
9533 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
9535 * basic-simd.cs: Added tests for Vector8u and Vector16u.
9537 * basic-simd.cs: Fixed test naming.
9539 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
9541 * mini-ops.h: Added ops for packed and saturated math, shifts
9542 and packing/unpacking.
9544 * cpu-x86.md: Added descriptors for the above ops.
9546 * mini-x86.c: Added code to emmit the above ops.
9548 * simd-intrinsics.c: Added support for Vector16u and Vector8u.
9550 2008-10-08 Zoltan Varga <vargaz@gmail.com>
9552 * aot-compiler.c (compile_method): Enable AOT for generic code.
9554 * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
9556 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
9558 * mini.c: add a workaround for a common screwup that ends up blamed
9559 to mono (other processes blocking signal delivery).
9561 2008-10-07 Zoltan Varga <vargaz@gmail.com>
9563 * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
9564 in the LDFLD/STFLD opcodes. Fixes #432673.
9566 * iltests.il.in: Add a new test.
9568 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
9570 * mini-arm.c: attach the thread in unmanaged->managed transitions
9571 using delegates (bug #433148).
9573 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
9575 * basic-simd.cs: Use new ShuffleSel constants.
9577 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
9579 * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
9581 * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
9582 only disable simd intrinsics if no sse2 is detected.
9584 * optflags-def.h: Added sse3.
9586 * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
9589 2008-10-07 Zoltan Varga <vargaz@gmail.com>
9591 * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
9592 when adding delegate-invoke wrappers.
9594 2008-10-07 Zoltan Varga <vargaz@gmail.com>
9596 * Makefile.am: Reenable the simd tests.
9598 2008-10-07 Bill Holmes <billholmes54@gmail.com>
9600 * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
9601 add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
9602 other vreg is allocated to that hreg.
9604 Contributed under MIT/X11 license.
9606 2008-10-07 Zoltan Varga <vargaz@gmail.com>
9608 * Makefile.am: Disable the simd tests for now as Mono.Simd is not
9611 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
9613 * basic-simd.cs: New test suite for SIMD intrinsics.
9615 * Makefile.am: Added new tests.
9617 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
9619 * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
9623 * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
9625 * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
9626 using SSE2 aware opcodes.
9628 * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
9629 is enabled, this code path is only reachable if conversion ops are emmited after
9632 * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
9634 This optimization saves 6 bytes per conversion against the old version.
9636 2008-10-06 Zoltan Varga <vargaz@gmail.com>
9638 * aot-compiler.c (compile_method): Don't skip methods referencing
9639 generic methods without a corresponding entry in token_info_hash, since
9640 encode_method_ref () can handle all generic methods now.
9642 * method-to-ir.c (mono_save_token_info): Don't save the token info if a
9643 generic context is set.
9645 * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
9646 generic sharing of LDTOKEN.
9648 2008-10-06 Mark Probst <mark.probst@gmail.com>
9650 * mini-amd64.h: Temporarily disabled fast virtual generic method
9651 calls because it breaks the System.Runtime.Remoting tests.
9653 2008-10-06 Zoltan Varga <vargaz@gmail.com>
9655 * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
9657 * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
9658 so inlining actually works.
9659 (check_inline_caller_method_name_limit): Ditto.
9661 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
9663 * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
9664 64 bit safety (from Olaf Hering and Andreas Farber).
9666 2008-10-06 Zoltan Varga <vargaz@gmail.com>
9668 * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
9669 mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
9670 unused virtual call support code.
9672 * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
9674 * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
9675 which can't use aot trampolines.
9676 (decode_patch): Don't create aot trampolines for methods which can't use
9679 * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
9680 use aot trampolines.
9682 * mini.h: Bump AOT image format version.
9684 2008-10-05 Zoltan Varga <vargaz@gmail.com>
9686 * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
9687 to save_token_info () since cmethod is inflated for constrained calls.
9689 * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
9691 2008-10-04 Andreas Farber <andreas.faerber@web.de>
9693 * Makefile.am: Add build rules for ppc64.
9694 This avoids the build failing at pedump with unresolved symbols
9695 due to lack of arch_sources. Instead it will now fail earlier
9696 due to lack of cpu-ppc64.md.
9698 Contributed under MIT/X11 license.
9700 2008-10-04 Mark Probst <mark.probst@gmail.com>
9702 * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
9705 * iltests.il.in: Add test case for tail call with many arguments.
9707 2008-10-03 Zoltan Varga <vargaz@gmail.com>
9709 * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
9710 to the fast virtual generic method code until the aot case is fixed.
9712 2008-10-03 Mark Probst <mark.probst@gmail.com>
9714 * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
9716 2008-10-03 Mark Probst <mark.probst@gmail.com>
9718 * mini-amd64.c, mini-amd64.h: Implement generic virtual method
9721 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
9723 * simd-intrinsics.c: Forgot to add this one.
9725 * mini-codegen.c: Fix macro in case SIMD is not supported.
9727 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
9729 This patch land initial JIT support for simd intrinsics.
9731 * mini-x86.h: Added new define to make --enable_minimal work on x86.
9733 * Makefile.am: Added simd-intrinsics.c
9735 * simd-intrinsics.c: New file with simd instrinsic related
9738 * cfold.c (mono_constant_fold_ins2): Fold XZERO.
9740 * cpu-x86.md: Add simd related instructions.
9742 * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
9744 * driver.c: Added two new --regression variants.
9746 * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
9748 * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
9750 * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
9751 extract some complicated logic to helper functions.
9753 * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
9755 * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
9757 * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
9758 the specialized simplification pass.
9760 * method-to-ir.c (mono_spill_global_vars): Use new macro.
9762 * mini-codegen.c: Added SIMD constants to all regbanks arrays.
9764 * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
9767 * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
9768 if MONO_ARCH_NEED_SIMD_BANK is defined.
9770 * mini-ops.h: Added the new simd ops.
9772 * mini-x86.c: Added mono_arch_xregname.
9774 * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
9776 * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
9778 * mini-x86.h: Define simd related MONO_ARCH macros.
9780 * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
9782 * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
9784 * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
9785 MONO_CLASS_IS_SIMD to deal with simd related IR.
9787 * mini.h (MonoInst): Added spill_var to the backend union.
9789 * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
9791 * mini.h: Added forward declarations of the new simd fuctions.
9793 * optflags-def.h: Added new optimization names SIMD.
9795 * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
9797 * regalloc.h: Added support for working with 3 register banks.
9799 * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
9801 * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
9803 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
9805 * mini-exceptions.c: remove 64 bit related ifdef clutter.
9807 2008-10-03 Zoltan Varga <vargaz@gmail.com>
9809 * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
9810 instead of one on 64 bit systems.
9812 * method-to-ir.c: Remove unused includes.
9814 2008-10-02 Zoltan Varga <vargaz@gmail.com>
9816 * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
9817 cfg->used_int_regs, since the two are different on arm.
9819 2008-10-02 Mark Probst <mark.probst@gmail.com>
9821 * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
9822 mono_method_get_vtable_index() to get the vtable index.
9824 2008-10-02 Mark Probst <mark.probst@gmail.com>
9826 * method-to-ir.c (mono_method_to_ir2): Don't create native
9827 wrappers for array methods, because they're never called (and if
9828 they were called they wouldn't work).
9830 2008-10-02 Mark Probst <mark.probst@gmail.com>
9832 * method-to-ir.c (mono_method_to_ir2): Array methods are
9833 special-cased and must not be invoked indirectly via the (M)RGCTX
9834 when generic sharing is turned on. Fixes #431413.
9836 2008-10-01 Mark Probst <mark.probst@gmail.com>
9838 * method-to-ir.c: When generic sharing is active, call
9839 non-interface virtual generic methods via the standard trampoline.
9841 * mini-trampolines.c: Handle virtual generic shared methods.
9843 * mini.h, mini-x86.c, mini-x86.h: New argument for
9844 mono_arch_build_imt_thunk() which is non-NULL for virtual generic
9845 method thunks and which is the trampoline to call if the lookup
9846 fails. Enable the virtual generic method thunk for x86.
9848 * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
9849 mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
9850 argument but assert that it's NULL, because these archs don't yet
9851 implement the virtual generic method thunk. Changes in the IMT
9852 thunk data structures.
9854 2008-10-01 Zoltan Varga <vargaz@gmail.com>
9856 * aot-compiler.c (emit_globals): Avoid invalid characters in
9857 the static linking symbol.
9859 * objects.cs: Add a test for the range check optimization. Fix warnings.
9861 * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
9862 optimization from the current JIT.
9864 * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
9865 later in decompose_array_access_opts () to allow more optimizations.
9867 * method-to-ir.c (mono_handle_soft_float): Rename this to
9868 mono_decompose_soft_float () for consistency.
9870 * mini-ops.h: Fix arguments of OP_STRLEN.
9872 * method-to-ir.c (save_cast_details): Extract the cast details saving code
9873 into a separate function.
9874 (reset_cast_details): Ditto.
9875 (handle_unbox): Save cast details. Fixes #431254.
9877 * method-to-ir.c: Remove some obsolete FIXMEs.
9879 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
9881 * ir-emit.h (alloc_dreg): Write a warning before crashing.
9883 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
9885 * mini-codegen.c: More work on macros to make them
9886 ready for multiple regbanks.
9888 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
9890 * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
9892 * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
9894 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
9896 * mini-codegen.c (mono_spillvar_offset): Proper support for
9899 2008-09-30 Zoltan Varga <vargaz@gmail.com>
9901 * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
9902 the stack overflow changes.
9904 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
9906 * mini-codegen.c: Make all bank macros depend on reg_bank.
9908 * mini-codegen.c (mono_local_regalloc): Make free mask
9909 initialization regbank aware.
9911 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
9913 * mini-codegen.c (mono_local_regalloc): Extract callee
9914 mask selection to a function and make it regbank aware.
9916 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
9918 * mini-codegen.c (mono_local_regalloc): Changed the cloberring
9919 code to deal with many regbanks.
9921 2008-09-30 Zoltan Varga <vargaz@gmail.com>
9923 * mini-codegen.c: More fp->regbank changes.
9925 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
9927 * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
9928 of a hardcoded constant.
9930 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
9932 * method-to-ir.c (type_from_stack_type): Fix typo.
9934 2008-09-29 Zoltan Varga <vargaz@gmail.com>
9936 * mini-ia64.c (emit_move_return_value): Convert float return values to
9939 * objects.cs: Add a new test.
9941 * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
9942 VARARG methods to fix an assert later.
9944 * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
9945 end so it at least compiles.
9947 2008-09-28 Zoltan Varga <vargaz@gmail.com>
9949 * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
9951 2008-09-28 Rodrigo Kumpera <rkumpera@novell.com>
9953 * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
9954 optimization to a new function (emit_optimized_ldloca_ir) and enable
9955 it for both ldloca and ldloca_s.
9957 2008-09-28 Zoltan Varga <vargaz@gmail.com>
9959 * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
9960 gshared CASTCLASS code.
9962 * driver.c (mono_main): Add a workaround for shutdown crashes seen on
9963 amd64, where the libc stack unwinder encounters stack frames referring to
9964 native code in unmapped memory.
9966 * method-to-ir.c (mini_emit_check_array_type): Add support for generic
9969 * generics.cs: Add new test.
9971 2008-09-27 Zoltan Varga <vargaz@gmail.com>
9973 * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
9974 add a check that one of the ARM_FPU_ constants is defined.
9976 * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
9978 * mini-exceptions.c: Fix build on non-altstack platforms.
9980 * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
9983 * ir-emit.h: Add a comment to NEW_PCONST.
9985 * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
9987 * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
9989 * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
9990 after the changes to MonoJitDomainInfo.
9992 2008-09-27 Mark Probst <mark.probst@gmail.com>
9994 * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
9996 2008-09-27 Mark Probst <mark.probst@gmail.com>
9998 * mini-ppc.c: Compiler warning fixes.
10000 2008-09-27 Mark Probst <mark.probst@gmail.com>
10002 * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
10005 2008-09-27 Mark Probst <mark.probst@gmail.com>
10007 * exceptions-ppc.c, mini-ppc.h: Compile
10008 mono_arch_handle_altstack_exception() on Darwin, too.
10010 2008-09-27 Mark Probst <mark.probst@gmail.com>
10012 * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
10013 work on archs which don't have generic sharing implemented, only
10014 without the vtable_arg.
10016 2008-09-26 Mark Probst <mark.probst@gmail.com>
10018 * mini.c: Added comment explaining why delegate ctor icall
10019 wrappers are compiled.
10021 2008-09-26 Mark Probst <mark.probst@gmail.com>
10023 * mini.c: Don't produce trampolines to delegate ctor icall
10024 wrappers but compile them upfront.
10026 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
10028 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
10029 runtime-set function when going back to managed code. Currently this
10030 is used to set back the protection on the soft ovf pages and/or to
10031 throw the stack overflow exception that happened in unmanaged code.
10033 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
10035 * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
10036 runtime-set function when going back to managed code. Currently this
10037 is used to set back the protection on the soft ovf pages and/or to
10038 throw the stack overflow exception that happened in unmanaged code.
10040 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
10042 * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
10043 the support code for restoring stack protection after stack overflows
10044 that happen in unmanaged code. Don't set the exec permission on the
10045 soft overflow area.
10047 2008-09-26 Zoltan Varga <vargaz@gmail.com>
10049 * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
10050 delegate->method_ptr is set. Fixes #428054.
10052 2008-09-25 Zoltan Varga <vargaz@gmail.com>
10054 * tests.cs: Rename to ratests.cs.
10056 * method-to-ir.c: Merge the emit_get_rgctx () calls into the
10057 emit_get_rgctx_... functions.
10059 2008-09-25 Mark Probst <mark.probst@gmail.com>
10061 * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
10063 2008-09-25 Mark Probst <mark.probst@gmail.com>
10065 * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
10066 before asserting that method is sharable.
10068 2008-09-25 Mark Probst <mark.probst@gmail.com>
10070 * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
10071 whether method needs a static RGCTX wrapper used instead of
10072 complex conditions.
10074 * generic-sharing.c, mini.h: A few functions moved to
10075 metadata/generic-sharing.c.
10077 2008-09-25 Mark Probst <mark.probst@gmail.com>
10079 * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
10080 Generic code sharing for value types, which essentially means
10081 treating value type methods like static methods. The RGCTX is
10082 passed in the same way.
10084 2008-09-25 Zoltan Varga <vargaz@gmail.com>
10086 * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
10087 opcode when creating multi-dimensional arrays of open types.
10089 * generic-sharing.c (mono_method_check_context_used): Handle arrays of
10090 open generic types.
10092 * generics.cs: Add a test.
10094 * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
10096 2008-09-24 Zoltan Varga <vargaz@gmail.com>
10098 * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
10100 * mini.c (mini_method_compile): Set it when running under the debugger.
10102 * method-to-ir.c (mono_handle_global_vregs): Disable global->local
10103 vreg optimization if the flag is set.
10105 * driver.c (mono_main): Add --attach= option to pass options to
10108 * mini.c (sigquit_signal_handler): Start the attach agent.
10110 * ssapre.c: Disable this to save space since it is not yet ported to
10113 * regalloc2.c: Disable this to save space.
10115 * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
10117 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
10119 * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
10120 the -v option useful again.
10122 2008-09-24 Zoltan Varga <vargaz@gmail.com>
10124 * mini-amd64.c (mono_arch_output_basic_block): Add support for
10127 * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
10128 arrays of arrays. Fixes #428406.
10130 * method-to-ir.c (mini_emit_castclass): Ditto.
10132 * objects.cs: Add new test.
10134 2008-09-23 Rodrigo Kumpera <rkumpera@novell.com>
10136 * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
10137 was wrong at it choked against target_type_is_incompatible for byref types.
10139 2008-09-23 Zoltan Varga <vargaz@gmail.com>
10141 * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most
10144 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
10146 * mini-exceptions.c: update a few more exceptions-related counters.
10148 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
10150 * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
10151 new functions to allocate from persistent mempools.
10153 2008-09-23 Zoltan Varga <vargaz@gmail.com>
10155 * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow
10156 multiple register banks in the future.
10158 * mini-codegen.c (mono_local_regalloc): Fix a warning.
10160 2008-09-22 Rodrigo Kumpera <rkumpera@novell.com>
10162 * mini.c (type_to_eval_stack_type): Remove duplicated function.
10164 * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
10166 * mini.h: Export type_to_eval_stack_type.
10168 This function was nearly duplicated in method-to-ir.c and mini.c. The difference
10169 is only ins->klass of byref types.
10171 2008-09-22 Zoltan Varga <vargaz@gmail.com>
10173 * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
10174 (mini_emit_memcpy2): Ditto.
10176 * mini-amd64.c: Fix a warning.
10178 2008-09-21 Mark Probst <mark.probst@gmail.com>
10180 * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
10183 2008-09-19 Rodrigo Kumpera <rkumpera@novell.com>
10185 * method-to-ir.c: Extract stloc micro-optimization to a
10186 function and apply it to all cases.
10188 2008-09-19 Mark Probst <mark.probst@gmail.com>
10190 * method-to-ir.c: Don't fail generic code sharing in cases we
10193 2008-09-18 Mark Probst <mark.probst@gmail.com>
10195 * mini-ppc.c: Handle structs in tailcalls on Darwin.
10197 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
10199 * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
10202 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
10204 * trace.c: make tracing more useful and correct, with per-thread
10205 id and indent info.
10207 2008-09-15 Mark Probst <mark.probst@gmail.com>
10209 * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
10210 doing a method call and the argument is an R4.
10212 2008-09-14 Zoltan Varga <vargaz@gmail.com>
10214 * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
10217 2008-09-13 Mark Probst <mark.probst@gmail.com>
10219 * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
10221 2008-09-12 Zoltan Varga <vargaz@gmail.com>
10223 * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
10224 (MONO_JUMP_TABLE_FROM_INS): Ditto.
10226 2008-09-11 Zoltan Varga <vargaz@gmail.com>
10228 * driver.c: Add a --agent argument (not supported yet) to load managed
10229 agent assemblies before loading the main assembly, similarly to how the
10230 Java VM handles agents.
10232 2008-09-11 Mark Probst <mark.probst@gmail.com>
10234 * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
10235 function to do stack layout of local variables.
10237 2008-09-11 Mark Probst <mark.probst@gmail.com>
10239 * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
10242 2008-09-11 Zoltan Varga <vargaz@gmail.com>
10244 * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
10245 abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
10246 JIT if DISABLE_JIT is defined.
10248 * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
10251 2008-09-10 Mark Probst <mark.probst@gmail.com>
10253 * iltests.il.in: Disable the fconv test on PPC (the result is
10254 undefined according to ECMA).
10256 2008-09-10 Mark Probst <mark.probst@gmail.com>
10258 * iltests.il.in: Enable tail call tests for PPC.
10260 * mini.h: Add variable for storing incoming valuetype argument
10261 addresses for tail calls.
10263 * mini-ppc.c: Implement valuetype arguments and return values for
10264 tailcalls on Linux.
10266 2008-09-09 Mark Probst <mark.probst@gmail.com>
10268 * mini-ppc.c: Partially implement tail calls (struct arguments and
10269 return values not supported).
10271 * method-to-ir.c: Enable tail calls on PPC.
10273 2008-09-08 Zoltan Varga <vargaz@gmail.com>
10275 * aot-compiler.c (emit_wrapper_info): Omit the klass name from
10276 runtime-invoke wrappers to work around the problem of them getting
10277 assigned to a random class.
10279 * aot-runtime.c (mono_aot_get_method): Ditto.
10281 2008-09-07 Zoltan Varga <vargaz@gmail.com>
10283 * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
10284 the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
10286 2008-09-07 Mark Probst <mark.probst@gmail.com>
10288 * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
10289 until they're implemented properly.
10291 * exceptions-ppc.c: Use arch-independent exception-handling code
10292 instead of custom one.
10294 * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
10297 * tramp-ppc.c, mini-ppc.c: Fixed warnings.
10299 * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
10300 applies when __powerpc__ is defined.
10302 2008-09-06 Zoltan Varga <vargaz@gmail.com>
10304 * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
10305 methods to their code to avoid computing the full name of wrappers and
10306 doing a lookup in a string hash table.
10308 2008-09-05 Zoltan Varga <vargaz@gmail.com>
10310 * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
10311 we identify bblocks before method_to_ir () is ran.
10313 * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
10314 Also avoid optimizing branches pointing to themselves.
10316 * mini.c (mini_method_compile): Ditto. Fixes #422947.
10318 2008-09-05 Rodrigo Kumpera <rkumpera@novell.com>
10320 * driver.c (mono_main): Enable the new verifier under core-clr and cas.
10322 2008-09-05 Zoltan Varga <vargaz@gmail.com>
10324 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
10325 (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
10326 (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
10329 * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all
10330 jumped to the same entry in plt_jump_table.
10332 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
10334 * method-to-ir.c (initialize_array_data): Handle field with RVA from
10337 2008-08-31 Zoltan Varga <vargaz@gmail.com>
10339 * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
10340 other assignment can be if converted. Saves 1.5% on corlib size and fixes
10343 2008-08-29 Geoff Norton <gnorton@novell.com>
10345 * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
10346 segment, and doesn't properly handle .space as .text. Fixes
10349 2008-08-29 Geoff Norton <gnorton@novell.com>
10351 * mini.c: Disable the mach exception handler when running on
10354 2008-08-29 Geoff Norton <gnorton@novell.com>
10356 * aot-compiler.c: Patch from Renaldas Zioma to properly register
10357 globals on Darwin/ARM
10359 2008-08-28 Zoltan Varga <vargaz@gmail.com>
10361 * mini.c: Avoid not initializing the runtime when doing AOT compilation,
10362 since too many things depend on it. Instead, call
10363 mono_runtime_set_no_exec ().
10365 * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
10368 * aot-compiler.c: Add an 'asm-only' AOT option.
10370 * mini.c: Avoid initializing the runtime when doing AOT compilation.
10372 * aot-compiler.c (compile_method): Disable gshared support for now as it
10375 2008-08-27 Bill Holmes <billholmes54@gmail.com>
10377 * mini-amd64.h : Fix a compiler warning.
10379 * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
10380 Changed to use a callback function to retrieve the unwind info.
10381 This avoids problems observed when code blocks were removed by
10382 unloading an app domain.
10384 * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole
10385 and branch excludes for Winx64. The fix in exceptions-amd64.c allows them
10388 Contributed under MIT/X11 license.
10390 2008-08-27 Bill Holmes <billholmes54@gmail.com>
10392 * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
10393 case to keep the stack aligned to 8.
10395 Contributed under MIT/X11 license.
10397 2008-08-26 Zoltan Varga <vargaz@gmail.com>
10399 * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
10400 avoid repeated linear searches.
10402 2008-08-25 Zoltan Varga <vargaz@gmail.com>
10404 * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
10405 methods it can't handle.
10407 * aot-compiler.c (add_method): Avoid adding a method twice.
10408 (add_wrappers): Add runtime invoke wrappers for all methods.
10410 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
10411 function to create an aot-compatible version of this trampoline.
10413 * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
10415 2008-08-24 Zoltan Varga <vargaz@gmail.com>
10417 * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
10419 * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
10420 with a generic sharing failure.
10422 * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
10424 * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
10425 CEE_RETHROW. Fixes #419634.
10427 * mini.c (mono_method_to_ir): Ditto.
10429 * exceptions.cs: Add a new test.
10431 * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
10432 to mono_type_stack_size_internal () since some callers might not pass in
10435 * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
10436 instrument_prolog. Fixes #419878.
10438 * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
10439 doubles in soft float mode volatile.
10441 2008-08-23 Zoltan Varga <vargaz@gmail.com>
10443 * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
10445 * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
10446 to handle soft float correctly.
10448 * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
10451 * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
10453 * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
10454 to sp, since the generics catch code requires it.
10456 * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
10459 * method-to-ir.c (emit_imt_argument): Pass imt_arg to
10460 mono_arch_emit_imt_argument ().
10462 * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
10464 * mini-arm.c tramp-arm.c: Generic sharing updates.
10466 2008-08-22 Zoltan Varga <vargaz@gmail.com>
10468 * mini-arm.c: Fix the arm build.
10470 * generic-sharing.c (mini_type_get_underlying_type): New helper function
10471 handling enums, generic instances and generic sharing.
10472 (mini_type_stack_size_full): Ditto.
10474 * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
10476 * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
10478 * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
10480 * tramp-arm.c: Implement the rgctx fetch and the generic class init
10483 * mini-arm.c: Various small generic sharing changes.
10485 * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
10487 (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
10490 * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
10491 helper function to return a generic class init trampoline.
10493 * method-to-ir.c mini.c: Use it.
10495 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
10496 arch-specfic function to return a generic class init trampoline.
10498 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
10499 the GENERIC_CLASS_INIT custom code.
10501 * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
10502 a fatal error, not a sharing failure.
10504 * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
10507 * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
10508 trampoline argument from MONO_ARCH_VTABLE_REG.
10510 * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
10511 order of the arguments to the C trampoline: pass 'slot' as the trampoline
10512 argument, and pass the vtable in VTABLE_REG.
10514 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
10515 order of the arguments to the C trampoline: pass 'slot' as the trampoline
10516 argument, and pass the vtable in VTABLE_REG.
10517 (mono_arch_create_trampoline_code_full): Remove some special casing for
10518 the rgctx fetch trampoline.
10520 * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
10523 * iltests.il: Add a test for it.
10525 2008-08-21 Zoltan Varga <vargaz@gmail.com>
10527 * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
10529 * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
10532 * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
10533 use mono_jit_info_table_find () to avoid recursion.
10534 (mono_delegate_trampoline): Add a sync wrapper here.
10536 * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
10539 * mini.c (mono_method_to_ir): Ditto.
10541 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
10542 add_sync_wrapper argument. Don't add a sync wrapper here.
10543 (mono_create_jump_trampoline): Don't add a sync wrapper here.
10545 * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
10547 2008-08-20 Bill Holmes <billholmes54@gmail.com>
10549 * exceptions-amd64.c (seh_handler): For Winx64 adding missing copy
10550 of nonvolatile registers back from MonoContext to CONTEXT.
10552 Contributed under MIT/X11 license.
10554 2008-08-20 Bill Holmes <billholmes54@gmail.com>
10556 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): When shifting the
10557 arguments on Winx64 there are only 4 argument registers. For this
10558 logic to work the last argument must be pulled from the stack.
10560 Contributed under MIT/X11 license.
10562 2008-08-20 Zoltan Varga <vargaz@gmail.com>
10564 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
10566 * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
10567 MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
10568 encode/decode_method_ref ().
10570 * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
10572 * aot-runtime.c (decode_patch): Ditto.
10574 * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
10575 MONO_PATCH_INFO_METHOD.
10577 * aot-runtime.c (decode_exception_debug_info): Decode the contents of
10578 MonoGenericJitInfo.
10580 * aot-compiler.c (emit_exception_debug_info): Emit the contents of
10581 MonoGenericJitInfo.
10583 * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
10585 * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
10586 one from the caller.
10588 * aot-runtime.c (decode_generic_inst): New function to decode and
10589 return a interned generic inst.
10590 (decode_klass_ref): Use it.
10591 (decode_method_ref): Ditto.
10593 * aot-compiler.c (emit_exception_debug_info): Save
10594 jinfo->has_generic_jit_info too.
10596 2008-08-19 Zoltan Varga <vargaz@gmail.com>
10598 * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
10600 * iltests.il.in: Add a test for fconv_to_i.
10602 * liveness.c: Disable the liveness2 pass for now to save space.
10604 * regalloc2.c: Include mempool-internals.h to fix warnings.
10606 * aot-compiler.c (encode_method_ref): Encode the context of generic
10609 * aot-runtime.c (decode_method_ref): Inflate generic methods using
10610 the context saved in the aot file.
10612 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
10614 * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
10616 * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
10617 volatile so they won't be optimized away.
10619 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
10625 * dominators.c: Remove duplicated functions that now are in
10626 mempool-internals.h.
10628 2008-08-19 Zoltan Varga <vargaz@gmail.com>
10630 * aot-compiler.c: Fix warnings.
10632 * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
10634 * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
10636 * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
10639 * mini.c (mono_resolve_patch_target): Ditto.
10641 * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
10642 (encode_klass_ref): Add support for encoding VARs/MVARs.
10644 * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
10646 * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
10647 the handling of the got entries into a separate 'decode_got_entry' function.
10648 Add support for RGCTX_FETCH.
10650 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
10651 clobbered by the trampoline code.
10653 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
10654 not clobbered by the indirect calling code.
10656 2008-08-18 Zoltan Varga <vargaz@gmail.com>
10658 * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
10661 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
10663 * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
10664 signature using the compilation mempool otherwise we would leak it.
10666 2008-08-18 Zoltan Varga <vargaz@gmail.com>
10668 * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
10669 mono_emit_abs_call ().
10671 * patch-info.h: Add GENERIC_CLASS_INIT.
10673 * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
10675 * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
10676 as their target as a near call.
10678 * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
10680 (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
10682 * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
10683 call to a runtime function described by a patch.
10685 * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
10686 mono_emit_abs_call, this has the advantage that the ABS handling code in
10687 mono_codegen () can handle them both, and can handle other stuff in the
10688 future without additional code.
10690 * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
10692 (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
10695 * mini.h: Add missing bblock related prototypes.
10697 * mini.h (MonoCompile): Remove unused reverse_inst_list and
10698 reverse_inst_list_len fields.
10700 * mini.c: Refactor this file a bit by moving branch optimizations to
10703 * method-to-ir.c: Merge generic sharing changes missed earlier.
10705 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
10707 * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
10708 shared patches. Process METHODCONST as a shared patch.
10710 * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
10711 as it crashes on the 2.0 mscorlib.
10713 * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
10716 * aot-compiler.c: Use is_plt_patch () in a few additional places.
10717 (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
10720 * aot-compiler.c: Reorganize the got handling code to be a bit more
10723 2008-08-17 Zoltan Varga <vargaz@gmail.com>
10725 * aot-compiler.c: Make the patch_to_plt_offset hash table use
10726 mono_patch_info_equals/hash, and use it to massively simplify
10729 * mini.c (mono_patch_info_hash): Simplify this and add support for
10732 * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
10734 * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
10735 handling code, since an offset is not enough to identify a trampoline.
10737 * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
10739 2008-08-17 Mark Probst <mark.probst@gmail.com>
10741 * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
10743 * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
10745 * mini-ops.h: Argument and result types for OVF_CARRY ops.
10747 * decompose.c: PPC decompositions for various ops.
10749 * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
10751 2008-08-17 Zoltan Varga <vargaz@gmail.com>
10753 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
10754 call the generic trampoline code using a call, instead of a jump, to
10755 remove some special casing from the generic trampoline code.
10757 * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
10758 (mono_codegen): Ditto.
10760 * aot-compiler.c aot-runtime.c: Ditto.
10762 * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
10764 * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
10765 helper function to find the offset corresponding to a lazy fetch trampoline.
10767 * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
10768 when doing generic sharing.
10770 * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
10773 * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
10774 mini-trampolines.c to be with the other trampoline creation functions.
10776 * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
10777 as it is equal to method->signature in most cases, add a
10778 mono_emit_method_call_full variant which takes a signature and an imt
10781 2008-08-16 Zoltan Varga <vargaz@gmail.com>
10783 * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
10784 to this function, since it could be computed easily from the method
10786 (mono_helper_compile_generic_method_wo_context): Removed, not needed any
10789 * method-to-ir.c mini.c: Remove references to
10790 compile_generic_method_wo_context.
10792 * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
10793 generic method calls.
10795 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
10796 dimensional non-szarrays.
10798 * mini.c (mini_init): Register mono_array_new_1.
10800 * jit-icalls.c (mono_array_new_1): New jit icall.
10802 * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
10803 pointing to the method.
10805 * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
10806 method addresses belonging to METHOD_JUMP patches in the
10807 jump_target_got_slot_hash.
10808 (mono_aot_load_method): Ditto.
10810 * aot-compiler.c (compile_method): Allow AOT compilation of methods with
10811 METHOD_JUMP patches.
10813 * mini.c (mini_create_jit_domain_info): New helper function which
10814 initializes/frees domain->runtime_info.
10815 (mini_free_jit_domain_info): Ditto.
10816 (mini_init): Install the domain hook functions with the runtime.
10818 * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
10819 information maintained by the JIT.
10821 * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
10822 insertion into jump_table_hash into mono_codegen (), also implement proper
10825 * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
10826 tail calls, it is already done by the aot code.
10828 * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
10829 mechanism on amd64.
10831 * iltests.il.in: Make the jmp test a bit more complex.
10833 * aot-compiler.c (encode_method_ref): Handle references to normal methods of
10834 generic instances which doesn't have a token.
10836 * aot-runtime.c (decode_method_ref): Ditto.
10838 * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
10839 can handle this case now.
10840 (handle_box): Ditto.
10842 2008-08-15 Geoff Norton <gnorton@novell.com>
10844 * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
10847 2008-08-15 Zoltan Varga <vargaz@gmail.com>
10849 * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
10850 calling generic methods.
10852 * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
10854 * aot-runtime.c (decode_patch_info): Ditto.
10856 * mini.c (mono_resolve_patch_target): Ditto.
10858 * patch-info.h: Add METHOD_RGCTX.
10860 * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
10862 2008-08-14 Zoltan Varga <vargaz@gmail.com>
10864 * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
10865 arguments in registers.
10867 * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
10868 OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
10870 * mini.c (mini_method_compile): Abort aot compilation for generic
10871 methods if generic sharing is disabled.
10873 * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
10876 * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls
10877 requiring an mrgctx.
10879 * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
10880 store instructions when converting a vcall to a normal call.
10882 * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
10883 mono_arch_find_jit_info.
10885 2008-08-13 Zoltan Varga <vargaz@gmail.com>
10887 * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
10888 avoid calling mono_method_full_name () for every method even if the
10889 env var is not set.
10890 (check_inline_caller_method_name_limit): Ditto.
10892 2008-08-12 Zoltan Varga <vargaz@gmail.com>
10894 * driver.c (main_thread_handler): Allow AOT compilation of multiple
10895 assemblies in one run.
10897 * aot-compiler.c (mono_compile_assembly): Only print out a count of
10898 skipped methods if it is not 0.
10900 * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
10902 2008-08-12 Bill Holmes <billholmes54@gmail.com>
10904 * mini.c (mono_codegen): Changing a preprocessor check from WIN64 to
10905 MONO_ARCH_HAVE_UNWIND_TABLE.
10907 Contributed under MIT/X11 license.
10909 2008-08-12 Bill Holmes <billholmes54@gmail.com>
10911 * mini-amd64.c (mono_arch_cpu_optimizazions): Remove peephole and branch
10912 from default optimizaton list on Winx64.
10914 * mini-amd64.c (emit_tls_get): Added Winx64 specific implementation for GetTLS.
10916 * mini-amd64.c (mono_arch_emit_prolog): Adding an offset on Winx64 to get
10917 the LMF from the MonoJitTlsData structure.
10919 * mini-amd64.c (mono_arch_setup_jit_tls_data): Added Winx64 implementation.
10921 Contributed under MIT/X11 license.
10923 2008-08-12 Zoltan Varga <vargaz@gmail.com>
10925 * mini.c (sigsegv_signal_handler): Fix the build.
10927 * mini-amd64.c (emit_call_body): Use image->aot_module instead of
10928 assembly->aot_module.
10930 * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
10931 hash table. This simplifies and speeds up a lot of code, and fixes support
10934 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
10937 * mini-exceptions.c: Ditto.
10939 * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
10940 'native_offset' argument, since these are computed in the
10941 mono_find_jit_info () function.
10943 * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
10944 is used by exceptions-ppc.c.
10946 * exceptions-ppc.c: Call mono_find_jit_info () instead of
10947 mono_arch_find_jit_info ().
10949 * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
10950 mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
10951 generic code in mini-exceptions.c.
10953 2008-08-11 Zoltan Varga <vargaz@gmail.com>
10955 * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
10957 * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
10959 * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
10960 the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
10961 called while holding the loader lock. Fixes #415608.
10962 (mono_aot_get_method_from_token_inner): Ditto.
10964 2008-08-09 Zoltan Varga <vargaz@gmail.com>
10966 * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
10967 to reduce differences between this and the generic implementation in
10969 (ves_icall_get_frame_info): Ditto.
10971 * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
10973 * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
10976 * exceptions-ppc.c (arch_get_call_filter): Rename this to
10977 mono_arch_get_call_filter () and make it non-static, for consistency with the
10978 other architectures.
10980 2008-08-09 Rodrigo Kumpera <rkumpera@novell.com>
10983 * local-propagation.c:
10984 * mini-x86.c: Correct the name of arch defines.
10986 2008-08-09 Zoltan Varga <vargaz@gmail.com>
10988 * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
10989 NO_EMULATE_LONG_SHIFT_OPS define.
10991 2008-08-08 Zoltan Varga <vargaz@gmail.com>
10993 * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
10994 now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
10996 * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
10997 MACH fixes. Merged from the 2.0 branch.
10999 * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
11001 * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
11002 (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
11004 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
11006 * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
11007 mono_marshal_get_native_wrapper () signature changes.
11009 2008-08-07 Rodrigo Kumpera <rkumpera@novell.com>
11011 * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
11012 conversion bug under arm.
11014 2008-08-06 Rodrigo Kumpera <rkumpera@novell.com>
11016 * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
11018 * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
11019 with overflow checking.
11021 2008-08-05 Marek Habersack <mhabersack@novell.com>
11023 * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
11024 to the genmdesc.pl file
11026 2008-08-05 Zoltan Varga <vargaz@gmail.com>
11028 * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
11029 arg_array in the soft-float versions of the LOAD/STORE macros.
11031 * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
11034 * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
11036 2008-08-02 Zoltan Varga <vargaz@gmail.com>
11038 * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
11039 a float HFA. Fixes #413621.
11041 2008-08-02 Gert Driesen <drieseng@users.sourceforge.net>
11043 * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
11044 frame_size to args_size. Fixes build.
11046 2008-08-02 Zoltan Varga <vargaz@gmail.com>
11048 * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
11049 and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
11051 * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
11052 the stack are not unaligned. Fixes #413247.
11054 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
11056 * mini.c: update jitted methods performance counters.
11058 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
11060 * mini-exceptions.c: increase the exceptions thrown performance
11061 counter in mono_handle_exception ().
11063 2008-07-29 Zoltan Varga <vargaz@gmail.com>
11065 * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
11066 can work with netmodules.
11068 2008-07-28 Geoff Norton <gnorton@novell.com>
11070 * mini-x86.h: Correct the frame alignment on OSX. Fixes the jit
11073 2008-07-28 Zoltan Varga <vargaz@gmail.com>
11075 * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
11078 2008-07-28 Bill Holmes <billholmes54@gmail.com>
11080 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
11081 The float param registers and other param registers must be the
11082 same index on Windows x64.
11084 * mini-amd64.c (mono_arch_allocate_vars) : Implementing the
11085 ArgValuetypeAddrInIReg argument case. Setting the argument
11086 op to OP_VTARG_ADDR (OP_REGOFFSET)).
11088 * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix. Use the size
11089 variable computed above as the copy length for arguments of storage
11090 type ArgValuetypeAddrInIReg.
11092 * mini-amd64.c (mono_arch_emit_call) : Implementing the
11093 ArgValuetypeAddrInIReg argument case. This case will rely on
11094 mono_arch_emit_outarg_vt to emit the correct code later in the process.
11096 * mini-amd64.c (mono_arch_emit_call) : On Winx64 there always needs to be
11097 a 32 byte stack allocation for all calls. We will omit the adjustment for
11098 jump and tail call instructoins as they do not follow the typical call behavior.
11100 * mini-amd64.c (mono_arch_emit_outarg_vt) : Implementing the case for
11101 ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
11102 local variable and pass the local variable by reference to the called method.
11104 * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
11105 Implementing the ArgValuetypeAddrInIReg argument case. When the address
11106 of a struct is passed in a register it must be saved with the other
11107 volatile argument on the stack.
11109 * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix. When omitting the
11110 frame pointer the stack adjustment value must be saved to the unwind
11113 Contributed under MIT/X11 license.
11115 2008-07-28 Zoltan Varga <vargaz@gmail.com>
11117 * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
11118 which got lost in the merge.
11120 2008-07-27 Zoltan Varga <vargaz@gmail.com>
11122 * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
11125 * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
11127 * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
11128 icalls, since they won't be patched.
11130 * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
11131 different code sequence when running under valgrind to prevent some valgrind
11134 * iltests.il.in: Add new regression test.
11136 * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
11139 * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
11140 accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
11142 * iltests.il.in: Add new test.
11144 * aot-compiler.c: Fix some warnings.
11146 * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
11149 2008-07-27 Zoltan Varga <vargaz@gmail.com>
11151 * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
11152 (mini_usage_jitdeveloper): Add a missing --wapi option.
11154 2008-07-25 Zoltan Varga <vargaz@gmail.com>
11156 * mini-codegen.c: Simplify the is_fp macros.
11157 (free_up_ireg): Remove, use free_up_reg instead.
11158 (free_up_reg): Fix the fp case.
11160 2008-07-26 Zoltan Varga <vargaz@gmail.com>
11162 * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
11165 * exceptions-x86.c: Merge some changes which seemed to have got lost
11166 in the linear-ir merge.
11168 * liveness.c: Disable the liveness2 pass on 32 bit platforms.
11170 * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
11171 long vreg volatile even if the variable was already created.
11173 * liveness.c (update_liveness2): Avoid eliminating dead definitions of
11174 volatile variables.
11176 2008-07-26 Zoltan Varga <vargaz@gmail.com>
11178 * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
11180 * mini.c (mono_jit_compile_method_inner): Add support for
11181 MONO_EXCEPTION_BAD_IMAGE.
11183 * method-to-ir.c (mono_method_to_ir2): Avoid a crash if
11184 mini_method_get_context () returns NULL. Fixes #356531.
11186 * mini.c (mono_method_to_ir): Ditto.
11188 * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
11189 accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
11191 2008-07-25 Zoltan Varga <vargaz@gmail.com>
11193 * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
11194 in the LDFTN implementation.
11196 2008-07-25 Mark Probst <mark.probst@gmail.com>
11198 * mini-trampolines.c (mono_magic_trampoline): When sharing generic
11199 code, patch calls to icalls, too, even if they're not in the
11200 shared generic code hash. Fixes #411962.
11202 2008-07-25 Zoltan Varga <vargaz@gmail.com>
11204 * cpu-x86.md: Increase the length of the fcall opcodes.
11206 * mini-x86.c (emit_move_return_value): Avoid some precision issues for
11207 calls returning floats.
11209 * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
11212 * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
11215 * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
11216 into the domain->method_code_hash.
11218 * aot-compiler.c: Fix win32 build.
11220 * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
11222 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
11223 gshared NEWARR implementation.
11225 * cpu-sparc.md: Remove duplicate localloc_imm opcode.
11227 * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
11228 can be used outside of method_to_ir.
11230 * mini.h (MonoCompile): Add arg_types field.
11232 * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
11234 * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
11235 the values of the local arg_array and param_types array.
11237 2008-07-24 Zoltan Varga <vargaz@gmail.com>
11239 * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
11240 got accesses might only get generated later when NEWOBJ is decomposed.
11242 * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
11243 looking up the native code of the target method when a delegate is called
11244 for the first time.
11246 * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
11249 * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
11251 * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
11252 AOT work on platforms without a working dlsym implementation.
11254 * mini.h: Bump AOT image format version.
11256 2008-07-24 Mark Probst <mark.probst@gmail.com>
11258 * mini-exceptions.c: Free a MonoType with
11259 mono_metadata_free_type() instead of g_free().
11261 * aot-runtime.c: Free a MonoType.
11263 2008-07-24 Zoltan Varga <vargaz@gmail.com>
11265 * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
11268 * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
11271 2008-07-23 Massimiliano Mantione <massi@ximian.com>
11272 * mini.c (sigprof_signal_handler): call the new "runtime initialized"
11275 2008-07-23 Zoltan Varga <vargaz@gmail.com>
11277 * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
11278 NEWOBJ calls on valuetypes.
11280 * iltests.il.in: Add new test.
11282 * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
11284 2008-07-22 Zoltan Varga <vargaz@gmail.com>
11286 * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
11287 is no longer needed.
11289 * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
11290 non register sized integer arguments.
11291 (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
11292 (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to
11295 * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
11298 * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
11299 two a binop with different sized arguments is emitted.
11301 * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
11302 instruction in the ins==NULL case.
11304 2008-07-23 Zoltan Varga <vargaz@gmail.com>
11306 * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
11308 * mini-x86.c: Fix osx build.
11310 * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
11313 * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
11314 instruction for non int sized variables.
11316 * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
11319 2008-07-23 Robert Jordan <robertj@gmx.net>
11321 * method-to-ir.c: Fix MSVC build.
11323 2008-07-22 Zoltan Varga <vargaz@gmail.com>
11325 * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
11326 a non int sized type, widen it to an int since newer versions of gcc seem to
11327 generate code which needs this.
11329 * ssa2.c abcremoval2.c: Fix warnings.
11331 * *: Merge the Linear IR branch.
11333 The original branch is at trunk/branches/vargaz/mini-linear-il, and
11334 the ChangeLog file there describes all the changes done over the years.
11335 Further documentation can be found at www.mono-project.com/Linear_IL.
11337 2008-07-21 Bill Holmes <billholmes54@gmail.com>
11339 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
11340 The float param registers and other param registers must be the
11341 same index on Windows x64.
11343 Contributed under MIT/X11 license.
11345 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
11347 * mini.c: Make the previous fix GC safe.
11349 2008-07-21 Raja R Harinath <harinath@hurrynot.org>
11351 * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
11353 2008-07-21 Bill Holmes <billholmes54@gmail.com>
11355 * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
11356 on Winx64. This type will not be passed on the stack (ArgOnStack), but
11357 ArgValuetypeAddrInIReg instead.
11359 Contributed under MIT/X11 license.
11361 2008-07-21 Zoltan Varga <vargaz@gmail.com>
11363 * mini-codegen.c (get_register_spilling): Fix a warning.
11365 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
11367 * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
11368 for types which the initialization fails. Raises the provided exception
11369 at the right stop after cleanup.
11371 2008-07-16 Zoltan Varga <vargaz@gmail.com>
11373 * aot-compiler.c: Free most of the memory allocated during compilation.
11375 * mini.c (mini_parse_debug_options): Fix a leak.
11377 * mini.c (mini_method_compile): Don't add the method to the jit info tables
11378 during aot compilation.
11380 2008-07-14 Zoltan Varga <vargaz@gmail.com>
11382 * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as
11383 it has too much register pressure.
11385 2008-07-13 Zoltan Varga <vargaz@gmail.com>
11387 * inssel.brg (CEE_CASTCLASS): Remove some dead code.
11389 2008-07-12 Zoltan Varga <vargaz@gmail.com>
11391 * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
11394 * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
11395 on amd64 similar to the way it is done on arm.
11397 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
11399 * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for
11400 consistency, normalize error messages, avoid loading aot-only modules in
11403 * driver.c (mono_main): Rename --aot-only command line option to --full-aot
11406 * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
11408 2008-07-11 Martin Baulig <martin@ximian.com>
11411 (MonoDebuggerInfo): Add `interruption_request'.
11413 2008-07-12 Zoltan Varga <vargaz@gmail.com>
11415 * aot-compiler.c (emit_plt): Remove some dead code.
11417 * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
11419 * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
11420 return the plt info offset belonging to a given plt entry.
11422 * mini-trampolines.c (mono_aot_plt_trampoline): Use
11423 mono_aot_get_plt_info_offset.
11425 * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
11426 similar to the amd64 code by makeing jumps through a separate jump table
11427 instead of embedding the jump addresses into the code.
11429 2008-07-11 Zoltan Varga <vargaz@gmail.com>
11431 * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
11434 2008-07-10 Martin Baulig <martin@ximian.com>
11436 * mini.c (mini_method_compile): Disable generics sharing when
11437 running in the debugger.
11439 2008-07-10 Zoltan Varga <vargaz@gmail.com>
11441 * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
11443 * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
11444 the local register allocator from running out of registers on x86 when
11447 2008-07-10 Bill Holmes <billholmes54@gmail.com>
11449 * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when
11450 expressing IntMin for the VS Compiler. See Compiler Warning (level 2)
11453 Contributed under MIT/X11 license.
11455 2008-07-10 Zoltan Varga <vargaz@gmail.com>
11457 * aot-compiler.c: Get rid of whitespace in the generated assembly file to
11458 speed up the assembler.
11460 2008-07-09 Zoltan Varga <vargaz@gmail.com>
11462 * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
11465 * mini.c: Move the soft float handling macros a bit earlier, add
11466 NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
11469 * mini.h: Add prototype for mono_arch_fixup_jinfo.
11471 * mini.c (mini_init): In aot-only mode, set the root domain code manager to
11472 read-only to help catch code allocation requests.
11474 * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
11475 and turn it off when using --aot-only or when compiling with --aot=full.
11477 * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
11478 jump table for switches from the normal domain mempool, not the code
11481 * mini-trampolines.c (get_unbox_trampoline): New function to return an
11482 unbox trampoline which handles aot-only mode too.
11484 * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
11485 an AOTed unbox trampoline.
11487 * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
11489 2008-07-09 Bill Holmes <billholmes54@gmail.com>
11491 * wapihandles.c: Fixing MSVC builds. Include statement changed from <> to
11494 Contributed under MIT/X11 license.
11496 2008-07-09 Bill Holmes <billholmes54@gmail.com>
11498 * mini.c (mono_codegen): Allocate space at the end of the code block and store
11499 the unwind information for the method at the end of the allocated block.
11501 * mini-amd64.h: Added declarations for the unwind routines and adding field to
11502 MonoCompileArch to hold the unwind info for SEH on Winx64
11504 * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
11505 frame pointer info for the method being compiled.
11507 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
11508 the call to mono_exception_from_token.
11510 * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations. This code is responsible
11511 storing the method prolog information in a format that the Winx64 SEH can understand. This
11512 information is stored a the end of the method block because it is all 32-bit offset based.
11514 Contributed under MIT/X11 license.
11516 2008-07-09 Zoltan Varga <vargaz@gmail.com>
11518 * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
11520 * wapihandles.c: Fix warnings.
11522 * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
11525 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling
11526 mono_jit_compile_method in aot-only mode since that calls the type
11529 * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
11530 get_delegate_invoke_impl in aot-only mode.
11532 * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
11534 2008-07-08 Zoltan Varga <vargaz@gmail.com>
11536 * trace.c (mono_trace_enter_method): Fix printing of Type instances.
11538 * aot-compiler.c (compile_method): Disable the check for GSHARED since it
11541 * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
11543 * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
11544 init trampoline from the AOT file as well.
11546 * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
11547 mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
11550 * mini.c (mini_init): Move the call to mono_exceptions_init () after
11553 * exceptions-amd64.c: Add _full variants for the remaining exception code
11554 creation functions as well, allow emission of relocatable code, remove
11555 caching since that is now done by the caller.
11557 * mini-exceptions.c: Add _full variants for the remaining exception code
11558 creation functions as well, add aot-only support.
11560 * aot-compiler.c (compile_method): Allow calls to methods of constructed types
11561 if we can determine a proper token for them.
11562 (add_wrappers): Add a few more wrappers.
11563 (emit_method_code): Remove some dead code.
11564 (emit_trampolines): Emit exception code too.
11566 * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
11568 * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
11569 mono_array_new_va which avoids varargs.
11571 * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
11573 * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
11574 mono_arch_create_specific_trampoline () in all places.
11576 * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
11577 a bit so it can be used for other things as well.
11579 * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
11582 * exceptions-amd64.c: Rename the caching from the exception code creation
11583 functions, it is done by the caller instead.
11585 * exceptions-amd64.c: Change the signature of the exception code creation
11586 functions to allow the creation of relocatable code later.
11588 * mini-exceptions.c: Add a set of functions to query the various
11589 runtime-generated exception functions.
11591 * mini.c mini-exceptions.c: Use the newly added functions instead of the
11592 mono_arch_.. () functions.
11594 2008-07-07 Zoltan Varga <vargaz@gmail.com>
11596 * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
11598 * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
11600 * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
11601 (mini_get_vtable_trampoline): Ditto.
11603 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
11604 code in the AOT case by returning the code size and a list of relocations to
11607 * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
11609 2008-07-07 Bill Holmes <billholmes54@gmail.com>
11611 * mini-amd64.c: On Winx64 the calling convention always requires the caller to
11614 Contributed under MIT/X11 license.
11616 2008-07-07 Zoltan Varga <vargaz@gmail.com>
11618 * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
11619 so the buffer size can be computed correctly. Fixes #404735.
11621 * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
11622 normally as cfg->debug_info is already freed.
11624 2008-07-06 Zoltan Varga <vargaz@gmail.com>
11626 * mini-amd64.c: For calls returning vtypes in registers, don't store
11627 the return address on the stack, instead allocate a separate local for
11630 2008-07-05 Mark Probst <mark.probst@gmail.com>
11632 * mini-trampolines.c, mini.h: Add an argument to
11633 mono_create_jit_trampoline_in_domain() for turning off the adding
11634 of the sync wrapper.
11636 * mini.c: Use the JIT trampoline without sync instead of
11637 ldftn_nosync in static RGCTX invoke wrappers so that the call can
11640 2008-07-04 Mark Probst <mark.probst@gmail.com>
11642 * driver.c: Turn on GSHARED optimization by default.
11644 2008-07-04 Zoltan Varga <vargaz@gmail.com>
11646 * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
11647 to MONO_TRAMPOLINE_JIT since it better reflects what it does.
11649 * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
11650 create a variant of the generic trampoline code callable from AOTed trampolines.
11652 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
11653 trampoline code callable from AOTed trampolines.
11655 * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
11657 2008-07-04 Mark Probst <mark.probst@gmail.com>
11659 * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
11660 pass-through manner.
11662 * mini.c: Generic method sharing. Pass MRGCTX to generic methods
11663 and don't fail sharing for them anymore.
11665 * mini-exceptions.c: Handle exceptions in shared generic methods.
11667 * generic-sharing.c: When checking the context of a generic
11668 method, also check its class's context. Don't treat wrappers as
11671 * mini-trampolines.c: Some code factored out to
11672 metadata/generic-sharing.c. Handle the MRGCTX case.
11674 * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
11675 we must deal with the method being of another instantiation of the
11676 class. Add static rgctx invoke wrappers to generic methods.
11678 2008-07-04 Mark Probst <mark.probst@gmail.com>
11680 * mini.c: Provide all jit infos of generic shared methods with a
11683 * mini-exceptions.c: Handle the new situation that a generic info
11684 might be available, but not info about the this/vtable/mrgctx
11687 2008-07-03 Mark Probst <mark.probst@gmail.com>
11689 * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
11692 2008-07-03 Zoltan Varga <vargaz@gmail.com>
11694 * dominators.c (check_dominance_frontier): Fix a warning.
11696 * mini.h: Add some missing prototypes.
11698 * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
11700 * driver.c (mono_jit_init_version): Correct the comments since the first
11701 argument should be the name of the root domain, not a filename.
11703 * aot-runtime.c (make_writable): Error out if this is called while running
11705 (load_aot_module): Ditto.
11707 * aot-compiler.c: Really fix the computation of method indexes.
11709 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous
11710 optimizations as this is no longer called frequently.
11712 * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
11713 method and the invoke impl code and pass it to the delegate trampoline instead of
11714 just the delegate class.
11716 2008-07-02 Zoltan Varga <vargaz@gmail.com>
11718 * aot-compiler.c: Fixup the computation of method indexes.
11719 (add_wrappers): Create the base methods of the runtime invoke wrappers using
11720 the method builder infrastructure.
11722 * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
11725 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
11726 mode, load the method right away instead of creating a trampoline.
11728 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
11730 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
11733 2008-07-01 Zoltan Varga <vargaz@gmail.com>
11735 * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
11736 (mono_aot_load_method): Use method_index instead of method->token.
11738 * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
11739 can handle icalls etc. properly.
11741 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
11743 * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
11745 * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
11746 (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
11747 JIT_ICALL_ADDR patch type.
11749 * patch-info.h: Add JIT_ICALL_ADDR patch type.
11751 * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
11753 (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
11755 * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
11757 2008-06-30 Zoltan Varga <vargaz@gmail.com>
11759 * mini.c: Use domain->jit_code_hash_lock for controlling access to
11760 domain->jit_code_hash.
11762 2008-06-29 Zoltan Varga <vargaz@gmail.com>
11764 * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
11766 2008-06-27 Zoltan Varga <vargaz@gmail.com>
11768 * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
11769 get_this_arg_from_call, let it compute it when needed.
11771 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
11772 gsctx from code only when needed.
11774 * mini-trampolines.c (get_generic_context): Rename this to
11775 mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
11776 it can be called by the arch backends.
11778 * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
11780 2008-06-26 Zoltan Varga <vargaz@gmail.com>
11782 * driver.c (mono_main): Add experimental --aot-only command line option.
11784 * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
11787 2008-06-26 Kornel Pal <kornelpal@gmail.com>
11789 * driver.c (DllMain): Remove mono_module_handle.
11791 Contributed under MIT/X11 license.
11793 2008-06-25 Zoltan Varga <vargaz@gmail.com>
11795 * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
11796 for emitting methods which are not in the source assembly. Detect and report
11797 failure of assembling+linking.
11799 * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
11801 * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
11803 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
11805 * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
11807 2008-06-24 Zoltan Varga <vargaz@gmail.com>
11809 * mini.h: Remove some obsolete prototypes.
11811 * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
11813 2008-06-24 Mark Probst <mark.probst@gmail.com>
11815 * mini.c (get_object_generic_inst): Variable-sized arrays are not
11816 supported by Visual Studio, so use alloca().
11818 2008-06-23 Zoltan Varga <vargaz@gmail.com>
11820 * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
11823 2008-06-23 Mark Probst <mark.probst@gmail.com>
11825 * mini.c: Fail sharing of a generic method if it contains an open
11826 catch clause (because we don't pass MRGCTXs yet).
11828 2008-06-23 Mark Probst <mark.probst@gmail.com>
11830 * mini.c: When compiling a method with generic sharing, insert the
11831 method instantiated with an all-Object generic context into the
11832 jit info table, instead of the context of the first instantiation
11833 of the method we happen to compile.
11835 2008-06-18 Martin Baulig <martin@ximian.com>
11837 * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
11838 `major_version' and `minor_version'.
11840 2008-06-17 Mark Probst <mark.probst@gmail.com>
11842 * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
11843 mono_method_is_generic_sharable_impl() takes an additional
11844 argument specifying whether to treat type variables as reference
11847 2008-06-17 Mark Probst <mark.probst@gmail.com>
11849 * mini.h: Removed obsolete prototypes.
11851 2008-06-17 Mark Probst <mark.probst@gmail.com>
11853 * mini.c: Don't fail generic sharing for initobj and sizeof - we
11854 already handle them.
11856 2008-06-17 Mark Probst <mark.probst@gmail.com>
11858 * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
11859 tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
11860 tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
11861 tramp-x86.c: Added a MonoGenericContext* argument to
11862 mono_arch_get_unbox_trampoline() so that it can call other
11863 functions which require it.
11865 2008-06-17 Mark Probst <mark.probst@gmail.com>
11867 * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
11868 mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
11869 mono_arch_get_this_arg_from_call() takes a
11870 MonoGenericSharingContext* as well.
11872 2008-06-17 Mark Probst <mark.probst@gmail.com>
11874 * mini.c: Factor out code for emitting unbox into emit_unbox() and
11875 implement generic sharing of unbox.
11877 2008-06-17 Mark Probst <mark.probst@gmail.com>
11879 * mini.c: Don't compute the vtable to determine whether a field is
11880 special static, because it might not work for open types.
11882 2008-06-17 Mark Probst <mark.probst@gmail.com>
11884 * mini.c: Removed the unused token_type and token_source arguments
11885 from get_runtime_generic_context_ptr().
11887 2008-06-17 Marek Habersack <mhabersack@novell.com>
11889 * mini.c (ADD_BINOP): fix the build
11891 2008-06-16 Zoltan Varga <vargaz@gmail.com>
11893 * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
11896 2008-06-16 Mark Probst <mark.probst@gmail.com>
11898 * mini.h: Removed class relations enum that's not used anymore.
11900 2008-06-16 Mark Probst <mark.probst@gmail.com>
11902 * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
11904 * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
11905 the lazy fetch trampoline access code.
11907 2008-06-15 Zoltan Varga <vargaz@gmail.com>
11909 * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
11911 2008-06-14 Zoltan Varga <vargaz@gmail.com>
11913 * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
11915 * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
11917 * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
11919 2008-06-13 Zoltan Varga <vargaz@gmail.com>
11921 * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
11924 * mini-ops.h: Add MIN/MAX_UN opcodes.
11926 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
11929 * basic-math.cs: Add more min/max tests.
11931 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
11933 2008-06-13 Mark Probst <mark.probst@gmail.com>
11935 * mini.c: Small fix in the prologue of emit_castclass.
11937 2008-06-13 Zoltan Varga <vargaz@gmail.com>
11939 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
11941 * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
11942 do not work even for unsigned types. Fixes #400014.
11944 * basic-math.cs: Add regression tests for unsigned Min/Max.
11946 2008-06-13 Mark Probst <mark.probst@gmail.com>
11948 * mini.c: Added additional context_used argument to several
11949 functions, which will be needed for sharing generic methods. Use
11950 GET_RGCTX macro wherever appropriate. Declare only one
11951 context_used in mono_method_to_ir().
11953 2008-06-13 Mark Probst <mark.probst@gmail.com>
11955 * mini.c, generic-sharing.c: Removed generic class relations.
11957 * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
11958 functions due to MRGCTX changes.
11960 2008-06-13 Mark Probst <mark.probst@gmail.com>
11962 * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
11963 graph.c, local-propagation.c, aliasing.c: New opcodes for calls
11964 with calculated IMT.
11966 * mini.c: Generic sharing of calls via generic interfaces.
11968 * jit-icalls.c, jit-icalls.h: Helper function for compiling a
11969 generic method with non-constant MonoGenericContext*. Instead,
11970 the context is taken out of the method itself.
11972 2008-06-13 Mark Probst <mark.probst@gmail.com>
11974 * mini.c: Generic sharing of ldvirtftn.
11976 2008-06-13 Mark Probst <mark.probst@gmail.com>
11978 * mini.c: Generic sharing of ldftn.
11980 2008-06-13 Mark Probst <mark.probst@gmail.com>
11982 * mini.c: Do pass VTable/RGCTX argument to static generic methods.
11984 2008-06-13 Mark Probst <mark.probst@gmail.com>
11986 * mini.c: Generic sharing of the special case of ldtoken followed
11987 by a call to GetTypeFromHandle.
11989 2008-06-13 Mark Probst <mark.probst@gmail.com>
11991 * mini.c: Generic sharing of box for nullable types.
11993 2008-06-13 Zoltan Varga <vargaz@gmail.com>
11995 * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
11996 are passed on the stack. Fixes #324807.
11998 2008-06-12 Bill Holmes <billholmes54@gmail.com>
12000 * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
12001 for the ArgValuetypeAddrInIReg case.
12003 * mini-amd64.c:mono_arch_allocate_vars: Adding a case for
12004 ArgValuetypeAddrInIReg to avoid asserts. Code needs to be added here.
12006 * mini-amd64.c: mono_arch_call_opcode: Adding Winx64 code for an ArgInfo of
12007 type ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
12008 local variable and pass the local variable by reference to the called method.
12010 * mini-amd64.c: mono_arch_emit_prolog: Adjust the stack for calls to
12011 mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
12013 Contributed under MIT/X11 license.
12015 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
12017 * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
12019 * debug-mini.c (mono_debug_print_vars): Release memory after printing
12022 2008-06-10 Martin Baulig <martin@ximian.com>
12025 (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
12027 2008-06-09 Kornel Pal <kornelpal@gmail.com>
12029 * main.c: Add and set argv [argc] to NULL to match C specification that fixes
12030 possible error when no arguments are passed.
12032 Contributed under MIT/X11 license.
12034 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
12036 * mini-exceptions.c (ves_icall_get_trace): Skip source locations
12037 where the file name is NULL.
12039 2008-06-09 Zoltan Varga <vargaz@gmail.com>
12041 * mini.c: Fix s390 build.
12043 2008-06-08 Zoltan Varga <vargaz@gmail.com>
12045 * trace.c (mono_trace_parse_options): Fix warnings.
12047 * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
12049 2008-06-07 Zoltan Varga <vargaz@gmail.com>
12051 * mini.c (remove_block_if_useless): Avoid printing the method name.
12053 * mini.c: Remove needless setting of ins->cil_code which is now done by
12056 * mini-amd64.c: Add some code to avoid saving callee saved registers in the
12059 * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
12060 translated code after it has been patched.
12062 2008-06-06 Zoltan Varga <vargaz@gmail.com>
12064 * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
12065 avoid problems during code patching on SMP systems.
12066 (emit_call): Avoid adding a patch info which is already added by
12068 (mono_arch_emit_exceptions): Ditto.
12070 2008-06-05 Zoltan Varga <vargaz@gmail.com>
12072 * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
12073 MONO_TYPE_ISSTRUCT already checks for it.
12075 2008-06-05 Bill Holmes <billholmes54@gmail.com>
12077 * mini-amd64.c:merge_argument_class_from_type: When marshaling
12078 structs with floats on Winx64 the float registers are not used.
12079 The integer registers are always used..
12080 * mini-amd64.c:add_valuetype: When marshaling structs on Winx64
12081 only one register will be used and only if the size of the struct
12082 is 1,2,4, or 8 bytes.
12084 * tramp-amd64.c : Adjusting size used for mono_global_codeman_reserve
12085 to work for Winx64.
12087 Contributed under MIT/X11 license.
12089 2008-06-05 Martin Baulig <martin@ximian.com>
12091 * debug-debugger.c (debugger_lookup_class): Also call
12092 mono_class_setup_methods() here; we're only called from RTI.
12094 2008-06-05 Andreas Farber <andreas.faerber@web.de>
12096 * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
12097 (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
12098 * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
12099 Post-process object files and add dtrace-generated object, if necessary.
12101 Contributed under MIT/X11 license.
12103 2008-06-04 Mark Probst <mark.probst@gmail.com>
12105 * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
12108 * mini.c: Generic sharing for unbox.any and castclass.
12110 2008-06-04 Mark Probst <mark.probst@gmail.com>
12112 * mini.c: Ignore tailcall prefix in shared generic code and when
12113 doing calls which require a vtable/rgctx argument.
12115 2008-06-04 Mark Probst <mark.probst@gmail.com>
12117 * mini.c: Don't free the JIT info.
12119 * driver.c: Changes in the JIT info table testing code.
12121 2008-06-03 Zoltan Varga <vargaz@gmail.com>
12123 * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread
12124 interruption. Fix some warnings.
12126 * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
12127 interruption_checkpoint.
12129 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
12131 * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
12132 from embedding applications.
12134 2008-06-02 William Holmes <billholmes54@gmail.com>
12136 * mini-amd64.c : Correcting some of the issues for Winx64 dealing with
12137 reserving 32 bytes on the stack when making calls.
12139 Contributed under MIT/X11 license.
12141 2008-06-01 Zoltan Varga <vargaz@gmail.com>
12143 * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
12144 the linear IL branch.
12146 * driver.c: Print out more information for --version on arm.
12148 2008-05-30 Zoltan Varga <vargaz@gmail.com>
12150 * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
12151 bb_exit instead, since out of line bblocks might not actually be emitted
12154 * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
12155 maximum epilog size for out of line bblocks if tracing is enabled.
12157 * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
12159 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
12161 * arrays.cs: Regression tests for allocating arrays with negative sizes.
12163 2008-05-28 Zoltan Varga <vargaz@gmail.com>
12165 * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
12166 CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE
12169 2008-05-27 Zoltan Varga <vargaz@gmail.com>
12171 * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
12172 the 'value' to store is a constant.
12174 * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
12176 * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
12177 of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
12179 2008-05-26 Zoltan Varga <vargaz@gmail.com>
12181 * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
12182 for accessing method->generic_container.
12184 2008-05-24 Zoltan Varga <vargaz@gmail.com>
12186 * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
12188 * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
12190 * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
12192 * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
12195 2008-05-23 Zoltan Varga <vargaz@gmail.com>
12197 * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
12199 * mini.c: Handle the case when mono_class_vtable () fails.
12201 2008-05-23 Massimiliano Mantione <massi@ximian.com>
12202 * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
12205 2008-05-22 Mark Probst <mark.probst@gmail.com>
12207 * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
12208 together with domain sharing.
12210 2008-05-22 Mark Probst <mark.probst@gmail.com>
12212 * mini.c: Treat callvirts to final methods like non-virtual calls
12213 when doing generic sharing, i.e. look them up in the runtime
12216 2008-05-22 Mark Probst <mark.probst@gmail.com>
12218 * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
12219 with computed types (for generic sharing).
12221 * mini.c: Generic sharing for mkrefany and refanyval.
12223 2008-05-22 Zoltan Varga <vargaz@gmail.com>
12225 * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
12228 * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
12229 the generic sharing code.
12231 * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
12234 2008-05-21 Zoltan Varga <vargaz@gmail.com>
12236 * mini.h: Remove the declaration of mono_aot_init_vtable ().
12238 2008-05-21 C.J. Adams-collier <cjac@colliertech.org>
12240 * driver.c: updated copyright date
12242 2008-05-21 Zoltan Varga <vargaz@gmail.com>
12244 * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
12247 2008-05-19 Martin Baulig <martin@ximian.com>
12249 * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
12250 pointing to the new `_mono_debug_using_mono_debugger' variable.
12253 (mono_main): Check mono_debug_using_mono_debugger() rather than
12254 the `MONO_INSIDE_MDB' environment variable to check whether we're
12255 inside the debugger.
12257 2008-05-19 Zoltan Varga <vargaz@gmail.com>
12259 * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
12262 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
12264 * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
12266 * mini.c: Added mini_assembly_can_skip_verification. This
12267 function checks if the assembly requested to skip verification.
12268 Fixes part of #387274.
12270 2008-05-07 Zoltan Varga <vargaz@gmail.com>
12272 * mini.c (mini_get_method): Disable the check for open generic classes when
12273 using generic sharing.
12275 * generics.cs: Add a test for #387034.
12277 * mini.c (mini_get_method): Check whenever the method class is an open generic
12278 type, and return NULL in that case, causing a verification error. Fixes
12281 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
12283 * driver.c (mono_main): Revert r102623. The right
12284 thing to do is to enable the verifier under verifiable
12285 unless a --security flag was passed.
12287 We need this non-trivial behavior for --verify-all otherwise
12288 mcs-compileall won't be able to use it. As it needs everything to
12289 be verified under validil.
12291 2008-05-06 Martin Baulig <martin@ximian.com>
12295 * debug-mini.c (mono_debugger_thread_created): Add proper locking.
12296 (mono_debugger_thread_cleanup): Likewise.
12297 (mono_debugger_extended_notification): Likewise.
12299 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
12301 * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
12302 against both inflated and non-inflated methods. We need to check against the
12303 generic definition for cases where the instantiated method is not visible.
12304 We need to check against the inflated types for cases where the instantiation
12305 changes any super type. This fixes #382986.
12307 Note that this doesn't need to be applied to other parts of mono_method_to_ir
12308 that check for visibiliy as generic params only appears as the type subject
12309 of tokens on call opcodes. Field manipulation and ldftn must always
12310 target an exact type.
12312 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
12314 * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
12315 if no related --security flag is passed.
12317 2008-05-05 Andreas Farber <andreas.faerber@web.de>
12319 * mini-arch.h: Prepare support for ppc64.
12321 Contributed under MIT/X11 license.
12323 2008-05-05 Andreas Farber <andreas.faerber@web.de>
12325 * aot-runtime.c: Prepare support for ppc64.
12327 Contributed under MIT/X11 license.
12329 2008-05-05 Andreas Farber <andreas.faerber@web.de>
12331 * mini-ops.h: Prepare support for ppc64.
12333 Contributed under MIT/X11 license.
12335 2008-05-04 Andreas Farber <andreas.faerber@web.de>
12337 * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
12339 Contributed under MIT/X11 license.
12341 2008-05-03 Zoltan Varga <vargaz@gmail.com>
12343 * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
12344 assemblies, since aot_name is not a full path, causing us to load MS.NET
12345 assemblies on windows.
12347 ?2008-04-28 Kornel Pal <kornelpal@gmail.com>
12349 * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
12350 for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
12351 * main.c: Use UTF-8 encoded command line instead of Windows default code
12352 page on Windows to support Unicode.
12353 * driver.c (DllMain): New function for mixed-mode assembly support.
12354 * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
12355 export __stdcall functions without decoration.
12357 Contributed under MIT/X11 license.
12359 2008-04-28 Mark Probst <mark.probst@gmail.com>
12361 * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
12362 saving it very early.
12364 2008-04-28 Mark Probst <mark.probst@gmail.com>
12366 * mini.h, mini.c: Lots of code for accessing the old RGCTX
12367 deleted. The only way to access the new RGCTX is via the
12370 * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
12371 vtable instead of the RGCTX to static methods.
12373 * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
12374 accessing the new RGCTX.
12376 * generic-sharing.c: There is no separation between self, type
12377 arguments and other types in the RGCTX anymore.
12379 2008-04-25 Jonathan Chambers <joncham@gmail.com>
12381 * mini-amd64.c (add_general): Remove previous stack adjustment.
12382 (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
12383 adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
12384 for 32 bytes of stack space reserved for all calls.
12386 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
12387 (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack
12390 Code contributed under MIT/X11 license.
12392 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
12394 * mini.c (mini_method_verify): Only verify non-inflated methods, check
12395 against the root definition, peeling out method and type instantiations.
12396 Cache verify success results, code that fails verification is still
12397 checked multiple times.
12399 2008-04-23 Zoltan Varga <vargaz@gmail.com>
12401 * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
12403 2008-04-23 Jonathan Chambers <joncham@gmail.com>
12405 * mini-amd64.c (add_general): Always increment stack on Win64.
12406 (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
12409 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for
12410 stack based argument handling on Win64.
12412 Code contributed under MIT/X11 license.
12414 2008-04-23 Raja R Harinath <harinath@hurrynot.org>
12416 * Makefile.am (version.h): Add support for git-svn.
12418 2008-04-22 Zoltan Varga <vargaz@gmail.com>
12420 * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
12421 so instead of calling g_spawn_command_line_sync, we do everything by hand,
12422 avoiding allocations and libc functions which might deadlock.
12424 * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
12425 'no-gdb-backtrace' option is set.
12427 * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
12429 * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
12431 2008-04-21 Martin Baulig <martin@ximian.com>
12433 * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
12434 and `get_lmf_addr'; `notification_address' is no longer a pointer.
12436 2008-04-21 Martin Baulig <martin@ximian.com>
12438 * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
12439 `thread_vtable', `event_handler_ptr' and `event_handler'.
12441 2008-04-21 Martin Baulig <martin@ximian.com>
12443 * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
12444 allows delayed initialization of the `executable_code_buffer' when
12447 2008-04-21 Martin Baulig <martin@ximian.com>
12449 * mini.h (mono_debugger_create_notification_function): Removed.
12450 * tramp-*.c (mono_debugger_create_notification_function): Removed.
12452 * mdb-debug-info64.s
12453 (MONO_DEBUGGER__notification_function): Added this in the .text section.
12455 * mdb-debug-info32.s
12456 (MONO_DEBUGGER__notification_function): Added this in the .text section.
12458 * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
12459 currently only works on x86 and x86_64, so don't create it on ppc.
12461 2008-04-21 Martin Baulig <martin@ximian.com>
12463 * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
12466 (mini_method_compile): In the fp elimination check, check
12467 `debug_options.mdb_optimizations' in addition to
12468 mono_debug_using_mono_debugger().
12470 * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
12471 disable some JIT optimizations which are only disabled when
12472 running inside the debugger.
12473 Added `--help-debug' option to describe the debugging options.
12474 (parse_debug_options): New static function to parse the `--debug'
12475 options, so we can easily add more stuff in future.
12477 2008-04-20 Zoltan Varga <vargaz@gmail.com>
12479 * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
12480 the method has no body.
12482 2008-04-19 Jonathan Chambers <joncham@gmail.com>
12484 * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
12485 assembly is not allowed in MSVC 64-bit compiler.
12486 (mono_arch_cpu_init): Don't set floating point precision on MSVC build
12487 as we get floating point exceptions everywhere.
12489 * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
12490 correctly align arguments for call to throw_exception.
12491 (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
12493 Code contributed under MIT/X11 license.
12495 2008-04-19 Zoltan Varga <vargaz@gmail.com>
12497 * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
12499 2008-04-17 Zoltan Varga <vargaz@gmail.com>
12501 * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
12503 * mini-amd64.c (NEW_INS): Set cil_code.
12505 * mini.c (mini_method_compile): Move the disabling of fp elimination to here
12506 from mini-amd64.c so all debugger related logic is in one place.
12508 * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
12509 later won't have a random ip assigned to them.
12511 2008-04-16 Zoltan Varga <vargaz@gmail.com>
12513 * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
12514 the arch specific function initializes code_size.
12515 (mono_create_delegate_trampoline): Ditto.
12517 * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
12518 tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
12521 * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if
12522 running under the debugger.
12524 * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
12527 * mini.c (mini_method_compile): Set a few flags in cfg if running under the
12528 debugger. Also move the disabling of optimizations here from driver.c.
12529 (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
12532 * mini.h (MonoCompile): Add a few new flags.
12534 2008-04-15 Zoltan Varga <vargaz@gmail.com>
12536 * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
12537 so the cil_code field of created MonoInst's is properly set.
12538 (mini_select_instructions): Ditto.
12540 * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
12541 (MONO_INST_NEW_CALL): Ditto.
12543 * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
12544 in many places so the ins->cil_code field is properly initialized.
12546 * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
12549 2008-04-14 Zoltan Varga <vargaz@gmail.com>
12551 * mini.c (mini_method_compile): Print a different message when compiling a
12554 * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
12557 2008-04-11 Zoltan Varga <vargaz@gmail.com>
12559 * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
12562 * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
12564 2008-04-11 Zoltan Varga <vargaz@gmail.com>
12566 * mini.c (handle_stack_args): Make this return void since its return value was
12567 never used. Also set cfg->unverifiable for invalid IL instead of calling
12570 2008-04-10 Mark Probst <mark.probst@gmail.com>
12572 * mini.c: Make sure "this" is live in catch clauses with type
12573 variables in shared generic code.
12575 2008-04-08 Mark Probst <mark.probst@gmail.com>
12577 * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
12578 generic_class_is_reference_type() to ensure the proper behaviour
12579 when sharing generic code and the type in question is a type
12582 2008-04-08 Zoltan Varga <vargaz@gmail.com>
12584 * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
12585 race conditions when printing thread dumps. Fixes #377738.
12587 2008-04-08 Massimiliano Mantione <massi@ximian.com>
12589 aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
12590 shows up when both MonoInst arguments can cause aliasig.
12591 There is likely no way in the current JIT to trigger this problem, but
12592 it showed up in the development of generics sharing, when in a new
12593 opcode both args of an OP_GROUP can be aliases (addresses of a local).
12594 When the generics sharing code will be committed, its tests will be
12595 valid also for this bug.
12597 2008-04-08 Zoltan Varga <vargaz@gmail.com>
12599 * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
12602 * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
12605 2008-04-07 Zoltan Varga <vargaz@gmail.com>
12607 * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
12608 use a more detailed exception message for InvalidCastException.
12610 * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
12612 * driver.c (mono_main): Add --debug=casts option to turn on better
12613 InvalidCastException message details.
12615 * mini.c (mini_get_debug_options): New helper function to return the address of
12616 the debug_options variable.
12618 * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
12619 the jit_tls TLS variable.
12621 * mini.c (mono_jit_tls): New TLS variable.
12623 * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
12626 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
12628 * mini.h: Removed verifer related stuff. This code was moved to verify.c
12630 * mini.c: Removed verifer related stuff, code moved to verify.c.
12632 * driver.c: Using code from verify.c instead of mini.c.
12634 2008-04-05 Zoltan Varga <vargaz@gmail.com>
12636 * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
12639 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
12641 * mini.c (check_for_method_verify): Enabling verification of
12642 corlib if mono_verify_all is set. Bugs in the verifier preventing that
12645 2008-04-04 Zoltan Varga <vargaz@gmail.com>
12647 * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
12648 caller saved registers as well.
12650 * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
12651 saved registers as well.
12653 2008-03-30 Zoltan Varga <vargaz@gmail.com>
12655 * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
12657 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
12660 2008-03-27 Zoltan Varga <vargaz@gmail.com>
12662 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
12664 (get_call_info): Take a gsctx argument instead of 'cfg'.
12666 2008-03-26 Zoltan Varga <vargaz@gmail.com>
12668 * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
12669 mono_verify_all is set.
12671 * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
12673 * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
12675 2008-03-25 Zoltan Varga <vargaz@gmail.com>
12677 * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
12680 * driver.c mini.c mini.h: Add a --verify-all development option to test the
12681 verifier and the code generated by the compiler.
12683 2008-03-25 Mark Probst <mark.probst@gmail.com>
12685 * mini.c: Generic sharing of the non-nullable case of the box
12688 2008-03-24 Zoltan Varga <vargaz@gmail.com>
12690 * inssel.brg: Fix the build.
12692 * iltests.il.in: Add a test for lconv.ovf.u8.un.
12694 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
12696 * mini.c (mono_method_to_ir): Implement readonly for ldelema and
12697 Array:Address. Fixes #372410.
12699 * iltests.il.in: New tests for readonly prefix.
12701 2008-03-23 Zoltan Varga <vargaz@gmail.com>
12703 * mini.h mini.c mini-trampolines.c: Move trampoline related code to
12704 mini-trampolines.c.
12706 * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to
12709 * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
12711 * mini.c (mono_decompose_op_imm): New helper function.
12713 * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
12714 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
12717 * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
12718 mono_arch_output_basic_block. Fix warnings.
12720 * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
12723 2008-03-22 Zoltan Varga <vargaz@gmail.com>
12725 * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
12726 since the extra frame is now detected automatically inside the loop.
12728 * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole
12729 opts which are now in mono_peephole_ins ().
12731 * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
12733 * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
12734 frames and skip duplicate managed-to-native frames. Fixes #367665.
12736 * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
12737 opts which are now in mono_peephole_ins ().
12738 (mono_arch_peephole_pass_2): Ditto.
12740 * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
12742 * mini-codegen.c (mono_peephole_ins): New helper function containing the
12743 arch independent peephole optimizations.
12745 * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
12746 opts which are now in mono_peephole_ins ().
12748 * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
12750 * mini-s390.c (mono_arch_output_basic_block): Fix build.
12752 * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
12755 * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
12756 CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
12759 2008-03-21 Zoltan Varga <vargaz@gmail.com>
12761 * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
12762 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
12765 * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
12766 mono_arch_output_basic_block. Fix warnings.
12768 2008-03-20 Zoltan Varga <vargaz@gmail.com>
12770 * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
12773 2008-03-20 Zoltan Varga <vargaz@gmail.com>
12775 * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
12778 * iltests.il: Add new tests.
12780 2008-03-20 Kornel Pal <kornelpal@gmail.com>
12782 * mini.c: Removed Windows version macros.
12784 2008-03-20 Mark Probst <mark.probst@gmail.com>
12786 * generic-sharing.c: Put reflection types in the extensible part
12787 of the runtime generic context.
12789 * mini.c: Generic sharing of the GetTypeHandle special case of the
12790 ldtoken instruction.
12792 2008-03-20 Zoltan Varga <vargaz@gmail.com>
12794 * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
12796 * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
12798 * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for
12799 consistency with the other version on the linear IR branch.
12801 * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
12803 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
12805 * iltests.il.in: Add new tests.
12807 2008-03-19 Zoltan Varga <vargaz@gmail.com>
12809 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
12811 * iltests.il.in: Add new tests.
12813 2008-03-19 Mark Probst <mark.probst@gmail.com>
12815 * mini.c: Two variables with the same name were declared in
12816 nesting contexts and one wasn't initialized. Fixed.
12818 2008-03-19 Mark Probst <mark.probst@gmail.com>
12820 * mini.c: Generic sharing of the initobj instruction.
12822 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
12824 * mini.c: make the test to optimize ldtoken from typeof() more
12827 2008-03-18 Mark Probst <mark.probst@gmail.com>
12829 * mini.c: Generic sharing of the initobj instruction for reference
12832 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
12834 * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
12835 the mono_breakpoint_clean_code() code to perform bound checks.
12837 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
12839 * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
12840 mono_arch_patch_callsite() to include the start of the managed method
12841 to be able to perform bound checks.
12843 2008-03-17 Mark Probst <mark.probst@gmail.com>
12845 * mini.c: Generic sharing for the isinst instruction.
12847 2008-03-17 Mark Probst <mark.probst@gmail.com>
12849 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
12850 inssel-long32-mips.brg: Added opcodes for doing indirect calls
12851 with the runtime generic context argument.
12853 * mini.c: Share calls to several types of unsharable methods by
12854 putting the address of the method code in the runtime generic
12855 context and doing an indirect call.
12857 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
12860 2008-03-16 Mark Probst <mark.probst@gmail.com>
12862 * generic-sharing.c: Change due to a change in the runtime genric
12865 2008-03-15 Martin Baulig <martin@ximian.com>
12868 (mono_arch_nullify_class_init_trampoline): Add call to
12869 mono_breakpoint_clean_code() to make things work when running
12870 inside the debugger.
12873 (mono_arch_nullify_class_init_trampoline): Add call to
12874 mono_breakpoint_clean_code() to make things work when running
12875 inside the debugger.
12877 2008-03-14 Zoltan Varga <vargaz@gmail.com>
12879 * inssel-long.brg (reg): Fix 64 bit build.
12881 2008-03-14 Mark Probst <mark.probst@gmail.com>
12883 * mini.c, mini.h: Share static generic code by passing it an
12884 implicit argument pointing to the runtime generic context.
12886 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
12887 inssel-long32-mips.brg: New opcodes for calling shared static,
12888 which need to be passed the runtime generic context.
12890 * mini-amd64.c, mini-x86.c: Save the runtime generic context
12891 argument on the stack in the prologue if needed. New function for
12892 finding the runtime generic context argument from the registers
12893 saved by the trampoline.
12895 * mini-amd64.h, mini-x86.h: Specify which register to use for the
12896 runtime generic context argument.
12898 * tramp-amd64.c: Also restore the register used for the runtime
12899 generic context argument.
12901 * mini-trampoline.c: Resolve shared static calls by consulting the
12902 runtime generic context via the new argument.
12904 * generic-sharing.c: Add an argument to sharability-checking
12905 functions that specifies whether type variables should be treated
12906 as sharable type arguments.
12908 * inssel-x86.brg: Removed a superfluous, buggy rule.
12910 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
12913 2008-03-14 Martin Baulig <martin@ximian.com>
12915 * debug-debugger.c (main_thread_handler): Call
12916 mono_runtime_run_main() without sending any notifications.
12918 * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
12920 2008-03-14 Zoltan Varga <vargaz@gmail.com>
12922 * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
12924 2008-03-14 Mark Probst <mark.probst@gmail.com>
12926 * tramp-x86.c: Fixed register restore offsets in the trampoline
12927 code for ECX and EDX.
12929 2008-03-12 Geoff Norton <gnorton@novell.com>
12931 * mini-arm.h: Add some #defines for locating sp, pc, r4 with
12932 different ucontext_t implementations.
12933 * exceptions-arm.c: Use the above defines to get exceptions working on
12934 iPhone (based on a patch by Luke Howard lukeh@padl.com)
12935 * mini-arm.c: Implement iPhone icache support (based on a patch by
12936 Luke Howard lukeh@padl.com)
12938 2008-03-12 Mark Probst <mark.probst@gmail.com>
12940 * mini.c: Enable generic sharing of calls to non-static
12941 non-interface non-generic non-value-type methods.
12943 * mini-trampolines.c: Resolve calls from shared generic code.
12945 2008-03-11 Zoltan Varga <vargaz@gmail.com>
12947 * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
12949 * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
12951 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
12953 * mini.c: some fixes for the AOT compiler.
12955 2008-03-07 Zoltan Varga <vargaz@gmail.com>
12957 * cpu-amd64.md: Add clob:1 to some float opcodes.
12959 2008-03-07 Rodrigo Kumpera <rkumpera@novell.com>
12961 * mini.h: Added MiniVerifierMode enumeration.
12963 * mini.c: Added mini_verifier_set_mode to control
12964 the usage of the new verifier.
12966 * mini.c (mono_method): Integrated the new verifier.
12968 * driver.c: Extended --security option with validil and
12969 verifiable options to activate the new verifier.
12971 2008-03-07 Zoltan Varga <vargaz@gmail.com>
12973 * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation
12974 optimization to ctors taking 0 or 2 arguments too.
12976 * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
12979 * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
12981 * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
12983 2008-03-06 Zoltan Varga <vargaz@gmail.com>
12985 * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
12986 non-aot case as well.
12988 * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
12990 * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
12993 * aot-compiler.c (encode_patch): Ditto.
12995 * mini.h (G_MININT32): Fix the definition of this.
12997 2008-03-05 Zoltan Varga <vargaz@gmail.com>
12999 * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
13001 * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
13003 2008-03-04 Zoltan Varga <vargaz@gmail.com>
13005 * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for
13006 methods returning vtypes in registers.
13007 (mono_arch_allocate_vars): Ditto.
13009 * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
13011 * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().
13013 * generics.cs: Add a test from the linear IR branch.
13015 * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
13017 * mini.c (inline_method): Cache failed inline attempts.
13019 2008-03-04 Mark Probst <mark.probst@gmail.com>
13021 * mini.c: For shared methods of generic classes put the location
13022 of "this" into the MonoGenericJitInfo.
13024 * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
13025 register out of a MonoContext by register number. Add the generic
13026 sharing context as an argument to mono_arch_find_this_argument().
13028 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
13029 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
13030 for new arch function.
13032 * mini-exception.c: Handle open exception clauses in shared
13035 * mini-trampolines.c: Supply additional argument to
13036 mono_arch_find_this_argument().
13038 2008-03-04 Zoltan Varga <vargaz@gmail.com>
13040 * Makefile.am (regtests): Run the bench.exe tests last.
13042 2008-03-03 Zoltan Varga <vargaz@gmail.com>
13044 * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
13047 2008-03-02 Zoltan Varga <vargaz@gmail.com>
13049 * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
13052 * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
13054 * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
13056 * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
13057 whose class has no cctor.
13059 * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
13061 2008-03-01 Zoltan Varga <vargaz@gmail.com>
13063 * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
13066 2008-02-29 Zoltan Varga <vargaz@gmail.com>
13068 * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
13069 to be in sync with the code on the linear IR branch.
13071 * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
13073 * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
13075 2008-02-27 Zoltan Varga <vargaz@gmail.com>
13077 * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
13079 * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
13081 * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
13083 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
13085 * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
13087 * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
13090 2007-11-14 Yoichi NAKAYAMA <nakayama@pixela.co.jp>
13092 * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
13093 OP_LOADR4_MEMBASE emission.
13095 * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
13096 (mono_spillvar_offset_float): Ditto.
13098 * mini-mips.c (mono_arch_emit_prolog): Ditto.
13100 * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
13103 * basic-long.cs: Add regression tests for them.
13105 * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
13107 (mono_arch_allocate_vars): Fix representation of single-precision float
13109 (mono_arch_output_basic_block): Ditto.
13111 * inssel-mips.brg: Ditto, remove duplicate items.
13113 * mini-mips.c (emit_load_volatile_arguments): New function to handle
13114 arguments of tail calls as on other platforms.
13115 (mono_arch_output_basic_block): Handle tail calls.
13117 * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
13120 * objects.cs (test_5_pass_static_struct): Add test for it.
13122 Contributed under MIT/X11 license.
13124 2008-02-26 Zoltan Varga <vargaz@gmail.com>
13126 * Makefile.am: Use gmcs for compiling the regression tests.
13128 * *.2.cs *.2.il: Rename to *.cs and *.il.
13130 2008-02-24 Zoltan Varga <vargaz@gmail.com>
13132 * regalloc.h: Make the vassign array smaller.
13134 * mini.c (mini_method_compile): Remove an unused field in cfg.
13136 * mini-codegen.c: Add a bunch of micro optimizations.
13138 2008-02-23 Zoltan Varga <vargaz@gmail.com>
13140 * regalloc.h: Remove some unused fields.
13142 2008-02-22 Zoltan Varga <vargaz@gmail.com>
13144 * mini-amd64.c (mono_arch_patch_code): Fix a warning.
13146 * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
13148 2008-02-22 Mark Probst <mark.probst@gmail.com>
13150 * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
13152 * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
13153 trampoline: Fetch an entry from the runtime generic context. If
13154 it's NULL, jump to the actual trampoline to fill the runtime
13155 generic context. Otherwise, return it.
13157 * mini.c: Call the lazy fetch trampoline to get entries out of the
13158 runtime generic context.
13160 * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
13161 tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
13162 tramp-sparc.c: Stubs for the lazy fetch trampoline.
13164 2008-02-21 Mark Probst <mark.probst@gmail.com>
13166 * mini.c: Fetch data out of the extensible part of the runtime
13167 generic context instead of calling a helper function.
13169 * generic-sharing.c: Some functions moved into
13170 metadata/generic-sharing.c. Helper function for fetching other
13171 types now checks and asserts against extensible rgctx (just for
13172 debugging purposes - the helper function isn't called anymore
13173 unless for debugging).
13175 2008-02-21 Zoltan Varga <vargaz@gmail.com>
13177 * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
13178 for tail calls up to the point that the tests in iltests.exe run. Also add a
13179 dummy CKFINITE implementation.
13180 (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
13181 needed for trampoline LMF frames.
13183 * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for
13184 trampoline LMF frames.
13186 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
13188 * mini.c (inline_method): clean any pending loader error when inlining fail.
13189 Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
13191 2008-02-21 Zoltan Varga <vargaz@gmail.com>
13193 * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
13195 * aot-runtime.c (decode_patch_info): Ditto.
13197 * mini.c (mono_resolve_patch_target): Ditto.
13199 * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
13202 * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
13204 * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
13205 if it references an icall address.
13207 2008-02-20 Zoltan Varga <vargaz@gmail.com>
13209 * cpu-s390x.md: Remove some more unused opcodes.
13211 * cpu-s390x.md: Remove some unused opcodes.
13213 * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
13214 mono_op_imm_to_op ().
13216 * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
13217 instead of a switch statement.
13219 * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
13220 the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
13222 * mini-codegen.c: Eliminate rassign macro which is no longer needed.
13224 * mini-codegen.c: Remove unused mono_regstate2_... functions.
13226 * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
13229 2008-02-19 Zoltan Varga <vargaz@gmail.com>
13231 * driver.c (mono_main): Improve error reporting when an assembly cannot be
13232 opened. Fixes #362607.
13234 * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
13236 * iltests.il.in: Add a test for static methods in interfaces.
13238 2008-02-18 Zoltan Varga <vargaz@gmail.com>
13240 * genmdesc.c (build_table): Fix a crash on older glib versions.
13242 * cpu-sparc.md: Remove some unused opcodes.
13244 * genmdesc.c: Error out if the .md contains CEE_ opcodes if
13245 MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
13247 * cpu-amd64.md: Remove some unused opcodes.
13249 * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
13250 like the other opcodes.
13252 2008-02-17 Zoltan Varga <vargaz@gmail.com>
13254 * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
13256 * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
13258 * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
13259 variables 'cfg' instead of 'm' for consistency.
13261 * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
13263 * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
13264 argument holding the vtype return address, to avoid the ambigious use of
13265 cfg->ret for this purpose.
13267 * mini.c (NEW_RETLOADA): Use vret_addr if set.
13269 * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
13271 * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
13272 new mono_print_ins () function which only takes one argument.
13274 2008-02-15 Zoltan Varga <vargaz@gmail.com>
13276 * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
13279 2008-02-14 Zoltan Varga <vargaz@gmail.com>
13281 * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
13283 * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
13285 * mini-x86.c: Sync with the version on the linear IR branch by adding new
13286 opcodes and other small changes.
13288 * mini-ops.h: Add some new opcodes from the linear IR branch.
13290 * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
13292 * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
13293 opcodes, use the REG_MEMBASE opcodes instead.
13295 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
13296 opcodes, use the REG_MEMBASE opcodes instead.
13298 * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
13301 * mini.c (mono_op_imm_to_op): New helper function.
13303 * mini-ops.h: Add some opcodes from linear IR branch.
13305 2008-02-13 Zoltan Varga <vargaz@gmail.com>
13307 * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov
13310 2008-02-12 Zoltan Varga <vargaz@gmail.com>
13312 * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to
13315 * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
13317 2008-02-09 Zoltan Varga <vargaz@gmail.com>
13319 * aot-compiler.c (emit_method_code): Add an assert.
13321 * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
13322 the IMT code so it is AOT friendly. Enable AOT for methods which call interface
13325 2008-02-08 Zoltan Varga <vargaz@gmail.com>
13327 * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for
13328 some load/store opcodes so they are consistent.
13329 (mono_arch_emit_prolog): Simplify some code.
13331 * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
13333 * objects.cs: Add tests for large argument offsets on ARM.
13335 * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large
13336 stack offsets. Fixes #359651.
13338 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
13340 * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
13342 * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
13344 * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
13346 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
13348 * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
13349 rid of CEE_CONV_R_UN.
13351 * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
13353 2008-02-07 Zoltan Varga <vargaz@gmail.com>
13355 * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
13357 * mini.c (mono_normalize_opcodes): Add some more opcodes.
13359 * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
13361 * cpu-amd64.md: Remove some unused opcodes.
13363 * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
13365 * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
13367 * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make
13368 arch specific functions for its parts. Call the peephole pass after local
13369 regalloc so the prolog can compute a more accurate max_offset.
13371 * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
13372 the corresponding OP_I/OP_L opcodes.
13374 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
13376 * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
13378 2008-02-06 Zoltan Varga <vargaz@gmail.com>
13380 * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
13381 as they are handled in mini.c.
13383 * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
13385 * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
13386 case since it is handled in mini.c.
13388 * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
13390 * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
13392 * *.c: Use the new opcodes in the IR and back end code.
13394 * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
13396 * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
13398 2008-02-06 Mark Probst <mark.probst@gmail.com>
13400 * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
13401 an assert because it has a race condition.
13403 2008-02-06 Zoltan Varga <vargaz@gmail.com>
13405 * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
13407 * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
13409 * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
13411 * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
13412 use OP_MOVE/OP_FMOVE/OP_ICONST instead.
13414 2008-02-05 Zoltan Varga <vargaz@gmail.com>
13416 * cpu-amd64.md (move): Correct the maximum size of move.
13418 2008-02-05 Mark Probst <mark.probst@gmail.com>
13420 * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
13421 the generic class init trampoline to return quickly if the class
13424 2008-02-04 Zoltan Varga <vargaz@gmail.com>
13426 * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
13427 issues where an 32 bit callsite cannot be patched by a 64 bit address.
13429 2008-02-03 Zoltan Varga <vargaz@gmail.com>
13431 * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
13434 2008-01-31 Zoltan Varga <vargaz@gmail.com>
13436 * objects.cs: Add some soft-float tests.
13438 * mini.c: Fix a couple more soft-float issues.
13440 * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
13442 * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
13443 avoid a REX prefix.
13445 2008-01-30 Zoltan Varga <vargaz@gmail.com>
13447 * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
13448 exception happens while compiling a virtual method.
13450 2008-01-29 Zoltan Varga <vargaz@gmail.com>
13452 * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
13454 * mini-sparc.c: Fix build.
13456 * mini-sparc.c (get_call_info): Add support for generic sharing.
13458 * mini-exceptions.c: Add a FIXME.
13460 2008-01-27 Zoltan Varga <vargaz@gmail.com>
13462 * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
13463 altstack handling code.
13465 * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
13467 * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
13469 * mini-s390.c: Add support for generic sharing.
13471 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
13473 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
13475 * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
13477 * mini-s390x.c: Add support for generic sharing.
13479 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
13481 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
13483 * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
13484 can be used since it takes a 16 bit signed immediate.
13486 * inssel-s390x.brg: Fix OP_SETRET.
13488 * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
13490 * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
13492 * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
13494 * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
13496 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
13499 * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
13502 * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
13503 of the unused mono_arch_patch_delegate_trampoline stuff.
13505 2008-01-26 Zoltan Varga <vargaz@gmail.com>
13507 * basic-long.cs: Move the fp related tests to basic-float.cs.
13509 * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
13511 * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
13513 * basic-calls.cs: Add a test for proper float argument passing.
13515 * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
13516 if the context corresponds to an exception received through a signal.
13518 * exceptions.cs: Add a test for nullref handling at the start of a try
13521 * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
13523 * jit-icalls.c (mono_break): New JIT icall.
13525 * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
13527 * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
13529 2008-01-25 Zoltan Varga <vargaz@gmail.com>
13531 * cpu-*.md: Get rid of unused opcodes.
13533 * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
13535 * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
13538 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
13541 * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
13542 the arch independent trampoline code in mini-trampolines.c.
13544 * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
13546 * mini.c (get_runtime_generic_context_ptr): Fix a warning.
13548 * mini-s390.h: Remove an unused define.
13550 * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
13551 the arch independent trampoline code in mini-trampolines.c.
13553 * mini-arm.c (mono_arch_emit_prolog): Fix build.
13555 2008-01-24 Zoltan Varga <vargaz@gmail.com>
13557 * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
13559 * mini-s390.c (mono_arch_emit_prolog): Fix build.
13561 * mini-s390x.c (mono_arch_emit_prolog): Fix build.
13563 * mini-ppc.c (mono_arch_emit_prolog): Fix build.
13565 * cpu-amd64.md: Use smaller sizes for int opcodes.
13567 * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
13569 * *.cs: Add some tests from the linear-ir branch. Move structs tests to
13572 * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
13575 * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
13576 instead of though a pointer to save an indirection when accessing elements of
13579 * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
13581 (NOT_IMPLEMENTED): New helper macro.
13582 (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
13585 * *.c: Use the new helper macro.
13587 2008-01-21 Zoltan Varga <vargaz@gmail.com>
13589 * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
13591 2008-01-20 Zoltan Varga <vargaz@gmail.com>
13593 * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
13596 2008-01-18 Zoltan Varga <vargaz@gmail.com>
13598 * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
13599 profiling is enabled.
13601 * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
13603 (mono_arch_emit_prolog): Add more first bblock optimizations.
13605 * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
13606 in order if possible.
13607 (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
13608 bblock, since the arguments are still in their original registers.
13610 * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
13612 2008-01-17 Zoltan Varga <vargaz@gmail.com>
13614 * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
13617 * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
13620 * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
13622 * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
13623 process async exceptions received while in unmanaged code.
13625 * mini.c (mini_init): Install a callback with the runtime which will be called
13626 when a thread receives an async exception while in unmanaged code.
13628 * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
13630 * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
13632 2008-01-16 Wade Berrier <wberrier@novell.com>
13639 2008-01-16 Zoltan Varga <vargaz@gmail.com>
13641 * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
13642 compilation with sun cc.
13644 * cpu-*.md: Fix the build.
13646 * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
13648 * mini-amd64.h: Add some comments to the MonoLMF structure.
13650 * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
13652 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
13653 in the LMF structure if possible. This saves two instructions in the
13654 managed->native wrappers.
13656 * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
13658 2008-01-16 Mark Probst <mark.probst@gmail.com>
13660 * generic-sharing.c: New type argument lookup code which uses the
13661 runtime generic context template.
13663 2008-01-15 Zoltan Varga <vargaz@gmail.com>
13665 * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
13667 * mini-arm.c (add_general): Fix arm eabi parameter passing.
13668 (mono_arch_output_basic_block): Fix localloc implementation.
13670 * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
13672 * mini-ia64.c (peephole_pass): Fix ia64 build.
13674 * mini-amd64.c (peephole_pass): Fix a warning.
13676 * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
13677 at a constant offset from sp/fp.
13679 * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
13680 instead of obtaining it from *lmf in the managed method case.
13682 2008-01-14 Zoltan Varga <vargaz@gmail.com>
13684 * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
13686 Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
13688 * mini.h (MonoInstList): New type.
13689 (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
13690 __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
13691 MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
13692 __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
13693 MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
13694 MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
13695 MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
13696 MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
13697 MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
13698 MONO_INST_LIST_FOR_EACH_PREV_SAFE,
13699 MONO_INST_LIST_FOR_EACH_ENTRY,
13700 MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
13701 MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
13702 mono_inst_list_first, mono_inst_list_last,
13703 mono_inst_list_next, mono_inst_list_prev): New instruction
13704 list handling interfaces.
13705 (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
13706 list head 'ins_list'.
13707 (MonoInst): Replace next pointer with list head 'node'.
13708 (MonoCallInst): Make 'out_args' a MonoInstList.
13709 (MONO_INST_NEW_CALL): Explicitly init ->out_args.
13710 (MonoCompile): Delete reverse_inst_list and
13711 reverse_inst_list_len.
13712 * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
13713 mono_arch_lowering_pass, mono_arch_local_regalloc,
13714 mono_arch_output_basic_block, mono_arch_emit_prolog):
13715 Convert to new instruction lists.
13716 (insert_after_ins): Delete.
13717 * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
13719 * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
13720 * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
13721 split_bblock, mono_add_ins_to_end, mono_emit_call_args,
13722 mono_emulate_opcode, mono_emit_load_got_addr,
13723 inline_method, mono_method_to_ir, mono_print_bb_code,
13724 print_dfn, decompose_pass, nullify_basic_block,
13725 replace_out_block_in_code, remove_block_if_useless,
13726 merge_basic_blocks, move_basic_block_to_end,
13727 try_unsigned_compare, optimize_branches, mono_print_code,
13728 mini_select_instructions, remove_critical_edges): Likewise.
13729 * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
13730 peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
13731 mono_arch_output_basic_block, mono_arch_emit_prolog):
13733 * mini-mips.c (mono_arch_call_opcode, peephole_pass,
13734 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
13735 mono_arch_output_basic_block): Likewise.
13736 (inst_list_prepend, insert_after_ins): Delete.
13737 * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
13738 MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
13740 * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
13741 peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
13742 mono_arch_emit_prolog): Likewise.
13743 * cfold.c (mono_constant_fold): Likewise.
13744 * liveness.c (visit_bb, mono_analyze_liveness,
13745 optimize_initlocals): Likewise.
13746 * ssapre.c (dump_code, process_bb, code_motion): Likewise.
13747 * graph.c (mono_draw_code_cfg): Likewise.
13748 * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
13749 mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
13750 mono_ssa_cprop): Likewise.
13751 * abcremoval (get_relations_from_previous_bb, process_block):
13753 * local-propagation (mono_cprop_invalidate_values,
13754 mono_local_cprop_bb): Likewise.
13755 * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
13756 peephole_pass, mono_arch_output_basic_block,
13757 mono_arch_emit_prolog): Likewise.
13758 * mini-arm.c (mono_arch_call_opcode, peephole_pass,
13759 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
13760 mono_arch_emit_prolog): Likewise.
13761 (insert_after_ins): Delete.
13762 * aliasing.c (print_code_with_aliasing_information,
13763 mono_build_aliasing_information, mono_aliasing_deadce):
13764 Convert to new instruction lists.
13765 * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
13766 peephole_pass, NEW_INS, mono_arch_lowering_pass,
13767 mono_arch_local_regalloc, mono_arch_output_basic_block):
13769 (insert_after_ins): Delete.
13770 * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
13771 peephole_pass, mono_arch_output_basic_block): Convert to
13772 new instruction lists.
13773 * mini-codegen (InstList, inst_list_prepend,
13774 insert_after_ins): Delete.
13775 (insert_before_ins, get_register_force_spilling,
13776 get_register_spilling, free_up_ireg, free_up_reg,
13777 create_copy_ins, create_spilled_store, alloc_int_reg,
13778 alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
13779 to new instruction lists.
13780 * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
13781 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
13782 mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
13783 (insert_after_ins): Delete.
13784 * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
13785 mono_arch_local_regalloc, mono_arch_output_basic_block,
13786 mono_arch_call_opcode): Convert to new instruction lists.
13787 (insert_after_ins): Delete.
13788 * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
13789 peephole_pass, mono_arch_output_basic_block,
13790 mono_arch_emit_prolog): Convert to new instruction lists.
13792 2008-01-11 Zoltan Varga <vargaz@gmail.com>
13794 * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
13796 * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
13799 * Makefile.am (version.h): Make this work with non-bash shells.
13801 2008-01-10 Zoltan Varga <vargaz@gmail.com>
13803 * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
13805 2008-01-08 Zoltan Varga <vargaz@gmail.com>
13807 * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
13808 the InitializeArray optimization.
13810 2008-01-06 Zoltan Varga <vargaz@gmail.com>
13812 * mini.c driver.c: Don't include os/gc_wrapper.h.
13814 2008-01-05 Zoltan Varga <vargaz@gmail.com>
13816 * mini.c (print_jit_stats): Print GC statistics if available.
13818 2008-01-04 Zoltan Varga <vargaz@gmail.com>
13820 * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
13822 2007-12-29 Zoltan Varga <vargaz@gmail.com>
13824 * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
13826 2007-12-26 Zoltan Varga <vargaz@gmail.com>
13828 * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
13830 * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
13832 * driver.c (mono_main): Ditto.
13834 2007-12-23 Zoltan Varga <vargaz@gmail.com>
13836 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
13838 * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
13839 in the vtable can't be encoded.
13840 (compile_method): Ditto.
13842 2007-12-21 Zoltan Varga <vargaz@gmail.com>
13844 * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
13847 * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
13850 * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
13851 the top LMF entry belongs to the current method.
13853 * mini.c: Update after renaming of mono_thread_get_pending_exception ().
13855 2007-12-20 Zoltan Varga <vargaz@gmail.com>
13857 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
13859 * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
13861 * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
13863 * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
13865 * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
13867 * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
13870 * basic-float.cs: Add an ulong->double cast test.
13872 2007-12-15 Zoltan Varga <vargaz@gmail.com>
13874 * mini.c (mono_method_to_ir): Fix a warning.
13876 2007-12-14 Zoltan Varga <vargaz@gmail.com>
13878 * mini-ops.h: Add OP_SWITCH.
13880 * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
13881 CEE_SWITCH in back-end code, use OP_SWITCH instead.
13883 2007-12-11 Geoff Norton <gnorton@novell.com>
13885 * mini-s390x.c: Minor change to the MAX() define to allow
13886 it to compile with other gcc versions.
13888 2007-12-11 Geoff Norton <gnorton@novell.com>
13891 * mini-s390x.c: Implement sext_i4 to fix the build on s390x
13893 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
13895 exceptions-arm.c (mono_arch_get_restore_context): Restore
13898 exceptions-arm.c (throw_exception): Save the frame pointer.
13899 This is a partial fix for #323747. Only the client side is
13902 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
13904 * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
13905 was using an unrelated variable to log the class which
13906 needed the cctor to be called. This was crashing on arm.
13908 2007-12-09 Robert Jordan <robertj@gmx.net>
13910 * mini-x86.c (mono_arch_emit_epilog):
13911 Consider all kinds of 64-bit types. Fixes #323114.
13913 2007-12-08 Zoltan Varga <vargaz@gmail.com>
13915 * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
13917 2007-12-07 Zoltan Varga <vargaz@gmail.com>
13919 * mini-amd64.c (peephole_pass): Add a missing instruction check.
13921 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13923 * mini.c: run type ctor before allocating an object, not only
13924 when running it's constructor method (fixes at least part of bug #342507).
13926 2007-12-07 Zoltan Varga <vargaz@gmail.com>
13928 * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
13930 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
13931 * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
13934 * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
13935 mono_generic_class_init_trampoline () the same as it is done with the other
13938 * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
13939 aot-runtime.c aot-compiler.c: Implement AOT support.
13941 2007-12-07 Mark Probst <mark.probst@gmail.com>
13943 * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
13944 build for archs which don't have the vtable trampoline defined
13947 2007-12-07 Zoltan Varga <vargaz@gmail.com>
13949 * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
13951 * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
13953 * mini-trampolines.c (mono_get_trampoline_func): New helper function.
13955 * tramp-<ARCH>.c: Use the new helper function.
13957 2007-12-07 Mark Probst <mark.probst@gmail.com>
13959 * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
13960 trampoline call, which takes a vtable argument.
13962 * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
13963 OP_TRAMPCALL_VTABLEs like other calls.
13965 * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
13966 register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
13967 call. Implemented a support function which fetches the vtable
13968 from a register set.
13970 * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
13971 Implemented a generic class init trampoline, using the
13972 OP_TRAMPCALL_VTABLE opcode.
13974 * mini.c: Implemented static field access when sharing generic
13975 code. This implies initing the class using the new
13976 OP_TRAMPCALL_VTABLE call.
13978 2007-12-07 Mark Probst <mark.probst@gmail.com>
13980 * mini.c: Don't compile methods with sharing enabled if their
13981 classes are disabled for sharing.
13983 2007-12-06 Zoltan Varga <vargaz@gmail.com>
13985 * inssel.brg: Add a missing sign extension to the GETCHR and array access
13986 opcodes. Fixes #346563.
13988 * objects.cs: Add a new test.
13990 * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
13992 * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
13993 HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
13995 2007-12-06 Zoltan Varga <vargaz@gmail.com>
13997 * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
13999 2007-12-03 Zoltan Varga <vargaz@gmail.com>
14001 * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
14004 2007-12-02 Zoltan Varga <vargaz@gmail.com>
14006 * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
14008 * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
14009 optimization in the AOT case.
14011 2007-11-30 Zoltan Varga <vargaz@gmail.com>
14013 * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
14015 * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
14017 * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
14019 * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
14021 * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
14022 is created by the inlined delegate ctor.
14024 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
14026 * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
14028 2007-11-29 Zoltan Varga <vargaz@gmail.com>
14030 * cpu-x86.md: Fix the length of ckfinite.
14032 2007-11-28 Zoltan Varga <vargaz@gmail.com>
14034 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
14036 * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
14037 (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
14039 * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
14041 * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
14042 OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
14044 2007-11-28 Martin Baulig <martin@ximian.com>
14047 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
14048 after creating the trampoline.
14050 2007-11-27 Zoltan Varga <vargaz@gmail.com>
14052 * aot-runtime.c (load_aot_module): Check runtime version if needed.
14054 * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
14057 * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
14058 instead of the calling method to help AOT.
14060 * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
14062 2007-11-26 Zoltan Varga <vargaz@gmail.com>
14064 * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
14067 2007-11-23 Zoltan Varga <vargaz@gmail.com>
14069 * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
14071 * aot-compiler.c (compile_method): Correct check for generic method definitions.
14072 (encode_method_ref): No need to handle generic method definitions specially.
14074 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
14076 * aot-runtime.c (decode_klass_ref): Clean this up and rename from
14079 * aot-compiler.c (encode_klass_ref): Clean this up and rename from
14081 (compile_method): Enable generic sharing.
14083 2007-11-22 Zoltan Varga <vargaz@gmail.com>
14085 * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
14086 (mini_method_compile): Add preliminary support for AOTing shared generic code.
14088 * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
14091 * mini-trampolines.c: Fix a warning.
14093 * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
14095 (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
14096 (generic_class_is_reference_type): Remove unused function.
14098 * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
14099 in the generic vtable trampoline case.
14101 * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
14103 * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
14104 return an AOT method based on a vtable slot.
14106 * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
14108 * mini.c (mini_get_vtable_trampoline): Export this.
14110 2007-11-22 Martin Baulig <martin@ximian.com>
14113 (MonoDebuggerInfo): Move `debugger_version' up.
14115 2007-11-22 Martin Baulig <martin@ximian.com>
14118 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
14120 * mini-trampolines.c
14121 (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
14122 after compiling the method.
14124 2007-11-20 Martin Baulig <martin@ximian.com>
14127 (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
14128 (mono_debugger_remove_breakpoint): Likewise.
14129 (mono_debugger_check_breakpoints): Likewise.
14131 * debug-debugger.c: Implement the new breakpoint interface here.
14133 2007-11-18 Zoltan Varga <vargaz@gmail.com>
14135 * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
14136 CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
14138 * mini-x86.c (mono_arch_output_basic_block): Ditto.
14140 2007-11-17 Zoltan Varga <vargaz@gmail.com>
14142 * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
14144 * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
14147 * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
14150 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
14151 returning a vtype in a register.
14153 * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
14154 here from the arch specific code.
14156 * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
14159 * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
14160 (mono_arch_emit_prolog): Increment maximum prolog size.
14162 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
14163 START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
14165 * mini-x86.c (get_call_info): Receive a MonoCompile instead of a
14166 MonoGenericSharingContext.
14168 * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
14169 MonoGenericSharingContext. Allocate memory from the cfg mempool.
14171 2007-11-15 Mark Probst <mark.probst@gmail.com>
14173 * mini.c, mini.h, generic-sharing.c: Functions for producing code
14174 which extract fields out of the runtime generic context. Full
14175 sharing of the NEWARR opcode.
14177 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
14179 * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
14180 --enable-minimal=ssa.
14182 2007-11-13 Zoltan Varga <vargaz@gmail.com>
14184 * mini-trampolines.c (mono_delegate_trampoline): Update after
14185 mono_marshal_get_delegate_invoke () signature change.
14187 2007-11-13 Mark Probst <mark.probst@gmail.com>
14189 * mini.c: Removed the shared context in favor of the generic
14190 sharing context. Allocate the MonoJitInfo structure with room for
14191 the generic sharing context if it's needed.
14193 * mini.h: Remove MonoGenericSharingContext declaration. It's in
14194 domain-internals.h now.
14196 * mini-x86.c: Pass the generic sharing context to get_call_info ().
14198 * generic-sharing.c: Several changes for working without a shared
14199 context and instead operating on open types instead.
14201 2007-11-12 David S. Miller <davem@davemloft.net>
14203 * inssel-sparc.brg: Fix double instruction emit.
14205 2007-11-12 Zoltan Varga <vargaz@gmail.com>
14207 * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
14208 Get/Set/Address methods.
14210 * mini.c debug-debugger.c mini-trampolines.c: Update after
14211 mono_marshal_get_delegate_invoke signature change.
14213 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
14215 * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
14216 This can happens with dynamic methods. Fixes the other bug in #322722.
14218 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
14220 * tramp-arm.c (mono_arch_patch_callsite): Support patching
14223 * mini-arm.c (arm_patch): Implement patching of BX call
14224 sequence. Fixes one of the bugs in #322722.
14226 2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
14228 * mini-sparc.c (mono_arch_flush_icache): Make more efficient
14229 under Linux. We only need to flush every 32-byte cache line.
14231 2007-11-07 Massimiliano Mantione <massi@ximian.com>
14234 move_basic_block_to_end: Add branches when needed, eventually creating
14236 optimize_branches: added a parameter that tells if it's ok to create
14237 new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
14238 and avoid calling move_basic_block_to_end when it's not ok.
14241 2007-11-07 Mark Probst <mark.probst@gmail.com>
14243 * mini.c: Abort inlining call to InitializeArray if something
14244 looks wrong. Let the icall handle it, which now has proper safety
14247 2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
14249 * mini.c (mono_spill_call): add support for soft-float.
14251 * mini.c (mono_method_to_ir): add support for soft-float
14252 to inlined functions that return float.
14254 * mini.c (mono_method_to_ir): add support for soft-float
14255 to cee_stsfld opcode on float fields.
14257 2007-11-05 Geoff Norton <gnorton@novell.com>
14259 * mini-x86.h: Fix the structure access for X86 Leopard.
14262 2007-11-05 Martin Baulig <martin@ximian.com>
14264 * mini-trampolines.c
14265 (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
14266 after compiling the method to notify the debugger.
14268 2007-11-05 Martin Baulig <martin@ximian.com>
14270 * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
14272 2007-11-02 Zoltan Varga <vargaz@gmail.com>
14274 * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
14275 David Miller <davem@davemloft.net>. Allow larger offsets in branches.
14277 2007-11-01 Zoltan Varga <vargaz@gmail.com>
14279 * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
14280 native-to-managed wrappers.
14282 2007-11-01 Geoff Norton <gnorton@novell.com>
14284 * mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
14287 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
14289 * mini.c, mini-x86.c: when getting back from unmanaged code
14290 to managed via a marshaled delegate we also need to set the
14293 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
14295 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
14298 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
14300 * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
14301 let the debugger or other external agents to tell the JIT when
14302 a sw breakpoint has been inserted in the code that the JIT needs
14303 to be able to inspect.
14305 2007-10-31 Martin Baulig <martin@ximian.com>
14308 (MonoDebuggerInfo): Remove `runtime_class_init'.
14310 2007-10-30 Martin Baulig <martin@ximian.com>
14313 (mono_debugger_thread_created): Added `MonoThread *' argument.
14314 (mono_debugger_extended_notification): New public method.
14315 (mono_debugger_trampoline_compiled): New public method.
14318 (MonoDebuggerThreadInfo): Added `thread' and
14319 `extended_notifications' fields.
14322 (debugger_executable_code_buffer): New static variable.
14325 (MonoDebuggerInfo): Added `executable_code_buffer',
14326 `executable_code_buffer_size', `breakpoint_info_area',
14327 `breakpoint_table' and `breakpoint_table_size'.
14329 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
14331 * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
14332 that IP either is an unused value or the vtable pointer. IMT
14333 calls use vtable + offset now. Reduced by almost half the size
14336 2007-10-26 Jonathan Chambers <joncham@gmail.com>
14338 * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
14339 defines to access param registers. Replace long usage with
14340 gsize as sizeof(long) != sizeof(void*) on Win64.
14342 * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
14343 on Win64. Fix intrinsic, use _AddressOfReturnAddress
14344 instead of non-existant _GetAddressOfReturnAddress.
14346 * tramp-amd64.c: Use AMD64_ARG_REG# defines to access
14347 param registers. Save/restore %rdi and %rsi in MonoLMF.
14349 * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
14350 param registers. Modify (throw_exception) signature to take
14351 %rdi and %rsi on Win64.
14353 Code is contributed under MIT/X11 license.
14355 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
14357 * helpers.c: unlink debugging output files.
14359 2007-10-25 Zoltan Varga <vargaz@gmail.com>
14361 * mini.c: Move mono_create_ftnptr () to object.c.
14363 2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
14365 * helpers.c (mono_disassemble_code): MonoCompile parameter is now
14366 optional. This function can now be used to disassemble code generated
14367 outside the JIT such as trampolines and IMT thunks.
14369 * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
14371 * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
14372 vtable pointer from a ldr instruction.
14374 * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
14375 new IMT call sequence.
14377 * mini-arm.c (mono_arch_output_basic_block): emit the IMT
14378 call sequence for interface invocations.
14380 * mini-arm.c (mono_arch_emit_imt_argument): added, required
14381 for imt support. This function is empty since IMT on ARM requires no
14382 special handling on the IR side.
14384 * mini-arm.c (mono_arch_find_imt_method): added, required for
14387 * mini-arm.c (mono_arch_find_this_argument): added, required
14390 * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
14391 a ldr instruction to load a value stored in the code stream.
14393 * mini-arm.c (mono_arch_build_imt_thunk):added, required
14397 2007-10-23 Zoltan Varga <vargaz@gmail.com>
14399 * mini.c (mini_init): Install the jump trampoline callback.
14401 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
14403 * mini-trampolines.c: handle synchronized methods with the common
14404 vtable trampoline (bug #335601).
14406 2007-10-17 Zoltan Varga <vargaz@gmail.com>
14408 * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
14410 * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
14413 * mini-ia64.h mini-ia64.c: Add support for IMT.
14415 * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
14416 prolog. Fixes #331958.
14418 2007-10-15 Zoltan Varga <vargaz@gmail.com>
14420 * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
14422 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
14424 * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
14427 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
14429 * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
14432 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
14434 * mini-x86.c, mini-x86.h: x86 support for the common vtable
14437 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
14439 * mini-trampolines.c: changed the magic rampoline to understand
14440 the common vtable trampoline method: the method to invoke is
14441 determined by the vtable displacement of the call.
14443 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
14445 * mini.c, mini.h: register the common vtable trampoline if the
14446 architecture supports it.
14448 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
14450 * cpu-amd64.md: use the correct max length for tls_get.
14452 2007-10-14 Zoltan Varga <vargaz@gmail.com>
14454 * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
14455 CEE_STELEM_ANY. Fixes #333696.
14457 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
14459 * exceptions-x86.c: provide more graceful handling of the case where
14460 we followed a bogus function pointer from managed code (bug #332866).
14462 2007-10-11 Mark Probst <mark.probst@gmail.com>
14464 * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
14465 replaces the generic_shared flag and will carry more information
14468 * generic-sharing.c: Added mini_type_stack_size() which allows
14469 allows open types if given a generic sharing context.
14470 mini_get_basic_type_from_generic() takes a
14471 MonoGenericSharingContext* instead of a MonoCompile* now.
14473 * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
14474 mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
14475 mini-sparc.c, mini-x86.c: Trivial changes required by the two
14476 changes above. Just passing arguments through to the right
14479 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
14481 * mini-arm.c: unify the call emission to emit_code_seq().
14483 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
14485 * tramp-arm.c: reduced the trampoline size.
14487 2007-10-10 Mark Probst <mark.probst@gmail.com>
14489 * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
14490 variable handling out of arch-specific code.
14492 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
14494 * mini-arm.c: implemented fast delegate dispatch.
14496 2007-10-09 Zoltan Varga <vargaz@gmail.com>
14498 * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
14499 that fp elimination is turned off if the space required by locals is too
14500 big. Fixes #331958.
14502 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
14504 * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
14505 ARM to the new style trampoline.
14507 2007-10-09 Zoltan Varga <vargaz@gmail.com>
14509 * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
14511 * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
14513 2007-10-09 Martin Baulig <martin@ximian.com>
14516 (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
14517 `field_info_offset_offset'.
14519 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
14521 * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
14522 removed more internal usage of the r11 register and made it available
14523 to the register allocator.
14525 2007-10-08 Mark Probst <mark.probst@gmail.com>
14527 * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
14528 when sharing generics and treat type variables as references.
14530 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
14532 * mini-ppc.c: started removing the internal uses of register r11
14533 to eventually allow the register allocator to manage it as an
14534 additional available register.
14536 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
14538 * tramp-amd64.c: fixed memory corruption in the trampoline generation.
14540 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
14542 * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
14543 specific trampolines as they are not performance critical as a jump
14544 target (maybe align as before only for AOT code?). This saves about
14545 200 KB of native code on x86 for monodevelop startup.
14547 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
14549 * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
14550 monodevelop startup.
14552 2007-10-06 Zoltan Varga <vargaz@gmail.com>
14554 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
14556 * mini-sparc.h mini-sparc.c: Implement IMT support.
14558 * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
14559 its smaller and doesn't clobber sparc_g1.
14561 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
14563 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
14565 * mini-ppc.c: optimized the size of the IMT thunks a bit.
14567 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
14569 * mini-ppc.c: implemented fast delegate invocation.
14571 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
14573 * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
14575 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
14577 * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
14578 code to the new style trampoline in preparation for IMT support.
14580 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
14582 * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
14583 systems already. This also reduces the specific trampiline sizes and
14584 prepares for the use of r12 as the IMT identifier register.
14586 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
14588 * mini-mips.h: endianess fix (simplified from a patch by
14589 Thomas Kunze <thommy@tabao.de>, bug #323737).
14591 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
14593 * exceptions-ppc.c, mini-ppc.h: refactor to use macros
14594 to access ucontext fields and enable netbsd support
14595 (partially from Magnus Henoch <mange@freemail.hu>).
14597 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
14599 * genmdesc.pl: patch from Henryk Plotz <henryk@openmoko.org> to
14600 use the preprocessor from the CPP env var if it is set.
14602 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
14604 * mini-trampolines.c: fixed an assertion and moved it earlier in the
14605 code, before interface_offset gets used.
14607 2007-10-02 Zoltan Varga <vargaz@gmail.com>
14609 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
14610 mono_class_setup_vtable () before accessing klass->vtable.
14612 2007-10-01 Zoltan Varga <vargaz@gmail.com>
14614 * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
14617 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
14619 * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
14620 IMT slots (this saves hundreds of KB of memory in programs like
14621 IronPython and Monodevelop).
14623 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
14625 * mini.c: print the delegate counter.
14627 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
14629 * mini-x86.c: make it easier to enable the debugging code for IMT
14632 2007-09-28 Martin Baulig <martin@ximian.com>
14635 (MonoDebuggerMetadataInfo): Add `klass_image_offset',
14636 `mono_method_klass_offset' and `mono_method_token_offset'.
14638 2007-09-20 Mark Probst <mark.probst@gmail.com>
14640 * mini.c: First generics sharing implementation. Can only share
14641 in very simple cases. If sharing doesn't work it falls back to
14642 dedicated compilation.
14644 * mini.h: Flag in MonoCompile to specify whether generic
14645 compilation is shared. Flags enum for marking which generic inst
14646 of a context is used. Prototypes for helper functions.
14648 * generic-sharing.c: Helper functions for generic method sharing.
14650 * optflags-def.h: Optimization flag (gshared) for enabling generic
14651 method sharing added.
14653 * Makefile.am: generic-sharing.c added.
14655 2007-09-19 Daniel Nauck <dna@mono-project.de>
14657 * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
14659 2007-09-19 Massimiliano Mantione <massi@ximian.com>
14660 * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
14663 2007-09-19 Martin Baulig <martin@ximian.com>
14665 * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
14666 mono_debug_cleanup() is now part of mono_cleanup().
14668 2007-09-18 Zoltan Varga <vargaz@gmail.com>
14670 * driver.c (mono_main): Fix a warning.
14672 2007-09-17 Zoltan Varga <vargaz@gmail.com>
14674 * aot-compiler.c: Optimize various parts when processing large assemblies.
14677 * mini.c (mono_patch_info_hash): Improve hash function.
14679 2007-09-14 Jonathan Chambers <joncham@gmail.com>
14681 * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
14683 Code is contributed under MIT/X11 license.
14685 2007-09-14 Zoltan Varga <vargaz@gmail.com>
14687 * mini.c (mini_init): Fix a leak.
14689 * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
14691 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
14693 * mini.c: redirect string.InternalAllocStr() to the managed allocator.
14695 2007-09-14 Zoltan Varga <vargaz@gmail.com>
14697 * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
14699 2007-09-13 Zoltan Varga <vargaz@gmail.com>
14701 * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
14704 * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
14706 * mini.c (handle_alloc): Enable managed allocators in AOT code.
14708 * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
14710 * aot-runtime.c (decode_patch_info): Ditto.
14712 2007-09-12 Jonathan Chambers <joncham@gmail.com>
14714 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
14715 static case. Cache delegates in architecture specific code,
14716 based on number of parameters.
14718 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
14719 in architecture specific code, based on number of parameters.
14721 * mini-trampolines.c (mono_delegate_trampoline): Architecture specific
14722 caching happen in architecture specific code now.
14724 Code is contributed under MIT/X11 license.
14726 2007-09-12 Jonathan Chambers <joncham@gmail.com>
14728 * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
14729 mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
14730 mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
14732 Code is contributed under MIT/X11 license.
14734 2007-05-15 Massimiliano Mantione <massi@ximian.com>
14735 * mini.c: (mono_thread_abort) Fixed bug #82416.
14737 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
14739 * mini.: hook the new managed GC allocation feature into the JIT.
14741 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
14743 * mini.c: implementation for the new runtime tls opcode.
14745 2007-09-11 Martin Baulig <martin@ximian.com>
14748 (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
14749 `mono_method_inflated_offset'.
14751 2007-09-07 Zoltan Varga <vargaz@gmail.com>
14753 * driver.c mini.h mini.c: Add a new devel command line option for injecting
14754 async exceptions into a method.
14756 * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
14757 purpose of testing whenever the unwinder works at every instruction.
14759 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
14761 * mini.c: check accessibility of method used in ldftn (fixes
14764 2007-09-04 Zoltan Varga <vargaz@gmail.com>
14766 * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
14768 * inssel.brg: Fix a warning.
14770 2007-09-03 Martin Baulig <martin@ximian.com>
14772 * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
14773 now takes the `main_method' as argument.
14775 2007-09-02 Zoltan Varga <vargaz@gmail.com>
14777 * cpu-sparc.md (endfilter): Add missing src1:i argument.
14779 2007-08-30 Jonathan Chambers <joncham@gmail.com>
14781 * driver.c: include the cil-coff.h header on Windows.
14783 Code is contributed under MIT/X11 license.
14785 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
14787 * mini.c, driver.c: don't include the cil-coff.h header.
14789 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
14791 * mini.c: flag places that needs fixes fo soft-float support.
14793 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
14795 * mini.h, inssel-float.brg: fix soft-float constant loads on big
14796 endian systems (partially from Dean Jenkins, bug #81924).
14798 2007-08-28 Mark Probst <mark.probst@gmail.com>
14800 * mini.c (check_linkdemand): Remove embedded reference object in
14801 call to LinkDemandSecurityException.
14802 (mono_jit_compile_method_inner): Call LinkDemandSecurityException
14803 with an IntPtr instead of a reference object.
14805 2007-08-28 Zoltan Varga <vargaz@gmail.com>
14807 * mini.c (handle_initobj): Handle alignment properly.
14809 * inssel.brg (mini_emit_memset): Ditto.
14811 * inssel.brg (mini_emit_memcpy): Ditto.
14813 * inssel-sparc.brg: Ditto.
14815 * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
14817 2007-08-26 Zoltan Varga <vargaz@gmail.com>
14819 * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
14820 exceptions raised in unmanaged code. Fixes part of #82594.
14822 2007-08-24 Mark Probst <mark.probst@gmail.com>
14824 * mini.c (mono_method_to_ir), declsec.c
14825 (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
14827 2007-08-22 Martin Baulig <martin@ximian.com>
14830 (MonoDebuggerThreadInfo): New typedef.
14831 (mono_debugger_thread_table): New global variable.
14832 (mono_debugger_thread_created): New public function.
14833 (mono_debugger_thread_cleanup): New public function.
14836 (MonoDebuggerInfo):
14837 - removed `get_current_thread' and `lookup_assembly'.
14838 - removed `data_table'.
14839 - added `thread_table'.
14842 (mono_thread_start_cb): Call mono_debugger_thread_created().
14843 (mono_thread_attach_cb): Likewise.
14844 (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
14845 (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
14848 * driver.c (mono_main): Move mono_debug_init() up, before calling
14849 mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
14851 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
14853 * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
14854 together when passing several arguments of type double (gives a small
14855 speedup and saves a few bytes of generated code).
14857 2007-08-20 Jb Evain <jbevain@novell.com>
14859 * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
14861 2007-08-20 Jb Evain <jbevain@novell.com>
14863 * mini.c (mono_method_to_ir): throw MethodAccessException
14864 and FieldAccessException instead of InvalidProgramException.
14866 2007-08-20 Mark Probst <mark.probst@gmail.com>
14868 * mini.c: CoreCLR security checks.
14870 * mini.h: Removed MonoSecurityMode (moved to
14871 metadata/security-manager.h) and mono_security_mode global var
14872 (replaced by set/get functions in security-manager.h).
14874 * driver.c: Added "core-clr-test" security mode for testing. Used
14875 set-function for setting security mode.
14877 2007-08-17 Mark Probst <mark.probst@gmail.com>
14879 * mini.c: MonoJitInfo's are freed hazardously now. Statistics for
14880 the new jit_info_table.
14882 * driver.c: Test code for the new jit_info_table (enabled by the
14883 define MONO_JIT_INFO_TABLE_TEST).
14885 2007-08-14 Zoltan Varga <vargaz@gmail.com>
14887 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
14888 detection of call <REG> instruction sequence. Fixes build on freebsd.
14890 2007-08-13 Zoltan Varga <vargaz@gmail.com>
14892 * mini-exceptions.c: Fix a warning.
14894 2007-08-11 Zoltan Varga <vargaz@gmail.com>
14896 * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
14897 stack overflow handling code on amd64 too.
14899 * mini-exceptions.c (mono_setup_altstack): Make this use
14900 mono_thread_get_stack_bounds ().
14902 * mini-x86.h: Disable sigaltstack on solaris x86.
14904 2007-08-10 Zoltan Varga <vargaz@gmail.com>
14906 * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
14908 2007-08-10 Geoff Norton <gnorton@customerdna.com>
14910 * tramp-x86.c: Remove some unneeded alignment changes on Apple. Fixes #82387.
14912 2007-08-08 Zoltan Varga <vargaz@gmail.com>
14914 * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
14916 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
14918 2007-08-03 Neale Ferguson <neale@sinenomine.net>
14920 * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
14923 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
14925 * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
14926 to be emitted (bug #82281).
14928 2007-08-01 Martin Baulig <martin@ximian.com>
14930 Merged the `debugger-dublin' branch.
14932 * debug-debugger.h (MonoDebuggerInfo):
14933 Removed the `old_*' compatibility entries.
14934 Added `debugger_version' and `data_table'.
14935 Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
14936 Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
14939 (MiniDebugMethodBreakpointInfo): Add `address_list'.
14940 (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
14941 instead of a `gconstpointer'.
14942 (mono_debugger_insert_method_breakpoint): Return a
14943 `MonoDebugMethodAddressList *'.
14945 2007-06-28 Martin Baulig <martin@ximian.com>
14947 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
14949 2007-08-01 Zoltan Varga <vargaz@gmail.com>
14951 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using
14952 __builtin_frame_address () since it is broken on older gcc versions.
14954 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
14956 * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
14957 on the stack overflow handling and made the managed stack overflows
14958 catchable in most cases using soft guard pages.
14959 * exceptions-x86.c: added code to restore the protection in the soft
14960 guard pages at the end of exception handling.
14962 2007-07-31 Zoltan Varga <vargaz@gmail.com>
14964 * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
14966 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
14968 * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
14969 exception handling.
14971 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
14973 * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
14974 signal handling support until it has been ported to the new mechanism.
14975 * mini.c: fixed stack overflow detection and use the new
14976 architecture code to handle signals on the altstack.
14978 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
14980 * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
14981 stack overflows on the alt stack.
14983 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
14985 * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
14986 stack overflows on the alt stack.
14988 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
14990 * exceptions-ppc.c: cleanup preparing for altstack support.
14992 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
14994 * exceptions-arm.c: cleanup preparing for altstack support.
14996 2007-07-27 Mark Probst <mark.probst@gmail.com>
14998 * mini.c (print_jit_stats): Output hazard pointer stats.
15000 2007-07-26 Mark Probst <mark.probst@gmail.com>
15002 * driver.c, mini.c: Replaced security mode flags with a single
15005 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
15007 * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
15009 2007-07-25 Mark Probst <mark.probst@gmail.com>
15011 * mini.c, mini.h, driver.c (mono_main): Added command-line flag
15012 (which doesn't do anything yet) for activating Core CLR
15013 (Silverlight) security.
15015 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
15017 * mini-codegen.c: work around a possible gcc bug on arm.
15019 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
15021 * driver.c, mini-x86.h, mini-amd64.h: print a nice error
15022 message for platforms that don't support AOT compilation.
15024 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
15026 * mini.h, mini.c, driver.c: temporary smcs hack.
15028 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
15030 * mini-arm.h, mini-arm.c: arm EABI fixes.
15032 2007-07-22 Zoltan Varga <vargaz@gmail.com>
15034 * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
15037 * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
15038 trampolines taking a method argument.
15040 * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
15042 * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
15043 * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
15045 * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
15046 JIT compilation throws an exception. Fixes #82050.
15048 2007-07-19 Mark Probst <mark.probst@gmail.com>
15050 * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
15051 with the MONO_EXCEPTION_ defines.
15053 2007-07-17 Zoltan Varga <vargaz@gmail.com>
15055 * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
15058 * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
15059 the cause of an assertion.
15061 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
15063 * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
15066 2007-07-15 Zoltan Varga <vargaz@gmail.com>
15068 * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
15069 assert. Should fix #82103.
15071 2007-07-14 Zoltan Varga <vargaz@gmail.com>
15073 * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
15074 here too. Fixes #82095.
15076 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
15079 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
15081 * mini-amd64.h: Enable IMT for amd64.
15083 * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
15085 2007-07-12 Zoltan Varga <vargaz@gmail.com>
15087 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
15089 2007-07-12 Mark Probst <mark.probst@gmail.com>
15091 * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
15092 as soon as check_linkdemand sets an exception_type.
15094 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
15096 * mini-x86.c: fixed offsets for IMT call sequence.
15097 * mini-x86.h: enable IMT again.
15099 2007-07-11 Zoltan Varga <vargaz@gmail.com>
15101 * trace.c (mono_trace_enter_method): Decode MonoType too.
15103 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
15105 * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
15107 * mini-amd64.c: Add preliminary IMT implementation.
15109 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
15111 * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
15112 understand the new IMT-base interface invocation (thanks to
15113 Daniel Nauck for the report and the remote debugging session).
15115 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
15117 * mini-x86.c: size and speed optimizations for the IMT bsearch.
15119 2007-07-11 Zoltan Varga <vargaz@gmail.com>
15121 * Makefile.am (aotcheck): Make this actually use the AOTed code.
15123 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
15125 * mini-trampolines.c: implement AOT IMT support.
15126 * mini-x86.h: enable IMT support for wider testing.
15128 2007-07-10 Zoltan Varga <vargaz@gmail.com>
15130 * inssel.brg (emit_imt_argument): Add aot support here.
15132 * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
15134 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
15136 * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
15137 of the IMT implementation, partially from massi, with my
15138 implementation of the bsearch sequence. Disabled by default until
15139 the AOT code is implemented.
15141 2007-07-10 Zoltan Varga <vargaz@gmail.com>
15143 * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
15145 * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
15147 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
15149 * inssel.brg, mini.c, mini.h, mini-trampolines.c:
15150 arch-independent IMT JIT code from Massimiliano
15151 Mantione (massi@ximian.com) with small cleanups from me.
15153 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
15155 * Makefile.am: fix svn invocation to get the svn revision to be
15156 independent of the local language (build fix).
15158 2007-07-09 Mark Probst <mark.probst@gmail.com>
15160 * mini.c (inline_method): Reset cfg->exception_type if the
15161 inlining is aborted. Fixes: 82049.
15163 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
15165 * mini.c: remove assert from exception handling code when exception_ptr
15168 2007-07-05 Zoltan Varga <vargaz@gmail.com>
15170 * mini.c (mono_codegen): Add an assert.
15172 * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method
15173 enter and leave code.
15174 * mini-amd64.c (mono_arch_emit_prolog): Likewise.
15176 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
15178 * mini-ppc.c: fixed memory corruption for localloc(0)
15181 2007-07-05 Zoltan Varga <vargaz@gmail.com>
15183 * mini.c: Fix warnings.
15185 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
15187 * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
15188 to emit better double->int conversions.
15190 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
15192 * mini.c: the provided Min/Max optimizations are valid for unisgned
15195 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
15197 * 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
15199 2007-06-28 Miguel de Icaza <miguel@novell.com>
15201 * mini.c (mono_running_on_valgrind): Add support for reporting the
15202 method and its boundaries to valgrind.
15204 2007-06-28 Martin Baulig <martin@ximian.com>
15206 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
15208 2007-06-25 Zoltan Varga <vargaz@gmail.com>
15210 * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
15212 * generic.2.cs: Add new test case.
15214 2007-06-25 Martin Baulig <martin@ximian.com>
15216 Merged the `debugger-dublin' branch.
15219 (mono_debugger_insert_method_breakpoint): New public method.
15220 (mono_debugger_remove_method_breakpoint): Likewise.
15221 (mono_debugger_check_breakpoints): New static method.
15222 (mono_debug_close_method): Call mono_debugger_check_breakpoints().
15224 * debug-debugger.h (MonoDebuggerInfo):
15225 Renamed (to keep backward compatibility in the vtable):
15226 `insert_breakpoint' -> `old_insert_breakpoint'.
15227 `remove_breakpoint' -> `old_remove_breakpoint'.
15228 `create_string' -> `old_create_string'.
15229 `lookup_class' -> `old_lookup_class'.
15230 `lookup_type' -> removed; changed into a dummy field.
15231 `lookup_assembly' -> `old_lookup_assembly'.
15232 Added (same functionality, but different signature):
15233 `create_string', `lookup_class', `lookup_assembly'
15235 `get_method_addr_or_bpt', `remove_method_breakpoint',
15236 `runtime_class_init'.
15238 * debug-debugger.c: Merged the `debugger-dublin' branch.
15240 2007-06-23 Zoltan Varga <vargaz@gmail.com>
15242 * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
15244 (peephole_pass): Likewise.
15246 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
15248 * driver.c: hopefully make setaffinity work also for ancient
15251 2007-06-22 Atsushi Enomoto <atsushi@ximian.com>
15253 * driver.c : win32 build fix.
15255 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
15257 * driver.c: check for the MONO_NO_SMP env var and bind to a single
15258 processor if it is set.
15260 2007-06-21 Martin Baulig <martin@ximian.com>
15262 * debug-mini.h: New file.
15265 (mono_debugger_insert_breakpoint_full): Moved here from
15266 ../metadata/mono-debug-debugger.c.
15267 (mono_debugger_remove_breakpoint): Likewise.
15268 (mono_debugger_breakpoint_callback): Likewise.
15270 2007-06-15 Raja R Harinath <rharinath@novell.com>
15272 * jit-icalls.c (mono_helper_compile_generic_method): Update to
15273 changes in MonoGenericClass.
15275 2007-06-14 Zoltan Varga <vargaz@gmail.com>
15277 * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
15279 2007-06-14 Raja R Harinath <rharinath@novell.com>
15281 * jit-icalls.c (mono_helper_compile_generic_method): Update to
15282 removal of MonoGenericMethod.
15284 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
15286 * mini-exceptions.c: hooks for the exception events profiling API.
15288 2007-06-14 Randolph Chung <tausq@debian.org>
15290 * Makefile.ma: Add hppa target.
15291 * mini-arch.h: Include mini-hppa.h
15292 * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
15293 mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
15294 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
15296 2007-06-14 Randolph Chung <tausq@debian.org>
15298 * inssel.brg: Add rules for "chained" compare-branch operations so that
15299 a single compare op can affect multiple branches. Adjust cost for
15300 OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
15301 * inssel-long32.brg: Update rules to use compare-branch macros. Adjust
15302 cost for some rules so that they can more easily be overridden by
15303 per-arch rules (with fixes from lupus).
15304 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
15306 2007-06-13 Randolph Chung <tausq@debian.org>
15308 * mini-ops.h: Reorder branch ops so that they match the order of the
15309 corresponding CEE_* ops. The code expects them this way.
15310 Add new ops for HPPA target.
15311 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
15313 2007-06-13 Randolph Chung <tausq@debian.org>
15315 * mini-exceptions.c: Handle cases where the stack grows towards
15317 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
15319 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
15321 * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
15323 * driver.c: explain where a non-matching corlib is found.
15325 2007-06-13 Mark Probst <mark.probst@gmail.com>
15327 * mini.c (print_jit_stats): Output dynamic code allocation stats.
15329 2007-06-10 Sanghyeon Seo <sanxiyn@gmail.com>
15331 * mini-exceptions.c: Generate a method profile leave event during
15332 an exception to ensure that the profiler gets notified.
15334 2007-06-07 Zoltan Varga <vargaz@gmail.com>
15336 * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir
15339 * cpu-amd64.md: Add long_and/or/xor opcodes.
15341 2007-06-06 Wade Berrier <wberrier@novell.com>
15343 * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
15344 (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction
15345 length of instruction shr_imm (expected 8, got 10)
15347 2007-06-06 Zoltan Varga <vargaz@gmail.com>
15349 * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
15351 2007-06-06 Mark Probst <mark.probst@gmail.com>
15353 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
15354 MonoInternalHashTable again (fixed bug in the internal hash table
15357 2007-06-06 Mark Probst <mark.probst@gmail.com>
15359 * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
15360 Have to figure out what makes it crash the SWF regression.
15362 2007-06-05 Zoltan Varga <vargaz@gmail.com>
15364 * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
15366 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
15368 * mini.c: optimize out the type check when storing null in a
15371 2007-06-04 Mark Probst <mark.probst@gmail.com>
15373 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
15374 MonoInternalHashTable.
15376 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
15378 * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
15379 signed integer methods.
15381 2007-06-02 Zoltan Varga <vargaz@gmail.com>
15383 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case
15384 permanently since the current approach doesn't work.
15386 2007-06-02 Zoltan Varga <vargaz@gmail.com>
15388 * inssel.brg (stmt): Only call delegate->invoke_impl if
15389 MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
15391 2007-06-01 Zoltan Varga <vargaz@gmail.com>
15393 * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
15394 the sreg2==rdx case.
15396 * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
15397 account if it contains a rex prefix.
15398 (peephole_pass): Handle OP_FMOVE as well.
15400 2007-06-01 Zoltan Varga <vargaz@gmail.com>
15402 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
15403 as it causes regressions.
15405 2007-05-31 Zoltan Varga <vargaz@gmail.com>
15407 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
15408 static case as well.
15410 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
15412 * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
15413 (mono_arch_get_this_arg_from_call): Ditto.
15415 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
15417 * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
15420 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
15421 (mono_arch_get_this_arg_from_call): Ditto.
15423 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
15425 * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
15426 try to create optimized invoke code and use that for further invocations.
15427 Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
15429 * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
15431 2007-05-29 Rodrigo Kumpera <kumpera@gmail.com>
15433 * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
15434 sealed classes or methods.
15435 *devirtualization.cs: tests for the new optimization
15437 2007-05-29 Zoltan Varga <vargaz@gmail.com>
15439 * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
15440 by the update_volatile () function.
15442 2007-05-27 Zoltan Varga <vargaz@gmail.com>
15444 * driver.c (mono_main): Call g_thread_init () early since newer glib versions
15447 * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
15449 2007-05-24 Jonathan Chambers <joncham@gmail.com>
15451 * mini.c: Add configure checks for header files.
15452 * mini-x86.c: Add configure checks for header files.
15453 * trace.c: Add configure checks for header files.
15454 * aot-runtime.c: Add configure checks for header files.
15455 * aot-compiler.c: Add configure checks for header files.
15456 * driver.c: Add configure checks for header files.
15457 * mini-codegen.c: Add configure checks for header files.
15459 Code is contributed under MIT/X11 license.
15461 2007-05-22 Zoltan Varga <vargaz@gmail.com>
15463 * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
15464 icompare_imm -128 + op_iclt. Fixes #81703.
15466 2007-05-19 Zoltan Varga <vargaz@gmail.com>
15468 * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
15470 2007-05-15 Massimiliano Mantione <massi@ximian.com>
15472 * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
15473 inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
15474 so that all isinst checks now use "interface_bitmap".
15476 2007-05-15 Zoltan Varga <vargaz@gmail.com>
15478 * cpu-amd64.md (jmp): Fix a warning.
15480 * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
15482 * basic.cs: Add new regression test.
15484 * basic.cs: Remove test which is now in basic-long.cs.
15486 * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
15488 * basic-long.cs: Add new test.
15490 2007-05-13 Zoltan Varga <vargaz@gmail.com>
15492 * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
15494 2007-05-12 Zoltan Varga <vargaz@gmail.com>
15496 * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
15498 * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
15501 * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception
15502 throwing code a bit.
15504 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of
15505 the exception throwing code a bit.
15507 * mini-x86.c (get_call_info): Allocate result from a mempool.
15509 2007-05-11 Zoltan Varga <vargaz@gmail.com>
15511 * aot-compiler.c (find_typespec_for_class): Fix the assert.
15513 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
15515 * mini.h (MonoCompile): Add 'token_info_hash' field.
15517 * mini.c: Save token->method associations during compilation so the AOT
15518 compiler can use it.
15520 * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
15521 which reference generic classes and methods.
15523 2007-05-10 Zoltan Varga <vargaz@gmail.com>
15525 * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
15527 * aot-compiler.c (compile_method): Fix a typo in a comment.
15529 * aot-runtime.c (decode_cached_class_info): Skip generic types.
15531 * aot-compiler.c: Add minimal support for AOTing generic code by skipping
15532 everything generic.
15534 * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
15536 2007-05-09 Zoltan Varga <vargaz@gmail.com>
15538 * mini.h (MonoCompile): Add 'args' field.
15540 * mini.c (mono_compile_create_vars): Store variables representing the arguments
15543 * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
15545 2007-05-08 Zoltan Varga <vargaz@gmail.com>
15547 * mini.c (mono_compile_get_interface_var): Remove this unused function.
15549 * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
15551 * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
15552 opcodes for some opcodes.
15554 * mini.h *.brg *.c: Use the new opcodes.
15556 2007-05-08 Massimiliano Mantione <massi@ximian.com>
15558 * mini.h: Bumped aot revision.
15560 * inssel.brg: modified code generation of type checks for interfaces
15561 to use the new "MonoClass.interface_bitmap" instead of the old
15562 "MonoClass.interface_offsets".
15564 2007-04-30 Zoltan Varga <vargaz@gmail.com>
15566 * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
15568 2007-04-29 Zoltan Varga <vargaz@gmail.com>
15570 * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
15573 2007-04-27 Neale Ferguson <neale@sinenomine.net>
15575 * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
15577 2007-04-27 Wade Berrier <wberrier@novell.com>
15579 * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in
15580 mini.h) to fix build.
15582 2007-04-26 Zoltan Varga <vargaz@gmail.com>
15584 * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
15586 * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
15587 causes the corlib unit tests to fail.
15589 2007-04-25 Zoltan Varga <vargaz@gmail.com>
15591 * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
15593 * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
15595 * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional
15596 opcodes to the comparison relations.
15598 * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional
15599 opcodes to their types.
15601 * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
15603 * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache
15604 it in cfg->arch.cinfo.
15606 * local-propagation.c (mono_local_cprop_bb): Fix a warning.
15608 * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in
15609 cfg->cil_offset_to_bb.
15611 2007-04-24 Zoltan Varga <vargaz@gmail.com>
15613 * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
15614 created becase of initlocals.
15616 2007-04-23 Zoltan Varga <vargaz@gmail.com>
15618 * mini-alpha.c cpu-alpha.md: More alpha port work from
15619 Sergey Tikhonov <tsv@solvo.ru>.
15621 2007-04-21 Andreas Faerber <andreas.faerber@web.de>
15623 * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
15625 2007-04-19 Zoltan Varga <vargaz@gmail.com>
15627 * cpu-s390.md (break): Correct the length of break instruction.
15629 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
15631 * mini.c: fix a couple of soft-float issues and comments.
15633 2007-04-15 Miguel de Icaza <miguel@novell.com>
15635 * trace.c (is_filenamechar): - is also a filename char.
15637 2007-04-15 Neale Ferguson <neale@sinenomine.net>
15639 * mini-s390.c: Correct checking for enum type in return value processing.
15641 2007-04-14 Raja R Harinath <rharinath@novell.com>
15643 * Makefile.am (BUILT_SOURCES): Add 'version.h'.
15644 (version.h): Makefile is in the build directory.
15646 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
15648 * mini-amd64.h: fix for assertion failure on Solaris/amd64
15650 2007-04-11 Martin Baulig <martin@ximian.com>
15652 * mini.c (can_access_member): Fix handling of generic classes;
15655 2007-04-10 Zoltan Varga <vargaz@gmail.com>
15657 * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
15659 2007-04-05 Zoltan Varga <vargaz@gmail.com>
15661 * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
15663 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
15665 * mini-codegen.c: make sure the right spill amount is
15666 used for fp or integer registers (fixes the float_sub_spill() on ppc).
15668 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
15670 * mini-ppc.c: fixes for the fp_branch_nan test.
15672 2007-03-23 Zoltan Varga <vargaz@gmail.com>
15674 * basic.cs: Comment out new test which still fails on ia64.
15676 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
15678 * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
15680 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
15682 * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
15684 2007-03-22 Zoltan Varga <vargaz@gmail.com>
15686 * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
15687 on 64 bit machines. Fixes part of #80738.
15689 * basic.cs: Add regression test.
15691 2007-03-17 Zoltan Varga <vargaz@gmail.com>
15693 * inssel.brg basic.cs: Revert previous change to fix build.
15695 * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
15698 * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
15700 * basic.cs: Add new regression test.
15702 2007-03-17 Zoltan Varga <vargaz@gmail.com>
15704 * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
15707 2007-03-16 Neale Ferguson <neale@sinenomine.net>
15709 * cpu-s390x.md: Correct length of break instruction.
15711 2007-03-16 Neale Ferguson <neale@sinenomine.net>
15713 * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
15714 * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
15716 2007-03-15 Jonathan Chambers <joncham@gmail.com>
15718 * *.c: Begin WIN64 port.
15719 * mini.c: Use correct register in profiler.
15720 * mini-amd64.c: No inline assembly on Win64.
15721 * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
15722 Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
15723 * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
15724 is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
15725 mono_arch_ip_from_context for Win64.
15727 Contributed under MIT/X11 license.
15729 2007-03-15 Zoltan Varga <vargaz@gmail.com>
15731 * exceptions-amd64.c (seh_handler): Ditto.
15733 * exceptions-x86.c (seh_handler): Fix a memory leak.
15735 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
15737 * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
15738 mini-s390x.c: fixed peephole optimizations to deal
15739 correctly with 1 and 2 byte reload avoidance.
15741 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
15743 * cpu-s390.md, cpu-s390x.md: update localloc length.
15745 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
15747 * cpu-g4.md: added missing descriptions.
15749 2007-03-14 Miguel de Icaza <miguel@novell.com>
15751 * Makefile.am: Add support so the tail tests are not executed on
15752 PowerPC as that is a known limitation of the PowerPC port.
15754 2007-03-13 Jonathan Chambers <joncham@gmail.com>
15756 * runmdesc.bat: Move to msvc directory.
15758 2007-03-13 Jonathan Chambers <joncham@gmail.com>
15760 * runmdesc.bat: Run executable that was produced by the current
15761 target and sent via an argument.
15763 2007-03-11 Zoltan Varga <vargaz@gmail.com>
15765 * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
15768 * generics.2.cs: Add regression test.
15770 2007-03-09 Wade berrier <wberrier@novell.com>
15772 * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
15774 2007-03-09 Zoltan Varga <vargaz@gmail.com>
15776 * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
15777 AOT code depends on this.
15779 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
15781 * mini.c: more precise tracking of types in the eval stack
15782 (part of fix for bug #81044).
15784 2007-03-07 Zoltan Varga <vargaz@gmail.com>
15786 * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
15788 * aot-compiler.c (encode_patch): Remove an obsolete comment.
15790 2007-03-06 Zoltan Varga <vargaz@gmail.com>
15792 * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
15794 * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
15796 2007-02-22 Zoltan Varga <vargaz@gmail.com>
15798 * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
15799 a pointer on 64 bit systems. Fixes #80190.
15801 * iltests.il: Add new regression test.
15803 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
15805 * mini.c: inline a constant for Environment.IsRunningOnWindows.
15807 2007-02-19 Geoff Norton <gnorton@customerdna.com>
15809 * trace.c: Remove an erroneous alignemnt check when tracing.
15810 Fixes --trace on OSX86.
15812 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
15814 * mini-$(arch).h: initialize SP in context for all the archs.
15816 2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
15818 * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
15819 regressions in the thread tests.
15821 2007-02-14 Zoltan Varga <vargaz@gmail.com>
15823 * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
15824 - fixed implementation of LOCALLOC opcode
15825 - implemented non-un compare for floats
15827 - implementation of FDIV and CKFINITE opcodes
15828 - fixes for latest mono updates
15829 - additional arch opcodes
15831 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
15833 * Makefile.am: simplify and merge rules for cross-compilation.
15835 2007-02-07 Massimiliano Mantione <massi@ximian.com>
15837 * local-propagation.c: Actually *apply* the fix for bug 80591...
15839 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
15841 * mini-exceptions.c: backuot part of the last change
15842 (fixes cas tests on amd64 related to GetExecutingAssembly ()).
15844 2007-02-06 Massimiliano Mantione <massi@ximian.com>
15845 * inssel.brg: Fix bug 59286.
15848 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
15850 * mini-exceptions.c: patch from Zoltan to correctly check for
15851 stack boundaries (using the stack register, not the frame register),
15852 fixes bugs #80724, #79717.
15854 2007-02-03 Zoltan Varga <vargaz@gmail.com>
15856 * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
15857 OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
15859 * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
15860 presence of frame pointer elimination.
15862 2007-02-01 Geoff Norton <gnorton@customerdna.com>
15864 * mini-x86.h: NetBSD UCONTEX_REG defines.
15866 2007-02-01 Zoltan Varga <vargaz@gmail.com>
15868 * inssel-amd64.brg: Fix amd64 build.
15870 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
15872 * mini.h: remove extern to workaround what looks likes gcc bug 26905
15875 2007-01-31 Zoltan Varga <vargaz@gmail.com>
15877 * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
15880 * mini-<ARCH>.c: Use mono_is_regsize_var ().
15882 2007-01-30 Mark Mason <mason@broadcom.com>
15884 * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
15885 * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
15886 * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
15887 beginning support for CEE_JMP [not quite working yet]
15888 * tramp-mips.c: LMF handling now works
15890 2007-01-30 Zoltan Varga <vargaz@gmail.com>
15892 * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
15894 * mini.h (NULLIFY_INS): New macro.
15896 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
15898 * mini.c: statistical profiler fix for windows, patch
15899 from Tor Lillqvist (tml@novell.com).
15901 2007-01-30 Massimiliano Mantione <massi@ximian.com>
15902 * local-propagation.c: Fix bug 80591.
15904 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
15906 * Makefile.am: put back the --export-dynamic option as with
15907 the previous gmodule flags (thanks to Robert Jordan).
15909 2007-01-28 Zoltan Varga <vargaz@gmail.com>
15911 * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
15913 mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
15914 simplify and speed up the local register allocator. Also rename some fields
15915 like iassign->vassign.
15917 * regalloc.c: Remove some functions which are no longer used since their
15918 inlined version is in mini-codegen.c.
15920 * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
15922 * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
15924 2007-01-27 Zoltan Varga <vargaz@gmail.com>
15926 * mini-amd64.c (peephole_pass): Remove optimizations which omit a
15927 narrowing. Fixes #80622.
15929 * iltests.il: Add new regresssion test.
15931 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
15933 * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
15934 debug-debugger.c, debug-debugger.h: warning fixes.
15935 * driver.c: updated copyright year and made it fit in one line.
15937 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
15939 * aot-runtime.c: updated to use mono-dl instead of gmodule.
15941 2007-01-25 Zoltan Varga <vargaz@gmail.com>
15943 * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
15945 * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
15947 * iltests.il: Add new test for bug #80507.
15949 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
15951 * mini-arm.h: use soft-float also on vfp for now.
15953 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
15955 * mini.c: fix some more soft-float issues.
15957 2007-01-24 Zoltan Varga <vargaz@gmail.com>
15959 * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
15961 2007-01-24 Massimiliano Mantione <massi@ximian.com>
15962 * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
15963 mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
15964 MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
15966 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
15968 * mini-arm.c: typo fix.
15970 2007-01-23 Neale Ferguson <neale@sinenomine.net>
15972 * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
15974 2007-01-21 Zoltan Varga <vargaz@gmail.com>
15976 * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
15977 Share stack slots for scalar types. Avoid expensive g_list_free () calls.
15979 * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
15981 * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto.
15983 * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
15985 * inssel.brg: Fix a warning.
15987 * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
15989 * abcremoval.c ssa.c ssapre.c: Update after this change.
15991 * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
15993 * dominators.c (df_set): Use mono_bitset_union_fast.
15995 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
15997 * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
15998 mini-codegen.c: reduce relocations and memory usage for the cpu
16001 2007-01-20 Zoltan Varga <vargaz@gmail.com>
16003 * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
16005 * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
16006 to reduce their size.
16008 2007-01-19 Mark Mason <mason@broadcom.com>
16010 * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
16011 * mini-mips.c: more configuration macros, support long conditional branches, additional
16012 asserts, fix epilog instrumentation.
16013 * mini-mips.h: use standard stack walk
16014 * cpu-mips.md: increase size of div, rem and conditional branches
16016 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
16018 * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
16021 2007-01-19 Zoltan Varga <vargaz@gmail.com>
16023 * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
16024 (compile_method): Ditto.
16026 * aot-runtime.c (decode_klass_info): Ditto.
16028 * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
16029 needed by the code generated by inssel.brg. Also fix a warning.
16031 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
16033 * mini.c: deal with enums that become genericinsts by
16034 being nested in a generic class (bug #79956).
16036 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
16038 * mini.c: match the generic definition to check for
16039 private access with generic types (bug #78431).
16041 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
16043 * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
16044 to make life easier for people cross-compiling that insist on not
16047 2007-01-17 Mark Mason <mason@broadcom.com>
16049 * inssel-long.brg: patch to deal with mips missing flags
16050 * inssel-long32-mips.brg: implement overflow checks
16051 * insset-mips.brg: implement overflow checks
16052 * mini-mips.h: implement conditional exception handling
16053 * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
16054 Remove unused code, minor cleanups.
16055 * exceptions-mips.c: minor cleanups
16056 * mini-ops.h: add mips conditional exception ops
16057 * cpu-mips.md: add mips conditional exception ops
16060 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
16062 * inssel.brg: patch from Mark Mason <mason@broadcom.com>
16063 to deal with mips missing of flags.
16065 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
16067 * exceptions-ppc.c: execute fault handlers.
16069 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
16071 * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
16073 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
16075 * mini.c: handle also floating point values in initialize_array.
16077 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
16079 * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
16080 array initialization and make it conditional on the intrins option.
16082 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
16084 * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
16085 relocations and put the patch info names close to the enum definition.
16087 2007-01-15 Mark Mason <mason@broadcom.com>
16089 * basic.cs, exceptions.cs: break up large tests to increase debugability.
16091 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
16093 * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
16095 2007-01-12 Raja R Harinath <rharinath@novell.com>
16097 * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
16099 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
16101 * Makefile.am: distribute the mips sources.
16103 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
16105 * mini-codegen.h: handle bug #80489 here, by excluding ecx
16108 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
16110 * cpu-x86.md: back out for now as this triggers other regressions.
16112 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
16114 * cpu-x86.md: force src1 and dest regpair for long shift instructions
16115 to eax:edx, so ecx can't get allocated to them (bug #80489).
16117 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
16119 * mini.c, mini-exceptions.c: enabled running fault handlers
16122 2007-01-03 Miguel de Icaza <miguel@novell.com>
16124 * driver.c: If nothing fail, do not use the string "failed",
16125 because it makes it very annoying to view test result logs on the
16128 2006-12-30 Miguel de Icaza <miguel@novell.com>
16130 * debug-debugger.c (mono_debugger_main): Rename "main" to
16131 "main_method" to prevent a warning.
16133 Remove a warning for unused field.
16135 2006-12-28 Martin Baulig <martin@ximian.com>
16138 (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
16140 2006-12-22 Martin Baulig <martin@ximian.com>
16142 * mdb-debug-info32.s, mdb-debug-info64.s: New files.
16143 Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
16144 seperate `.mdb_debug_info' section, so we can access it from the
16145 debugger even if the binary is stripped.
16147 * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
16148 from the `.mdb_debug_info' here to prevent the linker from
16149 removing that section.
16151 * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
16152 mdb-debug-info64.s.
16154 2006-12-19 Robert Jordan <robertj@gmx.net>
16156 * mini-x86: enable the code to return small structures in
16157 registers for FreeBSD as well. Fixes bug #80278.
16158 * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
16160 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
16162 * mini-x86.c: align the stack when calling the profiler
16163 function instrumenting the prolog (on OSX).
16165 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
16167 * mini.c: emit a break opcode where Debugger.Break () is called.
16169 2006-12-13 Miguel de Icaza <miguel@novell.com>
16171 * mini.c (mono_method_to_ir): Provide useful information on this
16172 assert, to prevent others from debugging like I did.
16174 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
16176 * mini.c: enable code which was incorrectly commented
16179 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
16181 * mini-x86.c: enable on OSX, too, the code to return small
16182 structures in registers.
16184 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
16186 * mini-x86.c: remove the use of the dynamic code manager here, too.
16188 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
16190 * mini.h, debug-debugger.c, tramp-*.c: fixed
16191 mono_debugger_create_notification_function() to use
16192 mono_global_codeman_reserve () instead of a dynamic code manager.
16194 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
16196 * mini.c, jit-icalls.h, jit-icalls.c: remove the
16197 ves_array_element_address() jit icall and use a generated
16198 managed method instead (which is about 4 times faster for a rank 3
16201 2006-11-29 Mark Mason <mason@broadcom.com>
16203 * basic-calls.cs: additional tests for passing
16204 structures as function arguments.
16206 2006-11-29 Mark Mason <mason@broadcom.com>
16208 * mini-mips.h: disable custom exception handling
16209 * mini-mips.c: throw/rethrow should use jalr to call
16210 exception stubs. Fixed bug with passing structures
16211 by value. More support for tracing floating point
16214 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
16216 * mini.c: fixed typo in the soft-float ldind.r4 handling
16219 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
16221 * mini.c, mini.h, driver.c: added --runtime command line
16222 option to select a different runtime than the autodetected one.
16223 * jit.h: added API for embedders to initialize with a specific
16226 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
16228 * mini.c: handle also boxing of r4 values (bug #80024).
16230 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
16232 * mini-ppc.c: force indirect calls until we reserve
16233 enough address space for all the generated code.
16235 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
16237 * exceptions-arm.c: workaround bugs in the libc definition
16238 of struct ucontext.
16240 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
16242 * inssel.brg: fixes from me and Mark Mason.
16244 2006-11-23 Dick Porter <dick@ximian.com>
16246 * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
16247 semaphore display now we've fixed the initial value
16249 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16251 * inssel.brg: partially revert the last change to fix the build.
16253 2006-11-21 Mark Mason <mason@broadcom.com>
16255 * inssel.brg: Add and use compare-and-branch macros to support
16256 architectures that do not have condition code registers (ie. MIPS).
16257 * *-mips.{c,brg,md}: Fix copyright statements
16259 2006-11-20 Mark Mason <mason@broadcom.com>
16261 * Makefile.am: remove mini-codegen.c from list of MIPS sources
16262 * mini.c: Allow GET_CONTEXT to be specified by the arch port
16263 * mini.h: Added declaration for mono_print_ins()
16264 * mini-codegen.c: added ins_spec initializer for MIPS
16265 * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
16266 vreg to be virtual and hreg to be non-virtual.
16267 * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
16268 is not yet working/implemented correctly.
16269 * mini-codegen.c (print_ins): rename to mono_print_ins(), make
16270 non-static, fixup calls to print_ins() from other parts in the file.
16272 2006-11-20 Mark Mason <mason@broadcom.com>
16274 * basic-calls.cs: added tests for passing structures as arguments
16277 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
16279 * inssel-long32.brg: optimize signed division by power of two.
16281 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
16283 * mini-arm.c: added support for interworking with thumb code
16284 (mono must be still be built using the ARM instruction encoding).
16286 2006-11-19 Miguel de Icaza <miguel@novell.com>
16288 * mini.c (type_from_op): Separate the conditions for OP_EQ as the
16289 verifier has different rules for it. Fixes a few verifier issues
16292 * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
16293 at the end, so people know what happened.
16295 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
16297 * brach-opts.c: in optimize_exception_target() make sure we
16298 are in a catch clause (fixes bug #79871).
16300 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16302 * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
16303 more soft-float support fixes.
16305 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
16307 * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
16308 that are passed half on the stack and half in registers.
16310 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
16312 * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
16313 more mips integration work from Mark E Mason
16314 <mark.e.mason@broadcom.com>.
16316 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
16318 * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
16319 cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
16320 tramp-mips.c: added sources for the mips port, not
16321 integrated in the build yet. Contributed by
16322 Mark E Mason <mark.e.mason@broadcom.com>.
16324 2006-11-14 Neale Ferguson <neale@sinenomine.net>
16326 * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
16328 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16330 * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
16331 put the soft-float rules in its own file since it seems to
16332 break s390 compilation.
16334 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
16336 * mini-arm.c: fixed wrnings.
16338 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
16340 * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
16341 inssel-arm.brg: ARM support for soft-float.
16343 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
16345 * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
16346 loads and stores of 32 bit fp values.
16348 2006-11-10 Zoltan Varga <vargaz@gmail.com>
16350 * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
16352 * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
16353 works. Fixes #79852 and #79463.
16355 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16357 * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
16358 more soft-float support WIP and fixes.
16360 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
16362 * mini-arm.c: some VFP updates.
16364 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
16366 * mini-exceptions.c: 0 is a valid local var offset in some
16367 architectures, don't assert (bug #78508).
16369 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
16371 * exceptions-arm.c: fixed off by one error in stack walk code.
16373 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
16375 * mini.h, mini.c: more precise tracking of type load exceptions.
16377 2006-11-03 Robert Jordan <robertj@gmx.net>
16379 * Makefile.am: [WIN32] Add monow.exe target.
16380 * driver.c: [WIN32] Don't detach the console when debugging.
16383 2006-10-30 Miguel de Icaza <miguel@novell.com>
16385 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
16387 2006-10-23 Zoltan Varga <vargaz@gmail.com>
16389 * aot-compiler.c (emit_method_info): Add a case missed earlier.
16391 * driver.c (mini_regression): Fix --regression with AOT.
16393 * aot-compiler.c (emit_method_info): Fix AOT on amd64.
16395 2006-10-17 Zoltan Varga <vargaz@gmail.com>
16397 * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
16399 * mini-sparc.h: Don't use sigaction on sparc/linux.
16401 * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
16403 * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
16405 * mini-exceptions.c: Add proper include files for getpid ().
16407 2006-10-16 Zoltan Varga <vargaz@gmail.com>
16409 * aot-runtime.c (mono_aot_get_method): Change this to return the native code
16410 address instead of a MonoJitInfo* to avoid decoding the exception info for the
16413 * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
16414 name cache to reduce its size.
16416 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
16418 2006-10-15 Zoltan Varga <vargaz@gmail.com>
16420 * mini-x86.c: Save/restore the current LMF structure more efficiently using
16421 the mono_lmf TLS variable.
16423 * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in
16424 trampoline lmf frames.
16426 * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
16428 2006-10-14 Zoltan Varga <vargaz@gmail.com>
16430 * mini-amd64.c: Save/restore the current LMF structure more efficiently using
16431 the mono_lmf TLS variable.
16433 * mini-exceptions.c: Access the LMF structure through accessors.
16435 * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS
16436 variable instead of in jit_tls->lmf.
16438 * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
16440 * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in
16441 trampoline lmf frames.
16443 * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
16445 2006-10-12 Zoltan Varga <vargaz@gmail.com>
16447 * mini.c trace.c mini-x86.c: Revert these too.
16449 * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
16452 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
16454 * genmdesc.c: removed now dead code.
16456 2006-10-09 Robert Jordan <robertj@gmx.net>
16458 * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
16460 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
16462 * mini.h: do not leave gaps in the opcode values.
16464 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
16466 * jit-icalls.h: flag functions as internal here, too.
16468 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
16470 * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
16471 functions with the internal attribute.
16473 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
16475 * aot-compiler.c: fclose the file descriptor in the profile read loop.
16477 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
16479 * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
16482 2006-10-05 Zoltan Varga <vargaz@gmail.com>
16484 * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
16485 tail calls as on other platforms.
16487 * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
16489 * iltests.il: Add a few tailcall tests.
16491 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
16493 * driver.c: fix loop for old compilers (bug #79521).
16495 2006-10-02 Zoltan Varga <vargaz@gmail.com>
16497 * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
16499 * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
16501 * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
16502 metadata without any code.
16504 * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
16505 more precise debugging information using gdb.
16507 2006-09-30 Zoltan Varga <vargaz@gmail.com>
16509 * inssel-ia64.brg: Make the helper methods static.
16511 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
16513 * inssel-x86.brg: make the helper methods static.
16515 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
16517 * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
16519 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
16521 * mini.c: updates for monoburg changes.
16522 * inssel.brg: make a few helper functions static as they should.
16524 2006-09-27 Zoltan Varga <vargaz@gmail.com>
16526 * Makefile.am: Move mini-codegen.c to common_sources.
16528 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
16530 * mini.h: instroduce inst_call in MonoInst for use in OUTARG
16532 * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
16533 mini-ppc.h: port to use the common local register allocator.
16535 2006-09-26 Zoltan Varga <vargaz@gmail.com>
16537 * mini.h: Remove the comment too then.
16539 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
16541 * mini.h: put back backend.data which is to be used shortly and
16542 doesn't increase the size of MonoInst. If any 64 bit arch aligned
16543 pointers on 4 byte boundaries it'd have much bigger issues running
16544 and you can ifdef it out anyway.
16546 2006-09-26 Zoltan Varga <vargaz@gmail.com>
16548 * mini.h (MonoInst): Remove backend.data field since it is unused and increases
16549 MonoInst size by 4 bytes on 64 bit machines.
16551 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
16553 * *.{c,h,brg}: long due removal of the unused field in MonoInst and
16554 replacement with more meaningful field names. Arch maintainers, please
16555 check the assigned names are good enough for your arch.
16557 2006-09-26 Zoltan Varga <vargaz@gmail.com>
16559 * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the
16560 OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
16562 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
16564 * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
16565 relocations and memory requirements, put the optimization flags
16566 definitions in their own file.
16568 2006-09-24 Zoltan Varga <vargaz@gmail.com>
16570 * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
16572 * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
16574 2006-09-22 Zoltan Varga <vargaz@gmail.com>
16576 * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
16578 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
16580 * inssel.brg: use the correct function to get the size of an item
16581 in an array, given an element class.
16582 * aot-compiler.c: do not access class->class_size directly.
16584 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
16586 * mini.h, debug-mini.c: added a debugging function to print
16587 info about local variables and arguments in a jitted method.
16589 2006-09-20 Zoltan Varga <vargaz@gmail.com>
16591 * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
16593 * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
16595 2006-09-19 Zoltan Varga <vargaz@gmail.com>
16597 * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
16598 inner and outer loops when passing vtypes.
16600 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
16602 * mini-ppc.c: take into account the cpu errata for cache flushing
16603 which caused some random errors (bug #79381).
16605 2006-09-19 Zoltan Varga <vargaz@gmail.com>
16607 * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to
16608 mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
16610 2006-09-17 Zoltan Varga <vargaz@gmail.com>
16612 * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
16615 * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
16616 freebsd ports tree.
16618 * mini-amd64.c (emit_call): Avoid near calls on freebsd.
16619 (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
16621 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
16624 2006-09-13 Zoltan Varga <vargaz@gmail.com>
16626 * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
16628 2006-09-12 Zoltan Varga <vargaz@gmail.com>
16630 * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this
16631 macro does not have to be changed during debugging.
16633 * 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>.
16635 * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
16637 * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
16639 * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if
16640 MONO_ARCH_NO_EMULATE_MUL is defined.
16642 * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
16644 * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
16646 * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
16648 * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
16650 2006-09-11 Zoltan Varga <vargaz@gmail.com>
16652 * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
16653 stuff to mini-exceptions.c where it is used.
16655 * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
16656 setup code, the real one is in mini-exceptions.c.
16658 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
16659 layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
16660 some changes from the freebsd ports tree.
16662 * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
16665 * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
16667 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
16669 * mini.c: on Linux, check for /proc to be mounted
16670 (bug# 79351, novell bug#201204).
16672 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
16674 * mini.c: handle cases where pthread_attr_getstack() behaves
16675 incorrectly (bug #78096).
16677 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
16679 * mini-arm.c: support larger stack frames (bug #79272).
16681 2006-09-08 Zoltan Varga <vargaz@gmail.com>
16683 * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
16685 * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef
16688 * aot-runtime.c (mono_aot_get_class_from_name): New function used by
16689 mono_class_from_name () to find a class from its name.
16691 * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
16693 2006-09-07 Zoltan Varga <vargaz@gmail.com>
16695 * mini-amd64.c (emit_call): Avoid strstr () call if possible.
16697 2006-09-05 Kornel Pal <kornelpal@gmail.com>
16699 * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
16701 2006-09-04 Zoltan Varga <vargaz@gmail.com>
16703 * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
16704 callinfo->trampoline.
16706 * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
16708 (mono_arch_patch_code): Add some debug code to help track down similar failures in the
16711 2006-09-03 Zoltan Varga <vargaz@gmail.com>
16713 * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
16715 2006-09-02 Zoltan Varga <vargaz@gmail.com>
16717 * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
16718 stats.method_trampolines, it is already done by the generic trampoline code.
16720 * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
16722 2006-09-01 Zoltan Varga <vargaz@gmail.com>
16724 * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
16726 * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
16728 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
16730 * mini.c (print_jit_stats): Print mscorlib mempool size too.
16732 * mini.c (print_jit_stats): Print new stats.
16734 * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
16736 2006-08-31 Zoltan Varga <vargaz@gmail.com>
16738 * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
16739 Address on two dimensional arrays. Fixes #78729.
16741 * mini.h (MonoCompile): Add a 'skip_visibility' field.
16743 * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
16746 * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
16748 * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
16751 * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
16753 (mini_get_ldelema_ins): Ditto.
16755 2006-08-30 Zoltan Varga <vargaz@gmail.com>
16757 * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
16758 (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation.
16761 2006-08-29 Neale Ferguson <neale@sinenomine.net>
16763 * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
16764 mono_arch_get_patch_offset as a dummy entry point to allow successful link.
16766 * exceptions-s390x.c: Cosmetic change.
16768 * tramp-s390.c: Fix warning.
16770 * cpu-s390.md: Correct length of mul_imm.
16772 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
16774 * aot-compiler.c: added binary writer with ELF backend
16775 implementation (only on Linux/x86 for now).
16777 2006-08-18 Zoltan Varga <vargaz@gmail.com>
16779 * Makefile.am: Don't run net 2.0 AOT tests.
16781 * aot-compiler.c (compile_method): Skip methods with tail calls as well.
16782 (mono_compile_assembly): Skip net 2.0 assemblies as well.
16784 * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
16786 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
16788 * aot-compiler.c: simplified and refactored the asm-writing code
16789 to allow different backends.
16791 2006-08-18 Zoltan Varga <vargaz@gmail.com>
16793 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
16795 * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a
16796 little. Share patches of type TYPE_FROM_HANDLE as well.
16798 * mini.c (mono_patch_info_equal): New helper function.
16799 (mono_patch_info_hash): Ditto.
16801 * aot-compiler.c (emit_method_code): Fix s390 build.
16803 * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
16804 is not handled because it is stored as a flag and not as a type ctor. Fixes
16807 2006-08-17 Zoltan Varga <vargaz@gmail.com>
16809 * aot-compiler.c: Fix computation of GOT slot statistics.
16811 * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
16812 Also remove support for not PIC AOT.
16814 * mini.h: Bump AOT file format version.
16816 * objects.cs: Add a test for #78990.
16818 * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
16819 (peter.dettman@iinet.net.au). Fixes #79087.
16821 * basic-long.cs: Add a test for the above.
16823 2006-08-16 Zoltan Varga <vargaz@gmail.com>
16825 * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
16827 * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
16830 2006-08-15 Zoltan Varga <vargaz@gmail.com>
16832 * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
16835 2006-08-10 Jonathan Chambers <joncham@gmail.com>
16837 * mini.c: Don't verify COM proxy invoke calls
16840 2006-08-10 Dick Porter <dick@ximian.com>
16842 * wapihandles.c (mini_wapi_seminfo): More info, to help track down
16843 which process is holding semaphores locked.
16845 2006-08-08 Zoltan Varga <vargaz@gmail.com>
16847 * mini-ia64.c mini-amd64.c: Fix #79027.
16849 * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
16851 * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
16853 * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
16854 implicit arguments in a vararg call. Fixes #79027.
16856 2006-08-07 Zoltan Varga <vargaz@freemail.hu>
16858 * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
16859 (mono_get_array_new_va_signature): Ditto.
16861 2006-08-05 Zoltan Varga <vargaz@gmail.com>
16863 * aot-runtime.c: Call init_plt lazily.
16865 * inssel-long.brg: Fix unsigned long->int conversion.
16867 * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
16869 * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
16870 that most data is now in the .rss/.data section.
16872 2006-08-04 Zoltan Varga <vargaz@gmail.com>
16874 * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.
16876 * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
16878 * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
16880 * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
16882 * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
16883 virtual call. Fixes #79010.
16885 * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method
16886 and use the result as the this argument in the real call.
16888 * generics.2.cs: Add a new test for #79010.
16890 2006-08-03 Zoltan Varga <vargaz@gmail.com>
16892 * mini-x86.c: Fix a warning.
16894 * aot-compiler.c: Add a bunch of statistics.
16896 * mini.c (inline_method): Disable inlining in out-of-line bblocks.
16898 2006-08-02 Zoltan Varga <vargaz@gmail.com>
16900 * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
16902 2006-08-01 Zoltan Varga <vargaz@gmail.com>
16904 * 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>.
16906 2006-07-13 Miguel de Icaza <miguel@novell.com>
16908 * mini.c (mono_method_to_ir): Obtain the original method in the
16909 CIL stream and use this to perform validation.
16913 2006-07-19 Zoltan Varga <vargaz@gmail.com>
16915 * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
16916 (mono_arch_call_opcode): Ditto.
16918 * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
16921 * mini.c (mono_patch_info_dup_mp): New helper function.
16923 * aot-compiler.c (compile_method): Fix some of the memory allocated during
16924 compilation. Fixes #78827.
16926 2006-07-18 Kornel Pal <kornelpal@gmail.com>
16928 * declsec.c: Use original security informations for
16929 MONO_WRAPPER_MANAGED_TO_MANAGED.
16931 2006-07-15 Jonathan Chambers <joncham@gmail.com>
16933 * mini.c: Allow Com Interop methods/classes and
16934 don't verify COM wrapper calls
16937 2006-07-13 Zoltan Varga <vargaz@gmail.com>
16939 * inssel-long32.brg: Fix long->i4 checked conversion.
16941 * exceptions.cs: Add a test for the above.
16943 2006-07-08 Zoltan Varga <vargaz@gmail.com>
16945 * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
16947 * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown
16950 * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
16953 2006-07-03 Zoltan Varga <vargaz@gmail.com>
16955 * mini.c: Fix solaris/x86 exception handling.
16957 * Makefile.am: Get rid of $(ICU_LIBS).
16959 2006-07-02 Zoltan Varga <vargaz@gmail.com>
16961 * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
16962 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
16963 (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
16965 * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
16967 * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
16968 this function causes a SIGSEGV.
16970 2006-06-22 Zoltan Varga <vargaz@gmail.com>
16972 * mini.c: Remove unused solaris/x86 includes.
16974 2006-06-21 Zoltan Varga <vargaz@gmail.com>
16976 * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
16978 2006-06-20 Jb Evain <jbevain@gmail.com>
16980 * cpu-g4.md: fix max length of start_handler instruction.
16982 2006-06-20 Massimiliano Mantione <massi@ximian.com>
16983 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
16985 2006-06-16 Massimiliano Mantione <massi@ximian.com>
16986 * ssa.c: Fixed bug 78653 for SSA based deadce.
16987 * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
16988 MonoInst.flags, used in SSA based deadce.
16989 * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
16990 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
16992 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
16994 * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
16995 it can end up using non executable memory on ppc64 systems
16996 running ppc32 userspace (fix from Johannes Berg).
16998 2006-06-14 Dick Porter <dick@ximian.com>
17000 * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
17003 2006-06-13 Massimiliano Mantione <massi@ximian.com>
17004 * mini.c: Made so that inline is locally disabled if it would
17005 trigger a .cctor, because too many apps depend on this behavior
17006 (which seems to be also the one of the MS CLR).
17008 2006-06-13 Zoltan Varga <vargaz@gmail.com>
17010 * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
17011 No idea why this worked before.
17013 * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
17014 which branch to outer exception clauses since they could skip the
17015 inner finally clauses. Fixes #78633.
17017 * exceptions.cs: Add a test for the above.
17019 * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
17022 * iltests.il: Add a test for the above.
17024 2006-06-12 Zoltan Varga <vargaz@gmail.com>
17026 * mini.c (remove_block_if_useless): Do not remove the bblock immediately
17027 after the end of a try bblock, to prevent asserts in mini_method_compile ().
17029 * iltests.il: Add a test for the above.
17031 2006-06-10 Zoltan Varga <vargaz@gmail.com>
17033 * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
17035 * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
17036 methods as instrinsics.
17038 2006-06-09 Wade Berrier <wberrier@novell.com>
17040 * Makefile.am: Fix sources list for svn rename so that make dist succeeds
17041 (simple-cee-ops.h ssapre-mini-ops.h)
17043 2006-06-09 Neale Ferguson <neale@sinenomine.net>
17045 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
17046 * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
17048 * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
17049 * cpu-s390x.md: Fix max. length values for a couple of instructions.
17051 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
17053 * mini-exceptions.c: Minor fix for building mono in Visual Studio.
17055 2006-06-08 Massimiliano Mantione <massi@ximian.com>
17057 * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
17058 * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
17059 * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
17060 * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
17061 * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
17062 of opcodes, so that bug 78549 should not happen again.
17063 * ssapre.c: Updated to use the renamed files.
17065 2006-06-08 Zoltan Varga <vargaz@gmail.com>
17067 * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move
17068 in OP_ATOMIC_EXCHANGE_I4.
17070 2006-06-07 Wade Berrier <wberrier@novell.com>
17072 * tramp-s390.c: Fix s390 build (add missing pointer declarations
17073 in mono_debugger_create_notification_function)
17075 2006-06-06 Zoltan Varga <vargaz@gmail.com>
17077 * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
17079 * mini.c (type_from_stack_type): Disable some changes which do not
17082 * driver.c: Reenable opts.
17084 * mini.h (MonoStackSlot): New structure to keep track of the verification state
17085 of the evaluation stack.
17087 * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
17088 evaluation stack trace at entry to the bblock.
17090 * mini.c (merge_stacks): New function to perform verification of stack merges.
17091 Turned off by default.
17093 * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
17096 2006-06-06 Massimiliano Mantione <massi@ximian.com>
17098 * local-propagation.c: Fixed bug 78549.
17100 2006-06-04 Zoltan Varga <vargaz@gmail.com>
17102 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
17104 2006-06-02 Miguel de Icaza <miguel@novell.com>
17106 * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
17107 tramp-arm.c, tramp-ia64.c
17108 (mono_debugger_create_notification_function): Update signature to
17109 new signature and use new protocol for creating the notification
17112 Should fix the build.
17114 2006-06-02 Geoff Norton <gnorton@customerdna.com>
17116 * exceptions-ppc.c (mono_jit_walk_stack)
17117 (ves_icall_get_frame_info): Fix the build
17119 2006-06-02 Zoltan Varga <vargaz@gmail.com>
17121 * mini.c (mono_set_defaults): Fix the handling of -O=-all.
17123 2006-05-31 Raja R Harinath <rharinath@novell.com>
17125 * il2tests.2.il: New file for generics CIL tests. Add test for
17127 * Makefile.am: Update.
17130 * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
17133 2006-05-30 Massimiliano Mantione <massi@ximian.com>
17135 * aliasing.c: Fixed bug 78311.
17137 2006-05-29 Martin Baulig <martin@ximian.com>
17139 * mini-exceptions.c (mono_find_jit_info): When computing the
17140 native offset, check whether we're actually inside the method's
17141 code; call mono_debug_print_stack_frame() to format the frame.
17142 (ves_icall_System_Exception_get_trace): Call
17143 mono_debug_print_stack_frame() to format the stack frame.
17144 (ves_icall_get_trace): Update to the new debugging API.
17145 (mono_jit_walk_stack_from_ctx): Likewise.
17146 (ves_icall_get_frame_info): Likewise.
17148 * mini.c (get_method_from_ip): Use the new debugging API.
17149 (mono_print_method_from_ip): Likewise.
17152 (mono_jit_walk_stack): Use the new debugging API.
17153 (ves_icall_get_frame_info): Likewise.
17155 2006-05-27 Zoltan Varga <vargaz@gmail.com>
17157 * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
17159 2006-05-25 Massimiliano Mantione <massi@ximian.com>
17161 * mini.c: Added "limitator" to inline for debugging.
17163 2006-05-24 Martin Baulig <martin@ximian.com>
17165 * debug-debugger.c (mono_debugger_init): Create a private,
17166 malloc()-based code manager for the notification function and
17167 intentionally leak it on exit. This fixes the crash-on-exit race
17171 (mono_debugger_create_notification_function): Added
17172 `MonoCodeManager *' argument.
17175 (mono_debugger_create_notification_function): Added
17176 `MonoCodeManager *' argument.
17178 2006-05-23 Massimiliano Mantione <massi@ximian.com>
17180 * aliasing.c: Fixed 64 bit issue.
17181 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
17182 default since all known bugs are fixed (one more time!).
17184 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
17186 * mini.c: write barrier support.
17188 2006-05-23 Martin Baulig <martin@ximian.com>
17190 * debug-debugger.c: Revert Paolo's change. Add comment and #error
17191 check at the top of the file.
17193 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
17195 * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
17196 reverting changes without reason and without changelog entries.
17198 2006-05-18 Zoltan Varga <vargaz@gmail.com>
17200 * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
17201 to a few opcodes. Fixes #78439.
17203 * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
17204 consistency with other archs.
17206 * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
17208 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
17210 * debug-debugger.c: fix the build.
17212 2006-05-17 Martin Baulig <martin@ximian.com>
17215 (debugger_thread_vtable): Moved here from ../metadata/threads.c.
17216 (debugger_init_threads): Formerly known as mono_debugger_init_threads().
17217 (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
17218 (debugger_attach): Call GC_mono_debugger_add_all_threads().
17220 2006-05-11 Zoltan Varga <vargaz@gmail.com>
17222 * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
17224 2006-05-10 Zoltan Varga <vargaz@gmail.com>
17226 * mini-x86.c (mono_arch_instrument_epilog): Fix handling of
17227 MONO_TYPE_GENERICINST.
17229 * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of
17230 MONO_TYPE_GENERICINST.
17232 2006-05-09 Zoltan Varga <vargaz@gmail.com>
17234 * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
17237 2006-05-08 Zoltan Varga <vargaz@gmail.com>
17239 * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
17241 (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
17243 2006-05-06 Zoltan Varga <vargaz@gmail.com>
17245 * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
17246 mono_trace_cleanup ().
17248 * iltests.il: Fix problem with the newly added test.
17250 * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
17251 due to register constraints, free up the previous hreg. Fixes #78314.
17253 * iltests.il: Add new test for #78314.
17255 * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
17256 Interlocked.Add. Fixes #78312.
17258 * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
17260 2006-05-05 Zoltan Varga <vargaz@gmail.com>
17262 * inssel.brg (mini_emit_virtual_call): Fix a warning.
17264 2006-05-05 Martin Baulig <martin@ximian.com>
17266 * debug-mini.c (mono_debug_open_block): New method.
17269 (mono_arch_output_basic_block): Call mono_debug_open_block() at
17270 the beginning of each basic block.
17273 (mono_arch_output_basic_block): Call mono_debug_open_block() at
17274 the beginning of each basic block.
17276 2006-05-04 Massimiliano Mantione <massi@ximian.com>
17278 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
17279 default until I understand why they break the build on amd64.
17281 2006-05-04 Zoltan Varga <vargaz@gmail.com>
17283 * mini.c (mini_cleanup): Call mono_cleanup ().
17285 * mini.c (UNVERIFIED): New macro to make it easier to track down verification
17288 2006-05-04 Massimiliano Mantione <massi@ximian.com>
17290 * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
17291 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
17292 default since all known bugs are fixed, and I cannot reproduce bug
17293 77944... I'm asking Matt Hargett to test again after this commit.
17295 2006-04-28 Massimiliano Mantione <massi@ximian.com>
17297 * mini-codegen.c: Fixed typo that thrashed inline.
17299 2006-04-28 Zoltan Varga <vargaz@gmail.com>
17301 * dominators.c (compute_dominators): Avoid using a worklist since
17302 it is not correct in some cases. Instead, iterate over all bblocks as
17303 in the original paper. Fixes --compile-all -O=all System.Xml.dll.
17305 2006-04-28 Miguel de Icaza <miguel@novell.com>
17307 * mini.c (mono_jit_compile_method_inner): Use
17308 mono_prepare_exception_from_error that resets the value
17311 2006-04-27 Miguel de Icaza <miguel@novell.com>
17313 * mini.c: Move the mini_loader_error_to_exception to metadata.
17315 2006-04-27 Massimiliano Mantione <massi@ximian.com>
17317 * aliasing.c: Fixed bug 78210.
17319 2006-04-27 Massimiliano Mantione <massi@ximian.com>
17321 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
17322 default until all their problems (or the ones they trigger) are fixed.
17324 2006-04-26 Zoltan Varga <vargaz@gmail.com>
17326 * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
17328 * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
17329 as loaded only after resolving patches since that could invoke the same method.
17331 * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
17333 * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
17336 * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
17339 * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
17342 * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
17343 made from AOT code through the PLT table.
17345 * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
17346 holding the plt offset when a call is made to the aot plt trampoline.
17348 2006-04-25 Zoltan Varga <vargaz@gmail.com>
17350 * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the
17353 * Makefile.am (common_sources): Fix build breakage.
17355 * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
17356 calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
17357 intra-assembly calls if possible.
17359 * tramp-*.c: Add new functions for patching/nullifying PLT entries.
17361 * mini-trampolines.c: Handle PLT entries.
17363 * mini.c: Avoid creating a GOT var for calls.
17365 * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
17366 from mscorlib code.
17368 * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
17369 from mscorlib code.
17371 * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
17374 * mini.h: Bump AOT file format version.
17376 * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
17379 2006-04-25 Martin Baulig <martin@ximian.com>
17381 * driver.c: Disable copyprop, consprop and inline when running
17382 inside the debugger.
17384 2006-04-25 Martin Baulig <martin@ximian.com>
17386 * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
17387 with `get_current_thread' and added `detach'.
17388 (MonoDebuggerMetadataInfo): Added `thread_size',
17389 `thread_tid_offset', `thread_stack_ptr_offset' and
17390 `thread_end_stack_offset'.
17392 2006-04-25 Zoltan Varga <vargaz@gmail.com>
17394 * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and
17397 * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
17398 ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
17400 * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
17402 * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
17404 * aot.c: Add support for ADJUSTED_IID.
17406 2006-04-24 Zoltan Varga <vargaz@gmail.com>
17408 * aot.c (emit_method_order): Don't align method_order_end.
17410 * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
17411 the interface ID changes.
17413 2006-04-21 Dick Porter <dick@ximian.com>
17415 * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
17416 cleaning up a thread. Fixes the new part of bug 77470.
17418 2006-04-20 Geoff Norton <gnorton@customerdna.com>
17420 * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
17421 to managed wrapper.
17423 2006-04-19 Zoltan Varga <vargaz@gmail.com>
17425 * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
17427 * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
17428 SIGSEGV. Fixes #78072.
17430 * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
17431 unregister our SIGABRT handler.
17433 2006-04-19 Massimiliano Mantione <massi@ximian.com>
17435 * mini.c: Disabled inline where it can alter the call stack in a
17436 way visible from managed code.
17437 * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
17440 2006-04-16 Zoltan Varga <vargaz@gmail.com>
17442 * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
17443 on other platforms. Fixes #78089.
17445 2006-04-13 Martin Baulig <martin@ximian.com>
17447 * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
17448 determine whether we're inside the debugger.
17451 (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
17453 2006-04-12 Zoltan Varga <vargaz@gmail.com>
17455 * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
17456 handler clauses. Fixes #78024.
17458 * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
17459 in the CALL_MEMBASE opcodes. Fixes #78088.
17460 (mono_arch_get_vcall_slot_addr): Ditto.
17462 2006-04-10 Martin Baulig <martin@ximian.com>
17464 * debug-debugger.c: The thread handling code has now been moved
17465 into ../metadata/threads.c.
17467 2006-04-10 Zoltan Varga <vargaz@gmail.com>
17469 * driver.c (mono_main): Fix --with-gc=none build.
17471 * mini-codegen.c (mono_spillvar_offset): Improve alignment.
17472 (mono_spillvar_offset_float): Ditto.
17473 (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
17474 hreg, not when its !global, since on ia64, there is a third category: stacked
17477 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
17479 * mini.c: set MonoInst->klass for load field address and a few other
17482 2006-04-10 Zoltan Varga <vargaz@gmail.com>
17484 * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
17486 2006-04-07 Zoltan Varga <vargaz@gmail.com>
17488 * dominators.c (compute_dominators): Fix yet another bug which surfaced after
17489 the branch opt changes.
17491 2006-04-06 Dick Porter <dick@ximian.com>
17493 * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
17495 * wapihandles.c (mini_wapi_seminfo):
17496 * driver.c (mono_main): Add semaphore info option
17498 2006-04-05 Zoltan Varga <vargaz@gmail.com>
17500 * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
17501 branch optimization changes. Fixes #78009.
17503 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
17505 * mini.c: ignore accessibility of methods in managed->native wrappers.
17507 2006-04-04 Zoltan Varga <vargaz@gmail.com>
17509 * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
17511 * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
17513 2006-04-03 Zoltan Varga <vargaz@gmail.com>
17515 * mini.c: Modify the branch optimizations to preserve the invariant that
17516 the entries inside the in_bb and out_bb arrays are unique.
17517 (mono_unlink_bblock): Avoid creation of new arrays.
17519 2006-04-02 Zoltan Varga <vargaz@gmail.com>
17521 * mini.c (mono_unlink_bblock): Fix regression caused by previous
17524 2006-04-01 Zoltan Varga <vargaz@gmail.com>
17526 * mini.c (optimize_branches): Remove the "optimizations" in
17527 the cbranch1/cbranch2 -> branch cases which were causing several
17528 problems in the past. Fixes #77986.
17530 2006-03-31 Chris Toshok <toshok@ximian.com>
17532 * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
17533 default optimizations :(
17535 2006-03-31 Zoltan Varga <vargaz@gmail.com>
17537 * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
17540 2006-03-31 Massimiliano Mantione <massi@ximian.com>
17542 * local-propagation.c: Added comments to structs and removed
17543 "Mono" prefixes from local tree mover types.
17545 2006-03-30 Zoltan Varga <vargaz@gmail.com>
17547 * Makefile.am (arch_sources): Define this for each architecture so
17548 libmono_la_SOURCES is defined in one place.
17550 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
17552 * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
17555 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
17557 * driver.c: print the GC name supplied by configure.
17559 2006-03-29 Massimiliano Mantione <massi@ximian.com>
17561 * local-propagation.c: Added tree mover, and moved here all the
17562 local propagation code from mini.c
17563 * mini.c: Added support for treeprop, and moved all the local
17564 propagation code to local-propagation.c
17565 * mini.h: Added support for treeprop
17566 * driver.c: Added support for treeprop, enabled consprop, copyprop,
17567 treeprop, inline and deadce by default
17568 * Makefile.am: Added local-propagation.c
17570 2006-03-25 Zoltan Varga <vargaz@gmail.com>
17572 * exceptions-sparc.c: Applied patch from David S. Miller <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
17574 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
17576 * debug-debugger.c: make it compile without the Boehm GC.
17578 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
17580 * mini.c: fixed issue with mismatch when an icall is registered
17581 with multiple names but same address.
17583 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
17585 * declsec.c, mini-exceptions.c: use write barrier to set reference
17586 fields of managed objects.
17588 2006-03-19 Zoltan Varga <vargaz@gmail.com>
17590 * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
17591 (can_access_internals): Fix a warning.
17593 * mini.c (print_method_from_ip): Rename this to
17594 mono_print_method_from_ip so it gets exported.
17596 * trace.c: Deal with strings inside StringBuilder's containing garbage
17597 and fix memory leaks. Fixes #77848.
17599 2006-03-19 Zoltan Varga <vargaz@gmail.com>
17601 * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
17604 2006-03-16 Neale Ferguson <neale@sinenomine.net>
17606 * mini-s390.c: Remove OP_X86_TEST_NULL.
17608 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
17610 * mini.c: use the correct GetHashCode() for the moving collector.
17612 2006-03-16 Massimiliano Mantione <massi@ximian.com>
17614 * liveness.c: Regalloc spill cost tuning.
17616 2006-03-15 Neale Ferguson <neale@sinenomine.net>
17618 * mini-s390x.h: Correct S390_LONG macro.
17620 * mini-s390x.c: Cleanup unused code.
17622 2006-03-15 Zoltan Varga <vargaz@gmail.com>
17624 * jit-icalls.h: New file.
17626 * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
17627 icalls and include that instead of including jit-icalls.c.
17629 * mini-ppc.c (mono_arch_output_basic_block): Remove references to
17632 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
17634 * mini.c: when checking for member accessibility, also check for
17635 friend assemblies and for explicit interface implementations.
17637 2006-03-14 Zoltan Varga <vargaz@gmail.com>
17639 * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
17641 * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
17643 * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
17644 common cases are done first.
17646 * mini-ops.h: Only define platform specific opcodes on the given platform.
17648 * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
17651 2006-03-14 Martin Baulig <martin@ximian.com>
17653 Revert Paolo's change from r57348:
17655 * mini.h: don't use gboolean for bitfields.
17656 * mini.c: verifier changes for fields and methods accessibility.
17658 2006-03-13 Neale Ferguson <neale@sinenomine.net>
17660 * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
17662 * mini-s390x.c: Fix conv_r_un.
17664 * cpu-s390, cpu-s390x.md: Fix lengths.
17666 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
17668 * mini.c: nested types have access to all the nesting
17669 levels, not just the enclosing types.
17671 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
17673 * mini.c: added a few more verification checks.
17675 2006-03-12 Zoltan Varga <vargaz@gmail.com>
17677 * liveness.c: Merge optimizations from the linear-il branch.
17679 2006-03-11 Zoltan Varga <vargaz@gmail.com>
17681 * mini-ia64.c (emit_call): Add a comment.
17683 * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
17685 * tramp-ia64.c: Fix some warnings.
17687 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
17689 * mini.h: don't use gboolean for bitfields.
17690 * mini.c: verifier changes for fields and methods accessibility.
17692 2006-03-11 Zoltan Varga <vargaz@gmail.com>
17694 * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
17695 lazy icall wrapper changes.
17697 * dominators.c: Replace all the dominator algorithms with faster
17698 ones from the linear-il branch.
17700 * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
17703 * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
17704 common cases are done first.
17706 * mini-amd64.c: Fix some warnings.
17708 * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
17711 * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
17714 * mini.h: Add a missing prototype.
17716 2006-03-10 Zoltan Varga <vargaz@gmail.com>
17718 * mini.c: Compile icall wrappers lazily.
17720 * mini-codegen.c: Use printf instead of g_print since its much faster.
17722 * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
17725 * mini.c (optimize_branches): Cache the negative result from
17726 remove_block_if_useless ().
17728 * mini.c (optimize_branches): Avoid restarting the iteration after each change.
17729 Also fix some bblock linking issues.
17731 * helpers.c (mono_disassemble_code): Reduce the size of the temporary
17734 * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
17736 * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
17737 accessed fields first, for better cache behavior.
17739 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
17741 * mini.c: speedup IList<T> array accesses.
17743 2006-03-09 Zoltan Varga <vargaz@gmail.com>
17745 * mini.c (mono_method_to_ir): Handle large methods overflowing the
17746 inline_costs counter. Fixes #77190.
17748 2006-03-06 Zoltan Varga <vargaz@gmail.com>
17750 * mini-exceptions.c: Call mono_trace_is_enabled () before printing
17751 trace messages. Fixes #77706.
17753 2006-03-04 Martin Baulig <martin@ximian.com>
17755 * tramp-amd64.c, tramp-x86.c
17756 (mono_debugger_create_notification_function): Use
17757 mono_global_codeman_reserve() to allocate a buffer at runtime and
17760 * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
17762 * debug-debugger.c (mono_debugger_init): Dynamically allocate the
17763 notification function at runtime and then call `initialize' in the
17764 `MONO_DEBUGGER__debugger_info' vtable.
17766 2006-03-04 Zoltan Varga <vargaz@gmail.com>
17768 * iltests.il: Fix a visibility problem.
17770 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
17772 * driver.c, mini.c: add hooks for the counters API.
17774 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
17776 * driver.c: show disabled options.
17778 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
17780 * linear-scan.c: always use cost-driven selection.
17782 2006-02-28 Raja R Harinath <rharinath@novell.com>
17784 * jit-icalls.c (helper_compile_generic_method): Revert change from
17787 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
17789 * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
17791 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
17793 * inssel.brg: style fixes, mostly to force the updated monoburg
17794 to run for people using svn.
17796 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
17798 * mini.c: match monoburg changes.
17800 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
17802 * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
17803 ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
17804 declaration in the header file.
17806 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
17808 * helpers.c: reduce relocations and mem usage.
17810 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
17812 * mini.h, mini-codegen.c: disable logging features if
17813 requested by configure.
17815 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
17817 * mini.c: tiny verifier changes.
17819 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
17821 * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
17822 cpu-pentium.md: stack alignment changes for osx/x86,
17823 partially from Geoff Norton <gnorton@customerdna.com>.
17825 2006-02-24 Raja R Harinath <harinath@gmail.com>
17827 * jit-icalls.c (helper_compile_generic_method): Update to changes
17828 in metadata/class.c.
17830 2006-02-24 Zoltan Varga <vargaz@gmail.com>
17832 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
17834 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
17835 interface calls with large offsets.
17837 2006-02-23 Raja R Harinath <rharinath@novell.com>
17839 * jit-icalls.c (helper_compile_generic_method): Document the
17840 special-case we depend on so that we can inflate the method twice
17841 with the same context with no bad side-effects.
17843 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
17845 * mini-x86.c, mini-amd64.c: fix for case when xen support
17848 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
17850 * mini-x86.c, mini-amd64.c: generate code to access tls items
17851 in a faster way for Xen systems.
17853 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
17855 * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
17856 updates and compilation fixes for the OSX/x86 port, mostly from
17857 Geoff Norton <gnorton@customerdna.com>.
17859 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
17861 * inssel.brg: faster interface call implementation
17862 to sync with the interface_offsets MonoVTable changes.
17864 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
17866 * mini.c: more verification checks.
17868 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
17870 * mini.c: added a few more verification checks.
17872 2006-02-17 Neale Ferguson <neale@sinenomine.net>
17874 * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
17875 facility on the processor and use it if available.
17877 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
17879 * driver.c, aot.c, mini.c: throw exception if the IL code is
17880 invalid or unverifiable.
17882 2006-02-17 Raja R Harinath <rharinath@novell.com>
17884 * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
17887 2006-02-16 Zoltan Varga <vargaz@gmail.com>
17889 * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
17891 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
17893 * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
17894 mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
17895 handling of instantiated generic valuetypes.
17897 2006-02-11 Zoltan Varga <vargaz@gmail.com>
17899 * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of
17900 MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
17903 * generics.2.cs: Revert the nullable reftypes tests.
17905 2006-02-10 Zoltan Varga <vargaz@gmail.com>
17907 * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
17908 using __builtin_frame_address (1) as it doesn't work in the presence
17909 of optimizations. Hopefully fixes #77273.
17911 * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
17912 -> generics.cs change as it doesn't work with some automake versions.
17914 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
17916 * mini.c: handle systems that sue a different way to
17917 retrieve the stack address of the current thread.
17919 2006-02-09 Zoltan Varga <vargaz@gmail.com>
17921 * Makefile.am generics.2.cs: Rename this to generics.cs and handle
17922 it specially in the makefile.
17924 * generics.2.cs: Add tests for nullable reference types.
17926 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
17928 * mini.c: always handle the case when mono_jit_init()
17929 is called in a thread different from the main thread,
17930 confusing libgc (bug #77309).
17932 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
17934 * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
17936 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
17938 * mini.c: change optimize_branches () to use a single loop
17939 and introduce a new optimization to simplify some range checks.
17941 2006-02-03 Martin Baulig <martin@ximian.com>
17943 * debug-debugger.c (debugger_thread_manager_thread_created): Removed
17944 and merged with debugger_thread_manager_add_thread().
17945 (mono_debugger_main): Call debugger_thread_manager_add_thread() to
17946 inform the debugger about the main thread.
17948 2006-02-03 Zoltan Varga <vargaz@gmail.com>
17950 * basic.cs: Add test for div.un/rem.un constant folding.
17952 2006-02-03 Neale Ferguson <neale@sinenomine.net>
17954 * cpu-s390x.md: correct int_xor_imm length
17956 2006-02-03 Zoltan Varga <vargaz@gmail.com>
17958 * generics.2.cs: New test for #77442.
17960 * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
17963 2006-02-02 Martin Baulig <martin@ximian.com>
17965 * tramp-x86.c, tramp-amd64.c: It's now safe to #include
17966 <mono/metadata/mono-debug-debugger.h>
17968 * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
17970 2006-02-02 Martin Baulig <martin@ximian.com>
17972 * debug-debugger.h: New header file for debug-debugger.c.
17974 * debug-debugger.c: Big API cleanup; don't run the managed Main()
17975 function is a separate thread anymore; add support for attaching.
17977 2006-02-01 Zoltan Varga <vargaz@gmail.com>
17979 * tramp-x86.c: Fix a warning.
17981 2006-01-31 Zoltan Varga <vargaz@gmail.com>
17983 * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
17984 on very large methods.
17986 * aot.c (load_patch_info): Fix a warning.
17988 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
17990 * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
17991 mini-ops.h: alu membase optimizations.
17993 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
17995 * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
17996 to speedup StringBuilder.
17998 2006-01-27 Zoltan Varga <vargaz@gmail.com>
18000 * dominators.c (mono_compute_natural_loops): Fix detection of
18001 loop body start blocks.
18003 * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
18005 2006-01-26 Zoltan Varga <vargaz@gmail.com>
18007 * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
18010 2006-01-25 Massimiliano Mantione <massi@ximian.com>
18012 * aliasing.c: Fixed aliasing issue on 64 bit archs.
18014 2006-01-25 Martin Baulig <martin@ximian.com>
18016 * debug-debugger.c: Moved the `MonoDebuggerManager' and
18017 `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
18018 started to cleanup this file a little bit.
18020 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
18022 * mini.c: optimize a codepath frequently happening in generics code.
18024 2006-01-23 Martin Baulig <martin@ximian.com>
18026 * Makefile.am: Only compile debug-debugger.c on supported platforms.
18028 * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
18029 functions directly.
18031 * driver.c: debug-debugger.c is only available if
18032 `MONO_DEBUGGER_SUPPORTED' is defined.
18034 2006-01-23 Martin Baulig <martin@ximian.com>
18036 * debug-debugger.c: Only enable this on platforms where the Mono
18037 Debugger is working (x86 and x86_64).
18039 2006-01-21 Martin Baulig <martin@ximian.com>
18041 The Mono Debugger is now using the normal `mono' instead of the
18042 `mono-debugger-mini-wrapper' when executing managed code.
18044 * debug-debugger.c: New file; previously known as
18045 debugger/wrapper/wrapper.c.
18047 * debug-mini.c (mono_init_debugger): Removed.
18049 * driver.c (mono_main): Added new `--inside-mdb' command line
18050 argument which is used when running inside the debugger.
18052 2006-01-20 Zoltan Varga <vargaz@gmail.com>
18054 * liveness.c (mono_analyze_liveness): Remove some unused data
18057 2006-01-17 Zoltan Varga <vargaz@gmail.com>
18059 * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
18061 2006-01-16 Zoltan Varga <vargaz@gmail.com>
18063 * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
18064 depends on implementation details of monobitset.
18066 * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
18069 2006-01-15 Zoltan Varga <vargaz@gmail.com>
18071 * liveness.c: Update after monobitset changes.
18073 2006-01-14 Zoltan Varga <vargaz@gmail.com>
18075 * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
18077 2006-01-11 Neale Ferguson <neale@sinenomine.net>
18079 * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
18081 * mini-s390x.c: Remove warning messages.
18083 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
18085 * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
18087 2006-01-10 Zoltan Varga <vargaz@gmail.com>
18089 * generics.2.cs: Add ldelem/stelem_any test.
18091 2006-01-10 Neale Ferguson <neale@sinenomine.net>
18093 * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
18095 2006-01-07 Zoltan Varga <vargaz@gmail.com>
18097 * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
18099 2006-01-06 Zoltan Varga <vargaz@gmail.com>
18101 * generics.2.cs: Reenable vtype tests.
18103 * inssel-x86.brg: Remove an icorrect valuetype rule.
18105 2006-01-06 Neale Ferguson <neale@sinenomine.net>
18107 * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
18108 initial support for OP_ABS.
18110 2006-01-05 Neale Ferguson <neale@sinenomine.net>
18112 * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
18114 2006-01-05 Neale Ferguson <neale@sinenomine.net>
18116 * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int
18117 conversion and implement LADD/LSUB.
18119 * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
18122 2006-01-05 Neale Ferguson <neale@sinenomine.net>
18124 * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
18126 * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
18129 2006-01-05 Neale Ferguson <neale@sinenomine.net>
18131 * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when
18132 localloc is encountered. Fixes crash in test-183.cs when using gmcs
18133 (stack walk problem).
18135 2006-01-04 Zoltan Varga <vargaz@gmail.com>
18137 * aot.c (mono_aot_load_method): Fix a warning.
18139 2006-01-03 Neale Ferguson <neale@sinenomine.net>
18141 * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
18143 2006-01-03 Zoltan Varga <vargaz@gmail.com>
18145 * iltests.il: Add test for #77148.
18147 * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
18150 2006-01-03 Neale Ferguson <neale@sinenomine.net>
18152 * mini-s390x.c, inssel-s390x.brg: Remove debug statements
18154 2006-01-03 Neale Ferguson <neale@sinenomine.net>
18156 * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
18157 cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
18159 * basic-long.cs: Add lconv-to-r4/r8 tests.
18161 2006-01-03 Zoltan Varga <vargaz@gmail.com>
18163 * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
18165 * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
18166 here as on other archs.
18168 2005-12-29 Neale Ferguson <neale@sinenomine.net>
18170 * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
18172 2005-12-29 Neale Ferguson <neale@sinenomine.net>
18174 * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
18176 * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
18178 * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
18179 instrument_prolog; Add memory_barrier instruction.
18181 2005-12-26 Zoltan Varga <vargaz@gmail.com>
18183 * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
18185 2005-12-23 Zoltan Varga <vargaz@gmail.com>
18187 * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
18189 * aliasing.c inssel.brg: Fix warnings.
18191 * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
18192 could skip initialization of some parts of memory.
18194 * mini.c mini-ia64.c: Fix warnings.
18196 * inssel-sparc.brg: Add an implementation of lneg which actually works.
18198 2005-12-22 Zoltan Varga <vargaz@gmail.com>
18200 * aliasing.c (mono_build_aliasing_information): Add a workaround for
18201 a crash seen on sparc.
18203 * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
18205 * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
18207 2005-12-21 Neale Ferguson <neale@sinenomine.net>
18209 * mini-ops.h: Add s390_backchain instruction
18211 * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
18213 * cpu-s390.md: Add s390_backchain instruction
18215 * mini-s390.c: Significant ABI changes
18217 * mini-s390.h: Cater for zero length structures
18219 2005-12-20 Neale Ferguson <neale@sinenomine.net>
18221 * mini-s390.c: ABI fixes
18223 * inssel-s390.brg: Remove debug statements
18225 * cpu-s390.md: Fix length of ATOMIC_xx operations
18227 2005-12-19 Zoltan Varga <vargaz@gmail.com>
18229 * basic-float.cs: Add float<->long conversion tests.
18231 2005-12-16 Neale Ferguson <neale@sinenomine.net>
18233 * mini-s390.c: Fix LOCALLOC processing.
18235 * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
18237 2005-12-15 Zoltan Varga <vargaz@gmail.com>
18239 * iltests.il: Add tests for some opcodes not covered by the other
18242 2005-12-15 Neale Ferguson <neale@sinenomine.net>
18244 * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct
18245 register loading for Tail processing; Correct trace output.
18247 * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
18249 * cpu-s390.md: Correct size of jmp instruction.
18251 2005-12-13 Neale Ferguson <neale@sinenomine.net>
18253 * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
18255 2005-12-13 Neale Ferguson <neale@sinenomine.net>
18257 * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
18258 Bring s390 up to current level.
18260 2005-12-12 Zltan Varga <vargaz@gmail.com>
18262 * generics.2.cs: Disable the newly added tests as they do not work yet.
18264 * generics.2.cs: Add valuetype tests.
18266 2005-12-09 Zoltan Varga <vargaz@gmail.com>
18268 * basic-long.cs: Add i4->u8 test.
18270 * objects.cs: Add tests for JIT intrinsic.
18272 * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
18273 optimizations lost by a mistake.
18275 2005-12-07 Zoltan Varga <vargaz@gmail.com>
18277 * basic-long.cs: Remove a test moved to objects.cs.
18279 * arrays.cs: Add more array tests.
18281 2005-12-06 Zoltan Varga <vargaz@gmail.com>
18283 * arrays.cs: Add new tests for multi-dimensional arrays.
18285 2005-12-06 Raja R Harinath <rharinath@novell.com>
18287 * Makefile.am (test_sources2): Add generics.2.cs.
18288 (EXTRA_DIST): Add test_sources2.
18290 2005-12-05 Ben Maurer <bmaurer@ximian.com>
18292 Support for boxing and unboxing nullable types as well as the
18293 isinst operation on nullables, per the CLI ammendment.
18295 * inssel.brg (CEE_ISINST): Special case for nullable
18297 * mini.c (handle_unbox_nullable): new method
18298 (handle_box): Special case for nullable types
18299 (mono_method_to_ir): Call handle_unbox_nullable in correct
18302 * generics.2.cs: New test suite
18304 * Makefile.am: Support for regression tests with generics.
18306 2005-12-03 Zoltan Varga <vargaz@gmail.com>
18308 * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
18309 allocated to registers. Fixes #76800.
18311 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
18313 * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
18315 2005-11-30 Zoltan Varga <vargaz@gmail.com>
18317 * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot
18320 2005-11-29 Zoltan Varga <vargaz@gmail.com>
18322 * objects.cs basic-calls.cs: Move a test depending on valuetypes to
18325 * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
18327 * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
18328 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
18330 * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
18331 single precision before storing to a single precision location.
18333 2005-11-28 Raja R Harinath <rharinath@novell.com>
18335 * Makefile.am (ILASM): Use profile-dependent location of ilasm.
18337 2005-11-27 Zoltan Varga <vargaz@gmail.com>
18339 * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
18342 * basic.cs: Remove test_0_byte_compares test which was moved to
18343 objects.cs a long time ago.
18345 2005-11-22 Massimiliano Mantione <massi@ximian.com>
18347 * aliasing.c: Fixed aliasing issue on 64 bit archs.
18349 2005-11-20 Zoltan Varga <vargaz@gmail.com>
18351 * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
18352 handlers are called.
18354 * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
18357 * mini-ia64.c: Add support for the throw->branch exception
18360 * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
18362 2005-11-18 Massimiliano Mantione <massi@ximian.com>
18364 * mini.c: Enabled "fastpath" deadce :-)
18366 2005-11-18 Massimiliano Mantione <massi@ximian.com>
18368 * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
18369 alias analysis pass to support it.
18370 * mini.h: Likewise.
18372 * liveness.c: Likewise (liveness computation can use aliasing
18373 information to be more accurate).
18374 * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
18375 moreover made so that "--compile-all" uses the given optimization
18376 flags and not the default ones.
18377 * aliasing.c: Alias analysis (new file).
18378 * aliasing.h: Likewise.
18379 * Makefile.am: added "aliasing.c" and "aliasing.h".
18381 2005-11-17 Zoltan Varga <vargaz@gmail.com>
18383 * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
18386 2005-11-13 Zoltan Varga <vargaz@gmail.com>
18388 * mini-exceptions.c (mono_handle_exception_internal): Remove the
18389 fp >= end_of_stack exit condition, as it is not needed, and it might
18390 become true for fp eliminated frames.
18392 2005-11-11 Zoltan Varga <vargaz@gmail.com>
18394 * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
18397 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
18399 * mini-arm.c: fixed alignment of doubles/longs to match
18400 the C ABI (bug #76635).
18402 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
18404 * aot.c: fix compilation with --enable-minimal=aot.
18406 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
18408 * mini-arm.c: fixed compatibility with the new
18409 floating point emulator package for compares.
18411 2005-11-03 Atsushi Enomoto <atsushi@ximian.com?
18413 * mini.c : reverted sig->pinvoke changes (r51396-51397).
18415 2005-11-01 Zoltan Varga <vargaz@freemail.hu>
18417 * mini-exceptions.c (print_stack_frame): Output to stderr.
18418 (mono_handle_native_sigsegv): Ditto.
18420 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
18422 * mini-amd64.c (mono_arch_output_basic_block): Remove unused
18423 OP_LCONV_TO_OVF_I implementation.
18425 * mini-amd64.c: Add support for the throw->branch exception
18428 * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
18429 when the catch clause catches a more general exception, i.e. Object.
18431 2005-10-30 Zoltan Varga <vargaz@gmail.com>
18433 * cpu-ia64.md: Remove unused opcodes.
18435 * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
18436 specific defines for architectures defining USE_SIGACTION.
18438 * mini-ia64.c: Fix some warnings.
18440 * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
18441 version seemed to skip a frame.
18443 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
18445 * mini.c: Clean up the usage of sig->pinvoke flag. Now
18446 only calls which are made to native code use this flag.
18448 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
18450 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
18451 varargs methods as well.
18453 * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
18454 which have save_lmf set. Reorganize methods prologs a bit.
18456 * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
18457 debugger to the proper place.
18459 2005-10-29 Martin Baulig <martin@ximian.com>
18461 * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
18462 when running inside the debugger until the debugger has support
18465 2005-10-26 Zoltan Varga <vargaz@gmail.com>
18467 * mini.h: Fix a warning.
18469 2005-10-24 Miguel de Icaza <miguel@novell.com>
18471 * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
18472 we expose publicly, this returns the string.
18474 2005-10-22 Zoltan Varga <vargaz@freemail.hu>
18476 * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
18477 with fp elimination.
18479 2005-10-21 Zoltan Varga <vargaz@gmail.com>
18481 * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
18482 native stacktrace using the glibc 'backtrace' function if available.
18484 2005-10-20 Zoltan Varga <vargaz@gmail.com>
18486 * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
18488 * mini-exceptions.c (mono_handle_native_sigsegv): New function to
18489 handle SIGSEGVs received while in native code.
18491 * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
18492 code, call mono_handle_native_sigsegv which will abort the runtime
18493 after printing some diagnostics, instead of converting it into a
18494 confusing NullReferenceException.
18496 2005-10-18 Zoltan Varga <vargaz@gmail.com>
18498 * cpu-pentium.md: Remove unused opcodes.
18500 2005-10-18 Zoltan Varga <vargaz@freemail.hu>
18502 * mini-amd64.h (MonoLMF): Add rsp field.
18504 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
18507 2005-10-17 Zoltan Varga <vargaz@gmail.com>
18509 * mini-codegen.c (get_register_spilling): Fix some warnings.
18511 2005-10-16 Zoltan Varga <vargaz@freemail.hu>
18513 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
18514 elimination during exception handling. Enable fp elimination by
18517 * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
18520 2005-10-16 Martin Baulig <martin@ximian.com>
18522 * mini-exceptions.c
18523 (mono_debugger_run_finally): New public method for the debugger.
18525 2005-10-10 Zoltan Varga <vargaz@gmail.com>
18527 * debug-mini.c (mono_debug_init_method): Fix warning.
18529 * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
18530 the 'exname' parameter const to fix some warnings.
18532 2005-10-09 Zoltan Varga <vargaz@freemail.hu>
18534 * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
18535 introduced by the previous patch.
18537 2005-10-08 Zoltan Varga <vargaz@gmail.com>
18539 * basic-float.cs: Add test for precision of float arithmetic.
18541 * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
18542 when loading/storing single values from/to memory.
18544 * mini.c (mono_jit_compile_method_with_opt): Create the function
18545 pointers in the correct domain.
18547 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
18549 * mini-exceptions.c (mono_handle_exception_internal): Fix bug
18550 introduced by previous patch.
18552 * mini-exceptions.c (mono_handle_exception_internal): Handle the case
18553 when out_filter_idx is NULL.
18555 * mini-exceptions.c: Don't run filter clauses twice during exception
18556 handling. Fixes #75755.
18558 2005-10-07 Zoltan Varga <vargaz@gmail.com>
18560 * aot.c: Add support for ldflda wrappers.
18562 * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
18565 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
18567 * mini.c, mini.h: do not consider exception handlers blocks when
18568 setting up interface variables.
18570 2005-10-04 Zoltan Varga <vargaz@freemail.hu>
18572 * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
18574 2005-10-03 Zoltan Varga <vargaz@gmail.com>
18576 * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
18577 causes a regression.
18579 * mini.c (mini_thread_cleanup): Fix reading of freed memory.
18581 2005-10-02 Zoltan Varga <vargaz@freemail.hu>
18583 * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
18584 of the OP_P definitions.
18586 * TODO: Add a proposal for dealing with the CEE/OP mess.
18588 * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm
18589 optimizations from the x86 port.
18591 * cpu-amd64.md: Ditto.
18593 * basic.cs basic-long.cs: Add tests.
18595 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
18597 * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
18598 Patrik Torstensson's implementation of my exception-handling
18599 optimization idea, when the exception object is not used
18602 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
18604 * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
18605 of the mul_imm optimizations from the old jit.
18607 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
18609 * mini.c, liveness.c: patch by Patrik Torstensson and
18610 Zoltan Varga to improve performance in methods with
18613 2005-09-30 Zoltan Varga <vargaz@gmail.com>
18615 * driver.c: Remove 'Globalization' entry from --version.
18617 2005-09-28 Zoltan Varga <vargaz@gmail.com>
18619 * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
18620 there is a profiler interested in JIT events.
18622 * aot.c: Load profile files produced by the AOT profiling module, and
18623 reorder methods based on the profiling info. Add a 'method_order' table
18624 to the AOT file to make mono_aot_find_jit_info work with the reordered
18627 * mini.h: Bump AOT file version info.
18629 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
18631 * mini-arm.h: work around what looks like a gcc bug when optimizations
18634 2005-09-28 Raja R Harinath <rharinath@novell.com>
18636 * Makefile.am (AM_CFLAGS): Don't use += to append inside
18637 conditionals. Use ...
18638 (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
18640 2005-09-27 Zoltan Varga <vargaz@freemail.hu>
18642 * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
18643 to determine the amount of memory to copy when passing valuetypes.
18645 * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
18646 4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
18648 2005-09-27 Zoltan Varga <vargaz@gmail.com>
18650 * mini.h mini.c aot.c: Add infrastructure to collect pagefault
18651 information about aot.
18653 2005-09-27 Ben Maurer <bmaurer@ximian.com>
18655 * *.c: Replace the use of {Enter,Leave}CriticalSection with
18656 macros. This will allow a deadlock debugger to easily be plugged
18659 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
18661 * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
18663 2005-09-27 Raja R Harinath <rharinath@novell.com>
18665 * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
18666 (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
18667 (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
18668 ($(arch_built)) [CROSS_COMPILING]: Error out.
18670 2005-09-26 Zoltan Varga <vargaz@gmail.com>
18672 * aot.c: Add support for the no_special_static flag for classes.
18674 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
18676 * Reapply reverted patches.
18678 * *: Revert r50174 as well.
18680 * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
18682 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
18684 * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
18686 2005-09-23 Miguel de Icaza <miguel@novell.com>
18688 * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
18689 part of the SIG_HANDLER_SIGNATURE.
18691 2005-09-23 Zoltan Varga <vargaz@gmail.com>
18693 * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
18696 * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention
18697 introduced by previous patch.
18699 2005-09-21 Zoltan Varga <vargaz@gmail.com>
18701 * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
18702 saved registers too.
18704 * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based
18705 upon the information returned by get_call_info ().
18707 * mini-x86.c (add_float): Fix stack size calculation.
18708 (mono_arch_call_opcode): Rewrite this so it works based up the
18709 information returned by get_call_info ().
18710 (mono_arch_get_this_vret_args): Ditto.
18712 2005-09-21 Zoltan Varga <vargaz@freemail.hu>
18714 * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
18715 in cinfo to determine the registers which need to be used.
18717 2005-09-20 Miguel de Icaza <miguel@novell.com>
18719 * driver.c (mono_main): Add --server and --desktop flags.
18721 2005-09-16 Zoltan Varga <vargaz@gmail.com>
18723 * mini-ia64.h: Make register masks 64 bit. Don't treat argument
18724 registers as global registers.
18726 * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no
18727 longer needed with the new register allocator.
18729 * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
18731 * cpu-ia64.md: Remove unused opcodes.
18733 * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
18735 2005-09-16 Zoltan Varga <vargaz@freemail.hu>
18737 * cpu-amd64.md: Remove unused opcodes.
18739 * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
18740 needed with the new register allocator.
18742 * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
18745 2005-09-16 Raja R Harinath <rharinath@novell.com>
18747 * Makefile.am (check-local): Don't invoke semdel-wrapper.
18749 2005-09-16 Martin Baulig <martin@ximian.com>
18751 * exceptions-amd64.c
18752 (throw_exception): Don't call mono_debugger_throw_exception() if
18753 we're a rethrow - see the FIXME in the code.
18755 2005-09-15 Geoff Norton <gnorton@customerdna.com>
18757 * mini.c (mono_init_exceptions): This only works on some architectures.
18759 2005-09-15 Zoltan Varga <vargaz@gmail.com>
18761 * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
18764 * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
18766 * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
18767 now in mini-exceptions.c.
18769 2005-09-15 Zoltan Varga <vargaz@freemail.hu>
18771 * mini-amd64.h mini-am64.c: Remove the altstack support code which is
18772 now in mini-exceptions.c.
18774 2005-09-15 Zoltan Varga <vargaz@gmail.com>
18776 * exceptions-x86.c: Applied patch from Patrik Torstensson
18777 <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
18779 * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
18780 code into mini-exceptions.c. Add some assertions to it.
18782 2005-09-12 Zoltan Varga <vargaz@gmail.com>
18784 * aot.c (emit_section_change): Applied patch from "The Software Team"
18785 (<software@solmersa.com>). Fix as errors on windows.
18787 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
18789 * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
18790 method info into the LMF.
18792 2005-09-11 Zoltan Varga <vargaz@gmail.com>
18794 * mini-ia64.c: Add proper unwind info for method epilogs.
18796 * exceptions-ia64.c: Add some code to help debugging.
18798 * mini-ia64.c mini-ia64.h: Add sigaltstack support.
18800 * mini-exceptions.c: Fix warning.
18802 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
18804 * mini.c: Really fix build.
18806 * mini-x86.c mini-amd64.c: Fix build.
18808 2005-09-11 Zoltan Varga <vargaz@gmail.com>
18810 * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
18812 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
18813 some Interlocked methods as intrinsics.
18815 * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
18816 for Thread methods as well.
18818 * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
18820 * inssel.brg: Add rule for OP_MEMORY_BARRIER.
18822 * mini-ia64.c mini-x86.c mini-amd64.c
18823 cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of
18826 * mini.c (mono_init_exceptions): Fix build breakage.
18828 2005-09-10 Zoltan Varga <vargaz@gmail.com>
18830 * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
18831 of instructions. Use the new ia64_unw_op macros for emitting unwind
18834 * mini.c (mono_init_exceptions): Initialize exception handling
18835 related trampolines at startup.
18837 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
18839 * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
18841 2005-09-09 Zoltan Varga <vargaz@gmail.com>
18843 * mini.c: Handle type loading errors gracefully during compilation and
18844 throw the appropriate exception.
18846 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
18848 * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
18849 for the mono binary.
18851 2005-09-09 Martin Baulig <martin@ximian.com>
18853 * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
18856 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
18858 * mini-arm.h: use emulation for conv.r.un for the release.
18860 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
18862 * mini-arm.c, objects.cs: more fixes and tests for them.
18864 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
18866 * mini-arm.c: align structures to at least 4 bytes to be able
18867 to keep our current optimized memcpy.
18869 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
18871 * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
18873 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18875 * mini.c: ignore SIGPIPE.
18877 2005-09-04 Zoltan Varga <vargaz@gmail.com>
18879 * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
18881 * mini-ia64.h mini-ia64.c: Add some minor optimizations.
18883 2005-09-02 Zoltan Varga <vargaz@gmail.com>
18885 * mini.h: Add prototype for mono_allocate_stack_slots_full.
18887 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
18889 * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
18890 exception handling support.
18891 * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
18892 patch by Brian Koropoff <briank@marakicorp.com>).
18894 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
18896 * mini.c: revert another 'optimization' which breaks when
18897 items on the eval stack need to be saved at a basic block end
18900 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
18902 * jit-icalls.c: for arrays, ensure we always provide
18905 2005-08-30 Zoltan Varga <vargaz@gmail.com>
18907 * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
18909 * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
18911 2005-08-29 Zoltan Varga <vargaz@gmail.com>
18913 * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
18914 arguments in their original register.
18916 2005-08-28 Zoltan Varga <vargaz@gmail.com>
18918 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
18921 * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
18922 when ssapre is enabled.
18924 * inssel-long.brg: Fix bug in previous patch.
18926 * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize
18927 multiplication by a constant.
18929 2005-08-27 Zoltan Varga <vargaz@gmail.com>
18931 * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
18934 * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
18937 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
18939 * inssel-arm.brg: apply changes tested by Brian Koropoff
18940 <briank@marakicorp.com>.
18942 2005-08-25 Zoltan Varga <vargaz@gmail.com>
18944 * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
18946 2005-08-24 Zoltan Varga <vargaz@gmail.com>
18948 * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
18949 to the same register if dreg is just a base register.
18950 (print_ins): Improve printing of membase opcodes.
18952 * inssel-x86.brg: Add optimized ldind(reg) rules.
18954 * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
18956 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
18958 * mini.c: when running under valgrind, set the stack bottom for
18959 the GC at the actual approximate stack for the app (fixes running
18960 mono with valgrind).
18962 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
18964 * mini.c: do no break at the first valuetype to init found
18965 (fixes bug #75791).
18967 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
18969 * cpu-arm.md, mini-arm.c: more fixes and LMF support.
18971 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
18973 * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
18975 2005-08-23 Zoltan Varga <vargaz@freemail.hu>
18977 * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
18979 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
18981 * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
18983 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
18986 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
18989 * mini.c (optimize_branches): Don't quit after 1000 iterations on large
18992 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
18994 * tramp-arm.c: allocate less memory for the trampoline and fix typo.
18996 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
18998 * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
18999 in the tail recursion optimization.
19001 * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as
19002 debug info into the assembly file.
19004 * iltests.il: Add test for filter regions.
19006 * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
19007 initial stack of filter regions. Fixes #75755.
19009 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
19011 * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
19012 stack requirements.
19014 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
19016 * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
19017 the check for an already compiled method on non-ia64 platforms.
19018 (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
19021 * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
19023 * inssel-x86.brg: Add some optimized call rules.
19025 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
19027 * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
19030 * mini.h mini-trampolines.c: Pass the trampoline argument to
19031 mono_arch_patch_delegate_trampoline.
19033 * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
19035 * mini-trampolines.c: Fix build.
19037 * mini-amd64.h: Add delegate trampolines.
19039 * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
19041 * inssel-amd64.brg: Add optimized call rules.
19043 * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
19045 * inssel-ia64.brg: Add optimized ldind(reg) rules.
19047 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
19049 * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
19052 * mini-ia64.c: Remove LMF fixmes.
19054 * mini-ia64.h: Remove most fields from LMF.
19056 * inssel-ia64.brg (stmt): Fix unaligned access errors.
19058 * mini-trampolines.c: Add support for IA64 function descriptors.
19060 * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
19061 for IA64 function descriptors.
19063 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
19065 * tramp-arm.c: patch the vtable for virtual calls. Added
19066 support code to register/unregister the LMF.
19067 * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
19070 2005-08-19 Dick Porter <dick@ximian.com>
19072 * mini.c: Use a gsize to store the thread ID, so it can hold a 64
19073 bit value if needed.
19075 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
19077 * mini.c (mini_get_method): Move handling of wrapper data here.
19079 * mini.c (mono_method_to_ir): Add support for dynamic methods.
19081 * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
19084 * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so
19085 bblock->code does not remain empty.
19087 2005-08-17 Zoltan Varga <vargaz@freemail.hu>
19089 * arrays.cs: Add regression test for #75832.
19091 * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
19092 rules. Fixes #75832.
19094 * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
19095 instruction scheduling.
19097 2005-08-12 Zoltan Varga <vargaz@freemail.hu>
19099 * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
19101 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
19103 * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
19105 * mini-codegen.c: Fix VC build.
19107 * cpu-pentium.md: Increase length of atomic_exhange_i4.
19109 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19111 * mini.h: fix signature for mono_register_opcode_emulation.
19113 2005-08-09 Zoltan Varga <vargaz@freemail.hu>
19115 * mini.c: Get rid of most of the helper_sig_... constants using
19116 mono_create_icall_signature ().
19118 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
19120 * jit-icalls.c (helper_ldstr): New helper function.
19122 * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
19124 * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
19125 throw, load the string using a helper call instead of creating a string object.
19127 * aot.c: Update after LDSTR changes.
19129 * mini.h: Bump AOT file version.
19131 * aot.c: Save class size info into the AOT file. Print more statistics during
19134 * mini.h: Bump AOT file version.
19136 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
19137 ordering of disasm cases. Fixes #74957.
19139 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
19141 * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
19142 jit-icalls.c, mini-codegen.c, Makefile.am: changes in
19143 the generic code needed for the ARM port.
19145 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
19147 * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
19148 inssel-arm.brg: more ARM features and fixes.
19150 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
19152 * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
19153 ARM port work in progress.
19155 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
19157 * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
19159 * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
19161 * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
19163 * inssel.brg (mini_emit_memset): Add support for unaligned access.
19165 * *-ia64.*: Ongoing IA64 work.
19167 * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
19169 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
19171 * TODO: Remove out-of-data todo stuff.
19173 * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
19176 * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
19178 * mini.h: Bump corlib version.
19180 2005-07-27 Martin Baulig <martin@ximian.com>
19183 (create_copy_ins): Added `const unsigned char *ip' argument; set
19184 `copy->cil_code' from it.
19186 2005-07-27 Martin Baulig <martin@ximian.com>
19188 * mini-exceptions.c (mono_handle_exception): Don't call
19189 mono_debugger_handle_exception() for filters.
19191 2005-07-27 Zoltan Varga <vargaz@freemail.hu>
19193 * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
19196 2005-07-26 Martin Baulig <martin@ximian.com>
19198 Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
19200 * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
19201 helper_compile_generic_method() if the method is actually virtual
19204 2005-07-26 Martin Baulig <martin@ximian.com>
19207 (trampoline_code): Renamed to `mono_trampoline_code' and made it
19208 public; this is now accessed directly by the debugger.
19209 (mono_generic_trampoline_code): Removed.
19212 (mono_debug_init_method): Also add interncalls and wrappers.
19214 2005-07-23 Zoltan Varga <vargaz@freemail.hu>
19216 * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
19218 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
19220 * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
19222 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
19224 * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
19226 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
19228 * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
19229 getting TLS offsets on AMD64 too.
19231 2005-07-20 Kornel Pal <kornelpal@hotmail.com>
19233 * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
19235 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
19237 * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
19238 inssel-arm.brg, mini-arm.h: ARM port work in progress.
19240 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
19242 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
19244 * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
19247 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call
19248 mono_sparc_is_virtual_call ().
19250 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
19252 * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
19253 trampoline parameters.
19255 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
19257 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
19258 to mono_arch_get_vcall_slot_addr.
19260 * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
19263 * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
19265 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
19267 * mini-ia64.h mini-ia64.c: Finish pinvoke support.
19269 2005-07-19 Martin Baulig <martin@ximian.com>
19271 * exceptions-amd64.c (throw_exception): Call
19272 mono_debugger_throw_exception() here like we're doing it on i386.
19274 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
19276 * mini-ia64.c: Add optimized TLS access support.
19278 2005-07-18 Zoltan Varga <vargaz@freemail.hu>
19280 * mini-exceptions.c: Ongoing IA64 work.
19282 * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
19284 * mini.c: Use the default optimization set when embedding. Fixes
19287 2005-07-11 Zoltan Varga <vargaz@freemail.hu>
19289 * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts
19290 of trampolines to a separate file.
19292 * mini-trampolines.c: New file.
19294 * mini.h tramp-x86.c: Move arch independent parts of trampolines to a
19297 * tramp-x86.c: Reorganize the trampoline code to be similar to the
19300 * mini-codegen.c: Fix cygwin build.
19302 2005-07-10 Zoltan Varga <vargaz@freemail.hu>
19304 * mini.c: Add some minor changes needed by the IA64 port.
19306 * *-ia64.*: Ongoing IA64 work.
19308 2005-07-09 Zoltan Varga <vargaz@freemail.hu>
19310 * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split
19311 trampolines into arch-independent and arch-dependent parts.
19313 * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
19315 2005-07-08 Zoltan Varga <vargaz@freemail.hu>
19317 * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
19319 * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
19320 the xp-regalloc-branch for amd64.
19322 * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
19323 xp-regalloc-branch for x86.
19325 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
19327 * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
19329 2005-07-06 Martin Baulig <martin@ximian.com>
19332 (mono_jit_compile_method_inner): Call mono_get_inflated_method().
19333 (mono_jit_runtime_invoke): Likewise.
19335 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
19337 * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
19340 * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
19341 without loading their metadata. Reorganize the file format so exception handling+
19342 debug info is kept separate from normal method info. Create MonoJitInfo
19343 structures for methods lazily.
19345 * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
19347 (x86_class_init_trampoline): Patch AOT class init trampolines too.
19349 * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
19351 * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
19354 * mini.h: Bump AOT file version.
19356 2005-07-04 Zoltan Varga <vargaz@freemail.hu>
19358 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
19360 2005-07-01 Raja R Harinath <rharinath@novell.com>
19362 * Makefile.am (check-local): Call semdel-wrapper.
19364 2005-06-29 Zoltan Varga <vargaz@freemail.hu>
19366 * mini-x86.c: Revert the last change as it seems to break the build..
19368 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
19370 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
19372 * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
19374 2005-06-27 Ben Maurer <bmaurer@ximian.com>
19376 * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
19377 outside of the macro, so strange stuff doesn't happen with gcc4
19378 (NEW_AOTCONST_TOKEN): Likewise.
19380 2005-06-28 Martin Baulig <martin@ximian.com>
19382 * mini.c (mini_class_is_system_array): New static method; use this
19383 instead of `klass->parent == mono_defaults.array_class' everywhere
19384 since this also works for the new generic array class.
19386 2005-06-26 Ben Maurer <bmaurer@ximian.com>
19388 * inssel.brg: Remove warnings.
19390 2005-06-24 Zoltan Varga <vargaz@freemail.hu>
19392 * mini-ia64.c: Ongoing IA64 work.
19394 * basic-float.cs: Add float->i1 conversion test.
19396 * iltests.il: Add conv.u4 test.
19398 2005-06-23 Zoltan Varga <vargaz@freemail.hu>
19400 * inssel-long.brg: Fix bug caused by last change.
19402 2005-06-23 Geoff Norton <gnorton@customerdna.com>
19404 * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other
19405 BSDs. Allows the x86 JIT to work on OSX86
19407 2005-06-22 Zoltan Varga <vargaz@freemail.hu>
19409 * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
19412 * mini-ia64.c: Ongoing IA64 work.
19414 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
19416 * mini-ia64.c: Ongoing IA64 work.
19418 * driver.c: Clean up jit_code_hash as well when using --regression.
19420 * inssel-long.brg: Fix long->i4/u4 conversion rules.
19422 * basic-long.cs: Add tests for long->u4 conversion.
19424 2005-06-18 Ben Maurer <bmaurer@ximian.com>
19426 * mini.c: Take mono_get_domainvar out of macros. This makes sure
19427 that we do not depend on undefined C behavior: the order stuff
19428 gets evaluated within an expression. Fixes mono when compiled on
19431 2005-06-18 Zoltan Varga <vargaz@freemail.hu>
19433 * *-ia64.*: Ongoing IA64 work.
19435 * aot.c: Lower memory usage while loading AOT methods.
19437 * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
19439 * mini.h: Bump AOT file format version.
19441 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
19443 * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
19445 2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
19447 * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
19448 not on callee assembly). Fixed some comments.
19450 2005-06-16 Zoltan Varga <vargaz@freemail.hu>
19452 * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
19453 it gets proper disassembly.
19454 (emit_method_info): Remove some dead code.
19456 * mini.c (mini_method_compile): Allways allocate the GOT var in
19457 mono_method_to_ir for emulating opcodes.
19459 2005-06-13 Zoltan Varga <vargaz@freemail.hu>
19461 * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
19462 before freeing the code memory. Fixes #74990.
19464 * objects.cs: Add regression test for #74992.
19466 * liveness.c: Extend live ranges of arguments to the beginning of the
19467 method. Fixes #74992.
19469 * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
19470 so it points into the faulting instruction.
19472 2005-06-12 Zoltan Varga <vargaz@freemail.hu>
19474 * jit-icalls.c (mono_imul_ovf): Add exception handling.
19476 * *-ia64.*: Ongoing IA64 work.
19478 * mini.c (mini_init): Fix signature of mono_delegate_ctor.
19480 2005-06-11 Zoltan Varga <vargaz@freemail.hu>
19482 * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
19484 * *-ia64.*: Ongoing IA64 work.
19486 2005-06-10 Zoltan Varga <vargaz@freemail.hu>
19488 * basic-long.cs: Add tests for add/sub.ovf.
19490 * basic.cs: Add tests for sub.ovf.
19492 * *-ia64.*: Ongoing IA64 work.
19494 2005-06-09 Zoltan Varga <vargaz@freemail.hu>
19496 * *-ia64.*: Ongoing IA64 work.
19498 * basic.cs: Add conv.ovf.i4.un test.
19500 2005-06-09 Massimiliano Mantione <massi@ximian.com>
19502 * mini.c: (remove_block_if_useless) Fixed bug 75061.
19504 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19506 * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
19508 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
19510 * *-ia64.*: Ongoing IA64 work.
19512 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19515 * mini.c: added the ability to toggle trace on/off using SIGUSR2.
19517 2005-06-04 Zoltan Varga <vargaz@freemail.hu>
19519 * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
19521 2005-06-03 Zoltan Varga <vargaz@freemail.hu>
19523 * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
19525 * mini-amd64.c (amd64_patch): Add an assert to check that the destination
19526 of a call is callable by a near call.
19528 2005-05-31 Zoltan Varga <vargaz@freemail.hu>
19530 * mini-ia64.c: Ongoing IA64 work.
19532 2005-05-29 Zoltan Varga <vargaz@freemail.hu>
19534 * genmdesc.c: Make the generated array non-static.
19536 * inssel-long.brg: Fix LSHR_IMM rule.
19538 * *-ia64.*: Ongoing IA64 work.
19540 * *-ia64.*: Ongoing IA64 work.
19542 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
19544 * *-ia64.*: Ongoing IA64 work.
19546 * *-ia64.*: Ongoing IA64 work.
19548 * mini-ia64.c: Ongoing IA64 work.
19550 * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
19552 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
19554 * objects.cs basic-calls.cs: Move some tests to objects.cs.
19556 * objects.cs basic-long.cs: Move some tests to objects.cs.
19558 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
19560 * *-ia64.*: Ongoing IA64 work.
19562 * iltests.il: Add a new test.
19564 * mini.c (mono_method_to_ir): Initialize valuetypes when created using
19565 newobj. Fixes #75042.
19567 2005-05-22 Zoltan Varga <vargaz@freemail.hu>
19569 * *-ia64.*: Ongoing IA64 work.
19571 * *-ia64.*: Ongoing IA64 work.
19573 * *-ia64.*: Ongoing IA64 work.
19575 * basic.cs objects.cs: Move tests accessing static variables as well.
19577 * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
19579 2005-05-21 Zoltan Varga <vargaz@freemail.hu>
19581 * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
19583 * driver.c: Always print failed tests.
19585 * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
19588 * *ia64*: Ongoing IA64 work.
19590 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
19592 * basic.cs: Add tests for add.ovf. Fix warnings.
19594 2005-05-18 Miguel de Icaza <miguel@novell.com>
19596 * driver.c (mono_main): Avoid crash if no argument is passed to
19597 --break; Do not use g_error, but f_printf. And fix all other
19598 ocurrences of the same crash.
19600 2005-05-17 Zoltan Varga <vargaz@freemail.hu>
19602 * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
19603 and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
19606 2005-05-14 Zoltan Varga <vargaz@freemail.hu>
19608 * *-ia64.*: Add beginnings of IA64 backend.
19610 * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.
19612 2005-05-13 Zoltan Varga <vargaz@freemail.hu>
19614 * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
19617 * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
19619 * mini-amd64.c: Fix a warning.
19621 2005-05-10 Zoltan Varga <vargaz@freemail.hu>
19623 * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
19624 in float_neg. Fixes #74897.
19626 * mini-amd64.c (emit_call): Fix another near call bug.
19628 2005-05-06 Sebastien Pouliot <sebastien@ximian.com>
19630 * declsec.c: Keep the appdomain information in the structure. Added a
19631 missing "return FALSE" for Unmanaged if FullTrust is set (or else the
19632 value gets overwritten).
19633 * declsec.h: Set the default MonoArray for the the stack to 6. Added
19634 an MonoAppDomain member to MonoSecurityFrame.
19635 * mini-exceptions.c: Do not use a glist to keep GC allocated objects
19636 used in the stack walk. Now use a MonoArray which grow (double) when
19639 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
19641 * mini.c: Re-enabled runtime cleanup, since running threads should
19642 now properly stop when exiting.
19644 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
19646 * mini-codegen.c: New file contaning the arch-independent local
19647 register allocator. Not used by any architectures yet.
19649 * mini.h linear-scan.c: Merge some changes from the
19650 mini-xp-local-regalloc branch.
19652 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
19654 * mini-amd64.c (emit_call): Fix calls to native functions when the
19655 runtime is compiled as a shared library. Fixes #74756.
19657 * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
19658 on a literal field. Fixes #74751.
19660 2005-04-25 Raja R Harinath <rharinath@novell.com>
19662 * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
19664 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
19666 * objects.cs: Add missing null casting test.
19668 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
19670 * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
19671 in wrapper methods. Also rename 'address' variable to 'offset'.
19673 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
19675 * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
19678 * Makefile.am (MCS): Use -unsafe instead of --unsafe.
19680 * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
19683 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
19685 * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
19687 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
19689 * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
19690 just the last bytes.
19692 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
19694 * aot.c (mono_compile_assembly): Fix warning.
19696 * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
19697 by the _MSC_VER stuff.
19699 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
19701 * inssel-long.brg: Fix #74588.
19703 * cpu-amd64.md: Fix #74591.
19705 * iltests.il: Add new regression tests.
19707 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
19709 * trace.c (mono_trace_enter_method): Print enums as an int, not as a
19712 2005-04-11 Zoltan Varga <vargaz@freemail.hu>
19714 * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
19716 * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches
19717 from Bill Middleton <flashdict@gmail.com>.
19719 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
19721 * arrays.cs: Add new regression test. Fix warnings.
19723 2005-04-09 Zoltan Varga <vargaz@freemail.hu>
19725 * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
19726 and leakage in CKFINITE.
19728 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
19729 this to a null op since it is called on amd64 too.
19731 * exceptions-amd64.c (get_throw_trampoline): Align stack.
19733 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
19734 body since this is not used on amd64.
19736 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
19738 * mini-amd64.c: Remove obsolete fixmes.
19740 * mini.c (print_method_from_ip): Fix debugging support.
19742 2005-2-1 Massimiliano Mantione <massi@ximian.com>
19744 * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
19745 so that expressions that don't give much gain are not reduced.
19746 * ssapre.h: Likewise.
19748 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
19750 * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
19752 * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
19754 * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
19756 2005-04-01 Zoltan Varga <vargaz@freemail.hu>
19758 * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
19760 * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
19762 2005-03-31 Zoltan Varga <vargaz@freemail.hu>
19764 * mini-x86.c: If sigaltstack support is enabled, perform win32 style
19767 * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
19769 * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
19771 * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
19773 * mini-x86.h mini-x86.c exceptions-x86.c: Add support for
19774 MONO_ARCH_USE_SIGACTION. Fixes #74252.
19776 * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
19778 * mini-x86.c: Fix up stack overflow handling.
19780 * exceptions.cs: Add new regression test.
19782 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
19784 * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
19785 mono_jit_thread_attach.
19787 * mini.c (mono_method_to_ir): Verify called method is not abstract.
19789 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
19791 * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
19792 avoid calling constructors using callvirt.
19794 * inssel.brg: Fix #74073.
19796 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
19798 * aot.c, mini.h: Added mono-compiler.h header to allow/ease
19799 compilation with non-GCC compilers.
19800 * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
19801 possible using VS.NET. Adapted from the work of J Lothian (for VC6).
19803 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
19805 * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
19806 klass->interface_offsets (will likely fix bug#74073).
19808 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
19810 * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
19812 2005-03-28 Zoltan Varga <vargaz@freemail.hu>
19814 * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
19815 to amd64_div_reg_size ().
19817 * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
19819 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
19821 * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
19823 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
19825 * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
19827 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
19829 * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
19831 * mini.c (mono_precompile_assembly): Load and precompile referenced
19832 assemblies as well. Fixes #74015.
19834 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
19836 * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
19838 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
19840 * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
19841 a lot of checks and (anyway) permissions cannot work until corlib is
19844 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
19846 * mini-ppc.c: fixed ABI issue on sysv/ppc.
19848 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
19850 * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
19851 calls (fixes bug#72824).
19853 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
19855 * mini.c: fix tail recursion elimination (see test in bug#73936).
19857 2005-03-21 Zoltan Varga <vargaz@freemail.hu>
19859 * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
19860 some fp functions in sse2 mode.
19862 2005-03-20 Zoltan Varga <vargaz@freemail.hu>
19864 * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
19866 2005-03-19 Zoltan Varga <vargaz@freemail.hu>
19868 * mini.h mini.c: Add mono_get_jit_tls_key ().
19870 * mini-x86.c: Enable fast TLS support on windows.
19872 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
19874 * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
19875 * mini.c: Check for p/invoke method when generating code. If a
19876 p/invoke method, or it's class, isn't decorated with [Suppress
19877 UnmanagedCodeSecurity] then generate code to call System.Security.
19878 UnmanagedDemand (only if the security manager is active).
19880 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
19882 * tramp-amd64.c (create_specific_trampoline): Revert parts of the
19883 last change as it seems to cause strange crashes.
19885 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
19887 * *.c: handle unsafe function pointers where needed.
19889 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
19891 * mini.c (mono_jit_free_method): Remove the fixme too.
19893 2005-03-15 Miguel de Icaza <miguel@novell.com>
19895 * mini.c: As discussed, make the code actually free the delegate
19896 thunk now, to enable the debugging of delegate problems, use
19897 MONO_DEBUG=1 when running Mono.
19899 This takes also care of parts of the leaks as seen by Joe.
19901 2005-03-15 Zoltan Varga <vargaz@freemail.hu>
19903 * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable
19904 thread_tls_offset calculation.
19906 2005-03-14 Sebastien Pouliot <sebastien@ximian.com>
19908 * declsec.c: Reworked linkdemand checks for icall. The previous code
19909 was using the declaration code (untrusted) and didn't work as expected
19910 with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
19913 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
19915 * iltests.il: Add new localloc test.
19917 * mini-amd64.c: Handle large stack allocations the same way as on
19918 windows if stack overflow handling is working.
19920 * mini-amd64.c: Allocate the signal stack using mmap.
19922 * mini.c (sigsegv_signal_handler): Fix reading of context.
19924 * mini-exceptions.c: Fix up stack overflow handling.
19926 * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
19928 * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
19930 * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
19932 * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
19934 * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
19935 tramp_init functions as they are no longer needed.
19937 2005-03-12 Zoltan Varga <vargaz@freemail.hu>
19939 * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
19941 * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
19943 * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
19945 * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
19948 * mini-ops.h: Add OP_LMUL_IMM.
19950 * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
19951 long mul/div opcodes as intrinsic.
19953 * mini-amd64.c (emit_call): Handle the case when the callee might be
19956 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
19958 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
19961 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
19963 * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
19965 2005-03-09 Ben Maurer <bmaurer@ximian.com>
19967 * mini.c (mono_codegen): Don't leak here, to help people running
19970 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
19972 * mini-amd64.c (mono_arch_output_basic_block): Fix int->float
19973 conversions in sse2 mode.
19975 * basic-float.cs: Add regression test.
19977 * mini-amd64.c: Reenable sse2.
19979 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
19981 * mini-amd64.c: Disable sse2 until some regressions are fixed.
19983 2005-03-07 Joerg Rosenkranz <joergr@voelcker.com>
19985 * driver.c: Copyright text should include 2005.
19987 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
19989 * cpu-amd64.md (load_membase): Fix more max lengths.
19991 2005-03-06 Zoltan Varga <vargaz@freemail.hu>
19993 * cpu-amd64.md (load_membase): Fix max length.
19995 * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
19997 * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
19999 * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
20000 support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
20002 * basic-float.cs: Add rounding regression test.
20004 * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
20006 2005-03-04 Neale Ferguson <NealeFerguson@earthlink.net>
20008 * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
20009 structures in registers for pinvoke wrappers.
20011 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
20013 * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
20015 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
20017 * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
20018 wrapper to mono_jit_thread_attach.
20020 * mini.c (mini_jit_thread_attach): New jit icall.
20022 * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in
20023 native->managed wrappers.
20025 * exceptions.cs: Add new regression test.
20027 * mini.c (optimize_branches): Check regions in the cbranch to throw
20028 block case as well. Fixes #73242.
20030 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20032 * mini.c: thread safety fixes.
20034 2005-02-27 Zoltan Varga <vargaz@freemail.hu>
20036 * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
20037 patching stuff, since delegates use jump trampolines so there is
20040 * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in
20043 * tramp-amd64.c: Fix build.
20045 * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
20046 it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
20048 * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
20049 Rename this to mono_arch....
20050 (mono_amd64_get_delegate_method_ptr_addr): Ditto.
20052 * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
20054 * mini-amd64.c (emit_call): If both the caller and the callee is
20055 guaranteed to have 32 bit addresses, emit a normal call.
20057 * tramp-amd64.c: Adapt to changes in mini-amd64.c.
20059 * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines.
20060 * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
20061 method_ptr inside delegates.
20063 2005-02-26 Zoltan Varga <vargaz@freemail.hu>
20065 * mini.c (mono_jit_free_method): Free the method info even if the native code is
20066 invalidated. Fixes #73001.
20068 * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
20070 * mini-x86.c: Only use stdcall for pinvokes on windows.
20072 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
20074 * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
20075 * mini-x86.c: remove unreliable __thread var offset detection,
20076 use the correct accessors and enable by default.
20078 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
20080 * mini.c (mono_jit_free_method): Fix memory leak.
20082 2005-02-22 Zoltan Varga <vargaz@freemail.hu>
20084 * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW.
20086 2005-02-21 Zoltan Varga <vargaz@freemail.hu>
20088 * cpu-amd64.md: Fix lengths of atomic opcodes.
20090 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
20092 * driver.c: try to not imply using ICU is any good.
20094 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
20096 * mini-amd64.c (mono_arch_get_inst_for_method): Implement more
20097 functions as inline ops.
20099 * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
20100 some Interlocked functions as inline ops.
20102 * mini.c (move_basic_block_to_end): Fix bug in last patch.
20104 * mini.h (MonoBasicBlock): Reorganize fields a bit.
20106 * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
20108 * mini.c: Add support for OP_NOT_TAKEN.
20110 * mini-amd64.h mini-amd64.c: Add support for passing/returning small
20111 structures in registers for pinvoke wrappers.
20113 * mini-amd64.c: Fix warnings.
20115 2005-02-19 Zoltan Varga <vargaz@freemail.hu>
20117 * mini.h (MonoCompile): Add 'ret_var_is_local' field.
20119 * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
20121 * mini.c (NEW_RETLOADA): If the ret variable is a local, use its
20122 address instead of loading the address from it.
20124 * mini-x86.c: Add support for returning small structs in registers
20125 on Win32. Fixes part of #70864.
20127 2005-02-18 Zoltan Varga <vargaz@freemail.hu>
20129 * trace.c (get_token): Improve error checking.
20131 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
20133 * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
20135 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
20137 * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
20138 it can be reused for MonoClass.
20139 * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
20142 2005-02-15 Sebastien Pouliot <sebastien@ximian.com>
20144 * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code
20145 instead of a MonoReflectionMethod. The method information wasn't used
20146 when displaying SecurityException details (but will be now).
20148 2005-02-15 Atsushi Enomoto <atsushi@ximian.com>
20150 * Makefile.am : windows build fix.
20152 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
20154 * iltests.il: Add new regression test.
20156 * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
20159 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
20161 * mini.c: Moved linkdemand check into helper function check_linkdemand
20162 to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP,
20165 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
20167 * declsec.c: Added statistics counter for different kinds of
20169 * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
20170 (and commented) declaration.
20171 * mini.c: Added statistics counter for security Demand code
20172 generation. Added display of security statistics.
20174 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
20176 * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
20177 Fix compilation errors under gcc-2.95.
20179 2005-02-12 Ben Maurer <bmaurer@ximian.com>
20181 * mini.c, driver.c: Use the new jit trampoline hashtable
20183 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
20185 * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
20187 2005-02-11 Martin Baulig <martin@ximian.com>
20189 * debug-mini.c (mono_debug_close_method): Free the line number array.
20191 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
20193 * aot.c: Break up large methods into smaller ones. Share GOT slots for
20196 * mini.h: Bump AOT file format version.
20198 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
20200 * declsec.c: Added LinkDemand support and it's special cases for ECMA,
20202 * declsec.h: Added macros to get/set lazyly initialized security
20203 informations about assemblies. Added new enum for different type of
20204 possible LinkDemand violation. Added function to check LinkDemands.
20205 * mini.h: Added a field to MonoCompile to hold any security violation
20206 detected when JITting a method (so it can be thrown later).
20207 * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL
20208 and CEE_CALLVIRT. Added code to throw exception at the end of
20209 mini_method_compile (note: the exception is unhandled right now).
20211 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
20213 * mini.c, jit-icalls.c: use the managed implementation of
20214 memset for initobj and memset, to avoid managed <-> unmanaged
20217 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
20219 * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
20220 optimization if it would need a GOT var.
20222 * basic.cs: Add tests for constant propagation and switch statements.
20224 * ssa.c: Fix out-of-range constant propagation and switch statements.
20226 2005-02-09 <vargaz@freemail.hu>
20228 * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
20230 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
20232 * cpu-amd64.md (load_membase): Fix max length of load_membase.
20234 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
20236 * mini.c: update to new signature of mono_class_get_allocation_ftn().
20238 2005-02-06 Neale Ferguson <NealeFerguson@earthlink.net>
20240 * cpu-s390.md, mini-s390.c: Correct bug with register usage on certain
20241 arithmetic operations.
20243 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
20245 * mini-ppc.c: add a workaround for broken user code that
20246 DllImports vararg functions with non-vararg signatures.
20248 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
20250 * mini.c (mono_jit_compile_method_inner): Add detection and a
20251 meaningfull error message for assemblies written in Managed C++.
20253 * tramp-amd64.c mini-amd64.h: Add support for
20254 create_trampoline_from_token ().
20256 * aot.c mini-x86.c abcremoval.c: Applied patch from
20257 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
20259 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
20261 * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline
20262 which takes a MonoImage/token as parameter instead of a MonoMethod.
20264 * aot.c: Use the new trampoline for initializing vtables.
20266 * aot.c: Add support for ldfld/stfld_remote wrappers.
20268 * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
20269 rules for compare <MEM>, IMM.
20271 * mini.h (MONO_AOT_FILE_VERSION): Bump it.
20273 * aot.c: Handle inherited finalizers correctly.
20275 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
20277 * inssel.brg (stmt): Add a missing _setup_... ().
20279 * aot.c: Save some parts of the class state to the AOT file and use it
20280 to recompute that state when a class is initialized.
20282 * mini.c: Install AOT hooks into the runtime.
20284 * mini.h: Bump AOT file format version.
20286 * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
20289 * iltests.il: Add new test.
20291 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
20293 * mini.c: fix typo.
20295 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
20297 * mini.c: setup the statistical profiler in the thread attach
20298 callback to cope with the new single thread code.
20300 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
20302 * mini-ppc.c: ensure we have enough room for the profiler
20303 calls (fixed bug#72084).
20305 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
20307 * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding
20310 2005-2-1 Massimiliano Mantione <massi@ximian.com>
20312 * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
20314 2005-2-1 Massimiliano Mantione <massi@ximian.com>
20316 * ssapre.c: Fixed an issue with down safety (this allows IronPython
20317 to succesfully execute parrotbench).
20318 * ssapre.h: Likewise.
20320 2005-2-1 Massimiliano Mantione <massi@ximian.com>
20322 * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
20323 variable for stores to method arguments (fixes a SSAPRE issue).
20325 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
20327 * mini.c: handle value types in dup, fixes gen-112.cs.
20329 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
20331 * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
20332 sequence for calls in dynamic methods to avoid thunks.
20334 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
20336 * mini.c: correctly remove dynamic methods from the hashtable.
20338 2005-1-20 Massimiliano Mantione <massi@ximian.com>
20340 * driver.c: Disabled SSAPRE until fix the bug that appears
20341 in IronPython's parrotbench.
20343 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
20345 * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
20347 * mini.c (mono_method_to_ir): Revert the previous change.
20349 * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
20350 when AOT compiling.
20352 * tramp-x86.c (x86_magic_trampoline): Avoid calls to
20353 mono_jit_info_table_find () etc. when running under valgrind.
20355 * inssel.brg: Fix warnings.
20357 * mini-exceptions.c: Fix warnings.
20359 2005-01-31 Martin Baulig <martin@ximian.com>
20361 * driver.c (compile_all_methods_thread_main): Don't try to compile
20362 generic methods or anything which has type parameters.
20364 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
20366 * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
20368 * TestDriver.cs: Add --verbose flags.
20370 * graph.c ssa.c: Fix 64 bit warnings.
20372 * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c
20373 trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
20374 Fix 64 bit warnings.
20376 * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
20377 variable not spotted by gcc.
20379 * mini-amd64.c inssel-amd64.brg: Applied patch from
20380 Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of
20381 X86_COMPARE_MEMBASE opcodes.
20383 * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
20385 2005-01-29 Ben Maurer <bmaurer@ximian.com>
20387 * *: MonoMethod->signature might be NULL now. You *MUST* use
20388 mono_method_signature.
20390 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
20392 * driver.c (compile_all_methods_thread_main): Compile the methods
20393 without invoking cctors.
20395 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
20397 * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
20398 * basic-calls.cs: test for the above.
20400 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
20402 * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after
20403 MonoJitInfo changes.
20405 2005-01-27 Zoltan Varga <vargaz@freemail.hu>
20407 * mini-exceptions.c (mono_handle_exception): Compute the stack trace
20408 eagerly if it contains dynamic methods.
20410 * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
20412 * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
20413 trace, it is now computed by an icall from trace_ips.
20415 * mini-exceptions.c: Fix a warning.
20417 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
20419 * mini-exceptions.c: don't bother getting stack trace info if
20420 it's not going to be used.
20422 2005-01-27 Raja R Harinath <rharinath@novell.com>
20424 * Makefile.am (common_sources): Add ssapre-cee-ops.h and
20427 2005-01-26 Zoltan Varga <vargaz@freemail.hu>
20429 * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
20431 * aot.c: Avoid calling mono_method_get_header () if not needed.
20433 * mini.h: Bump AOT file format version.
20435 * mini.c (mono_emit_native_call): Allocate a GOT var here.
20437 * mini.c (mono_print_tree): Print more info for calls.
20439 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
20441 * declsec.h: Remove warning by adding missing include for marshal.h
20443 2005-01-26 Martin Baulig <martin@ximian.com>
20445 * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
20448 2005-01-25 Zoltan Varga <vargaz@freemail.hu>
20450 * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
20453 * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
20455 * aot.c (mono_compile_assembly): Fix a warning.
20457 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
20459 * declsec.c: Look for security attributes on the original MonoMethod
20460 (and not the wrapped one). This fix permissions on icalls.
20462 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
20464 * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
20466 * mini.c (mono_allocate_stack_slots): Add a fixme.
20468 * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
20470 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
20472 * inssel.brg: optimize casts of sealed types (more
20473 optimizations waiting for fixes in remoting).
20475 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
20477 * inssel.brg (stmt): Add another dummy rule.
20479 * driver.c: Fix warnings.
20481 * driver.c (mono_main): If running under valgrind, instruct glib to use
20482 the system allocation functions so valgrind can track the memory
20483 allocated by the g_... functions.
20485 * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
20487 * mini-ops.h: Add OP_DUMMY_STORE opcode.
20489 * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
20491 * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
20492 variables in try regions.
20494 * mini.c (mini_method_compile): Don't disable optimizations on large
20495 methods when AOT compiling.
20497 * mini.c (mono_allocate_stack_slots): New arch independent method to
20498 allocate stack slots. Not yet used.
20500 2005-01-22 Ben Maurer <bmaurer@ximian.com>
20502 * debug-mini.c (mono_debug_close_method): Plug some leaks.
20504 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
20506 * mini-ppc.c: make the branch info relative as the code
20507 buffer can be reallocated.
20509 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
20511 * aot.c: Allow decoding of the new MONO_PATCH_INFO_DECLSEC.
20512 * driver.c: Removed the AOT/security restriction. Now initialize the
20513 security manager (in metadata) if --security is used.
20514 * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
20515 rather than the pointer to declarative security, when AOT is used.
20517 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
20519 * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
20520 basic blocks, reduced intrinsic exception throwing code size.
20522 2005-01-22 Miguel de Icaza <miguel@ximian.com>
20524 * driver.c (mini_usage): Reorder the usage screen.
20526 2005-01-21 Zoltan Varga <vargaz@freemail.hu>
20528 * mini.c (mono_resolve_patch_target): Fix warning.
20530 2005-01-20 Zoltan Varga <vargaz@freemail.hu>
20532 * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
20535 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
20537 * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
20538 breaks the amd64 build.
20540 * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem
20541 register allocation. Fixes #71454.
20543 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
20545 * arrays.cs: Add new regression test.
20547 2005-1-20 Massimiliano Mantione <massi@ximian.com>
20549 * ssapre.c: Turned usage of snprintf to GString.
20550 * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
20551 (I left it on by mistake in my previous commit).
20553 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
20555 * mini.c, cfold.c, basic-calls.cs: preserve side effects
20556 on cond branch optimization (fixes bug# 71515).
20558 2005-1-20 Massimiliano Mantione <massi@ximian.com>
20560 * abcremoval.c: Fixed bug 71062.
20561 * abcremoval.h: Likewise.
20563 2005-1-20 Massimiliano Mantione <massi@ximian.com>
20565 * mini.c: Added a new functionality to optimize_branches, the removal
20566 of useless basic blocks, and fixed some problem in the removal of
20567 critical edges; some utility functions added for both purposes.
20568 * ssapre.c: Added complex expression support, and fixed bug 70637.
20569 * ssapre.h: Likewise.
20570 * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
20572 * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
20573 * driver.c: Re-enabled SSAPRE.
20575 2005-01-19 Martin Baulig <martin@ximian.com>
20577 * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
20578 the result of mono_get_method_constrained().
20580 2005-01-18 Neale Ferguson <NealeFerguson@earthlink.net>
20582 * exceptions-s390.c tramp-s390.c: Allocate code using the global code
20585 2005-01-18 Geoff Norton <gnorton@customerdna.com>
20587 * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
20588 be detected. Fixes #59296.
20590 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
20592 * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
20593 which can happen. Fixes #71361.
20595 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
20597 * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
20600 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
20602 * mini.c (mono_create_jump_trampoline): Revert last change as it causes
20603 appdomain-unload.exe to fail.
20605 * mini.c: Fix some memory leaks.
20607 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
20609 * inssel.brg: handle the new size of rank, idepth, max_interface_id.
20610 Fixed bug and sped up some codepaths.
20612 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
20614 * mini.c: Fix some memory leaks.
20616 * exceptions.cs basic-long.cs: Add test for checked ulong->int
20619 * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
20621 * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
20624 * iltests.il: Add regression test for #71320.
20626 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
20628 * mini.c (mono_codegen): Fix installation of profiler hooks.
20630 * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
20632 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
20634 * mini.h, mini.c, cfold.c: optimize access to enum
20635 readonly fields, too. Eval conditional branches if possible
20636 to perform unreachable code removal in more cases.
20638 2005-01-15 Zoltan Varga <vargaz@freemail.hu>
20640 * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
20642 * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
20645 * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
20646 WinXP DEP. Fixes #71244.
20648 2005-01-14 Zoltan Varga <vargaz@freemail.hu>
20650 * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
20652 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
20654 * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
20656 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
20658 * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo
20661 * mini.h: Bump AOT version.
20663 * mini.h (MonoCompile): Change exvar to a hash table.
20665 * mini.c: Allocate a separate exvar for each handler block.
20667 * mini.c: Get rid of the computation of filter_lengths, its not needed.
20669 * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
20670 ex var with the pending exception and only throw if the two are equal.
20673 * exceptions.cs: Add tests for rethrow and nested catch clauses.
20675 * mini-x86.c: Fix warnings.
20677 * Makefile.am (common_sources): Move mini-exceptions.c here as it is
20678 used by all the ports now.
20680 * aot.c: Add write-symbols and save-temps options.
20682 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
20684 * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
20686 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
20688 * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx
20691 * tramp-s390.c: Check vtable slot belongs to the domain.
20693 * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
20694 as per other platforms.
20696 * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
20698 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
20700 * driver.c: we don't run the Main() code in a subthread anymore.
20702 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
20704 * mini.c: added experimental rtc support in the statistical
20705 profiler: if the user has the permission, more accurate statistics
20706 are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
20707 The MONO_RTC value must be restricted to what the linux rtc allows:
20708 power of two from 64 to 8192 Hz.
20710 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
20712 * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
20714 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
20716 * mini-ppc.c: better icache flush for smp.
20718 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
20720 * mini-amd64.c (emit_move_return_value): Fix memory leak.
20722 * mini-x86.c (get_call_info): Add the get_call_info () code from the
20723 amd64 port, not yet used.
20725 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
20727 * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
20730 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
20732 * driver.c: Added --security option to activate the security manager.
20733 Right now this will allow code generation for declarative demands and
20734 is disabled when AOT is specified.
20735 * mini.c: Add code generation for declarative security demands.
20736 * mini.h: Add mono_use_security_manager as an extern gboolean.
20738 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
20740 * aot.c (mono_compile_assembly): Speed up compilation a bit by
20741 emitting more dense assembly code.
20743 * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
20744 exception throwing stuff.
20746 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
20748 * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
20751 * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
20752 left in by mistake.
20754 * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is
20757 * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
20759 * tramp-*.c: Only patch vtable slots if the object is in the current
20760 domain. Fixes appdomain-unload.exe.
20762 * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
20764 * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
20767 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
20769 * mini.c (reverse_branch_op): New helper function.
20771 * mini.c (optimize_branches): Run the new optimization only on
20772 platforms which support it. Also reverse all kinds of branches.
20774 * mini.h (MonoBasicBlock): Add 'out_of_line' field.
20776 * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
20779 * mini.c (optimize_branches): Reverse not-equals branches if the false
20780 bblock is a throw. This happens a lot of time with argument checking in
20783 * mini.c (mono_codegen): Add support for placing basic blocks after
20784 the function epilogue.
20786 * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
20789 2005-01-05 Miguel de Icaza <miguel@ximian.com>
20791 * mini.c (setup_stat_profiler): Only set this up if the platform
20792 supports ITIMER_PROF.
20794 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
20796 * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
20799 * inssel.brg: Fix a warning.
20801 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
20803 * mini.c: added support for statistical profiler
20804 (run with: --profile=default:stat).
20806 2005-01-04 Zoltan Varga <vargaz@freemail.hu>
20808 * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
20810 * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
20812 * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes
20813 related to global registers from the amd64 port.
20815 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
20817 * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
20819 * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
20820 with global registers.
20821 (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
20823 * aot.c (emit_method_code): Fix the 'method emitted as' messages.
20825 2004-12-31 Zoltan Varga <vargaz@freemail.hu>
20827 * debug-mini.c (encode_value): Fix off-by-one.
20829 * aot.c (encode_value): Likewise.
20831 * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
20833 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
20835 * mini.c linear-scan.c: Add a workaround for the mcs crash when using
20838 * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
20840 * aot.c (emit_method_info): Increase size of temp buffer.
20842 * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in
20845 2004-12-28 Zoltan Varga <vargaz@freemail.hu>
20847 * aot.c (emit_method_info): Fix build.
20849 * aot.c: Further rework of the AOT file format to reduce the size of
20850 the method info data.
20852 * mini.h: Bump AOT file format version.
20854 2004-12-27 Martin Baulig <martin@ximian.com>
20856 * mini.c (mini_get_method): New static method; call
20857 mono_get_method_full() and mono_get_inflated_method().
20858 (mono_method_to_ir): Use mini_get_method() instead of
20859 mono_get_method_full().
20861 2004-12-26 Patrik Torstensson <patrik.torstensson@gmail.com>
20863 * mini-x86.c (atomic ops): fixed bug interlocked bug #70784.
20865 2004-12-25 Zoltan Varga <vargaz@freemail.hu>
20867 * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
20869 * inssel-amd64.brg: Add some optimization rules.
20871 2004-12-24 Ben Maurer <bmaurer@ximian.com>
20873 * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
20874 standard not GC'd stuff is fine.
20876 2004-12-24 Zoltan Varga <vargaz@freemail.hu>
20878 * aot.c: Rework the AOT file format to get rid of most of the global
20879 symbols. This reduces the size of the mscorlib.dll.so by 1MB.
20881 * mini.h: Bump AOT file format version.
20883 2004-12-23 Zoltan Varga <vargaz@freemail.hu>
20885 * mini.h: Bump AOT file format version.
20887 * aot.c (mono_aot_is_got_entry): New function to determine if an
20888 address is inside a GOT.
20890 * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
20892 * cpu-pentium.md: Increase the maximum size of some instructions which
20893 might involve a got access.
20895 * mini.c (get_method_from_ip): Another debug helper function.
20897 * mini.c: Call mono_get_got_var () in a couple places. Handle the case
20898 when got var accesses are created during the decompose phase.
20900 * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
20902 * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
20903 argument mini_compile_method and to MonoCompile, and use this to
20904 determine whenever a given method is compiled for AOT. This allows the
20905 other methods compiled during AOT compilation to be free of AOT stuff,
20906 so the backends does not need to add special support for them by
20907 creating a fake GOT etc.
20909 * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
20912 2004-12-21 Ben Maurer <bmaurer@ximian.com>
20914 * mini.c (mono_method_to_ir): It turns out that some of the
20915 x-appdomain wrappers are lax with types, so just ignore this for
20918 * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
20919 at the vtable->klass. If it is non-shared code we can just use the
20922 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
20924 * mini-ppc.c: access MonoDomain from tls, too.
20926 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
20928 * declsec.c: Removed unused variable (and related warning ;-)
20930 2004-12-21 Ben Maurer <bmaurer@ximian.com>
20932 * iltests.il: New test for LDELEMA on an array of ref types.
20934 * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
20935 all ldelema's on reftypes.
20936 (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
20937 it was the wrong place to put it.
20939 * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
20940 register to pop to make this cleaner, at the request of Paolo.
20942 2004-12-20 Ben Maurer <bmaurer@ximian.com>
20944 * mini-ops.h (OP_GETHASHCODE): New op.
20946 * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
20948 * mini.c (mini_get_inst_for_method): Create the intrinsic hash
20951 For a microbenchmark, this reduces the cost of Hashtable.get_Item
20954 * mini-x86.c (mono_arch_output_basic_block): Rather than
20962 The first is 3 bytes while the second is 1. This saves 36 kb on
20963 mscorlib, quite a big saving. When bootstraping mcs, I was able to
20964 see a small boost because of icache locality.
20966 * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
20968 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
20970 * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
20971 started code sharing with the generic code.
20973 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
20975 * mini-ppc.c, cpu-g4.md: added code for direct access to
20978 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
20980 * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
20981 mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
20984 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
20986 * declsec.c|h: Added functions to cache the declarative stack modifiers
20987 in MonoJitInfo and to create a security frame from a MonoJitInfo
20989 * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
20990 created. Register internal calls for System.Security.SecurityFrame::
20991 _GetSecurityFrame and _GetSecurityStack.
20992 * mini.h: Added definition for new icalls (in mini-exceptions.c) and
20993 the definitions for the new stack walk/callback mechanism.
20994 * mini-exceptions.c: Added internal call GetSecurityFrame (to get the
20995 first security frame for LinkDemands and InheritanceDemands) and
20996 GetSecurityStack for Demands. Both use the new mono_walk_stack code
20998 * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
20999 walk initialization (lupus).
21001 2004-12-20 Ben Maurer <bmaurer@ximian.com>
21003 * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
21005 (handle_loaded_temps): Do not create a temporary variable for
21006 things that we know are temps. They will never be modified.
21007 (mono_spill_call): Set MONO_INST_IS_TEMP
21008 (mono_emulate_opcode): ditto
21010 (mono_method_to_ir.CEE_DUP): ditto
21012 2004-12-19 Ben Maurer <bmaurer@ximian.com>
21014 * mini.c (type_to_eval_stack_type): Make this handle the void type
21015 (mono_emit_call_args): set the call->type with type_to_eval_stack_type
21016 (emit_tree): use ip_in_bb to special case some common idioms
21017 Update all callers to pass in the IP.
21018 (mono_method_to_ir): Make CEE_CALL* do the above as well.
21020 This gives us a nice 2% speedup in mcs bootstrap.
21022 * mini-x86.c (peephole_pass): Peephole pass to make
21031 * mini.c (ip_in_bb): new method.
21032 (mono_method_to_ir): use this method rather than doing the hash
21035 * linear-scan.c (mono_linear_scan): When expiring actives, you
21036 don't need to keep around variables that expire on this
21037 instruction. This makes it so that:
21040 store (ebx add (ebx, 1))
21044 2004-12-19 Zoltan Varga <vargaz@freemail.hu>
21046 * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc
21047 combination to avoid doing two copies. Fix up problems with previous
21050 * mini.c: Fix 64 bit warnings.
21052 * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
21054 2004-12-17 Zoltan Varga <vargaz@freemail.hu>
21056 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
21057 changes from the x86 code.
21059 * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
21061 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
21063 * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
21064 throwing code to reduce its size, unify the AOT and non-aot code and
21065 get rid of relocations in the AOT case.
21067 * mini-x86.h mini.c exceptions-x86.c
21068 (mono_arch_get_throw_corlib_exception): New arch specific function to
21069 raise corlib exceptions which doesn't require relocations in the
21072 * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
21074 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
21076 * mini.c (mono_emit_method_call): Only allocate the got var when it is
21079 * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
21082 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
21084 * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
21085 with add function when used from Inc/dec atomic
21086 functions. Re-enabled optimization on x86.
21087 * mini-ops.h: renamed atomic_add functions to
21088 allow _add to match the Interlocked::Add and
21089 _add_next to match Interlocked::Inc/Dec.
21091 2004-12-15 Massimiliano Mantione <massi@ximian.com>
21093 * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
21094 linking of BBs to the end BB, and enabled SSAPRE also with
21095 consprop and copyprop (which was prevented by that bug).
21097 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
21099 * mini-x86.c: disabling the Interlocked optimizing code.
21101 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
21103 * aot.c (load_aot_module): Move reading of got_addr after the AOT
21104 file version check.
21106 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
21108 * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm
21109 interlocked optimization due lack of support on x86, rewrote
21110 exchange to take into account that base may be in eax.
21112 xsp works again; activated Interlocked optimizing code.
21114 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
21116 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
21118 2004-12-13 Zoltan Varga <vargaz@freemail.hu>
21120 * mini-ops.h: Add new opcodes.
21122 * mini.h: Add new patch types. Add got_var to MonoCompile.
21124 * mini.h mini-x86.c mini-amd64.c aot.c: Rename
21125 mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
21126 make it work with all kinds of patchable code.
21128 * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
21129 address of the GOT, and referencing entries in the GOT.
21131 * mini.c: Add code to load the GOT address if needed by an opcode.
21133 * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position
21134 independent AOT code on the x86 using an elf-style Global Offset Table.
21136 2004-12-14 Raja R Harinath <rharinath@novell.com>
21138 * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
21140 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21142 * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
21145 2004-12-13 Patrik Torstensson <patrik.torstensson@gmail.com>
21147 * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
21148 of Interlocked:Increment/Decrement/Add as inline ops.
21149 (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
21151 2004-12-12 Geoff Norton <gnorton@customerdna.com>
21153 * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
21154 * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
21156 2004-12-12 Duncan Mak <duncan@ximian.com>
21158 * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
21159 again. `patch_info->table_size' is no longer valid after Zoltan's
21162 2004-12-12 Martin Baulig <martin@ximian.com>
21164 * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
21165 if we are the "real" method, ie. not an inlined method inside it.
21167 2004-12-11 Ben Maurer <bmaurer@ximian.com>
21169 * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
21170 before we look in the special fields table. This fixes
21171 ../tests/thread-static-init.cs.
21173 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21175 * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
21176 for Array get_Rank and get_Length. Fixes bug #70465.
21178 2004-12-11 Zoltan Varga <vargaz@freemail.hu>
21180 * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
21181 separate structure to reduce the size of MonoJumpInfo.
21183 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
21185 * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
21187 2004-12-10 Patrik Torstensson <patrik.torstensson@gmail.com>
21189 * mini.c (mini_get_inst_for_method): Changed to allow ports
21190 to return a MonoInst instead of opcode
21191 (renamed mini_get_opcode_for_method to better reflect the new functionality)
21193 * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method):
21194 Allow ports to return a created MonoInst instead of op-code, will enable
21196 (renamed mini_get_opcode_for_method to better reflected the functionality)
21198 2004-12-09 Zoltan Varga <vargaz@freemail.hu>
21200 * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
21202 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
21204 * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
21207 2004-12-08 Martin Baulig <martin@ximian.com>
21209 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
21210 if we're a CEE_CONSTRAINED call. Fixes gen-118.cs.
21212 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
21214 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
21217 * exceptions.cs: Disable some tests which depend on properties of x86 fp
21220 2004-12-08 Raja R Harinath <rharinath@novell.com>
21222 * Makefile.am (CLEANFILES): Add *.exe, *.dll.
21224 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
21226 * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
21227 bug introduced by the previous patch.
21229 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
21231 * mini-ppc.c, objectc.cs: handle large structs passed by value
21232 (fixes bug #69972).
21234 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
21236 * mini-ppc.c: OP_ARGLIST implementation from
21237 Geoff Norton <gnorton@customerdna.com>.
21239 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
21241 * inssel-x86.brg, inssel-ppc.brg: fix reference to register
21242 in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
21244 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
21246 * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
21248 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21250 * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
21253 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
21255 * mini-sparc.c: Zero out localled-ed memory.
21257 * iltests.il: Add tests for zeroing out localloc-ed memory.
21259 2004-12-04 Martin Baulig <martin@ximian.com>
21261 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
21262 mono_method_get_signature_full().
21264 2004-12-03 Massimiliano Mantione <massi@ximian.com>
21266 * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
21267 and some utility functions (always for SSAPRE), integrated SSAPRE.
21268 * mini.h: Likewise.
21269 * driver.c: Added ssapre option.
21270 * ssa.c: Small fix on OP_ARG handling.
21271 * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
21272 * Makefile.am: Likewise.
21274 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
21276 * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
21277 now in the xp code.
21279 * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
21282 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21284 * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
21286 * cpu-s390.md : Increase instruction length of oparglist.
21288 * mini-s390.c : Implement vararg and TYPEDEBYREF support.
21290 2004-11-30 Martin Baulig <martin@ximian.com>
21292 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
21293 virtual generic methods. We call a special helper_compile_generic_method()
21294 icall to retrieve the method from the vtable, inflate and compile
21295 it and then do a CEE_CALLI. Thanks a lot to Paolo for this idea.
21297 * jit-icalls.c (helper_compile_generic_method): New JIT icall.
21299 2004-11-30 Zoltan Varga <vargaz@freemail.hu>
21301 * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
21303 2004-11-29 Zoltan Varga <vargaz@freemail.hu>
21305 * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
21308 2004-11-27 Ben Maurer <bmaurer@ximian.com>
21310 * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
21311 platforms with PIC aot.
21313 2004-11-28 Martin Baulig <martin@ximian.com>
21315 * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
21318 2004-11-28 Martin Baulig <martin@ximian.com>
21320 * mini-x86.c (mono_arch_call_opcode): Use the original type, not
21321 the result of mono_type_get_underlying_type() to check whether
21324 2004-11-26 Martin Baulig <martin@ximian.com>
21327 (mono_method_to_ir): Use `!method->signature->has_type_parameters'
21330 2004-11-26 Zoltan Varga <vargaz@freemail.hu>
21332 * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
21333 the same way as the other arguments so they won't get clobbered.
21335 * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual
21336 calls through R11 since it is clobbered by the trampoline code.
21338 2004-11-26 Raja R Harinath <rharinath@novell.com>
21340 * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
21341 pick up in-tree mscorlib.dll.
21343 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
21345 * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
21347 * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to
21348 runtime data/code are now stored in a table similar to the GOT in ELF.
21349 This allows the code itself to be position independent.
21351 * aot.c: Fix loading of referenced assemblies after the lazy assembly
21354 * aot.c: Attach ELF type (object/function) directives to all global
21357 * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
21359 * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
21361 * mini-amd64.h: Turn on PIC AOT code.
21363 * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
21364 returning the offset within an OP_AOTCONST instruction where the GOT
21365 offset needs to be added.
21367 * mini.h: Bump AOT file format version.
21369 2004-11-25 Martin Baulig <martin@ximian.com>
21371 * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
21372 uninflated generic methods.
21374 2004-11-25 Martin Baulig <martin@ximian.com>
21376 * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
21378 2004-11-24 Martin Baulig <martin@ximian.com>
21380 * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
21381 original klass (this only applies for generic instances).
21383 2004-11-24 Martin Baulig <martin@ximian.com>
21385 * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
21386 `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
21389 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
21391 * mini.c (mono_method_to_ir): Disable inlining for methods containing
21392 localloc. Fixes #69678.
21394 * iltests.il (test_0_localloc_inline): Add regression test for #69678.
21396 2004-11-23 Zoltan Varga <vargaz@freemail.hu>
21398 * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
21399 used SSE registers on pinvoke calls. Fixes #69774.
21401 2004-11-23 Geoff Norton <gnorton@customerdna.com>
21403 * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
21404 vt->inst_vtype->data.klass. This fixes generic structs and bug #69766
21406 2004-11-23 Raja R Harinath <rharinath@novell.com>
21408 * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
21409 Refer directly to the mcs/ tree.
21411 2004-11-19 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21413 * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
21414 Check if a trampoline for a synchronized method is required.
21416 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
21418 * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
21419 with localloc if needed. Throe arithmetric exception in
21420 div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
21421 Adapted from a patch by Geoff Norton <gnorton@customerdna.com>.
21423 2004-11-19 Geoff Norton <gnorton@customerdna.com>
21425 * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
21426 types before switching on type. Fixes #69622.
21428 2004-11-19 Raja R Harinath <rharinath@novell.com>
21430 * Makefile.am (check-local): New. Integrate into 'make check'.
21431 (MCS,RUNTIME): Define using in-tree mono and mcs.
21433 (%.exe): Use $(ILASM).
21435 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
21437 * mini-ppc.c: adjust initial prolog size (bug #69691).
21439 2004-11-18 Zoltan Varga <vargaz@freemail.hu>
21441 * cpu-pentium.md (localloc): Increase max instruction len. Fixes
21444 2004-11-17 Raja R Harinath <rharinath@novell.com>
21446 * Makefile.am (clean-local): Rename from 'clean'.
21448 2004-11-15 Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21450 * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
21451 to mono_arch_is_int_overflow.
21452 * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
21455 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
21457 * declsec.c|h: New files to support declarative security attributes.
21458 Added function to check if a method has (applicable) security.
21459 * mini.c|h: Add check for declarative security attributes in
21460 mono_method_check_inlining.
21461 * Makefile.am: Added declsec.c and declsec.h to the build.
21463 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
21465 * mini.c, mini.h: update to keep dynamic code info per-domain.
21467 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
21469 * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
21470 (mini_init): Get rid of it from here too.
21472 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
21474 * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
21475 implemented OP_RETHROW (patch by Geoff Norton
21476 <gnorton@customerdna.com>).
21478 2004-11-10 Geoff Norton <gnorton@customerdna.com>
21480 * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
21481 between appdomains. Fixes appdomain-unload on PPC.
21483 2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
21485 * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
21486 mini-exceptions.c: handle the new wrapper types.
21487 * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
21488 token value as a MonoClass* when compiling a wrapper.
21489 mono_jit_create_remoting_trampoline now takes an additional
21490 MonoRemotingTarget parameter.
21492 2004-11-10 Martin Baulig <martin@localhost>
21494 * mini.c (mono_method_to_ir): Use `generic_container->context'
21495 rather than creating a new one.
21497 2004-11-09 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21499 * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
21501 * inssel-390.md, mini-s390.c: Correct register allocation for globals.
21503 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
21505 * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
21506 the experimental aot cache stuff.
21508 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
21510 * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
21511 mini-exceptions.c: update to exception clause structure changes.
21513 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
21515 * exceptions-x86.c (throw_exception): Fix warnings.
21517 * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support
21520 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
21522 * exceptions-sparc.c (get_throw_exception): Really fix this.
21524 2004-11-07 Ben Maurer <bmaurer@ximian.com>
21526 * tramp-*.c: we no longer support icalls without wrappers, so
21527 a bit of code can be removed here
21529 2004-11-07 Zoltan Varga <vargaz@freemail.hu>
21531 * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
21534 * cpu-sparc.md: Add op_rethrow.
21536 * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
21538 * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
21540 * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
21541 * mini-ops.h: Add OP_RETHROW.
21543 * mini.c inssel.brg: Distinguish between THROW and RETHROW.
21545 * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
21547 2004-11-05 Geoff Norton <gnorton@customerdna.com>
21549 * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
21550 Makes the output much easier to read
21552 2004-11-05 Ben Maurer <bmaurer@ximian.com>
21554 * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
21555 prevents another huge leak when compiling with ssa. Secondly, the
21556 performance of doing this rather than freeing the lists is much
21557 better. GList does a lock every time you allocate a list link,
21558 so that it can use a memory pool. So, it is better to just use
21559 a memory pool of our own.
21561 * ssa.c, linear-scan.c: replace g_list_remove_link with
21562 g_list_delete. The remove one does not free the GList, so we were
21563 leaking memory. On -O=all --compile-all with corlib, this cut down
21564 3 MB of allocations.
21566 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
21568 * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
21570 * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
21572 * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
21573 into a new function mono_create_jit_trampoline ().
21575 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
21577 * trace.c (get_spec): Allow tracing of classes without a namespace.
21579 2004-11-02 Sebastien Pouliot <sebastien@ximian.com>
21581 * mini.c: Fix pointer overwrite in mini_method_compile.
21583 2004-11-2 Geoff Norton <gnorton@customerdna.com>
21585 * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
21586 The darwin ABI needs some special handling for 1 and 2 byte structs
21587 Lets use lbz/lhz instead of lwz everywhere.
21588 * mini-ppc.c (calculate_sizes): The Darwin ABI needs from special handling
21589 for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
21590 Use stb/sth for the former, and put the latter always on stack instead of in
21591 argument registers.
21593 2004-10-30 Zoltan Varga <vargaz@freemail.hu>
21595 * trace.c (is_filenamechar): Add '_'.
21597 2004-10-29 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21599 * mini-s390.c: Fix prolog length to allow for large trace requirements.
21601 * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
21603 2004-10-29 Zoltan Varga <vargaz@freemail.hu>
21605 * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
21606 depends on libmonogc. Fixes #68805.
21608 2004-10-26 Miguel de Icaza <miguel@ximian.com>
21610 * mini.c (mono_jit_free_method): Provide extra information for
21611 this error. Currently this leaks, but will be turned into a
21612 developer option in the future.
21614 2004-10-26 Zoltan Varga <vargaz@freemail.hu>
21616 * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
21618 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
21620 * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte
21621 boundary. Fixes reading of PATCH_INFO_R4 and R8.
21622 (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
21624 2004-10-24 Zoltan Varga <vargaz@freemail.hu>
21626 * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
21627 trampolines for AOT code.
21629 2004-10-22 <vargaz@freemail.hu>
21631 * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
21632 constructed types. Fixes #68136.
21634 2004-10-21 Martin Baulig <martin@ximian.com>
21636 * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
21637 if it returns true, unwind the stack to the call instruction.
21639 2004-10-21 <vargaz@freemail.hu>
21641 * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
21643 * mini.h: Bump AOT version number.
21645 * objects.cs: Add another test for unbox trampolines.
21647 * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for
21650 2004-10-20 <vargaz@freemail.hu>
21652 * driver.c: Add SHARED to the set of optimizations tested.
21654 * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
21656 * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
21657 used by CEE_NEWARR.
21659 * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
21661 2004-10-20 Martin Baulig <martin@ximian.com>
21663 * mini-exceptions.c (mono_handle_exception): Call
21664 mono_debugger_handle_exception() to tell the debugger about
21665 catch/finally clauses.
21667 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
21669 * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
21671 * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
21674 2004-10-15 Geoff Norton <gnorton@customerdna.com>
21676 * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
21677 methods as their native size, fixed bug #57543, #57545.
21678 * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
21679 This saves a temporary register and mullw call down into 1 (minor perf
21680 increase for cases like sum = sum * 5; This use to translate into:
21683 It now translates to
21686 2004-10-15 Zoltan Varga <vargaz@freemail.hu>
21688 * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
21691 2004-10-11 Martin Baulig <martin@ximian.com>
21693 * mini.c (mono_method_to_ir): If we're a generic method, get the
21694 MonoGenericContainer from our MonoMethodNormal and create a
21695 MonoGenericContext from it.
21697 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
21699 * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
21701 * basic-long.cs: Add test for checked i8->i2 cast.
21703 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
21705 * inssel-ppc.brg: added a couple of speedup rules.
21707 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
21709 * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
21710 to speed up rebuilds.
21712 2004-10-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21714 * mini-s390.c: Minor fix to OP_OR_IMM.
21716 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
21718 * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
21719 better. Fixes appdomain-unload.exe on sparc.
21721 2004-10-02 Massimiliano Mantione <massi@ximian.com>
21723 * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
21724 simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
21727 2004-10-02 Zoltan Varga <vargaz@freemail.hu>
21729 * jit-icalls.c: Handle a nonexisting trunc function more correctly.
21731 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
21733 * mini.c: Always generate a field read/write wrapper for members
21734 of the class MarshalByRefObject since the actual instance could
21737 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
21739 * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
21741 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
21743 * driver.c mini.h trace.c: Move the setting of the main assembly into
21744 a separate function called mono_trace_set_assembly () and call it after
21745 actually loading the main assembly. Fixes #66872.
21747 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
21749 * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
21750 using the code manager.
21752 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
21754 * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
21756 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
21758 * cpu-amd64.md: Fix bug in previous patch.
21760 * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
21763 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
21765 * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
21766 mini-exceptions.c: updates for changed stack walk interface.
21768 2004-09-21 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21770 * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
21772 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
21774 * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
21776 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
21778 * driver.c (mini_regression_list): Do not call mono_assembly_close
21779 since assemblies can't be unloaded.
21781 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
21783 * cpu-amd64.md: Fix more instruction lengths.
21785 * cpu-amd64.md: Fix lengths of some instructions.
21787 2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
21789 * inssel.brg: Make the array ldelema check aot friendly.
21791 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
21793 * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
21795 * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
21797 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
21799 * mini-x86.c: Fix build.
21801 * mini-sparc.c mini-x86.c mini-amd64.c: Use the new
21802 mono_type_get_underlying_type () helper function to simplify code.
21804 2004-09-09 Martin Baulig <martin@ximian.com>
21806 * mini-amd64.c: Don't access `type->data.klass' directly, call
21807 mono_class_from_mono_type() instead since the type may be a
21810 2004-09-09 Martin Baulig <martin@ximian.com>
21812 * mini-amd64.c (get_call_info): Fix support for generic instances.
21813 (add_valuetype): Use mono_class_from_mono_type() to get the class
21814 since we can be a generic instance.
21816 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
21818 * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
21820 2004-09-07 Ben Maurer <bmaurer@users.sourceforge.net>
21822 * liveness.c: reset spill costs on each scan: bug 62107
21824 2004-09-07 Bernie Solomon <bernard@ugsolutions.com>
21826 * exceptions-sparc.c (mono_arch_find_jit_info): remove
21827 unnecessary line that doesn't compile
21829 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
21831 * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
21832 trampolines, make them call an error function so people can fix their
21835 2004-09-06 Martin Baulig <martin@ximian.com>
21837 * mini.c (mono_method_to_ir): When initializing locals, handle a
21838 generic instances like a valuetype if it's a valuetype and like a
21839 class if it's a class.
21841 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
21843 * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
21844 stack. Fixes #64674.
21846 * exceptions.cs: Add test for unwinding of call arguments.
21848 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
21850 * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
21851 OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
21852 set the carry/borrow flag). The sparc and s390 implementations
21853 can now use optimized versions (and simplify the code). ppc bugfixes.
21855 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
21857 * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
21859 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
21861 * inssel-amd64.brg: Remove leftover 32 bit rule.
21863 * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
21865 2004-09-04 Zoltan Varga <vargaz@freemail.hu>
21867 * mini-exceptions.c (mono_find_jit_info): Refactor common code from
21868 mono_arch_find_jit_info functions into a new function. Fix a memory
21871 * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
21874 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
21876 * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
21879 * exceptions.cs: Add array size tests.
21881 * mini.c: Allocate a separate icall wrapper for each arity of
21882 mono_array_new_va. Fixes #59509.
21884 * exceptions.cs: Add testcase for 64578.
21886 * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
21888 * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
21890 2004-09-02 Martin Baulig <martin@ximian.com>
21892 * mini.c (mono_method_to_ir): When initializing the locals, call
21893 handle_initobj() on the generic instance itself, not its
21896 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
21898 * mini.h (MonoJitDynamicMethodInfo): New structure, extension of
21899 MonoJitInfo for dynamic methods.
21901 * mini.c: Rename trampoline_hash_mutex to jit_mutex.
21903 * mini.c: Add support for freeing JIT data for dynamic methods.
21905 2004-09-01 Martin Baulig <martin@ximian.com>
21907 * mini-x86.c (is_regsize_var): Added support for generic
21909 (mono_arch_emit_prolog): Make this compile again, use
21910 `x86_push_imm_template (code)'.
21912 2004-08-30 Ben Maurer <bmaurer@users.sourceforge.net>
21914 * mini-x86.c: make all push_imm instructions that get
21915 patched always emit the long form
21917 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
21919 * mini.c (mono_create_jump_trampoline): Store the jump trampolines
21920 in a per-domain hash.
21922 * mini-amd64.c (merge_argument_class_from_type): Handle generic
21925 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
21927 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
21930 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
21933 * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
21934 Beginnings of SSE2 support.
21936 * exceptions.cs: Add more tests for checked int<->uint casts.
21938 2004-08-28 Martin Baulig <martin@ximian.com>
21940 * mini-x86.c (mono_arch_instrument_epilog): Added support for
21944 (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
21945 Handle generic instances recursively.
21947 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
21949 * iltests.il: test for conv.u8 on a constant
21951 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
21953 * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
21954 LCONV_x4 (shrun_32 (membase)).
21956 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
21958 * inssel-x86.brg: c&p rules for push/setret of long
21960 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
21962 * inssel-x86.brg: c&p rules for compare (base, regvar) and
21963 compare (regvar, base)
21965 * inssel-x86.brg: more burg love
21967 * inssel.brg: more cleanup
21969 * inssel-x86.brg, inssel-long32.brg: burg cleanup.
21971 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
21973 * basic-long.cs, basic-calls.cs: new tests for optimization.
21975 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
21977 * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
21980 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
21982 * mini-amd64.c (read_tls_offset_from_method): Add another case.
21984 2004-08-25 Bernie Solomon <bernard@ugsolutions.com>
21986 * inssel.brg (mini_emit_memcpy): use
21987 NO_UNALIGNED_ACCESS to disable memcpy optimization
21989 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
21991 * mini-amd64.c: Handle generic types in various places.
21993 * mini.c (mono_method_to_ir): Handle generic types in init locals.
21995 2004-08-24 Zoltan Varga <vargaz@freemail.hu>
21997 * mini.c (handle_box): Fix warning.
21999 * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
22001 * mini-amd64.h: Enable the emit_state optimization.
22003 * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
22005 * mini-amd64.c: Add some new 64 bit peephole opts.
22007 * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
22009 * cpu-amd64.md: sreg1 of div instructions must be %rax.
22011 * mini-amd64.c: Register allocator fixes.
22013 * mini.c: Add an optimization to emit_state to avoid allocation of new
22014 registers on some platforms.
22016 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
22018 * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
22020 * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
22021 allocation. Fixes #63085.
22023 * basic-long.cs: Add new regression test.
22025 * mini-amd64.c: Register allocator improvements.
22027 2004-08-21 Zoltan Varga <vargaz@freemail.hu>
22029 * mini-amd64.c (read_tls_offset_from_method): Add another code
22032 * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
22033 instruction sequence for nullifying class init trampolines.
22035 * objects.cs: Add new regalloc test.
22037 * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
22039 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
22041 * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
22043 * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
22046 * driver.c: Fix profiling after TLS changes.
22048 * driver.c (mono_main): Set mono_stats.enabled if needed.
22050 * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
22053 2004-08-20 Ben Maurer <bmaurer@users.sourceforge.net>
22055 * mini-x86.c: use a 1 op rather than a 2 op tls access
22056 instruction -> faster.
22058 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
22060 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
22063 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
22065 * exceptions-sparc.c (throw_exception): fix typo
22067 2004-08-19 Ben Maurer <bmaurer@users.sourceforge.net>
22069 * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
22070 set tree->dreg correctly with tls. Allow any
22071 register to be used.
22073 * mini-x86.c (read_tls_offset_from_method): add new code
22074 generation pattern seen with GCC.
22077 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
22079 * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
22080 exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
22081 exceptions-sparc.c: fix some performance issues in exception
22082 handling and setting of the stack trace for exceptions that were
22085 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
22087 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
22090 * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible
22093 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
22095 This patch inlines tls access, when possible.
22097 * mini.h: new arch functions for TLS intrinsics.
22098 All platforms updated with a stub.
22100 * mini.c: use the new intrinsics
22102 * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
22103 arch specific intrinsic for tls variables
22105 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
22107 * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
22110 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
22112 * mini.c: thread local allocation
22114 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
22116 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
22118 * Makefile.am: Link against the static version of libmonogc.
22120 * Makefile.am: Link the static versions of the convenience libraries
22121 into the mono executable.
22123 * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
22125 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
22127 * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
22128 on integer overflow.
22130 * mini-amd64.c: Reorganize function call code.
22132 * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
22134 2004-08-14 Ben Maurer <bmaurer@ximian.com>
22136 * inssel-x86.brg: use xor eax,eax.
22138 * basic.cs: new tests
22140 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
22142 * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
22143 in exception throwing code.
22145 2004-08-14 Ben Maurer <bmaurer@ximian.com>
22147 * inssel-x86.brg: use xor esi,esi.
22149 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
22151 * driver.c (mono_main): Call mono_trace_parse_options earlier so it
22152 can trace methods compiled during mini_init () too.
22154 * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle
22157 2004-08-14 Ben Maurer <bmaurer@ximian.com>
22159 * Makefile.am: static link on x86 (r=zoltan)
22161 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
22163 * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
22164 code since it causes some programs to fail.
22166 2004-08-12 Zoltan Varga <vargaz@freemail.hu>
22168 * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
22170 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
22172 * mini.c: ovfops_op_map - add STACK_OBJ case for
22174 * basic.cs: add test_0_pin_string as test
22177 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
22179 * Makefile.am: build C# if srcdir != builddir
22181 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
22183 * dominators.c, mini.h, mini-x86.c: fix loop alignment with
22184 fall-through blocks.
22186 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
22188 * driver.c: enable loop by default again and include abcrem in -O=all.
22190 2004-08-08 Zoltan Varga <vargaz@freemail.hu>
22192 * iltests.il: Add some localloc tests.
22194 * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
22196 * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly.
22199 * inssel-amd64.brg: Add some optimizations.
22201 * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
22204 * Makefile.am: Statically link mono against libmono on AMD64.
22206 * mini-amd64.c inssel-amd64.brg: Optimizations.
22208 2004-08-07 Zoltan Varga <vargaz@freemail.hu>
22210 * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
22212 * tramp-amd64.c: Patch calling code in trampolines.
22214 2004-08-06 Zoltan Varga <vargaz@freemail.hu>
22216 * mini-amd64.c: pinvoke struct passing fixes.
22218 2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
22220 * mini-sparc.c: redo change, make mono_arch_cpu_init call
22221 mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
22223 2004-08-05 Duncan Mak <duncan@ximian.com>
22225 * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
22228 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
22230 * mini-amd64.c (emit_move_return_value): Move return value for normal
22233 2004-08-05 Martin Baulig <martin@ximian.com>
22235 * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
22236 `type->type'; just modify `type' itself when dealing with enums
22237 and generic instances.
22238 (check_call_signature): Make `simple_type' a `MonoType *'.
22240 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
22242 * mini.c: Use OP_PADD to add offsets to addresses.
22244 * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
22246 2004-08-04 Bernie Solomon <bernard@ugsolutions.com>
22248 * mini-sparc.c (mono_arch_emit_epilog): fix check
22249 for folding last op into restore instruction
22251 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
22253 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
22254 helper methods using the code manager.
22256 * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
22258 * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
22260 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
22262 * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
22263 cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
22265 * mini-s390.c: fix tail processing
22267 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
22269 * mini-ppc.c: mul.ovf.un exception name fix.
22271 2004-08-03 Martin Baulig <martin@ximian.com>
22273 * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
22274 instances; before jumping to `handle_enum', also modify `ptype'.
22276 2004-08-02 Bernie Solomon <bernard@ugsolutions.com>
22278 * cpu-sparc.md: fcall maximal length too small.
22280 2004-08-02 Zoltan Varga <vargaz@freemail.hu>
22282 * mini-amd64.c mini.h: Add initial support for passing/returning
22283 structures to/from pinvoked methods.
22285 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
22287 * mini-ppc.c: reg allocator fix.
22289 2004-07-31 Zoltan Varga <vargaz@freemail.hu>
22291 * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
22293 * inssel.brg: Optimize memset on 64 bit machines.
22295 * mini-amd64.c: Fix some vararg cases.
22297 2004-07-30 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
22299 * mini-s390.c: Corrected macro in emit_float_to_int
22301 * s390-abi.cs: Tests to exercise the s390 ABI
22303 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
22305 * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
22308 * basic.cs: Add a test for add.ovf.un.
22310 2004-07-30 Bernie Solomon <bernard@ugsolutions.com>
22312 * mini-sparc.c: add case for OP_IDIV_UN
22314 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
22316 * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
22318 * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
22320 2004-07-30 Ben Maurer <bmaurer@ximian.com>
22322 * basic.cs: regression tests.
22324 * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
22327 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
22329 * basic.cs: Add a new test.
22331 * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling
22332 and AOT. Various fixes and optimizations.
22334 * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
22336 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
22338 * mini-ppc.c: make sure temp regs are not used for global reg
22341 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
22343 * cpu-sparc.md: conv_i8 fix for 64bits
22345 * mini-sparc.c: add cases for OP_IXXX codes for 64bits
22347 2004-07-29 Ben Maurer <bmaurer@ximian.com>
22349 * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
22350 add opcode for cmp BYTE PTR [eax], imm.
22352 * inssel.brg: Make memcpy and memset takes bases.
22354 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
22356 * *-amd64.*: More AMD64 work.
22358 2004-07-28 Ben Maurer <bmaurer@ximian.com>
22360 * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
22361 add a compare-not-equal opcode.
22363 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
22365 * mini.c: Use mono_init_from_assembly instead of mono_init.
22367 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
22369 * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
22371 * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
22373 * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
22375 * inssel.brg: 64 bit fixes.
22377 * mini.h (MonoCallInst): Add some AMD64 specific data.
22379 * mini.h: Add some OP_P opcodes.
22381 2004-07-28 Ben Maurer <bmaurer@ximian.com>
22383 * basic.cs: tests for 61797 and 61740
22385 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
22387 * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
22388 numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
22390 2004-07-24 Zoltan Varga <vargaz@freemail.hu>
22392 * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
22394 * *-amd64*.*: Ongoing AMD64 work.
22396 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
22398 * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
22400 * *-amd64*: Ongoing AMD64 work.
22402 * mini-arch.h: Add AMD64 support.
22404 * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
22406 * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
22408 * mini-ops.h: Add new opcodes.
22410 * Makefile.am: Add AMD64 support.
22412 * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
22413 rules into the inssel-long*.brg files.
22415 * *-amd64.*: Add beginnings of AMD64 backend.
22417 2004-07-22 Ben Maurer <bmaurer@ximian.com>
22419 * mini.c (print_dfn): commenting out the code that prints
22420 the cil. With -O=deadce, this makes -v -v crash.
22422 * cpu-pentium.md: make checkthis have a length of 2
22424 2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
22426 * mini-sparc.h: fix implementations of __builtin
22427 functions for Sun compiler for V9.
22429 2004-07-16 Ben Maurer <bmaurer@ximain.com>
22431 * mini.c: use the new stelem.ref wrapper
22432 * exceptions.cs, arrays.cs: new stelem.ref tests
22434 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
22436 * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
22437 new XSP should work with these changes).
22439 2004-07-14 Ben Maurer <bmaurer@ximain.com>
22441 * inssel-{long32,x86,}.brg: trivial optimizations.
22443 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
22445 * mini.c: load value when emitting box operation in
22448 2004-07-12 Ben Maurer <bmaurer@ximian.com>
22450 * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
22451 is one byte shorter than cmp DWORD PTR [eax], 0.
22453 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
22455 * inssel-ppc.brg: arguments on the stack are always
22456 relative to the stack pointer (spotted by Neale Ferguson).
22458 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22460 * exceptions-x86.c: delay appending the method name to the trace until
22461 after mono_jit_info_table_find is called, as this gets the real
22464 2004-07-09 Ben Maurer <bmaurer@ximian.com>
22466 * aot.c: register roots
22468 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
22470 * aot.c : I could just use PLATFORM_WIN32 flag.
22472 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
22474 * aot.c : Reverting the previous fix. This time it broke linux build.
22476 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
22478 * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
22480 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
22482 * mini.c (handle_stack_args): Remove some more debugging code.
22484 * mini.c (handle_stack_args): Remove debug output left in by mistake.
22486 * driver.c mini.h aot.c: Allow additional options to be specified with
22487 --aot and pass them to mono_compile_assembly.
22489 * aot.c: Add experimental code to AOT compile all loaded assemblies
22490 on demand and save the code into a cache in the filesystem.
22492 * aot.c: Add support for more wrapper methods.
22494 * mini.c (handle_stack_args): Handle some corner cases. Fixes
22497 * cpu-*.md: Remove removed opcodes.
22499 * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
22500 CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
22501 related icalls to marshal.c.
22503 2004-07-06 Zoltan Varga <vargaz@freemail.hu>
22505 * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
22507 * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
22509 * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
22511 2004-07-06 Ben Maurer <bmaurer@ximian.com>
22512 * liveness.c: If liveness is recomputated we need to reset the information
22513 for each variable. This way, if the liveness range has been narrowed
22514 by optimizations that happened after the last computation, we can return
22517 For example, if you have
22522 // Tons of code that does not affect i
22528 i = 0 is dead code and will be removed by SSA. However, when
22529 linear scan gets to the code, i will still appear to be live
22530 throughout the entire block. This prevents good register allocation.
22532 2004-07-06 Martin Baulig <martin@ximian.com>
22534 * debug-mini.c (mono_debug_init_method): Allow
22535 MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
22536 (mono_debug_add_icall_wrapper): New method.
22538 * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
22540 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
22542 * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
22545 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
22547 * aot.c (mono_aot_load_method): Fix loading of debug info.
22549 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
22551 * aot.c: Add logging support.
22553 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
22555 * mini.h: Add prototype for mono_print_method_from_ip.
22557 * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
22559 * inssel.brg: 64 bit fixes.
22561 * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to
22564 * Makefile.am: Add SPARC64 support.
22566 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
22568 * aot.c: Fix alignment problems on 32 bit platforms.
22570 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
22572 * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
22575 * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
22578 * mini.h: Bump AOT file version. Some 64 bit fixes.
22580 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
22582 * inssel-sparc.brg: Add new rule to avoid register moves.
22584 * inssel.brg: Add ldind_to_load_membase helper function.
22586 2004-06-30 Ben Maurer <bmaurer@ximian.com>
22588 * mini.c: OffsetToStringData intrinsic.
22590 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
22592 * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
22594 * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
22597 * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
22598 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
22600 * mini.c: reinstated mono_compile_get_interface_var()
22601 on x86, too, since the change breaks the Gtk# build there as well.
22603 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
22605 * driver.c: remove loop from the default optimizations: it seems to
22606 interact badly with some of the other options (see bug #60613).
22608 2004-06-25 Zoltan Varga <vargaz@freemail.hu>
22610 * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
22611 (fld@informatik.uni-bremen.de): Add Solaris x86 support.
22613 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
22615 * mini-ppc.c, cpu-g4.md: small updates to be able to compile
22616 vararg-using methods.
22618 2004-06-21 Martin Baulig <martin@ximian.com>
22620 * mini/mini-exceptions.c
22621 (mono_handle_exception): Added `gpointer original_ip' argument.
22622 After calling mono_unhandled_exception(), call
22623 mono_debugger_unhandled_exception() and if that returns true,
22624 restore the context and return.
22626 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
22628 * mini-ppc.c: prefer the use of relative branches so
22629 they won't need to be patched in aot code (patch from Patrick Beard).
22631 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
22633 * aot.c: patch from Patrick Beard to make the output assembly
22634 more correct for the MacOSX assembler. Small tweak to
22635 generate sane images on Linux/PPC, too.
22637 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
22639 * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
22640 case until bug #59509 is fixed (shows up in #60332).
22642 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
22644 * mini.c: make sure the needed wrappers are compiled, too, with
22647 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
22649 * driver.c: remove NPTL reference in --version output.
22651 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
22653 * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
22654 generate valid assembly for the Mach-O assembler.
22656 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
22658 * driver.c: don't include abcrem in the all optimization specifier
22659 since it slows down jit compilation too much for now.
22661 2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
22663 * mini.c: use BIGMUL only if both operands have the same signage.
22664 * iltests.il: Test for bug 60056. (errors related to signage in
22669 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
22671 * mini.c, aot.c: memory leak fixes.
22673 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
22675 * inssel-long32.brg: implemented a few missing ulong cast opcodes.
22677 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
22679 * Makefile.am: remove the -static hack completely, it links in
22680 statically glib as well.
22682 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
22684 * iltests.il, mini.c: fixed bug#59580 in branch optimization.
22685 * exceptions.cs: make it compile with new mcs/csc.
22687 2004-06-03 Massimiliano Mantione <massi@ximian.com>
22688 * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
22689 and added relevant test case.
22691 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
22693 * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
22694 regressions in gtk-sharp.
22696 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
22698 * exceptions.cs: New regression tests.
22700 * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
22702 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
22704 * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
22706 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
22708 * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
22710 * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
22712 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
22714 * mini.c (mono_jit_runtime_invoke): Init class in this
22715 method instead of trusting mono_jit_compile_method to
22716 do the work (because wrappers can be in object class)
22718 2004-05-27 Zoltan Varga <vargaz@freemail.hu>
22720 * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
22722 * basic-long.cs: New regression test.
22724 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
22726 * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
22727 and div/rem checks.
22729 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
22731 * Makefile.am: fix miguel's change to build mono statically against
22732 libmono (track build dependencies).
22734 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
22736 * cfold.c: Some glib versions do not have G_MININT32.
22738 2004-05-26 Massimiliano Mantione <massi@ximian.com>
22740 * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
22741 with precision of tan, atan, sin and cos, and implemented related
22742 regressions tests (fixes bug 54467, but one new problem appeared and
22745 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
22747 * cfold.c (FOLD_BINOPZ): Avoid division by zero.
22749 * exceptions.cs: Add test for constant folding && division by zero.
22751 * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
22752 since driver.c is in libmono too, so the optimization was useless.
22754 * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
22755 variable to driver.c so the compiler can emit more efficient code to
22758 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22760 * Makefile.am: don't distribute generated inssel.[ch] files.
22762 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
22764 * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
22765 into the default appdomain. Fixes #58707.
22767 * jit-icalls.c: Remove the broken approximation for truncl, doing
22768 no conversion is better.
22770 * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
22773 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
22775 * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
22776 of the mcrxr instruction which is not available on some processors
22777 even if it's documented to be. Implement add and sub overflow correctly
22778 (still not complete for long unsigned). Speed up icalls a bit.
22780 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
22782 * mini.c (mono_jit_compile_method_with_opt): Make sure that
22783 we run .cctor in the current domain instead of target_domain.
22785 Fixes bug #58558, .cctor not being called in -O=shared.
22787 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
22789 * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
22791 2004-05-24 Ben Maurer <bmaurer@users.sourceforge.net>
22793 * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
22794 which can be done with an imm8, do it that way.
22795 (mono_arch_output_basic_block): ditto for a jmp
22796 (mono_arch_emit_prolog): Computate maximum offset of a label.
22798 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
22800 * mini-x86.c (mono_arch_local_regalloc): the reg allocator
22801 now tries to allocate prefered physical reg's for virtual
22802 regs. This reduces the number of emited spills/loads with
22803 20-30% on our core assemblies.
22805 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
22807 * jit-icalls.c: truncl() is not needed and trunc() is
22808 the correct thing to do anyway (bug #58287).
22810 2004-05-24 Zoltan Varga <vargaz@freemail.hu>
22812 * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
22815 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
22817 * driver.c: enable loop optimizations by default.
22819 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
22821 * mini-x86.c: fix calc of max loop size when aligning loops start.
22823 2004-05-23 Zoltan Varga <vargaz@freemail.hu>
22825 * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
22828 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
22830 * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
22833 * basic-long.cs: Add tests for add/subtract of immediates with carry.
22835 * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
22837 * mini.c (inline_method): Allways inline some wrappers even if the cost
22838 is too large. Fixes #58785.
22840 * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
22842 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
22844 * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
22845 (crichton@gimp.org). Beginning of support for sparc/linux.
22847 * mini-sparc.c: Optimize retrieval of LMF address.
22849 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
22851 * exceptions-ppc.c: handle alloca in methods with clauses.
22853 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
22855 * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
22857 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
22859 * mini.c: Delegate most of the abort signal work to
22860 mono_thread_request_interruption, which also handles Stop and Suspend
22863 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
22865 * mini.c mini.h: Allow inlining of icall wrappers if the backend
22866 supports the save/restore lmf opcodes.
22868 2004-05-19 Zoltan Varga <vargaz@freemail.hu>
22870 * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
22871 by gcc-3.4 as well.
22873 * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
22875 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
22877 * mini.h mini.c (mini_method_compile): Only run abc removal pass on
22878 methods which contain array accesses.
22880 * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
22881 boundaries. Fixes #58537.
22883 * iltests.il: Add regression test for #58537.
22885 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
22887 * mini-x86.c (mono_arch_local_regalloc): Last part of
22888 fix for bug #58633 (releasing register to early).
22890 2004-05-18 Miguel de Icaza <miguel@ximian.com>
22892 * basic-long.cs: Add new regression test.
22894 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
22896 * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
22897 register too early on the chain.
22899 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
22901 * mini.c (create_helper_signature): Use a helper function to reduce
22902 the code which needs to be written. Also set the calling convention of
22903 icalls on windows. Fixes #57840.
22905 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
22907 * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
22908 exceptions-ppc.c: added helper function to get the instruction address
22909 from a signal handler context.
22911 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
22913 * helpers.c: use g_get_tmp_dir. Invokes happyness
22916 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
22918 * helpers.c: Add new env variable to pass args to objdump.
22919 Specifically for those of us who love -Mintel. r=miguel, gonzalo.
22921 2004-05-17 Radek Doulik <rodo@ximian.com>
22923 * Makefile.am (common_sources): added abcremoval.h so it get
22924 disted and daily mono packages on go-mono.com will build again
22926 2004-05-17 Massimiliano Mantione <massi@ximian.com>
22928 * abcremoval.c: Fixed coding style, added copyright header.
22930 * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
22932 * mini.h: Added prototype for abc removal main function.
22934 * build_relations_propagation_table.pl: Added copyright header.
22936 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
22938 * basic-long.cs: reg test for complex ceq_long bug.
22940 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
22942 * mini-x86.c (mono_arch_local_regalloc): Correctly free
22943 reg in long and clob case (bug #58343). Fixed/added comments.
22945 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
22947 * mini.c (mono_jit_runtime_invoke): Follow new convention
22948 of calling the invoke method with an function pointer.
22950 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
22952 * ChangeLog: Fix author of memory leak patch.
22954 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
22956 * Makefile.am: fix make dist as well...
22959 2004-05-14 Massimiliano Mantione <massi@ximian.com>
22961 * cfold.c: Made so that conversions from pointer to int4 are no-ops
22962 on archs where pointers are 4 bytes long.
22964 * Makefile.am: Added abcremoval.c source file.
22966 * abcremoval.c: Added abcremoval.c.
22968 * abcremoval.h: Added abcremoval.h.
22970 * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
22972 * inssel.brg: Enabled bounds check removal.
22974 * mini.c: Added support for abcrem optimization.
22976 * mini.h: Added abcrem optimization label.
22978 * driver.c: Added support for abcrem optimization.
22980 * propagated_relations_table.def: Added propagated_relations_table.def.
22982 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
22984 * mini.c, cfold.c: fix style.
22986 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
22988 * mini.c: handle issue with the low-level implementation of
22989 some long opcodes (bug #54209).
22991 2004-05-13 Ben Maurer <bmaurer@users.sourceforge.net>
22993 * basic.cs: test for my new cmov stuff.
22995 2004-05-13 Patrik Torstensson
22997 * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
22998 opt and added peephole documentation.
23000 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
23002 * tramp-ppc.c: rewrote the generic trampoline code.
23004 2004-05-11 Patrik Torstensson
23006 * mini-x86.c: optimize long shl/shr asm code (one less branch)
23008 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
23010 * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
23012 * mini.h mini.c dominators.c: Applied patch from Derek Woo
23013 (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
23015 * mini.c: Add new icalls for AsAny marshalling.
23017 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
23019 * tramp-ppc.c, mini-ppc.c: more cleanups.
23021 2004-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23023 * mini.c: no warnings.
23025 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
23027 * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
23029 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
23031 * mini.c: In the thread abort signal handler, if the thread is in the
23032 process of being stoped, don't throw the Abort exception, just stop the
23035 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
23037 * tramp-ppc.c: removed old code.
23039 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
23041 * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
23042 do some simple speed optimizations on ppc.
23044 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
23046 * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
23047 and large offsets in load/store.
23049 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
23051 * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
23052 it causes regressions.
23054 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
23056 * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
23059 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
23061 * jit-icalls.c: remove warnings.
23062 * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
23063 speedups for unsafe code.
23065 2004-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
23067 * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
23069 2004-05-06 Zoltan Varga <vargaz@freemail.hu>
23071 * basic-calls.cs: Add new regression test.
23073 * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
23076 * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
23078 * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
23081 2004-05-06 Patrik Torstensson
23083 * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
23084 long reg allocation in any reg (not only eax:edx) and implemented
23085 long shl/shr ops in asm instead of helpers.
23087 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
23089 * mini-sparc.h: Fix warnings.
23091 * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
23094 * mini-exceptions.c (mono_handle_exception): Call the filter in a
23095 separate statement for clarity.
23097 * mini-sparc.c: Update status.
23099 2004-05-04 Zoltan Varga <vargaz@freemail.hu>
23101 * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
23104 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
23106 * inssel-ppc.brg: another small pre-release workaround:
23107 we don't do overflow detection for long_sub_un.
23109 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
23111 * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
23112 (also works around a weird ppc bug: 57957).
23114 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
23116 * tramp-ppc.c: trampoline fixes.
23118 Fri Apr 30 15:54:26 EDT 2004 Paolo Molaro <lupus@ximian.com>
23120 * mini-ppc.c: fixed typos.
23122 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
23124 * mini-ppc.c, exceptions-ppc.c: more code saves registers
23125 at the top of the stack. Fixed typos. Use a frame registers
23126 for all the methods with exception clauses.
23128 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
23130 * exceptions-ppc.c: restore fp registers.
23132 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
23134 * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
23135 order from the stack top (moved the stack room to save the
23136 return value for trace after the param area). Fixed corruption
23137 in restoring registers on unwind.
23139 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
23141 * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
23143 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
23145 * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
23146 and prolog/epilog for methods that use it. Allow
23147 enough param area room for varargs methods. Fix miguel's
23148 breakage in exception handling.
23150 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
23152 * Makefile.am: run genmdesc only on current arch.
23154 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23156 * exceptions-x86.c:
23157 * mini-x86.h: fix the build on windows.
23159 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
23161 * 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.
23163 * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
23165 * mini-exceptions.c: New file.
23167 * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
23168 Move some parts of the x86 exception handling code to an
23169 arch-independent file so it can be shared with other ports.
23171 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
23173 * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
23175 2004-04-26 David Waite <mass@akuma.org>
23177 * driver.c: remove comma from end of enumeration declaration
23179 2004-04-26 Jackson Harper <jackson@ximian.com>
23181 * driver.c: parse config file before loading first assembly. This
23182 allows the user gac to be enabled/disabled.
23184 2004-04-23 Miguel de Icaza <miguel@ximian.com>
23186 * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
23187 simpler mechanism: we do not care what is encoded initially
23188 (branch absolute or relative), we care about the code and its
23189 target. I kept the old code for reference for now.
23191 The new code tries first to determine if the jump is anywhere in
23192 the -/+32 absolute meg range, if it succeeds, it encodes using the
23193 absolute branch; If not, it tried to find something in the
23194 relative range, if not, it uses the handle_thunk code.
23196 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
23198 * exceptions-ppc.c: use the correct ip register on macosx.
23200 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
23202 * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
23204 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
23206 * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
23207 Raise exception on integer divide by zero by hand since the hw
23208 doesn't support it. Handle NaNs in FP compares.
23210 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
23212 * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
23213 code reducing duplication between the platforms and enabled
23214 signal exception handling (on linux for now).
23216 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
23218 * exceptions-ppc.c: more macosx support.
23220 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
23222 * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
23224 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
23226 * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
23228 2004-04-19 Ben Maurer <bmaurer@users.sourceforge.net>
23230 * iltests.il: more tests.
23232 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
23234 * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
23237 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
23239 * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
23241 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
23243 * liveness.c: Mark variables as volatile in all basic blocks reachable
23244 from exception clauses.
23246 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
23248 * exceptions.cs (test_0_rethow_stacktrace): Make this work with
23251 2004-04-18 Ben Maurer <bmaurer@users.sourceforge.net>
23253 * iltests.il, basic.cs: more tests for regalloc.
23255 2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
23257 * iltests.il: Some tests for register allocation modifications
23260 2004-04-16 Zoltan Varga <vargaz@freemail.hu>
23262 * exceptions.cs: Add regression test for bug #56782.
23264 * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
23265 original stack trace if an exception is rethrown. Fixes #56782. Oh,
23266 the beauty of fixing the same thing in 5 different files...
23268 2004-04-15 Zoltan Varga <vargaz@freemail.hu>
23270 * mini.c (mono_method_to_ir): Do not compute coverage for inlined
23273 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
23275 * mini.c: Add support for STRWLPARRAY marshalling convention.
23277 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
23279 * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
23280 to init the context to setup the regs pointer).
23282 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
23284 * exceptions-ppc.c: more exceptions work.
23286 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
23288 * mini.c: avoid reusing the same MonoInst on multiple trees: this is
23291 2004-04-13 Miguel de Icaza <miguel@ximian.com>
23293 * inssel-x86.brg (reg): Add new rules for add, sub and mul that
23294 can use the memory directly.
23296 * cpu-pentium.md: Update documentation from a post from Zoltan.
23298 add x86_add_membase, x86_sub_membase, x86_mul_membase
23300 2004-04-13 Miguel de Icaza <miguel@ximian.com>
23302 * mini-ppc.c: Remove unused definitions FLOAT_REGS and
23303 GENERAL_REGS they were also hardcoded for all PPC ports.
23305 (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
23307 Remove hard-coded limit for floating point registers, use
23308 PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
23310 Notice that in MacOS X calling conventions you can fit a lot more
23311 floating point values in registers, so I should update the PInvoke
23312 test to excercise the passing of floating point values on the
23313 stack (currently broken).
23315 2004-04-06 Miguel de Icaza <miguel@ximian.com>
23317 * tramp-ppc.c (create_trampoline_code): Added
23318 JUMP_TRAMPOLINE_SIZE.
23319 (ppc_magic_trampoline): Follow the pattern from
23320 x86_magic_trampoline: if code is set to zero, return.
23321 (create_trampoline_code): Always pass MonoMethod to the jump
23322 trampoline, before it was passing a null.
23323 (mono_arch_create_jump_trampoline): Implement the jump stub, could
23324 share the code with mono_arch_create_jit_trampoline.
23326 * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
23328 (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
23331 * cpu-g4.md: Added length for jmp instruction, the worst case
23332 scenario is 92 bytes (4 mandatory bytes, potential 19 registers
23335 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
23337 * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
23339 2004-04-07 Zoltan Varga <vargaz@freemail.hu>
23341 * mini.c: Only set bblock->real_offset when adding a new bblock, and
23342 before each IL instruction.
23344 * mini.c (CEE_BOX): Fix warnings.
23346 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23348 * mini.c: removed a few unused vars and extra whitespace.
23350 2004-04-05 Ben Maurer <bmaurer@users.sourceforge.net>
23352 * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
23354 (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
23356 (OP_GETCHR): use the above
23357 (CEE_LDELEMA): use the above.
23359 * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
23360 version of the generic impl.
23361 (MONO_EMIT_BOUNDS_CHECK_IMM): the same
23362 (CEE_LDELEMA): use the above.
23364 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
23366 * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
23369 * iltests.il: Added new regression test for #56317.
23371 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
23373 * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
23374 under NetBSD. Fixes #56450.
23376 * liveness.c (update_gen_kill_set): Fix previous patch.
23378 2004-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23380 * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
23382 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
23384 * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
23385 ldsfld and ldsflda.
23387 * inssel-sparc.brg: Add more optimizations.
23389 * mini-sparc.c: Replace multiply/divide with shifts if possible.
23391 2004-04-01 Martin Baulig <martin@ximian.com>
23393 * mini.c (handle_box): New static function; moved the
23394 implementation of CEE_BOX here.
23395 (mono_method_to_ir): Added `constrained_call' variable.
23396 (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
23397 (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
23398 mono_method_get_constrained() to get the method.
23400 2004-04-01 Martin Baulig <martin@ximian.com>
23402 * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
23403 (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
23404 (mono_method_to_ir): We don't need these macros anymore since
23405 mono_class_get_full() already takes care of it.
23407 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23409 * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
23410 use @function (as doesn't accept #function here) and check the return
23411 value of system and stop if fails.
23413 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23415 * mini.c: set the timeout to 2s when calling mono_domain_finalize.
23417 2004-03-31 Zoltan Varga <vargaz@freemail.hu>
23419 * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
23421 * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
23423 * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
23426 * basic-long.cs: Add test for negation of Int64.MinValue.
23428 2004-03-30 Zoltan Varga <vargaz@freemail.hu>
23430 * mini-sparc.c: Update status.
23432 * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
23434 * exceptions-sparc.c: Fix return value in filters.
23436 * inssel-sparc.brg: Fix register allocation in some rules.
23438 2004-03-28 Martin Baulig <martin@ximian.com>
23440 * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
23443 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
23445 * mini-x86.c (mono_arch_patch_code): Fix warnings.
23447 * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if
23448 dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
23449 remove unused conv_u4 opcode.
23451 * mini-x86.c: Remove valgrind workaround since it slows down things
23452 even when mono is not run under valgrind.
23454 2004-03-26 Zoltan Varga <vargaz@freemail.hu>
23456 * mini-sparc.c: Update status.
23458 * inssel-sparc.brg: Add some optimizations.
23460 * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
23461 future delay slot filling. Add support for varargs, tail calls and JMP.
23463 * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of
23464 CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
23466 * inssel.brg: Fix register allocation in OP_ARGLIST.
23468 * inssel.brg: Fix warnings.
23470 2004-03-25 Martin Baulig <martin@ximian.com>
23472 * mini.c (inflate_generic_field): Removed.
23473 (mini_get_method): Removed, use mono_get_method_full(),
23474 (mini_get_class): Removed, use mono_class_get_full().
23475 (mono_method_to_ir): Pass our generic context to
23476 mono_field_from_token().
23478 2004-03-25 Martin Baulig <martin@ximian.com>
23480 * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
23481 of a `MonoMethod *'.
23482 (mini_get_method): Take a `MonoGenericContext *' instead
23483 of a `MonoMethod *'.
23484 (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
23485 a new local variable called `generic_context' which holds the
23486 current `MonoGenericContext *'; use it to lookup things.
23488 2004-03-24 Martin Baulig <martin@ximian.com>
23490 * mini.c (mini_get_class): New static method; if we're inside a
23491 generic instance, inflate the class if neccessary.
23492 (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
23494 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
23496 * iltests.il: New regression test for #55976.
23498 * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
23501 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
23503 * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
23506 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
23508 * liveness.c: Consider SSA stores as well as loads when making vars
23511 * exceptions.cs: New regression tests for register allocation.
23513 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
23515 * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
23516 * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
23517 domain lock only to protect puntual access to data structures.
23518 Added access lock for sighash, jit_icall_hash_name,
23519 jit_icall_hash_addr and domain->code_mp.
23521 2004-03-20 Zoltan Varga <vargaz@freemail.hu>
23523 * driver.c: Print SIGSEGV handling method.
23525 * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
23527 * mini.c (setup_jit_tls_data): Handle case when this is called
23528 multiple times for a thread.
23530 * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx
23531 is different from fbxx_un. Fixes #54303. Also use constants instead of
23532 magic numbers in a lot of places.
23534 2004-03-19 Zoltan Varga <vargaz@freemail.hu>
23536 * exceptions.cs: Fix cctor test when --regression is used.
23538 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
23540 * mini-ppc.c, exceptions-ppc.c: basic exceptions support
23543 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
23545 * inssel-ppc.brg: fixed register assignments for some rules.
23547 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
23549 * exceptions.cs: Add test for exceptions in static constructors.
23551 * mini.c (mono_jit_compile_method_with_out): Move the calling of
23552 static constructors outside the domain lock. Fixes #55720.
23554 2004-03-17 Martin Baulig <martin@ximian.com>
23556 * mini.c (get_generic_field_inst): Removed, this'll never happen.
23557 (inflate_generic_field): Take the `MonoMethod *' instead of the
23558 `MonoClass *' and added support for generic method.
23559 (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
23560 have a `field->parent->gen_params', only inflate the field if it's
23561 an open constructed type.
23563 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
23565 * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
23566 exception object instead of the preconstructed ones.
23568 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23570 * mini.c: reverted changed to sigsegv_signal_handler commited
23571 accidentally in the previous patch.
23573 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23576 (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
23577 running --aot with an old assembly.
23579 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
23581 * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
23584 * mini-sparc.c: Add support for v9 branches with prediction.
23586 2004-03-15 Bernie Solomon <bernard@ugsolutions.com>
23588 * mini.c (mini_init): #warning is GNUC only
23590 * mini-sparc.h: implement __builtin_frame_address
23591 and __builtin_return_address for Sun C compiler
23593 2004-03-15 Zoltan Varga <vargaz@freemail.hu>
23595 * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
23597 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
23599 * basic-calls.cs: Add test for unaligned byref long argument passing.
23601 * mini-ops.h: Add sparcv9 compare and branch instructions.
23603 * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
23604 v9 instructions if we have a v9 cpu.
23606 * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
23607 registers for global allocation.
23609 * exceptions-sparc.c: Fixes.
23611 2004-03-11 Zoltan Varga <vargaz@freemail.hu>
23613 * liveness.c (mono_analyze_liveness): Optimized version.
23615 * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
23617 * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
23620 * basic-float.cs basic-calls.cs: New regression tests.
23622 2004-03-10 Zoltan Varga <vargaz@freemail.hu>
23624 * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
23625 sigaltstack implementation.
23627 * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
23629 * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
23630 stuff if SIGSEGV_ON_ALTSTACK is not defined.
23632 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
23634 * mini.c: Fix warnings.
23636 * mini.c (mono_resolve_patch_target): New function which contains the
23637 arch independent part of the patching process.
23639 * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
23640 patching code to a separate function.
23642 2004-03-09 Bernie Solomon <bernard@ugsolutions.com>
23644 * mini.c (add_signal_handler): ifdef out on Windows
23646 2004-03-08 Zoltan Varga <vargaz@freemail.hu>
23648 * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c
23649 cpu-sparc.md: Add exception handling support + other fixes.
23651 * driver.c: Print --help output to stdout. Fixes #55261. Also fix
23652 typed GC detection in --version.
23654 * basic.cs exceptions.cs: New regression tests.
23656 * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
23657 the arch specific code can store data during a compilation.
23659 * mini-ops.h: Add OP_SETFRET.
23661 * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
23662 function, register a separate icall for each arity, so the icalls can
23665 * mini.c (mono_print_tree): Print negative offsets in a more readable
23668 * mini.c: Make signal handling work on sparc.
23670 * mini.c (mini_init): Add emulation for lconv_to_r8_un.
23672 * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
23674 * jit-icalls.c: Emulate truncl by aintl on solaris.
23676 * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
23678 2004-03-05 Zoltan Varga <vargaz@freemail.hu>
23680 * mini.c (mini_init): fconv_to_ovf can raise exceptions.
23682 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
23684 * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
23685 a MarshalByRef type, inline a method that performs the check, taking into
23686 account that the object can be a proxy. Also implemented tow new opcodes:
23687 CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
23688 * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and
23689 OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
23691 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
23693 * mini-ppc.c: if a relative branch displacement is too big
23694 but it points to and area reachable with an absolute branch,
23697 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
23699 * mini.c: optimize small copies in cpblk.
23701 2004-03-01 Zoltan Varga <vargaz@freemail.hu>
23703 * basic-calls.cs basic-float.cs: New regression tests.
23705 * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at
23706 negative offsets from %fp. Implement localloc. Fix local register
23707 allocation. Fix the case when the this argument needs to be saved to
23708 the stack. Implement some missing opcodes.
23710 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
23712 * mini.c (mini_method_compile): Reenable global regalloc in methods
23713 with exception handlers.
23715 * linear-scan.c (mono_varlist_sort): Fix warning.
23717 * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
23719 * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
23722 * liveness.c: Make all variables uses in exception clauses volatile, to
23723 prevent them from being allocated to registers. Fixes #42136.
23725 2004-02-25 Zoltan Varga <vargaz@freemail.hu>
23727 * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
23728 causes regressions.
23730 * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
23731 argument to mono_arch_regalloc_cost.
23733 * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs
23736 2004-02-24 Zoltan Varga <vargaz@freemail.hu>
23738 * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c:
23739 Make the cost of allocating a variable to a register arch dependent.
23741 * basic-calls.cs: Fix compilation of tests.
23743 * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
23744 helper function to cut back on the number of #ifdefs needed.
23746 * mini-ppc.c: Fix compilation.
23748 * basic-calls.cs: New regression tests.
23750 * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
23752 * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
23753 of l0 since that is callee saved.
23755 * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
23758 * mini-sparc.c: Ongoing work + flag virtual calls with a special kind
23759 of delay instruction.
23761 * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
23763 * mini.h (MonoCallInst): Add 'virtual' flag.
23765 * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
23767 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
23769 * *.cs: New regression tests.
23771 * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc
23774 * mini.c (mono_runtime_install_handlers): Fix build.
23776 * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
23777 'signal_stack_size' members.
23779 * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an
23780 alternate signal stack.
23782 * exceptions-x86.c: Add stack overflow handling.
23784 * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing
23785 functions to arch independent code.
23787 * mini.c (mono_print_tree): Print more detailed info for load_membase
23790 2004-02-23 Martin Baulig <martin@ximian.com>
23792 * mini.c (mini_get_method): Set `gmethod->generic_inst'.
23794 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
23796 * mini-x86.c: fixed reg allocation for div/rem.
23798 2004-02-22 Miguel de Icaza <miguel@ximian.com>
23800 * driver.c (mono_main): Report some configuratio options on --version.
23802 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
23804 * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
23805 low in the address space. Correctly flush memory in thunks where we
23806 output native code.
23808 2004-02-20 Martin Baulig <martin@ximian.com>
23810 * mini.c (mini_get_method): New static method; inflate all generic
23811 methods and methods in open generic instances.
23812 (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
23813 (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
23815 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
23817 * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
23819 * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
23821 2004-02-19 Bernie Solomon <bernard@ugsolutions.com>
23823 * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
23825 * mini-sparc.c (flushi mono_arch_output_basic_block): make
23826 it compile using Sun's compiler.
23828 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
23830 * 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.
23832 * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
23834 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
23836 * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
23838 * mini-ppc.c: handle calls outside of the allowed range with thunks
23839 allocated using the code manager.
23840 * tramp-ppc.c: use the code manager to hold generated native code.
23841 Fixed the magic trampoline to just patch vtable entries.
23843 2004-02-17 Zoltan Varga <vargaz@freemail.hu>
23845 * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
23848 2004-02-16 Zoltan Varga <vargaz@freemail.hu>
23850 * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
23853 * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
23854 if we have a working __thread implementation.
23856 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove
23857 OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
23859 2004-02-15 Zoltan Varga <vargaz@freemail.hu>
23861 * mini-x86.c: Fix compilation under gcc 2.
23863 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
23865 * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
23866 contains a call to the wrapped function.
23868 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add
23869 OP_<CALL>_IMM opcodes, and use them under X86.
23871 * mini.c (mono_jit_find_compiled_method): Fix warning.
23873 * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
23875 * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
23877 * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
23878 functionality to mini.c.
23880 * mini.c (mono_create_jump_trampoline): New function to create a jump
23881 trampoline. Return a compiled method instead of a trampoline if it
23882 exists. Add a cache for jump trampolines.
23884 * mini.c (mono_jit_find_compiled_method): New function to return a
23885 compiled method if it exists.
23887 * mini-x86.c: Call mono_create_jump_trampoline instead of
23888 mono_arch_create_jit_trampoline.
23890 * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
23891 a jump trampoline. Fixes #52092.
23893 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
23895 * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
23896 which is not up-to-date. Add check_corlib_version () instead.
23898 * mini.c (mini_init): Call mono_thread_attach () so embedders do not
23901 * mini.c (mono_runtime_install_handlers): Remove check for valgrind
23902 since newer valgrind versions do not need it.
23904 * mini.c (mono_jit_compile_method_with_opt): New helper function to
23905 compile a method with a given set of optimizations.
23907 * mini.c: Compile icall wrappers on-demand instead of at startup.
23909 * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
23910 wrapper for an icall.
23912 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
23914 * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
23917 * iltests.il: Add test for non-empty stack before switch instruction.
23919 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
23921 * mini.c: Add support for new stringbuilder marshalling conventions.
23923 * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
23925 2004-02-01 Martin Baulig <martin@ximian.com>
23927 * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
23928 in `ginst->mtype_argv'.
23930 2004-01-31 Miguel de Icaza <miguel@ximian.com>
23932 * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
23933 facilitate grepping.
23935 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
23937 * mini.c: fixed buglet in initobj generic implementation for references.
23939 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
23941 * Makefile.am: make the version script conditional.
23942 * jit-icalls.c: handle missing truncl().
23944 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
23946 * exceptions.cs: Add more tests for double->int conversion.
23948 * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
23949 we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
23951 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
23953 * driver.c: make --verbose --version emit an error
23954 if the loaded corlib doesn't match the runtime version.
23956 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
23958 * mini-ppc.h: export ppc_patch().
23959 * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
23960 * tramp-ppc.c: call convention fixes: Linux/PPC support should be
23961 on par or better than on MacOSX.
23963 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
23965 * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
23966 mono_lookup_pinvoke_call.
23968 * mini-x86.c: Under windows, the default pinvoke calling convention is
23969 stdcall. Fixes #52834.
23971 * mini.c (optimize_branches): Add an upper bound to the number of
23972 iterations to prevent infinite loops on strange loops. Fixes #53003.
23974 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
23976 * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
23977 and ISINST. Fixes #52093.
23979 * objects.cs (test_0_vector_array_cast): New tests.
23981 2004-01-15 Zoltan Varga <vargaz@freemail.hu>
23983 * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
23984 checking in Array.Set ().
23986 * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
23989 * object.cs (test_0_multi_array_cast): New regression test.
23991 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
23993 * exceptions-ppc.c: fix build on Linux/PPC.
23995 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
23997 * tramp-x86.c (x86_magic_trampoline): Disable code patching when
23998 running under valgrind.
23999 (x86_magic_trampoline): Fix build bustage.
24001 * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
24002 negative values as well. This is needed for the encoding of the line number
24003 info, since sometimes the line numbers are not in increasing order.
24005 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
24007 * cpu-pentium.md (localloc): Increase the size of the localloc
24008 instruction since it is a loop under Win32.
24010 * debug-mini.c (record_line_number): Get rid of unneccesary memory
24013 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
24015 * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c
24016 tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from
24017 Max Horn (max@quendi.de). Fix file names in comments.
24019 2004-01-03 Zoltan Varga <vargaz@freemail.hu>
24021 * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
24022 avoid stack overflow.
24023 (replace_usage): Avoid uninitialized variable warnings.
24025 * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
24026 and taking the address of valuetype variables.
24028 2004-01-03 Patrik Torstensson
24030 * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
24031 for other purposes than FP later on.
24033 2004-01-02 Zoltan Varga <vargaz@freemail.hu>
24035 * mini.c (mono_method_to_ir): Prevent register allocation for arguments
24038 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
24040 * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
24042 2003-12-30 Patrik Torstensson <p@rxc.se>
24044 * mini-x86.h: Decreased number of availiable fp regs.
24045 Solves corner cases with FP spilling.
24047 2003-12-23 Patrik Torstensson <p@rxc.se>
24049 * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
24050 for floating point stack tracking / spilling on x86.
24053 * basic-float.cs: added float mul overflow test.
24055 2003-12-23 Zoltan Varga <vargaz@freemail.hu>
24057 * mini.c (mono_method_to_ir): Add workaround for bug #51126.
24059 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
24061 * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
24062 supports for cond branches that overflow the immediate
24063 overflow offset. mcs can compile simple programs.
24065 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
24067 * exceptions-ppc.c: exception handling support wip:
24068 finally handlers get run on exception.
24070 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
24072 * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while
24075 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
24077 * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
24078 initial support for stack walking and unwinding.
24080 2003-12-18 Zoltan Varga <vargaz@freemail.hu>
24082 * driver.c (mono_main): Make corlib-out-of-sync message more
24083 descriptive. Also remove verify_corlib call.
24085 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
24087 * mini.c: make CEE_NEWARR calls and other emulated opcodes
24088 not overlap with other call's arguments, too.
24090 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
24092 * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c:
24093 move to arch-specific code the choice of arch-specific
24094 intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
24095 * mini.c: ensure emulation calls will not interleave
24098 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
24100 * tramp-ppc.c, basic-calls.cs: rework trampolines so that
24101 the magic trampoline stack frame is dropped before executing
24104 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
24106 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
24107 and integer to fp conversions. Added support for overflowing
24108 arguments on the stack. Reserve a couple more registers as temps.
24109 Added support for aot compilation (as output still needs to be
24112 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
24114 * mini-ppc.c, basic-long.cs: fix jumps to known labels.
24115 Don't overwrite return register in some corner cases.
24117 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
24119 * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
24120 static constructors when AOT compiling.
24122 * driver.c (mono_main): Call mono_check_corlib_version.
24124 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
24126 * cpu-g4.md, basic.cs: fixed div target register.
24128 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
24130 * mini-ppc.c, basic.cs: shl_imm fix with test.
24132 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
24134 * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing
24135 structures by value. Misc fixes.
24136 * objects.cs: more tests.
24138 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
24140 * mini-ppc.c: lconv.ovf.i implemented.
24142 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24145 (mini_init): don't error out if someone already called g_thread_init.
24147 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
24149 * exceptions-x86.c, exceptions-ppc.c: allow the exception object
24150 to be any type per the spec. Fix abnormal memory usage when
24151 the same object is repeatedly thrown.
24153 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
24155 * mini.c: check for overruns in IL code.
24157 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
24159 * TODO: Add/remove some todo entries.
24161 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
24163 * driver.c (mono_main): Call mono_verify_corlib.
24165 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
24167 * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy.
24168 This has been moved to mini.c
24169 * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
24170 type being casted is marshalbyref it could be a proxy, so instead of
24171 emitting the type check code, emit a call to a runtime method that will
24172 perform the check by calling CanCastTo if needed.
24174 2003-12-06 Zoltan Varga <vargaz@freemail.hu>
24176 * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
24177 methods with large stack frames under Win32.
24179 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
24181 * Makefile.am: Distribute regression tests.
24183 * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
24184 at the end instead of inserting each variable into the sorted list.
24186 * linear-scan.c (mono_varlist_sort): New helper function.
24188 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
24190 * mini.c: ensure arguments and locals are within bounds.
24192 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
24194 * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and
24197 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
24199 * mini.c (mono_cprop_copy_values): Fix crash.
24201 * aot.c: Set verbosity back to 0.
24203 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
24205 * regalloc.c: complete memory leak fix by Laurent Morichetti
24208 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
24210 * driver.c (main_thread_handler): Revert the previous patch.
24212 * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
24215 * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
24216 memory from the memory pool.
24218 * driver.c (main_thread_handler): Turn on all optimizations when
24221 * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
24222 an array for better performance.
24224 * regalloc.c (mono_regstate_assign): Fix memory leak.
24226 * debug-mini.c (mono_debug_serialize_debug_info): New function to
24227 serialize the debug info.
24229 * debug-mini.c (mono_debug_add_aot_method): New function to load the
24230 debug info from the serialized representation.
24232 * aot.c: Save debug info into the generated file and load it when
24235 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
24237 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
24239 * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
24240 More FP-related fixes.
24242 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
24244 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
24245 and register allocation buglet. Hello world now runs.
24247 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
24249 * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
24250 * tramp-ppc.c: fixed class init trampoline.
24251 * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
24253 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
24255 * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
24256 mini.c: more ppc changes/fixes.
24258 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
24260 * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
24261 Also optimize the case when the arguments are the same in the caller
24264 * iltests.il: Add tests for tail calls with valuetype arguments.
24266 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
24268 * mini-ppc.c: fixes for struct return type.
24270 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
24272 * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move
24273 mono_spillvar_offset() to arch-specific code.
24275 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
24277 * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
24279 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
24281 * exceptions-x86.c: Fix stack space leaks.
24283 * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
24284 registers from the lmf if the method has save_lmf set.
24286 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
24288 * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
24289 of icall wrappers into InvokeInDomain, since these are now per-domain.
24291 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
24293 * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
24294 make some opcode emulation and intrinsic ops enabled/disabled
24295 according to the architecture. More fixes.
24297 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
24299 * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
24301 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
24303 * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
24304 arch-specific handling for 'this' and struct return type to
24305 arch-specific code.
24307 2003-11-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24309 * aot.c: prevent divide by zero error when reporting (it happened with
24310 Accessibility.dll).
24312 2003-11-25 Zoltan Varga <vargaz@freemail.hu>
24314 * mini.h (inst_switch): Remove unused macro.
24316 2003-11-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24319 (load_aot_module): free 'info->methods' and 'info' properly. No more
24320 "free(): invalid pointer blah" messages when you have an old aot
24323 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
24325 * jit-icalls.c, mini.c: Added support for context static fields.
24327 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
24329 * mini.c (mono_method_blittable): Methods which set LastError are not
24330 blittable either. Fixes #51108.
24332 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
24334 * mini.c: flush icache.
24335 * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
24337 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
24339 * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
24341 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
24343 * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
24346 * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with
24349 * inssel.brg (CEE_MKREFANY): Fix AOT case.
24351 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
24353 * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div
24354 instruction when the result is discarded.
24356 * iltests.il (test_0_div_regalloc): New regression test.
24358 * arrays.cs: Fix compilation error.
24360 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
24362 * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
24363 float rules to inssel-x86.brg: sane architectures with FP registers
24364 don't need to implement these rules.
24366 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
24368 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
24370 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
24372 * mini.h, inssel-long32.brg: fixed endianess issues in int64
24373 implementation of 32 bit systems.
24375 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
24377 * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
24378 (Jeroen Zwartepoorte).
24380 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
24382 * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
24383 the caller and the callee matches.
24385 * mini.c (mono_method_to_ir): Add comment.
24387 * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
24388 signbit is missing on some platforms.
24390 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
24392 * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
24394 * mini.c (setup_jit_tls_data): Call the new function.
24396 * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
24398 * mini-x86.c: Add experimental support for fast access to the lmf
24399 structure under NPTL/Linux 2.6.x.
24401 2003-11-06 Martin Baulig <martin@ximian.com>
24403 * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
24404 `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
24407 2003-11-02 Martin Baulig <martin@ximian.com>
24409 * mini.c (inflate_generic_field): New static method.
24410 (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
24411 generic instance and the field is declared in a generic type, call
24412 inflate_generic_field() to inflate it. Fixes gen-28.cs.
24414 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
24416 * mini.h mini.c (mono_method_same_domain): New function to return
24417 whenever the caller and the callee are in the same domain.
24419 * tramp-x86.c (x86_magic_trampoline): Use the new function.
24421 2003-10-30 Martin Baulig <martin@ximian.com>
24423 * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
24424 similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
24426 (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
24427 MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS().
24429 2003-10-29 Zoltan Varga <vargaz@freemail.hu>
24431 * mini.c mini-ops.h inssel.brg: Implement undeniable exception
24434 * mini.c (sigusr1_signal_handler): Move creation of the thread abort
24435 object here, so it is in the correct appdomain etc.
24437 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
24439 * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
24441 (mono_method_to_ir): Avoid freeing the type created returned from
24442 mono_type_create_from_typespec, since it is put into an internal cache
24443 by the function. Fixes pointer.exe.
24445 * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal
24446 trampolines for icalls and pinvokes as well. Fixes #33569.
24448 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
24450 * mini.c: Update after appdomain changes.
24452 * mini.c (mono_jit_compile_method_inner): Allways compile native
24453 method wrappers in the root domain, since there can only be one
24454 instance of them, whose address is stored in method->info.
24456 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
24458 * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
24459 environment variable. Instead detect automatically whenever running
24460 under valgrind using the magic macro RUNNING_ON_VALGRIND from
24463 2003-10-16 Miguel de Icaza <miguel@ximian.com>
24465 * trace.c, trace.h: New files that implement the new trace option
24468 * driver.c: Document new --trace options.
24470 * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
24473 - if (mono_jit_trace_calls)
24474 + if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
24476 * mini.h: prototypes.
24478 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
24480 * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
24482 * mini.c inssel.brg: Implement typedefbyref opcodes.
24484 * mini.c (mono_jit_compile_method): Remove unused local variable.
24486 * mini.c (mono_jit_compile_method_inner): Ditto.
24488 2003-10-12 Zoltan Varga <vargaz@freemail.hu>
24490 * tramp-x86.c (x86_class_init_trampoline): Fix build.
24492 * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
24494 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
24496 * mini.c (mono_no_aot): Remove unused global variable.
24498 * mini.c: Thread safety fixes.
24500 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
24502 * mini.c (mono_create_class_init_trampoline): Add a lock around
24503 class_init_hash_addr.
24505 * arrays.cs (test_0_newarr_emulation): Add new regression test for
24508 * mini.c: Decompose the NEWARR instruction before decomposing its
24509 arguments. Fixes #30073.
24511 2003-10-08 Zoltan Varga <vargaz@freemail.hu>
24513 * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
24516 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
24518 * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
24520 * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
24522 * driver.c: Add support for compiling icall wrappers to --compile.
24524 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
24526 * inssel.brg: The empty value in class->interface_offsets is -1, not
24529 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
24531 * objects.cs: New test for 'is' operator on an array of interfaces.
24533 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
24535 * tramp-ppc.c: update trampoline code to support jumps
24536 and class initialization.
24538 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
24540 * mini.c (mono_jit_compile_method): Fix reading of freed memory.
24542 * inssel.brg (OP_UNBOXCAST): Fix #46027.
24544 * inssel.brg (OP_UNBOX): Remove unused rule.
24546 * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
24547 region instead of one for each method. Fixes #47813.
24549 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
24551 * exceptions.cs (test_0_nested_finally): New regression test for
24552 nested exception handlers.
24554 * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
24556 * mini.c (mono_method_to_ir): Avoid inlining tail calls.
24558 * mini.c (mono_method_to_ir): Fix tail recursion in the presence of
24561 * mini.c (mono_method_check_inlining): Make the inlining limit
24562 configurable by an environment variable.
24564 * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
24566 * mini.h: Bump AOT file version.
24568 * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a
24569 token, store the image along with the token, since the token might not
24570 refer to the same image as the method containing the relocation,
24571 because of inlining.
24573 2003-09-27 Zoltan Varga <vargaz@freemail.hu>
24575 * mini.c (mono_precompile_assemblies): New function to compile
24576 all methods in all loaded assemblies.
24578 * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
24580 * regalloc.h regalloc.c (MonoRegState): Change the type of
24581 iassign and fassign to int*, since they can contain large negative
24582 values if the register is spilled. Also added some comments. Fixes
24585 * exceptions-x86.c (seh_handler): Fix handling of system exceptions
24586 under Win32. Fixes #42964.
24588 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
24590 * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
24592 * aot.c: Added support for AOT compiling methods which contain calls
24593 to wrappers. Currently, only remoting-invoke-with-check wrappers are
24596 * driver.c (compile_all_methods): Run the compilation in a thread
24597 managed by mono. Fixes #44023.
24599 * mini.c (mono_codegen): Print full method name in verbose output.
24601 * mini-x86.c (mono_arch_patch_code): Fix warning.
24603 * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
24604 jumps, since the method we are jumping to might be domain-specific.
24606 * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
24608 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
24610 * inssel.brg: string chars are unsigned.
24612 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
24614 * TODO: New todo item.
24616 * tramp-x86.c (x86_class_init_trampoline): New trampoline function
24617 which calls mono_runtime_class_init and patches the call site to
24618 avoid further calls.
24619 (mono_arch_create_class_init_trampoline): New arch specific function
24620 to create a class init trampoline.
24621 (create_trampoline_code): Generalized so it can create
24622 class init trampolines as well.
24624 * mini.c (helper_sig_class_init_trampoline): New helper variable.
24625 (mono_create_class_init_trampoline): New function to create and cache
24626 class init trampolines.
24627 (mono_find_class_init_trampoline_by_addr): New function to lookup the
24628 vtable given the address of a class init trampoline. Used by the
24630 (mono_codegen): Generate a call to a trampoline instead of
24631 mono_runtime_class_init in LDSFLD[A].
24632 (mono_codegen): Add relocations for the new trampoline.
24634 * mini.h mini-x86.c aot.c: Added a new relocation type:
24635 MONO_PATCH_INFO_CLASS_INIT.
24637 * mini.h: Bump AOT version number.
24639 * aot.c: Create a copy of the loaded code instead of using the original
24640 so methods which call each other will be close in memory, improving
24643 * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
24644 patch since it breaks the regression tests.
24646 * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
24647 for the register saving instruction sequence since the
24648 frame_state_for function in glibc 2.3.2 don't seem to detect it.
24650 2003-09-14 Zoltan Varga <vargaz@freemail.hu>
24652 * TODO: Fix todo item && remove another.
24654 2003-09-12 Zoltan Varga <vargaz@freemail.hu>
24656 * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
24659 * aot.c: Moved the check for MONO_LASTAOT into the initialization
24660 function of the module.
24662 * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
24663 turning on/off the usage of AOT code. Got rid of mono_no_aot and the
24664 --no-aot command line option.
24666 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
24668 * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
24669 by Bernie Solomon (bernard@ugsolutions.com).
24671 * inssel.brg: Refactor the interface offset table related code into
24672 its separate functions and add support for the AOT case.
24674 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
24676 * aot.c (mono_aot_get_method_inner): Fix memory leak.
24678 * aot.c: Added mono_aot_verbose variable and made all debugging
24679 output depend on the value of this variable.
24681 * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
24682 method_label and info_label.
24684 * mini.h mini-x86.c aot.c: Added a new relocation type
24685 MONO_PATCH_INFO_IID for klass->interface_id.
24687 * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
24688 the MonoJitInfo structure.
24690 * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
24691 a non-root appdomain in shared mode.
24693 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
24695 * aot.c: make aot loader less verbose. Remove free of unused variable.
24697 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
24699 * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
24701 * .cvsignore: Added *.dll.
24703 * mini.c (mono_print_tree_nl): New function callable while debugging.
24705 * mini.c (mono_print_code): Export this.
24707 * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
24710 2003-09-05 Zoltan Varga <vargaz@freemail.hu>
24712 * mini.h (MonoCompile): Added 'jit_info' field.
24714 * mini.c (mini_method_compile): Save the generated MonoJitInfo into
24715 the cfg structure, since it is needed by the AOT compiler.
24717 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
24719 * aot.c: A major rewrite. Changes include:
24720 - save exception tables for methods which have them.
24721 - cache failed lookups in aot_get_method () to avoid the (slow) calls
24722 to g_module_symbol.
24723 - reworked the file format so it is now much smaller and needs
24724 fewer relocation entries.
24726 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
24728 * aot.c (load_aot_module): Fix build bustage on platforms without
24731 2003-09-04 Martin Baulig <martin@ximian.com>
24733 * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
24735 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
24737 * TODO: Some new optimization ideas.
24739 * aot.c: Move AOT module loading logic here from mono_assembly_open.
24741 * aot.c: Save the optimization flags used to compile the code into
24744 * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
24745 support emitting domain specific code.
24747 * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is
24748 no longer domain neutral. It can be made domain neutral by compiling
24749 with --optimize=shared.
24751 * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
24752 between appdomains.
24754 * driver.c mini.h mini.c: New --no-aot debugging option which disables
24755 loading of AOT code.
24757 * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
24759 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
24760 if there is no domain neutrality information.
24762 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
24764 * aot.c (mono_compile_assembly): Emit a symbol containing the file
24765 format version into the generated library.
24767 * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
24768 callee method into the caller since one of them could be shared.
24770 * mini.h mini-x86.c aot.c: Added two new relocations so throwing
24771 system exceptions from AOT code now works.
24773 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling
24774 method if it is domain neutral and the callee is not.
24776 * graph.c (cfg_emit_one_loop_level): Fix warning.
24778 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
24780 * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
24783 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
24785 * mini.c (mini_init): Call mono_marshal_init () explicitly since it
24786 is needed by code which is executed before mono_runtime_init ().
24787 Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
24789 * mini.c (mono_thread_abort): Fix warning.
24790 (mono_jit_compile_method): Call static constructor in the AOT case too.
24792 * aot.c (mono_compile_assembly): Fix warning.
24794 2003-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24796 * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
24798 2003-08-28 Zoltan Varga <vargaz@freemail.hu>
24800 * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
24802 * cpu-pentium.md: Fix the length of call opcodes so they include the
24803 ESP restoring instruction. Fixes #47968.
24805 2003-08-28 Martin Baulig <martin@ximian.com>
24807 * mini-x86.c (mono_arch_call_opcode): Added support for
24808 MONO_TYPE_GENERICINST.
24810 * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.
24812 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
24814 * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
24815 a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
24817 * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
24820 2003-08-26 Martin Baulig <martin@ximian.com>
24822 * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
24823 when reporting an error, set this to the actual error location.
24824 (mono_method_to_ir): Report the correct error location if
24825 get_basic_blocks() returned an error.
24827 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
24829 * mini.c (mono_type_blittable): OBJECT is not blittable.
24830 (mono_method_blittable): Methods which have marshalling descriptors
24831 are not blittable either. Fixes #47842.
24833 2003-08-22 Zoltan Varga <vargaz@freemail.hu>
24835 * driver.c mini.c: Use an environment variable instead of a global
24836 variable. Also fix the build.
24838 * mini.c (mini_init): Call g_thread_init () to make glib thread-safe.
24839 Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
24842 * driver.c mini.c: Added --with-valgrind option to turn off some
24843 code which prevents mono from running under valgrind.
24845 * mini.c (mono_emit_call_args): Fixed warning.
24847 * mini.c (mono_emulate_opcode): Fixed warning.
24849 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24851 * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
24852 * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
24853 regalloc.c, regalloc.h: specify available registers in arch-specific
24854 code and support floats in the regallocator (patch by Laurent Morichetti
24857 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
24859 * mini.c: mono_thread_current() can be called only after
24860 mono_runtime_init(): rearrange code to not call it early on.
24862 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
24864 * mini.c: allocate jump tables in the code mempools.
24866 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
24868 * mini.c, mini.h: make sure per-thread data allocated by the jit is
24871 2003-08-10 Miguel de Icaza <miguel@ximian.com>
24873 * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
24874 12 to 16. This fixes bug #47453.
24877 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
24879 * mini-ppc.c: fixed indexed load and unsigned compares.
24881 2003-08-06 Lluis Sanchez Gual <lluis@ximian.com>
24883 * mini.c: reenabled installation of handler for
24884 thread abort signal.
24886 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24888 * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
24889 by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
24890 until it's fixed and actually useful.
24892 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
24894 * inssel-long32.brg: couple more opcodes implemented.
24896 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
24898 * mini-sparc.c: Even more opcodes implemeted.
24900 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
24902 * mini-sparc.c: More opcodes implemented.
24904 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
24906 * mini-sparc.c: More opcodes implemented.
24908 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
24910 * inssel-sparc.brg: Add some needed rules. Direct
24912 * Makefile.am: Use inssel-sparc.brg
24913 * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
24914 an assert happy for now.
24916 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
24918 * mini-sparc.c: Fixed compile errors.
24919 * exceptions-sparc.c: Same. We now produce a mono binary
24920 on sparc-linux. Yea.
24922 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
24924 * mini-sparc.c: Renamed registers. Also some macro cleanups.
24925 * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
24926 They compile, but do not work.
24928 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24930 * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
24931 mini-sparc.h, tramp-sparc.c: Beginning of sparc support
24932 from Mark Crichton <crichton@gimp.org> and Christopher Taylor
24935 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24937 * mini.c: more opcodes implemented and better support for generics.
24939 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
24941 * cpu-g4.md, cpu-pentium.md: updates for new instructions.
24942 * mini.c, mini.h: first cut at generics support: some new instructions
24943 added and changed the behaviour of some of the existing ones.
24945 2003-07-21 Miguel de Icaza <miguel@ximian.com>
24947 * mini.c: Removed definition of metadata_shared mutex here.
24949 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
24951 * mini-x86.c: make vararg calls work for instance methods.
24953 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
24955 * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
24956 returns the arguments in a separte list, now.
24958 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
24960 * aot.c, mini.c: updates for array type representation changes.
24962 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
24964 * mini.c: register function to perform jit shutdown.
24966 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24968 * mini.c: use a faster allocator if possible.
24970 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
24972 * aot.c: some cleanups and portability changes.
24974 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
24976 * mini.c: use faster allocation for CEE_BOX if possible.
24978 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
24980 * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
24981 Moved inlined mempcy code to its own function so that is can be
24982 reused. Added an inline memset function as well (optimized initobj).
24983 * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
24985 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
24987 * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
24989 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
24991 * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
24992 arch code can setup the cpu for CLR execution, if needed.
24993 We use it on x86 to set the precision of FP operations.
24995 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
24997 * mini.c: disable some optimizations if we can guess they'll cost too
24998 much for a given method.
25000 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
25002 * mini.h mini.c: Rework last patch based on suggestions by Paolo.
25004 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
25005 * mini.h mini.c mini-x86.c: Added instruction level coverage
25006 info collection support.
25008 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
25010 * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
25011 is now implemented in the profiling API. Get rid of a couple of
25012 unnecessary global variables.
25014 2003-06-15 Nick Drochak <ndrochak@gol.com>
25016 * basic-long.cs: tests for negative values for bigmul, and unsigned.
25017 * cpu-g4.md: add op_bigmul and op_bigmul_un
25018 * cpu_pentium.md: add op_bigmul_un
25019 * inssel-long32.brg: add rule for unsigned bigmul
25020 * mini-ops.h: define OP_BIGMUL_UN
25021 * mini-x86.c: THE BUG: handle (un)signed properly
25022 * mini.c: choose unsigned opcode if needed.
25023 This set of patches fixes bug #44291
25025 2003-06-13 Dietmar Maurer <dietmar@ximian.com>
25027 * mini.c (optimize_branches): improved to handle all kinds of
25028 conditional branches.
25030 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
25032 * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
25033 don't raise exceptions.
25035 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
25037 * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
25038 to arch-specific files.
25040 2003-06-09 Martin Baulig <martin@ximian.com>
25042 * Makefile.am (libs): Added $(LIBGC_LIBS).
25044 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
25046 * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
25047 and OP_ATAN (fixes bug#44293).
25049 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
25051 * Makefile.am, mini-x86.c: rename cpu description array to
25052 pentium_desc, since some compilers define the 'pentium' preprocessor
25055 2003-05-28 Dietmar Maurer <dietmar@ximian.com>
25057 * mini.c (mini_select_instructions): add explicit branch if the
25058 following block is not the false target of a conditional branch -
25059 we need this with any optimization that reorder or remove bblocks
25061 * mini.c (optimize_branches): bug fixes
25063 2003-06-06 Dietmar Maurer <dietmar@ximian.com>
25065 * mini.c (mono_method_to_ir): inline static readonly fields
25067 * ssa.c (fold_tree): start cfold support for long (very simple
25070 * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
25072 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
25074 * inssel.brg: fixed memcpy (bug #44219).
25076 2003-06-05 Dick Porter <dick@ximian.com>
25078 * driver.c: Set the glib log levels to not abort if g_message
25081 g_set_prgname() has to happen before mini_init() so that the
25082 process handle gets the info.
25084 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
25086 * driver.c: add intrins to the default optimizations to get wider
25089 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
25091 * mini.h: some large basic blocks will overflow a 16-bit
25092 integers for symbolic registers.
25094 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
25096 * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
25097 (mono_arch_output_basic_block): fix bug 43499
25099 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
25101 * mini.c: kill duplicated definition of mono_debug_format.
25103 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
25105 * mini-x86.c, arrays.cs: fixed register allocation bug.
25107 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
25109 * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
25111 * mini.c (mini_get_opcode_for_method): inline IEEERemainder
25113 2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25116 (print_method_from_ip): also print source location information if
25119 2003-06-02 Dietmar Maurer <dietmar@ximian.com>
25121 * mini.c (mono_find_block_region): bug fix in region code
25122 (mini_method_compile): enable removing unreachable code again, but
25123 only in methods without exception clauses.
25125 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
25127 * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
25128 Implemented arglist opcode and handling of TypedReference type.
25129 Fixed x86 call convention when a structure is returned.
25130 Minimal support for calling static vararg methods.
25132 2003-05-30 Dietmar Maurer <dietmar@ximian.com>
25134 * mini.c (mini_method_compile): always remove unreachable code,
25135 because the code in them may be inconsistent (access to dead
25136 variables for example).
25138 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
25140 * driver.c, debug-mini.c: warning fixes.
25142 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
25144 * Makefile.am, jit.h, mini.h: install header for embedding mono.
25146 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
25148 * mini.c: thread-static fields are registered in mono_class_vtable(),
25149 so ensure the function is called before checking for them.
25151 2003-05-27 Dietmar Maurer <dietmar@ximian.com>
25153 * mini.c (optimize_branches): fix for bug 43586
25155 * jit-icalls.c (mono_llmult_ovf): added an additional check for
25156 overflow (fixes Bug #43639)
25158 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
25160 * mini.c, objects.cs: allow the use of stobj for primitive types.
25162 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
25164 * mini.c: be less strict about argument checking until we support
25165 running the verifier.
25167 2003-05-27 Nick Drochak <ndrochak@gol.com>
25169 * basic-long.cs: tests for (ulong)int * (ulong)int also
25170 * mini.c: use the same trick for (ulong)int * (ulong)int
25172 2003-05-27 Nick Drochak <ndrochak@gol.com>
25174 * basic-long.cs: add regression test for (long)int * (long)int
25175 * cpu-pentium.md: add op_bigmul specification
25176 * inssel-long32.brg: add OP_BIGMUL rule
25177 * mini-ops.h: add OP_BIGMUL
25178 * mini-x86.c: register allocator: handle case where src1 needs to be
25180 * mini.c: substitute special BIGMUL opcode in the tree for
25181 (long)int * (long)int
25183 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
25185 * jit-icalls.c: call the type ctor on field access if needed.
25187 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
25189 * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
25190 to a method (including results of ldelema, bug#43207).
25192 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
25194 * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
25195 colors to show exception handler blocks.
25197 * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
25198 (fix for pinvoke7.cs).
25200 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
25202 * mini.h, mini.c: ensure correct initialization order for types that
25203 require it. Prepare for lazy compilation of jit icall wrappers.
25204 Provide a name for opcode emulation to reduce unneeded mallocing.
25206 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
25208 * mini-x86.c: better register restoring code and profiling
25209 support for tail calls.
25211 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
25213 * mini.h, driver.c: prepare for leaf methods optimization.
25215 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
25217 * mini.c: get targets of branches before converting a method.
25219 2003-05-23 Dietmar Maurer <dietmar@ximian.com>
25221 * mini.c (optimize_branches): added some experimental code (disbaled)
25223 2003-05-22 Dietmar Maurer <dietmar@ximian.com>
25225 * mini.c (optimize_branches): fix branch to branch optimization
25227 * exceptions-x86.c (mono_arch_handle_exception): bug fix.
25229 * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
25231 * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
25233 * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
25236 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
25238 * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
25239 enable use of interface variables again.
25241 * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
25242 I1 to registers because there is no simply way to sign extend 8bit
25243 quantities in caller saved registers on x86.
25245 * inssel-float.brg: set costs of some rules to 2 so
25246 that monobure always select the arch. specific ones if supplied,
25247 regardless of the order we pass the files to monoburg.
25249 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
25251 * mini.c, mini-x86.c: since the magic trampoline for jumps
25252 can't patch the code directly, we do it as soon as the
25253 method gets compiled.
25255 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
25257 * mini-x86.c, mini.h: introduce a new patching method
25258 to support CEE_JMP and tail calls.
25259 * mini.c: obey tail.call. Don't precompile methods target
25261 * tramp-x86.c: new trampoline code to handle methods
25262 reached through a jump.
25264 2003-05-20 Dietmar Maurer <dietmar@ximian.com>
25266 * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
25267 bit values to registers
25269 2003-05-19 Dietmar Maurer <dietmar@ximian.com>
25271 * mini.c (mono_compile_get_interface_var): share interface
25272 variables if possible.
25274 2003-05-16 Martin Baulig <martin@ximian.com>
25276 * debug-mini.c (mono_init_debugger): New function to initialize
25277 the debugger. This is not in the debugger since it needs to
25278 access some of mini's internals.
25280 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
25282 * mini.c (mono_method_to_ir): inlining fixes/cleanups
25284 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
25286 * mini.c, mini-opts.h, inssel.brg: inline small memcpy
25287 for value type handling.
25289 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
25291 * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
25292 (mono_method_check_inlining): enable inlining of all kinds of wrappers
25294 2003-05-15 Lluis Sanchez Gual <lluis@ideary.com>
25296 * mini.c: fixed little bug in CEE_NEWOBJ case when calling
25297 the constructor through a proxy.
25299 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
25301 * jit-icalls.c, inssel.brg: fixes to array element address
25304 2003-05-15 Dietmar Maurer <dietmar@ximian.com>
25306 * mini-x86.c (is_regsize_var): allocate pointer to registers
25308 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
25310 * driver.c: fixed typo, added intrins to the set of optimizations
25311 tested with regressions.
25313 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
25315 * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
25316 * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
25319 2003-05-14 Dietmar Maurer <dietmar@ximian.com>
25321 * inssel.brg: remove some common pop instructions without side effects
25323 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
25325 * inssel-x86.brg: fixed thinko in int to double conversions.
25327 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
25329 * mini.c, jit-icalls.c: added runtime thread-static variable support.
25331 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
25333 * inssel-long32.brg: two more missing instructions.
25335 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
25337 * mini.c (mono_emit_call_args): set the cil_code for all arguments
25338 if not already set.
25340 2003-05-12 Zoltan Varga <vargaz@freemail.hu>
25342 * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
25345 * basic-float.cs: Added tests for negative zero.
25347 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
25349 * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
25350 a couple of missing operations for long casts, with test cases.
25352 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25354 * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
25356 2003-05-09 Dietmar Maurer <dietmar@ximian.com>
25358 * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
25359 code size estimation.
25361 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
25363 * mini.c (mono_jit_create_remoting_trampoline): make it work with
25364 abstract methods (fix bug 42542)
25366 * aot.c: add ability to handle array types
25368 2003-05-08 Zoltan Varga <vargaz@freemail.hu>
25370 * mini.c: Call the _specific versions of the object allocation
25371 functions if possible.
25373 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
25375 * driver.c: call setlocale ().
25377 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
25379 * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
25382 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
25384 * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
25386 * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
25387 wrappers (fix bug 42122)
25389 2003-05-04 Martin Baulig <martin@ximian.com>
25391 * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
25393 * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
25394 s/mini_set_defaults/mono_set_defaults/g.
25396 2003-05-04 Martin Baulig <martin@ximian.com>
25398 * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
25400 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
25402 * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
25403 (reported by Don Roberts).
25405 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
25407 * mini.c: temporarily work around two bugs for this release.
25409 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
25411 * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
25412 that contains -export-dynamic and it makes using the ld script
25414 * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
25416 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
25418 * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
25421 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
25423 * mini.c: make sure leave calls all the needed finally blocks,
25424 even when the target jumps out of multiple exception clauses.
25426 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
25428 * ldscript, Makefile.am: add linker script to reduce the number of
25429 exported symbols (should also fix the issues with libwine defining
25430 some of the same symbols in io-layer).
25432 2003-05-01 Zoltan Varga <vargaz@freemail.hu>
25434 * driver.c (mini_main): Avoid assertion when no file name is given on
25437 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
25439 * driver.c: added --version/-V command line option.
25440 Added the inline optimization in the regression tests.
25442 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
25444 * mini.c, basic-calls.cs: when inlining, save arguments to locals according
25445 to the type in the method signature (fixes bug#42134).
25447 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
25449 * mini.c: when inlining, check this is not null only when needed (bug #42135).
25451 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
25453 * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
25455 2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25457 * driver.c: fixed bug #42100.
25459 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
25461 * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
25463 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
25465 * mini.c: moved most of the code required to do inlining to its own
25466 function so it can be reused. Inline also ctors if appropriate.
25468 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
25470 * Makefile.am: Link with -export-dynamic so shared libs loaded by
25471 the runtime can call mono API functions.
25473 2003-04-27 Martin Baulig <martin@ximian.com>
25475 * debug-mini.c (mono_debug_init_method): Added
25476 `guint32 breakpoint_id' argument; if the method has a breakpoint,
25477 send a notification to the debugger.
25479 * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
25480 running in the Mono Debugger, just pass the breakpoint number to
25481 mono_debug_init_method().
25483 * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
25485 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
25487 * mini.c: allow some more unsafe compares.
25489 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
25491 * mini-x86.c, Makefile.am: make distcheck works (partially from
25492 a patch by Richard Lee <r.h.lee@attbi.com>).
25493 * regset.c, regset.h: removed, they are unused.
25495 2003-04-25 Dick Porter <dick@ximian.com>
25497 * driver.c: Usage reports the name as 'mono' not 'mini'
25498 * exceptions-x86.c: Build and run on freebsd
25500 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
25502 * Makefile.am: install the program with the 'mono' name and
25503 the library as libmono instead of mini and libmini.
25505 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
25507 * driver.c: provide the APIs for the embedding interface of the old jit.
25509 2003-04-23 Dietmar Maurer <dietmar@ximian.com>
25511 * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
25513 2003-04-23 Martin Baulig <martin@ximian.com>
25515 * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
25517 * driver.c: Added `--debug' command line argument to enable
25520 2003-04-23 Martin Baulig <martin@ximian.com>
25522 * debug.[ch]: Removed. The code is now in
25523 ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
25525 * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
25528 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
25530 * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
25532 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25535 (mini_cleanup): moved mono_runtime_cleanup call after the call to
25536 mono_domain_finalize.
25537 (mini_method_compile): use mono_method_profile* if the the option is
25540 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
25542 * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
25543 methods with their wrapper.
25545 * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
25546 methods with their wrapper.
25548 * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
25551 * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
25554 * mini.c (mono_method_check_inlining): Avoid inlining synchronized
25557 2003-04-17 Dietmar Maurer <dietmar@ximian.com>
25559 * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
25561 2003-04-16 Dietmar Maurer <dietmar@ximian.com>
25563 * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
25564 of the mempool. This is slightly faster and uses less memory
25566 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
25568 * mini.c: avoid O(n) allocation for variables.
25570 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
25572 * mini.c: handle items on the stack after inlining methods.
25574 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
25576 * mini.c: make the method->opcode optimization dependent
25577 on MONO_OPT_INSTRINS and do it lazily.
25579 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
25581 * driver.c: print overall results at the end of regression run.
25583 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
25585 * inssel.brg: don't overwrite symbolic registers.
25587 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
25589 * inssel-x86.brg: fix conversion from long to float.
25591 2003-04-11 Dietmar Maurer <dietmar@ximian.com>
25593 * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
25595 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
25597 * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
25599 * driver.c: Added --print-vtable option as in the old JIT.
25601 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
25603 * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
25605 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
25607 * inssel.brg, basic.cs: fixed checked conversions to byte and short.
25609 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
25611 * mini.c regalloc.c regalloc.h: Fix memory leak.
25613 2003-04-09 Dietmar Maurer <dietmar@ximian.com>
25615 * aot.c (mono_aot_get_method): register all used strings
25617 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
25619 * mini.c: always intern strings references with ldstr at compile time.
25621 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
25623 * Makefile.am: add BUILT_SOURCES.
25625 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
25627 * driver.c: give a better error message when the assembly to execute
25628 doesn't have an entry point.
25630 2003-04-07 Dietmar Maurer <dietmar@ximian.com>
25632 * Makefile.am: added hack for automake
25634 * mono/mini/mini.c (mono_save_args): always copy arguments to keep
25637 * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
25639 22003-04-07 Martin Baulig <martin@ximian.com>
25641 * Makefile.am: Added Makefile.am.
25643 * debugger-main.c: Removed, this is now in the debugger where it
25646 * mini.pc.in: Call this package `mini' for the moment.