1 2009-05-14 Zoltan Varga <vargaz@gmail.com>
3 * aot-compiler.c (emit_method_code): Emit a C style symbol for each
4 method so a breakpoint can be set when using gdb.
6 2009-05-13 Zoltan Varga <vargaz@gmail.com>
8 * aot-compiler.c (mono_aot_method_hash): Implement this properly based
9 on mono_method_get_imt_slot ().
11 * aot-runtime.c (find_extra_method_in_amodule): Get rid of the
12 num_decodes variables.
14 * aot-compiler.c (mono_aot_method_hash): Revert part of the last
15 change as it doesn't seem to work.
17 * aot-compiler.c (mono_aot_method_hash): Improve the hashing of
20 2009-05-12 Zoltan Varga <vargaz@gmail.com>
22 * aot-compiler.c mini.c mini-amd64.h mini-arm.h: Kill
23 MONO_ARCH_FULL_AOT_IMT_SUPPORTED define, both platforms now support imt.
25 * mini.c (mini_init): Install mono_aot_get_imt_thunk as the IMT thunk
26 builder when using full aot.
28 * mini-amd64.c (mono_arch_build_imt_thunk): Don't handle the full-aot case
29 here, it is already handled.
31 * mini-arm.c (mono_arch_emit_imt_argument): Pass the dynamic imt arg
34 * aot-compiler.c (arch_emit_imt_thunk): Implement this for ARM.
36 * mini-arm.h: Enable IMT for full aot.
38 * aot-compiler.c (mono_compile_assembly): Don't emit imt thunk if the
39 arch doesn't support it.
41 * mini.c (mini_init): Don't disable IMT for full aot if the
42 architecture supports it.
44 * mini.h (MonoAotTrampoline): New enum containing the different types
45 of 'numerous' trampolines.
46 (MONO_AOT_FILE_VERSION): Bump this.
48 * aot-compiler.c aot-runtime.c: Unify the handling of specific and
49 static rgctx trampolines. Add support for full-aot IMT thunks.
51 * mini-amd64.h: Enable IMT for full aot.
53 * TestDriver.cs: Add a CategoryAttribute class and an --exclude option
54 to exclude tests belonging to a category.
56 * generics.cs: Mark some tests with a !FULLAOT category.
58 * Makefile.am (fullaotcheck): Run tests with --exclude !FULLAOT. Include
61 2009-05-11 Zoltan Varga <vargaz@gmail.com>
63 * aot-compiler.c (emit_and_reloc_code): Move the implementation of
64 MONO_PATCH_INFO_GOT_OFFSET to a separate arch-specific function.
65 (emit_plt): Fix a warning.
67 2009-05-10 Zoltan Varga <vargaz@gmail.com>
69 * aot-compiler.c aot-runtime.c: Fix the build by moving is_shared_got_patch
70 back into aot-compiler.c to a place where the other functions shared by
71 the runtime and aot compiler are.
73 * aot-compiler.c aot-runtime.c: Emit the got addr using a separate symbol,
74 as done previously, instead of in MonoAotFileInfo, since pointers might have
75 alignment requirements.
77 * mini.h: Bump AOT file format version.
79 2009-05-10 Miguel de Icaza <miguel@novell.com>
81 * aot-runtime.c (mono_aot_is_shared_got_patch): Move this routine
82 that is used at runtime from the aot-compiler.c, this makes it
83 work on setups that remove the AOT compiler from the output
86 2009-05-09 Zoltan Varga <vargaz@gmail.com>
88 * mini-<ARCH>.h: Kill the MONO_ARCH_ENABLE_EMIT_STATE_OPT define.
90 * decompose.c (mono_decompose_long_opts): Move the ppc/sparc specific
91 stuff to mono_arch_decompose_long_opts ().
92 (mono_decompose_opcode): Remove some dead code.
94 2009-05-08 Rodrigo Kumpera <rkumpera@novell.com>
96 * method-to-ir.c (mono_method_to_ir): Fix boostrap of non amd64 builds
97 cmethod can be null for quite a some reasons.
99 2009-05-08 Rodrigo Kumpera <rkumpera@novell.com>
101 * method-to-ir.c (mono_method_to_ir): Fix non amd64 builds.
103 2009-05-08 Zoltan Varga <vargaz@gmail.com>
105 * aot-compiler.c (arch_emit_got_access): Fix the aot-not-supported build.
107 2009-05-08 Zoltan Varga <vargaz@gmail.com>
109 * method-to-ir.c (mono_emit_call_args): Add a 'tail' flag argument.
110 (mono_method_to_ir): Use MONO_ARCH_USE_OP_TAIL_CALL macro to determine
111 whenever to make tail calls using OP_TAIL_CALL. Enable support for tail
112 calls returning structures by addr on amd64.
114 * mini-amd64.h (MONO_ARCH_USE_OP_TAIL_CALL): New arch-specific macro.
116 * iltests.il.in: Restructure the tail call tests a bit.
118 2009-05-07 Zoltan Varga <vargaz@gmail.com>
120 * aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
121 for virtual methods too.
123 2009-05-06 Raja R Harinath <harinath@hurrynot.org>
125 * method-to-ir.c (mono_method_to_ir): Revert change of 2009-05-02
126 due to regression in verifying System.dll.
128 2009-05-06 Zoltan Varga <vargaz@gmail.com>
130 * debug-mini.c (mono_debugger_method_has_breakpoint): Allow breakpoints
133 * dwarfwriter.c (emit_class_dwarf_info): Add support for generic
136 * aot-compiler.c aot-runtime.c: Use our own hash function instead of
137 g_str_hash () which can change.
139 * driver.c (mini_regression): Disable optimizations not supported by
140 the cpu. Fixes #500019.
142 * aot-runtime.c (mono_aot_get_unwind_info): Fix the --enable-minimal=aot
145 2009-05-06 Zoltan Varga <vargaz@gmail.com>
147 * mini-llvm.c (mono_llvm_emit_method): Update the OP_TLS_GET implementation
148 to the latest LLVM code.
150 2009-05-05 Zoltan Varga <vargaz@gmail.com>
152 * genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.
154 2009-05-04 Zoltan Varga <vargaz@gmail.com>
156 * mini-llvm.c (mono_llvm_emit_method): Implement TLS support on
159 * aot-compiler.c (encode_patch_list): Simplify this considerably as we are
160 no longer saving offsets, so just save the patch types along with the other
162 * aot-runtime.c (load_patch_info): Update after the changes to
163 encode_patch_list ().
164 (decode_got_entry): Removed, merged into load_patch_info ().
165 (is_shared_got_patch): Removed, call the same function from
168 * mini.h: Bump aot file format version.
170 * aot-compiler.c aot-runtime.c: Resurrect static linking support. Kill the
171 half-finished no-dlsym code.
173 * aot-runtime.c (load_method): Kill the old and bit-rotten use_loaded_code
176 * mini-<ARCH>.h mini-trampolines.c aot-runtime.c: Kill the
177 MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN define.
179 2009-05-02 Zoltan Varga <vargaz@gmail.com>
181 * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Increase the
182 buffer length to work with AOT code.
184 * method-to-ir.c (mono_method_to_ir): Handle loading errors in the
187 * exceptions-x86.c (mono_arch_get_throw_exception_by_name): Simplify this
190 * mini-llvm.c mini-x86.c: Implement 32 bit and x86 support.
192 * ssa.c (mono_ssa_compute): Don't skip I8 values when using LLVM.
194 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Update to the latest
197 * mini.c (mini_method_compile): Set the from_llvm flag in MonoJitInfo
198 if needed. Don't decompose long operations when using llvm.
200 2009-05-01 Zoltan Varga <vargaz@gmail.com>
202 * aot-compiler.c aot-runtime.c: Use mono_pagesize () instead of the
205 * aot-runtime.c (load_aot_module): Get rid of another mprotect call.
207 2009-05-03 Martin Baulig <martin@ximian.com>
209 * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
210 mono_debugger_insert_method_breakpoint() since the class init
211 handler we're inserting at the top of the method already gives us
214 2009-04-30 Zoltan Varga <vargaz@gmail.com>
216 * decompose.c (mono_decompose_long_opts): Move the implementation of LNEG
217 to mono_arch_decompose_long_opts () for x86 and arm.
219 2009-04-29 Zoltan Varga <vargaz@gmail.com>
221 * mini-codegen.c (mono_regstate_alloc_int): Use __x86_64__ instead of
224 2009-04-28 Zoltan Varga <vargaz@gmail.com>
226 * *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in the
229 2009-04-26 Zoltan Varga <vargaz@gmail.com>
231 * aot-runtime.c (mono_aot_create_specific_trampoline): Add a stat for the
232 number of trampolines used in full-aot mode.
234 * aot-compiler.c: Add an ntrampolines option to set the number of
235 trampolines emitted in full-aot mode.
237 2009-04-27 Zoltan Varga <vargaz@gmail.com>
239 * mini-llvm.c (mono_llvm_emit_method): Implement OP_CHECK_THIS using
240 a volatile load. Get rid of get_tempname (), llvm assigns names
243 * mini-llvm-cpp.cpp (mono_llvm_build_volatile_load): New instruction
246 * mini-llvm.c (mono_llvm_emit_method): Don't call LLVMGetParam on
249 * abcremoval.c (REPORT_ABC_REMOVAL): Don't output messages at verbose
252 * mini-codegen.c (mono_local_regalloc): Prevent sreg1/dreg to be allocated
253 to the same register as a fixed sreg2. Fixes #497271.
255 * iltests.il.in: Add a new test.
257 2009-04-26 Zoltan Varga <vargaz@gmail.com>
259 * mini-amd64.c: Use moves instead of pushes for passing arguments on the
260 stack, since pushes complicate exception handling.
262 * exceptions-amd64.c (mono_arch_find_jit_info): Don't pop the arguments of
263 the stack if they are passed using moves.
265 * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
267 * method-to-ir.c (mono_method_to_ir): Disable fast virtual generic methods
270 * mini-llvm.c (mono_llvm_emit_method): Call jit icall wrappers, not the
271 icalls themselves. Convert arguments of FCOMPARE. Convert the destination
272 of FMOVE if it is an R4.
274 2009-04-25 Zoltan Varga <vargaz@gmail.com>
276 * mini-ops.h: Add OP_LLVM_OUTARG_VT opcode.
278 * mini.h (LLVMCallInfo): New structure to store calling convention
279 information for the LLVM back end similar to the CallInfo structures in
282 * mini-amd64.c (mono_arch_get_llvm_call_info): New arch function to return
283 call information in a format usable by LLVM.
284 (mono_arch_emit_call): Move the LLVM handling code to mono_llvm_emit_call ().
286 * method-to-ir.c (mono_emit_call_args): Emit calls using
287 mono_llvm_emit_call () when compiling using LLVM.
289 * mini-llvm.c: Implement support for passing/receiving valuetypes. Add
290 comments to all functions. Fix memory leaks. Add a public init/cleanup
293 * mini.c: Call the llvm init/cleanup functions in mini_init()/cleanup().
295 * method-to-ir.c (handle_array_new): Disable llvm when calling the vararg
296 mono_array_new_va () jit icall.
298 Fri Apr 24 16:44:08 CEST 2009 Paolo Molaro <lupus@ximian.com>
300 * Makefile.am, genmdesc.c, genmdesc.pl: tiny refactor to allow
301 multiple machine description files to be specified.
302 * mini-ops.h: fixes for cross-compilation.
304 2009-04-22 Miguel de Icaza <miguel@novell.com>
306 * aot-runtime.c (make_writable): Use mono_mprotect to simplify
309 2009-04-22 Zoltan Varga <vargaz@gmail.com>
311 * method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
312 to prevent asserts in various passes. Fixes #497220.
314 2009-04-21 Zoltan Varga <vargaz@gmail.com>
316 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove
319 * aot-compiler.c aot-runtime.c: Emit the unwind info into a separate
320 table to avoid duplicates.
322 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
324 * aot-compiler.c (emit_method_code): Avoid writing symbols if the nodebug
327 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
329 * mini.c (mini_method_verify): Fail fulltrust code if the exception
330 is for method or field access.
332 2009-04-20 Zoltan Varga <vargaz@gmail.com>
334 * mini-llvm-cpp.cpp (mono_llvm_dump_value): New helper function to print
337 * mini-llvm.c (mono_llvm_emit_method): Use it.
339 * mini-llvm.c (type_to_llvm_type): Fix the mapping of enums.
340 (mono_llvm_emit_method): Add support for CAS. Fix handling of CSET opcodes
343 * mini-trampolines.c (mono_llvm_vcall_trampoline): Add support for
344 synchronized methods.
346 * mini.c (mini_method_compile): Disable LLVM for dynamic methods.
348 * mini.c (mini_method_compile): Enable ABCREM when running with LLVM.
350 * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOADI4_MEM/
353 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add a MONO_LLVM env variable
354 allowing some options to be set dynamically.
356 2009-04-19 Zoltan Varga <vargaz@gmail.com>
358 * mini-llvm.c (mono_llvm_emit_method): Handle compares followed by an
359 unconditional branch.
361 * mini.h (MonoTrampolineType): Add new trampoline type
362 'MONO_TRAMPOLINE_LLVM_VCALL' which handles virtual calls made from LLVM
365 * mini-trampolines.c (mono_llvm_vcall_trampoline): New C trampoline
368 * mini-trampolines.c (mono_create_llvm_vcall_trampoline): New trampoline
371 * mini.c (mini_init): Avoid using the common vtable trampoline when LLVM
372 is enabled. Instead, use the llvm vcall trampoline.
374 * mini-trampolines.c (mono_get_vcall_slot_addr): New helper function.
376 * mini-trampolines.c tramp-amd64.c tramp-x86.c: Use it.
378 * mini-<ARCH>.c: Get rid of the identical mono_arch_get_vcall_slot_addr ()
381 * mini-<ARCH>.h mini-trampolines.c mini.c: Get rid of
382 MONO_ARCH_COMMON_VTABLE_TRAMPOLINE, it is supported by all archs.
384 * mini-ia64.c (mono_arch_lowering_pass): Null out the sregs of the
387 * mini.c: Fix a warning.
389 * mini-llvm.c (mono_llvm_emit_method): Convert arguments of SWITCH and
390 THROW to the appropriate llvm type.
392 2009-04-18 Zoltan Varga <vargaz@gmail.com>
394 * mini.c (mini_method_compile): Add statistics for methods JITted
397 2009-04-17 Zoltan Varga <vargaz@gmail.com>
399 * method-to-ir.c: Fix the computation of ins_sreg_counts for ia64
400 OP_IA64_CMP_<cond>_IMM opcodes.
402 2009-04-17 Zoltan Varga <vargaz@gmail.com>
404 * mini-llvm.c (emit_cond_system_exception): Implement throwing of
407 * dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
410 * mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
413 2009-04-17 Atsushi Enomoto <atsushi@ximian.com>
415 * mini-exceptions.c : add thread id to EXCEPTION trace message.
417 2009-04-17 Zoltan Varga <vargaz@gmail.com>
419 * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Fix AOT
422 * tramp-x86.c (mono_arch_get_unbox_trampoline): Implement static
423 rgctx invoke trampolines for x86.
425 * mini-x86.c (mono_arch_output_basic_block): Add a few nops before
426 indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
427 (mono_arch_get_vcall_slot): Simplify this.
429 2009-04-16 Zoltan Varga <vargaz@gmail.com>
431 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Move the calls to
432 mono_debug_add_delegate_trampoline () to get_delegate_invoke_impl ().
434 2009-04-14 Zoltan Varga <vargaz@gmail.com>
436 * aot-compiler.c tramp-arm.c mini-arm.c: Implement static rgctx
437 trampolines for ARM. Add full-aot support for delegate invokes for ARM.
439 * mini-trampolines.c (mono_magic_trampoline): Fix the build.
441 * liveness.c (visit_bb): Remove a needless assert.
443 2009-04-13 Zoltan Varga <vargaz@gmail.com>
445 * mini-trampolines.c (mono_create_delegate_trampoline): Delegate the
446 full aot support to the arch specific code.
448 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Add full-aot support.
450 * aot-compiler.c (emit_trampolines): Emit delegate invoke impl trampolines.
452 * aot-compiler.c (emit_named_code): Rename this to 'emit_trampoline'.
454 * mini-amd64.c (mono_arch_get_delegate_invoke_impls): New function to
455 collect information about the delegate invoke impl trampolines.
457 * mini.h (MonoAotTrampInfo): New structure collecting the information needed
458 to save trampolines during full-aot mode.
460 * mini-trampolines.c (mono_create_static_rgctx_trampoline): New trampoline
461 creation function which returns a trampoline which sets the rgctx
463 (mono_magic_trampoline): Use the rgctx trampoline instead of an rgctx
465 (mono_delegate_trampoline): Ditto.
467 * mini.c (mono_jit_runtime_invoke): Ditto.
469 * tramp-amd64.c: Add an implemention of static rgctx trampolines for AMD64.
471 * aot-compiler.c aot-runtime.c: Add support for static rgctx trampolines.
473 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
475 2009-04-12 Zoltan Varga <vargaz@gmail.com>
477 * mini-ia64.c (mono_arch_lowering_pass): Use NULLIFY_INS instead of
478 just setting the opcode to OP_NOP.
480 2009-04-11 Zoltan Varga <vargaz@gmail.com>
482 * mini.c (mini_method_compile): Put the last change inside an
483 #ifdef MONO_ARCH_HAVE_LIVERANGE_OPS.
485 * mini.c (mini_method_compile): Disable sharing of stack slots/registers
486 and extend live ranges to cover the whole method when using xdb.
488 * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
489 do it in the trampolines.
491 * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
494 * mini-trampolines.c (mono_delegate_trampoline): Ditto.
496 * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
497 call code in full-aot mode since IMT is disabled there.
498 (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
499 new JIT no longer has that restriction.
501 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
503 * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
504 a more compact format.
505 (mono_aot_wrapper_name): New function to return a unique name for a
506 wrapper method, also used by the AOT runtime.
508 * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
511 * aot-compiler.c (add_generic_class): Add the helper methods from T[]
512 when a ICollection<T> etc is encountered.
513 (add_generic_instances): Process method arguments/locals too.
514 (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
517 * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
519 2009-04-10 Zoltan Varga <vargaz@gmail.com>
521 * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
523 * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
525 * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
526 representing the result of the decomposition. Nullify instructions
527 instead of setting them to OP_NOP since nops can't have registers
530 2009-04-09 Zoltan Varga <vargaz@gmail.com>
532 * aot-compiler.c (mono_compile_assembly): Split this huge function into
533 smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
534 info. Strip 'mapping symbols' on ARM.
536 * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
538 * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
539 this with the native genmdesc.
541 2009-04-08 Bill Holmes <billholmes54@gmail.com>
543 * aot-runtime.c: Fixing the MSVC build.
545 Code is contributed under MIT/X11 license.
547 2009-04-08 Zoltan Varga <vargaz@gmail.com>
549 * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since
550 JITted code depends on it.
552 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
554 * aot-compiler.c: Use new MonoGenericParam accessors.
556 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
558 Reduce memory usage and improve correctness wrt MonoGenericParam
559 * aot-runtime.c (decode_klass_ref): Simplify generic parameter
560 handing. Avoid allocating MonoGenericParams, but use the ones in
561 the container itself.
563 2009-04-07 Miguel de Icaza <miguel@novell.com>
565 * tasklets.c: Return exceptions in the out argument.
567 2009-04-08 Zoltan Varga <vargaz@gmail.com>
569 * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
570 opcode. Use pointer types in more places instead of casting them to
573 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
575 (mono_llvm_optimize_method): New helper function to optimize a method.
577 * method-to-ir.c (mono_emit_widen_call_res): Extract the call result
578 widening code so it could be called from more places.
579 (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
580 code paths in the call opcodes.
582 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
584 * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
586 2009-04-06 Zoltan Varga <vargaz@gmail.com>
588 * dwarfwriter.c: Use _ to separate class name
589 components as gdb can't handle '.'. Represent reference variables
592 * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
594 * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
596 * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
598 * gc-test.cs: New file with GC stack marking tests.
600 * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
601 negative numbers for vfp.
603 * basic-float.cs: Add a test.
605 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
607 * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
609 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
611 * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
612 part of tasklet/continuation support.
614 2009-04-05 Zoltan Varga <vargaz@gmail.com>
616 * mini-llvm.c (mono_llvm_emit_method): Move the handling of
617 amd64 opcodes inside an ifdef.
619 * dwarfwriter.c: Emit inheritance information for classes, emit fields
622 * dwarfwriter.c (emit_type): Emit the class info for classes.
624 2009-04-04 Zoltan Varga <vargaz@gmail.com>
626 * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
628 * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
630 * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
632 * ssa.c (mono_ssa_compute): Fix some memory leaks.
634 2009-04-03 Zoltan Varga <vargaz@gmail.com>
636 * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
638 * mini-llvm.c: Update comments.
640 * mini.h (COMPILE_LLVM): New macro.
642 * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
644 * ssa.c (mono_ssa_compute): Ditto.
646 * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
647 the unwind ops from a DWARF FDE.
649 * mini-llvm.c: Implement generation of unwind info for LLVM compiled
650 methods by extracting the dwarf unwind ops from the unwind info generated
653 * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
656 * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
659 2009-04-02 Zoltan Varga <vargaz@gmail.com>
661 * Makefile.am (llvm_sources): Enable this.
663 * mini.c (mini_method_compile): Add support for compiling with LLVM,
664 failing back to the JIT if something cannot be handled.
666 * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
669 * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
672 * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when
675 * mini-ops.h: Add a few opcodes needed by LLVM.
677 * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
680 * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
683 * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
685 * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
687 2009-04-01 Mark Probst <mark.probst@gmail.com>
689 * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
690 ridiculously large methods.
692 2009-03-31 Martin Baulig <martin@ximian.com>
694 * debug-debugger.c (debugger_remove_breakpoint): Call
695 mono_debugger_remove_class_init_callback ().
697 2009-03-31 Zoltan Varga <vargaz@gmail.com>
699 * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
700 right before emitting code, not at the start.
702 * mini.c (mono_postprocess_patches): Extract this into a separate function
703 from mono_codegen ().
705 * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
706 byref types correctly.
708 2009-03-30 Zoltan Varga <vargaz@gmail.com>
710 * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
713 2009-03-29 Zoltan Varga <vargaz@gmail.com>
715 * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before
716 indirect calls, this avoids problems where get_vcall_slot () would get
717 confused by the native code for the instruction preceeding the call.
718 (mono_arch_get_vcall_slot): Simplify this.
719 (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
721 * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
722 register allocator now seems to depend on them instead of the data in
725 * mini.c (mini_method_compile): Throw the correct type of exception if
726 mono_method_get_header () fails because of a loading error.
728 2009-03-28 Zoltan Varga <vargaz@gmail.com>
730 * mini.c (mini_method_compile): Clear the loader error if the method
731 header cannot be decoded.
733 * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual
734 interface methods on proxies correctly.
736 * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
737 this argument for vtype methods. Add precise liveness info for arguments.
739 * mini-codegen.c (mono_print_ins_index): Print the vreg of the
740 LIVERANGE_START/END opcodes.
742 * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
743 for arguments and values in registers.
745 2009-03-27 Zoltan Varga <vargaz@gmail.com>
747 * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
748 return a valuetype. Fixes #487518.
750 * iltests.il: Add a test.
752 * aot-compiler.c: Use mono_thread_create () to create helper threads.
754 * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
755 closed over a null reference correctly.
757 2009-03-26 Zoltan Varga <vargaz@gmail.com>
759 * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
761 2009-03-25 Mark Probst <mark.probst@gmail.com>
763 * mini-codegen.c (mono_local_regalloc): Don't let sregs get
764 allocated to the same registers as fixed sregs.
766 2009-03-24 Mark Probst <mark.probst@gmail.com>
768 * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
771 * method-to-ir.c: Handle more cases for
772 Interlocked.CompareExchange.
774 * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
775 mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
776 ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
778 2009-03-23 Zoltan Varga <vargaz@gmail.com>
780 * aot-runtime.c (decode_method_ref): Fix a warning.
782 * unwind.c (mono_unwind_frame): Ditto.
784 2009-03-22 Zoltan Varga <vargaz@gmail.com>
786 * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
787 (mono_compile_assembly): Enable the binary writer for full-aot as well.
789 * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
790 fix the handling of large values in the ALU_PC_G0_NC relocation.
792 2009-03-22 Zoltan Varga <vargaz@gmail.com>
794 * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
796 2009-03-22 Mark Probst <mark.probst@gmail.com>
798 * method-to-ir.c (mono_spill_global_vars): Support for ternary
801 2009-03-22 Mark Probst <mark.probst@gmail.com>
803 * method-to-ir.c: MINI_OP3 needs a comma.
805 * method-to-ir.c, mini.h, mini.c: Remove
806 mono_init_op_sreg_counts ().
808 2009-03-22 Zoltan Varga <vargaz@gmail.com>
810 * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
813 * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
816 * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
818 * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
821 2009-03-21 Mark Probst <mark.probst@gmail.com>
823 * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
824 liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
825 mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
828 2009-03-20 Zoltan Varga <vargaz@gmail.com>
830 * driver.c: Change location of gc_wrapper.h.
832 * method-to-ir.c (mono_find_block_region): Handle try clauses nested
833 inside finally clauses correctly. Fixes #485721.
835 * mini.c (mono_find_spvar_for_region): This needs to handle try regions
836 after the change above.
838 * exceptions.cs: Add a test.
840 2009-03-19 Zoltan Varga <vargaz@gmail.com>
842 * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
844 * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
845 into cfg->used_int_regs, it is not needed with the dwarf unwinder.
846 (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
848 * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
849 the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
851 2009-03-19 Sebastien Pouliot <sebastien@ximian.com>
853 * method-to-ir.c: Allow CoreCLR to throw FieldAccessException.
854 Simplify logic for ensure_method_is_allowed_to_call_method.
855 Handle wrappers on callers.
857 2009-03-19 Zoltan Varga <vargaz@gmail.com>
859 * Makefile.am (fullaotcheck): Don't run the generics tests, some of
862 * basic-simd.cs: Fix the names of some test methods.
864 2009-03-18 Geoff Norton <gnorton@novell.com>
866 * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
868 2009-03-18 Zoltan Varga <vargaz@gmail.com>
870 * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
872 2009-03-17 Jb Evain <jbevain@novell.com>
874 * driver.c: remove now uneeded call to mono_gc_base_init before
877 2009-03-17 Jb Evain <jbevain@novell.com>
879 * dwarfwriter.c (token_handler): handle more cases.
881 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
883 * method-to-ir.c: Remove more dead code (that was required only
884 because of method_is_safe). Fix compiler warnings.
886 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
888 * method-to-ir.c: Remove unneeded/useless method_is_safe
889 http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
891 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
893 * mini.c (mini_method_compile): Print the method been compiled with
894 verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
895 for people not familiar with the runtime.
897 2009-03-17 Zoltan Varga <vargaz@gmail.com>
899 * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
900 a managed object which is later put into a GList. Return its class instead.
902 * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
903 stack slots when using sgen.
905 2009-03-16 Zoltan Varga <vargaz@gmail.com>
907 * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
909 2009-03-14 Zoltan Varga <vargaz@gmail.com>
911 * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
912 > so it works on the first vreg as well.
914 2009-03-13 Zoltan Varga <vargaz@gmail.com>
916 * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
919 * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
921 * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
924 2009-03-12 Zoltan Varga <vargaz@gmail.com>
926 * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
927 native->IL offset mapping.
929 2009-03-11 Zoltan Varga <vargaz@gmail.com>
931 * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
933 * basic.cs: Add a test.
935 2009-03-11 Mark Probst <mark.probst@gmail.com>
937 * mini-x86.c (mono_arch_output_basic_block): Use different
938 registers in case the ones we want to overwrite are used by the
939 other operand. Fixes regression in #480807.
941 2009-03-10 Zoltan Varga <vargaz@gmail.com>
943 * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
945 * dwarfwriter.c (emit_line_number_info): The line number info for
946 IL code was off by one. Fix that.
948 * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
951 2009-03-09 Mark Probst <mark.probst@gmail.com>
953 Contributed under the terms of the MIT/X11 license by Steven
954 Munroe <munroesj@us.ibm.com>.
956 * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
959 2009-03-08 Zoltan Varga <vargaz@gmail.com>
961 * dwarfwriter.c (token_handler): Decode method references in non-wrappers
964 2009-03-06 Zoltan Varga <vargaz@gmail.com>
966 * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
967 the delegate ctor handling code. Fixes #482638.
969 * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
972 * iltests.il.in: Add a test.
974 * mini-darwin.c (mono_chain_signal): Remove this, it is already in
977 2009-03-05 Mark Probst <mark.probst@gmail.com>
979 * mini-trampolines.c (mono_create_jump_trampoline): If the method
980 is shared generic code, return the trampoline, even if the method
981 has already been compiled. Fixes #479763.
983 * mini.c, mini.h: New function
984 mono_jit_find_compiled_method_with_jit_info() which is the same as
985 mono_jit_find_compiled_method() but also returns the jit info.
987 2009-03-05 Mark Probst <mark.probst@gmail.com>
989 * method-to-ir.c (mono_method_to_ir): Only force the vtable var
990 for methods which actually have one. For all other methods, make
991 sure the this argument var is live the whole method.
993 * mini.c (mini_method_compile): Every shared method has a
994 this/vtable/mrgctx info. Fixes #480807.
996 2009-03-05 Mark Probst <mark.probst@gmail.com>
998 * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
999 generic/imt thunks where some entries branch through the vtable,
1000 while other entries branch directly.
1002 2009-03-05 Zoltan Varga <vargaz@gmail.com>
1004 * mini-darwin.c (mono_chain_signal): Define this to fix the build.
1006 * mini-windows.c: Ditto.
1008 * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
1011 2009-03-04 Zoltan Varga <vargaz@gmail.com>
1013 * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
1016 2009-03-04 Mark Probst <mark.probst@gmail.com>
1018 * method-to-ir.c: Don't inline methods that use JMP. Fixes
1021 2009-03-04 Mark Probst <mark.probst@gmail.com>
1023 * exceptions-x86.c: Include debug-mini.h - fixes build.
1025 2009-03-04 Martin Baulig <martin@ximian.com>
1027 * debug-mini.c: Clean up the exception API and add documentation.
1028 (mono_debugger_handle_exception): New public method; this is
1029 called when throwing an exception or encountering an unhandled one.
1030 (mono_debugger_call_exception_handler): Formerly known as
1031 mono_debugger_handle_exception(); this is used to tell the
1032 debugger that we're about to invoke an exception handler.
1034 2009-03-04 Martin Baulig <martin@ximian.com>
1036 * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
1037 ../metadata/mono-debug-debugger.c; save and reset exception state.
1039 2009-03-02 Martin Baulig <martin@ximian.com>
1041 * debug-mini.c: Moved the debugger exception handling here from
1042 ../metadata/mono-debug-debugger.c.
1045 (MonoDebuggerExceptionAction): New exception typedef.
1048 (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
1050 * exceptions-amd64.c
1051 (mono_amd64_throw_exception): Use the new debugger exception
1055 (mono_handle_exception_internal): Don't call
1056 mono_debugger_unhandled_exception() here.
1058 2009-03-03 Zoltan Varga <vargaz@gmail.com>
1060 * mini.c aot-compiler.c: Update after the changes to
1061 mono_marshal_get_runtime_invoke ().
1063 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot):
1064 Virtual generic methods might not have method->slot set, work around
1067 * generics.cs: Add a test.
1069 2009-03-02 Geoff Norton <gnorton@novell.com>
1072 * driver.c: Allow signal chaining of SIGFPE as well.
1074 2009-03-02 Zoltan Varga <vargaz@gmail.com>
1076 * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
1077 this since it now receives the method not its generic context in the
1080 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
1081 generic/imt thunks where some entries branch through the vtable, while
1082 other entries branch directly.
1084 * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
1086 * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call
1087 support for interface methods as well.
1089 * mini-trampolines.c: Add support for virtual generic methods in interfaces
1090 using the normal IMT thunks.
1092 generics.cs: Add new tests.
1094 * method-to-ir.c (mono_method_to_ir): Pass the method instead of
1095 the generic inst to the generic imt thunks. This fixes AOT support,
1096 improves consistency with the normal IMT thunks, and makes it easier to
1097 add support for interface generic virtual methods later.
1099 * mini-trampolines.c (mono_magic_trampoline): Ditto.
1101 2009-02-28 Zoltan Varga <vargaz@gmail.com>
1103 * driver.c (mono_set_signal_chaining): New public API function to enable
1104 signal chaining on POSIX platforms.
1106 * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland
1107 (si@lindenlab.com) to implement signal chaining. The original patch was
1108 contributed under the MIT X/11 license:
1109 https://bugzilla.novell.com/show_bug.cgi?id=318894
1111 2009-02-27 Zoltan Varga <vargaz@gmail.com>
1113 * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
1114 too until it can be made to run on amd64.
1116 2009-02-26 Zoltan Varga <vargaz@gmail.com>
1118 * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
1119 to get_generic_context_from_code () + get_call_info () if possible.
1121 2009-02-25 Zoltan Varga <vargaz@gmail.com>
1123 * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
1124 suspend-on-sigsegv functionality.
1126 * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
1127 to suspend when a native SIGSEGV is received. This is useful for debugging
1128 crashes which don't happen under gdb, since a live process contains more
1129 information than a core file.
1131 * mini-exceptions.c (mono_print_thread_dump): Use
1132 MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
1134 * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
1136 * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
1138 * basic-float.cs: Disable the tests which currently fail on amd64.
1140 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null
1141 value to mono_arch_patch_callsite () to fix crashes.
1143 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
1145 2009-02-23 Zoltan Varga <vargaz@gmail.com>
1147 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
1148 nop code by patching the call address to point to the nullified class init
1149 trampoline, as the former does not seem to be safe on SMP machines.
1151 2009-02-23 Mark Probst <mark.probst@gmail.com>
1153 * mini-ops.h: Fix the argument types for a few x86 opcodes where
1156 2009-02-23 Zoltan Varga <vargaz@gmail.com>
1158 * basic-float.cs basic-calls.cs: Fix warnings.
1160 2009-02-22 Mark Probst <mark.probst@gmail.com>
1162 * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
1163 correct frame pointer in the LMF. Should fix #478394.
1165 2009-02-22 Zoltan Varga <vargaz@gmail.com>
1167 * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
1169 * image-writer.c: Make the binary writer less verbose.
1171 2009-02-21 Zoltan Varga <vargaz@gmail.com>
1173 * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
1174 are called from runtime invoke wrappers.
1176 2009-02-20 Zoltan Varga <vargaz@gmail.com>
1178 * cpu-ppc.md (store_memindex): Increase the size of this.
1180 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
1182 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
1184 * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
1186 * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
1189 Last fix for of #467201.
1192 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
1194 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
1196 * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
1197 and long_conv_to_r8_2:
1199 Fixed part of #467201.
1201 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
1203 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
1205 * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
1206 conversion to 32 bits.
1208 * cpu-x86.md: Increase the size of int_conv_to_r4.
1210 * basic-float.cs: Add a test for this.
1212 Fixed part of #467201.
1214 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
1216 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
1218 * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
1219 conversion to 64 bits.
1221 * basic-float.cs: Add a test for this.
1223 Fixed part of #467201.
1225 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
1227 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
1229 * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
1230 This behavior is compatible with MS.
1232 * iltest.il.in: Add a test for this.
1234 Fixed part of #467201.
1236 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
1238 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
1240 * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
1241 change the precision of the value.
1243 * cpu-x86.md: Define len for float_conv_to_r4.
1245 * basic-float.cs: Add a test for this.
1247 Fixed part of #467201.
1249 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
1251 * mini.c: Adjust locking order to the new semantics where the loader lock
1254 2009-02-18 Rodrigo Kumpera <rkumpera@novell.com>
1263 * mini-trampolines.c:
1276 * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
1278 2009-02-18 Zoltan Varga <vargaz@gmail.com>
1280 * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
1283 2009-02-17 Zoltan Varga <vargaz@gmail.com>
1285 * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
1286 for cctors if needed.
1288 2009-02-17 Mark Probst <mark.probst@gmail.com>
1290 * mini-ppc.c: Fix build on Darwin.
1292 2009-02-17 Zoltan Varga <vargaz@gmail.com>
1294 * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
1295 version instead of 3 as valgrind doesn't like version 3.
1297 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
1299 * aot-compiler.c (mono_aot_method_hash): New function to return a hash
1300 usable for hashing methods.
1301 (emit_extra_methods): Use the new hash to avoid putting every method in the
1304 * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
1306 * aot-runtime.c (can_method_ref_match_method): New function to quickly check
1307 whenever a method ref could match a method.
1309 * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
1312 * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded
1315 * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
1317 * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
1318 the encoding buffer.
1320 * method-to-ir.c (mono_method_check_inlining): Avoid calling
1321 mono_method_get_header () on inflated methods as an optimization.
1323 2009-02-16 Zoltan Varga <vargaz@gmail.com>
1325 * ssa.c (fold_ins): Fix another crash if the instruction following the
1326 switch was optimized away.
1328 2009-02-16 Mark Probst <mark.probst@gmail.com>
1330 Contributed under the terms of the MIT/X11 license by Steven
1331 Munroe <munroesj@us.ibm.com>.
1333 * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
1335 2009-02-16 Zoltan Varga <vargaz@gmail.com>
1337 * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
1338 around the mono_domain_alloc calls, it is now done by the functions
1341 * aot-compiler.c (compile_method): Only add wrappers referenced by
1342 the method if compiling with full AOT.
1343 (mono_compile_assembly): Error out if --aot=full is specified on
1344 a platform where it is not supported.
1346 * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
1349 * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
1352 * aot-runtime.c (load_named_code): Handle
1353 mono_arm_throw_exception_by_token.
1355 * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
1357 * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
1360 * Makefile.am (fullaotcheck): Exit if a test fails.
1362 * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
1364 (mono_compile_assembly): Handle the assembler failing.
1366 * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
1367 accepting subsections of .bss.
1369 * ssa.c (visit_inst): Fix a crash if the instruction following a switch
1372 * aot-compiler.c: Remove some unused includes.
1374 * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
1375 now in MonoImageWriter.
1377 * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
1378 code sequence which matches a non-virtual call. Fixes #472654.
1380 2009-02-15 Zoltan Varga <vargaz@gmail.com>
1382 * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
1385 * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
1386 use the image/dwarf writers directly.
1388 * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
1391 * aot-compiler.c (MonoAotCompile): Remove fields which are now in
1394 * image-writer.h: Fix some typos.
1396 * dwarfwriter.h dwarfwriter.c: New files.
1398 * aot-compiler.c: Extract the DWARF info writing functionality into a
1401 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
1402 argument to return unwind info.
1404 * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
1406 * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
1408 * aot-runtime.c (decode_method_ref): Add a case for
1409 MONO_AOT_METHODREF_WRAPPER_NAME.
1411 * mini.h: Add constants for the magic numbers used in encode_method_ref ()
1414 * aot-compiler.c (encode_method_ref): Use the new constants.
1416 * aot-runtime.c (decode_method_ref): Ditto.
1418 * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
1419 be compiled, not the icall itself.
1421 2009-02-14 Zoltan Varga <vargaz@gmail.com>
1423 * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
1424 using decode_method_ref ().
1426 * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
1427 convert it to an in32. Fixes #475859.
1429 * arrays.cs: Add a test.
1431 2009-02-12 Zoltan Varga <vargaz@gmail.com>
1433 * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in
1436 * basic-long.cs: Add a test.
1438 2009-02-12 Mark Probst <mark.probst@gmail.com>
1440 * mini-x86.c, mini-x86.h: Very simple frame pointer removal. We
1441 remove the frame pointer in leaf methods which don't receive any
1442 arguments, don't throw exceptions and don't do dynamic stack
1445 2009-02-12 Zoltan Varga <vargaz@gmail.com>
1447 * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
1448 the fail_tramp changes. Hopefully fixes #475132.
1450 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
1452 * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
1453 instead of mono_metadata_signature_dup_full.
1455 2009-02-12 Zoltan Varga <vargaz@gmail.com>
1457 * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
1458 for processing jump tables. Fixes #473787.
1460 2009-02-11 Mark Probst <mark.probst@gmail.com>
1462 * mini-generic-sharing.c: mini_method_get_context() just calls
1463 mono_method_get_context_general() now.
1465 * mini.c, mini.h: Moved get_object_generic_inst(),
1466 construct_object_context_for_method() and
1467 mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
1469 2009-02-11 Zoltan Varga <vargaz@gmail.com>
1471 * branch-opts.c (mono_if_conversion): Handle the case where the merged
1472 basic block fell through to its successor bblock without a branch. Fixes
1475 * iltests.il.in: Add a test.
1477 * aot-compiler.c (encode_method_ref): Encode methods of array types.
1478 (can_encode_patch): We can now handle arrays of generic parameters and
1481 * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
1483 * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
1484 the AOT file to avoid some #ifdefs in aot-runtime.c
1486 * mini.h: Bump AOT file format version.
1488 2009-02-10 Zoltan Varga <vargaz@gmail.com>
1490 * Makefile.am (fullaotcheck): Make this run the tests.
1492 * aot-compiler.c: Make the printing of skipped methods runtime configurable.
1494 2009-02-10 Mark Probst <mark.probst@gmail.com>
1496 * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
1497 individually. Fixes #473482.
1499 2009-02-10 Zoltan Varga <vargaz@gmail.com>
1501 * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
1503 2009-02-09 Jeffrey Stedfast <fejj@novell.com>
1505 * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
1506 (mono_compile_assembly): Hush compile warnings about
1507 uninitialized [tmp_]outfile_name variables in the !use_bin_writer
1510 2009-02-10 Zoltan Varga <vargaz@gmail.com>
1512 * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
1514 * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
1516 * aot-compiler.c: Fix arm support.
1518 * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
1519 img_writer_emit_unset_mode () function.
1521 * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
1522 (mono_unwind_get_dwarf_pc_reg): Ditto.
1524 * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
1525 Move almost all platform specific code to a set of arch_ functions,
1526 and document them to ease porting.
1528 * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
1530 * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
1532 * aot-compiler.c: Extract the image writing functionality into a separate
1533 module to reduce the size of this file.
1535 2009-02-09 Geoff Norton <gnorton@novell.com>
1537 * mini-s390.c: Fix the signature of emit_sig_cookie.
1539 2009-02-09 Zoltan Varga <vargaz@gmail.com>
1541 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
1543 * aot-runtime.c (is_shared_got_patch): Ditto.
1545 * aot-runtime.c (load_named_code): Cope with the fact that
1546 decode_got_entry () won't decode the patch fully if its corresponding got
1547 entry is already filled.
1549 * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full):
1551 (mono_arch_create_monitor_exit_trampoline_full): Ditto.
1553 * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
1554 as the moving pointer instead of 'buf' for consistency with the rest of the
1556 (mono_arch_create_monitor_exit_trampoline): Ditto.
1558 * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
1559 generic_class_init trampolines.
1560 (add_generic_class): Extract some code from add_generic_instances () into a
1561 separate function so it can be called from other places too.
1562 (compile_method): Call add_generic_class () for the classes of inflated methods
1563 referenced by the method.
1564 (can_encode_patch): Allow references to generic parameters.
1566 * aot-runtime.c: Add support the patches required by the new trampolines.
1568 * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
1571 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
1574 * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
1575 this from get_throw_pending_exception, make the signature full aot compatible.
1577 * Makefile.am (fullaotcheck): New target to run full-aot tests.
1579 * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
1581 * exceptions.cs: Add a test.
1583 2009-02-07 Zoltan Varga <vargaz@gmail.com>
1585 * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
1586 use the DWARF_DATA_ALIGN constant instead.
1588 * exception-<ARCH>.c: Update after the above change.
1590 * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
1593 * mini-arm.c: Enable the dwarf unwinder.
1595 * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
1596 instead of mono_class_setup_vtable ().
1598 2009-02-07 Zoltan Varga <vargaz@gmail.com>
1600 * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
1603 * mini-x86.h: Enable the dwarf unwinder.
1605 2009-02-06 Raja R Harinath <harinath@hurrynot.org>
1607 Fix mcs/tests/test-7.cs
1608 * mini-amd64.c (mono_arch_allocate_vars): Revert change from
1611 2009-02-06 Zoltan Varga <vargaz@gmail.com>
1613 * mini.c (print_jit_stats): Remove some unused statistics.
1615 2009-02-05 Zoltan Varga <vargaz@gmail.com>
1617 * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
1619 2009-02-05 Mark Probst <mark.probst@gmail.com>
1621 * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
1622 the method we get from mono_object_get_virtual_method() because
1623 that function does it properly, now.
1625 2009-02-05 Zoltan Varga <vargaz@gmail.com>
1627 * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
1628 opcodes. Fixes #472775.
1630 2009-02-05 Mark Probst <mark.probst@gmail.com>
1632 * mini-exceptions.c (ves_icall_get_frame_info): Account for the
1633 fact that mono_find_jit_info() sometimes returns the context
1634 corresponding to the jit info in new_ctx. Fixes #472600.
1636 2009-02-05 Zoltan Varga <vargaz@gmail.com>
1638 * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
1639 mini-s390.c: Use mono_class_enum_basetype () instead of accessing
1640 klass->enum_basetype directly.
1642 * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
1645 * unwind.c: Avoid 0 sized arrays.
1647 2009-02-04 Zoltan Varga <vargaz@gmail.com>
1649 * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
1650 size on systems with 64k pages. Fixes #471389.
1652 2009-02-04 Mark Probst <mark.probst@gmail.com>
1654 Contributed under the terms of the MIT/X11 license by Steven
1655 Munroe <munroesj@us.ibm.com>.
1657 * mini-ppc.c (mono_arch_output_basic_block): Generate better code
1658 for LOADI4_MEMBASE. Use addi instead of addic if it's not
1661 2009-02-04 Mark Probst <mark.probst@gmail.com>
1663 Contributed under the terms of the MIT/X11 license by Steven
1664 Munroe <munroesj@us.ibm.com>.
1666 * exceptions-ppc.c (mono_arch_get_restore_context): Code size
1669 * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
1670 The trampoline can be longer on PPC64.
1672 2009-02-04 Mark Probst <mark.probst@gmail.com>
1674 Contributed under the terms of the MIT/X11 license by Steven
1675 Munroe <munroesj@us.ibm.com>.
1677 * mini-ppc.c: Compiler warning fixes and trivial code
1680 2009-02-04 Zoltan Varga <vargaz@gmail.com>
1682 * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
1683 ins->dreg which could be a hardware register, not a vreg.
1685 * aot-compiler.c (emit_method_dwarf_info): Ditto.
1687 * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
1688 (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
1690 * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
1692 * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
1693 ->dreg, that is not the vreg we are looking for.
1695 * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
1697 * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
1700 * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
1703 2009-02-03 Zoltan Varga <vargaz@gmail.com>
1705 * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
1707 * aot-compiler.c (emit_line_number_info): Fix line number emission when
1710 * aot-compiler.c: Add xdebug support on x86.
1712 * unwind.c: Add x86 support.
1714 * aot-compiler.c (emit_exception_debug_info): Control the emission of
1715 unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
1717 * mini.c (mini_method_compile): Ditto.
1719 * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
1722 * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
1723 which mimic .push_section/.pop_section in GAS.
1725 * aot-compiler.c: Emit precise live range information for variables.
1727 * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
1729 * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
1730 the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
1733 * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
1734 the live ranges of variables.
1736 * mini.h (struct MonoMethodVar): Add two fields containing the live range
1737 of the variable in terms of native offsets.
1739 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
1741 * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
1743 2009-02-02 Mark Probst <mark.probst@gmail.com>
1745 Contributed under the terms of the MIT/X11 license by Steven
1746 Munroe <munroesj@us.ibm.com>.
1748 * exceptions-ppc.c (restore_regs_from_context): Correct operand
1749 order (offset then base reg) for ppc_load_multiple_regs.
1750 (emit_save_saved_regs) Correct operand order for
1751 ppc_store_multiple_regs.
1752 (mono_arch_get_call_filter): Correct operand order for
1753 ppc_load_multiple_regs.
1755 * mini-ppc.c (emit_memcpy): Fix operand order for
1756 ppc_load_reg_update and ppc_store_reg_update.
1757 (mono_arch_output_basic_block): Correct operand order for ppc_lha.
1758 (mono_arch_emit_epilog): Correct operand order for
1759 ppc_load_multiple_regs.
1761 * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
1762 order for ppc_store_multiple_regs and ppc_load_multiple_regs.
1764 2009-02-02 Mark Probst <mark.probst@gmail.com>
1766 * cpu-ppc64.md: Fixed storer4_memindex length.
1768 2009-02-02 Zoltan Varga <vargaz@gmail.com>
1770 * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
1773 * aot-compiler.c (emit_line_number_info): Optimize this.
1775 2009-02-01 Zoltan Varga <vargaz@gmail.com>
1777 * aot-compiler.c: Disassemble tokens in the IL disassembly.
1779 * aot-compiler.c: Add debug info for methods without debug info by
1780 emitting an IL file and having the line number info referencing that file.
1782 * aot-compiler.c: Optimize the size of the generated line number info.
1784 * aot-compiler.c: Emit line number info in xdebug mode.
1786 * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
1789 2009-01-31 Zoltan Varga <vargaz@gmail.com>
1791 * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
1793 * driver.c (mono_main): Enable debugging support automatically if XDEBUG
1796 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
1798 * basic-calls.cs: Test for the weird crash found on arm.
1800 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
1802 * cpu-arm.md: Increase the size of storer8_membase_reg and
1803 loadr8_membase_reg to 24 bytes to accomodate the extra add.
1805 * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
1806 OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
1807 reg to LR otherwise we'll be loading/storing from just the offset.
1809 2009-01-30 Miguel de Icaza <miguel@novell.com>
1811 Question: if we are storing gint32's inside the "*native_offset",
1812 should we change the signature to "gint32 *native_offset" to
1813 ensure that we do not have type definition problems?
1815 * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
1816 an int * as this is what the other function expects, causes
1817 problems with Freescale's compiler that defined int32_t to be a
1818 long and makes int incompatible
1820 2009-01-30 Miguel de Icaza <miguel@novell.com>
1822 * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
1823 filename conflict with bjam.
1825 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
1827 * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
1828 as it might use decomposed ops.
1830 2009-01-30 Zoltan Varga <vargaz@gmail.com>
1832 * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
1834 * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
1837 * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
1839 * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
1842 * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
1843 way registers are stored in MonoContext on arm.
1845 * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
1846 instead of locking so mono_get_cached_unwind_info () becomes signal safe.
1848 * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
1850 * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
1852 * mini.c (mini_init): Register mono_isfinite.
1854 * jit-icalls.c (mono_isfinite): New jit icall.
1856 * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
1858 * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
1859 set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
1862 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
1864 * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
1865 separate frame and stack pointers, so we must use FP to find the register
1867 The FP reg is retrieved from the MonoContext::regs array.
1869 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
1871 * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
1874 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
1876 * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
1877 return R4 and R8 when not running under softfloat.
1879 Fixes basic-calls.exe
1881 2009-01-30 Zoltan Varga <vargaz@gmail.com>
1883 * mini-arm.c: Implement some overflow opcodes.
1885 2009-01-29 Miguel de Icaza <miguel@novell.com>
1887 * ssa.c: handle another alloca.h
1889 * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
1890 PLATFORM_WIN32 for detecting if we have sigaction. Instead use
1891 MONO_ARCH_USE_SIGACTION.
1893 * aot-runtime.c, mini-exceptions.c: Replace platform define with
1896 * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
1898 * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
1899 PPC targets as sigaction does not exist on all platforms, define
1900 this on a per-platform basis.
1902 Instead of erroring out if the platform is not defined, include
1903 mini-ppc-os.h, and expect that the OS specific setting provides
1904 the required information.
1906 2009-01-30 Zoltan Varga <vargaz@gmail.com>
1908 * aot-compiler.c: Fix --enable-minimal=aot.
1910 2009-01-30 Zoltan Varga <vargaz@gmail.com>
1912 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
1915 2009-01-29 Zoltan Varga <vargaz@gmail.com>
1917 * exceptions-arm.c: Fix warnings.
1919 * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
1922 * mini-x86.c: Fix --enable-minimal=jit build.
1924 * mini.c: Really fix --enable-minimal=jit build.
1926 * mini.c (construct_object_context_for_method): Move this outside
1927 the DISABLE_JIT block to fix the --enable-minimal=jit build.
1929 "Backported" of r124984 from 2.0 branch.
1931 * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
1933 "Backport" of r124977 + r124978 from 2.0 branch.
1935 * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
1936 to avoid calling mono_exception_from_token () from the throw trampoline.
1937 (mono_arch_get_throw_exception_generic): call throw_exception_by_token
1938 for throwing corlib exceptions, this fixes full-aot support for corlib
1941 * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
1943 2009-01-29 Miguel de Icaza <miguel@novell.com>
1945 * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
1946 part of the changes to split the code in mini into operating
1947 system specific files.
1949 This patch was done by copying mini.c to the respective files to
1950 preserve SVN history.
1952 2009-01-29 Zoltan Varga <vargaz@gmail.com>
1954 * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
1956 2009-01-28 Zoltan Varga <vargaz@gmail.com>
1958 * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
1959 remoting-invoke-with-check wrappers of shared methods.
1961 * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
1963 2009-01-27 Mark Probst <mark.probst@gmail.com>
1965 * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
1966 optimization if the top of stack is the last instruction in the
1967 bblock. Otherwise it might have been used after its definition.
1970 2009-01-27 Zoltan Varga <vargaz@gmail.com>
1972 * mini-trampolines.c (mono_magic_trampoline): Print out the caller
1973 method as well when get_vcall_slot () fails to match a code sequence.
1975 * mini-arm.c: Fix the android build, which doesn't have
1978 2009-01-26 Zoltan Varga <vargaz@gmail.com>
1980 * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
1983 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
1985 * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
1987 2009-01-26 Zoltan Varga <vargaz@gmail.com>
1989 * mini.c (mini_method_compile): Save the unwind info generated by the JIT
1990 and put its id into jinfo->used_regs. This is only used on amd64,
1991 which is currently the only platform generating unwind info.
1993 * exceptions-amd64.c: Instead of unwinding based on a register mask, use
1994 the dwarf unwinder. This is required to correctly handle async exceptions
1995 like thread abort and stack overflows, which can happen while a method
1996 is in the middle of its prolog or epilog.
1998 * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
1999 the unwind info belonging to an AOTed method.
2001 * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
2002 into cfg->unwind_ops.
2004 * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
2006 * mini.c (mini_init): Call mono_unwind_init ().
2007 (mini_cleanup): Call mono_unwind_cleanup ().
2009 * unwind.c: Add functions for managing a set of unwind info entries, allowing
2010 unwind info to be shared between methods.
2012 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
2015 * exceptions-amd64.c (mono_arch_exceptions_init): Call
2016 get_throw_pending_exception () to avoid initialization races.
2018 * mini-exceptions.c (mono_exceptions_init): Call an arch specific
2019 mono_arch_exceptions_init () function.
2021 * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
2023 2009-01-25 Zoltan Varga <vargaz@gmail.com>
2025 * mini.c (mono_get_domain_intrinsic): New helper function.
2026 (mono_get_thread_intrinsic): Ditto.
2028 * mini-arm.c mini-ia64.c: Use the new helper functions.
2030 * method-to-ir.c (mono_method_to_ir): Fix the comment for
2031 the last constrained_call change, since it is needed in the non-AOT
2034 * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
2036 * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of
2037 mono_get_lmf_addr () on arm eabi linux.
2039 2009-01-24 Zoltan Varga <vargaz@gmail.com>
2041 * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
2042 code sequence which matches a non-virtual call.
2044 2009-01-23 Mark Probst <mark.probst@gmail.com>
2046 * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
2049 2009-01-23 Zoltan Varga <vargaz@gmail.com>
2051 * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
2052 runtime-invoke wrappers, since they are also shared based on signature.
2054 2009-01-22 Mark Probst <mark.probst@gmail.com>
2056 * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
2057 info from the (correct) context.
2059 2009-01-22 Zoltan Varga <vargaz@gmail.com>
2061 * unwind.c (mono_unwind_frame): Remove a stray g_free ().
2063 * unwind.c (mono_unwind_frame): New function to unwind through a frame
2064 using dwarf unwinding info. Not yet used.
2066 * mini.c (mini_init): When using xdebug, disable freeing of domains.
2068 2009-01-21 Mark Probst <mark.probst@gmail.com>
2070 * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
2073 * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
2074 special case and handle mono_arch_delegate_invoke_impl() returning
2075 function descriptors.
2077 * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
2078 trampolines return function descriptors, too.
2080 2009-01-21 Zoltan Varga <vargaz@gmail.com>
2082 * method-to-ir.c (handle_alloc): Avoid generic instances in the
2083 out_of_line optimization.
2085 2009-01-21 Martin Baulig <martin@ximian.com>
2088 (MonoCompile): Added `disable_deadce_vars' to disable removing
2092 (mini_method_compile): Set `cfg->disable_deadce_vars' when running
2093 inside the debugger.
2095 * liveness.c (mono_analyze_liveness): Don't remove any unused
2096 variables if `cfg->disable_deadce_vars' is set.
2098 2009-01-21 Mark Probst <mark.probst@gmail.com>
2100 * method-to-ir.c: Only apply exception constructor optimization if
2101 the the method actually belongs to an exception class. Fixes
2104 2009-01-21 Zoltan Varga <vargaz@gmail.com>
2106 * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
2107 change inside a #ifdef __mono_ppc64__.
2109 * aot-compiler.c (compile_method): Remove the previous limitation.
2111 * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
2112 on type variables in AOTed code.
2114 * aot-compiler.c (compile_method): Skip generic methods having type
2115 constraints on their generic parameters.
2117 * aot-compiler.c (compile_method): Check for methods which cannot be
2118 encoded inside RGCTX_FETCH patches as well.
2120 * mini-exceptions.c (mono_print_thread_dump): Fix the windows
2123 2009-01-20 Mark Probst <mark.probst@gmail.com>
2125 * method-to-ir.c: Force the vtable variable in shared generic code
2126 for the case that they might show up on a stack trace where they
2129 * mini-exceptions.c: Save and use generic sharing info as well as
2130 IP in stack traces to resolve shared generic instantiations.
2132 2009-01-20 Zoltan Varga <vargaz@gmail.com>
2134 * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
2135 added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
2137 2009-01-20 Mark Probst <mark.probst@gmail.com>
2139 * method-to-ir.c: Do generic sharing for array constructors.
2141 2009-01-20 Rodrigo Kumpera <rkumpera@novell.com>
2143 * mini-exceptions.c (mono_print_thread_dump): Add information
2144 about the thread state using wapi_current_thread_desc.
2146 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
2148 * basic-simd.cs: Tests for the new constructors.
2150 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
2152 * mini-ops.h: Added OP_EXPAND_*
2156 * mini-x86.c (mono_arch_output_basic_block): Same.
2158 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
2160 2009-01-19 Zoltan Varga <vargaz@gmail.com>
2162 * iltests.il.in: Add a test for #467385.
2164 2009-01-18 Rodrigo Kumpera <rkumpera@novell.com>
2166 * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
2167 thread been cleaned up is not the same currently in execution.
2169 Fixes appdomain-unload crashes on windows, osx and linux variants
2170 without the __thread keyword.
2172 2009-01-18 Zoltan Varga <vargaz@gmail.com>
2174 * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
2175 (koush@koushikdutta.com). Implement this for android.
2177 * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
2178 begins with a digit.
2180 * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
2181 mono_marshal_get_write_barrier ().
2183 2009-01-17 Rodrigo Kumpera <rkumpera@novell.com>
2185 * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
2186 of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
2187 that pass them on a register pair.
2189 This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
2190 test was crashing due to that.
2192 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
2194 * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
2195 trampoline code. Include ucontext.h only if available.
2197 2009-01-15 Mark Probst <mark.probst@gmail.com>
2199 * mini.c: mono_domain_lookup_shared_generic() takes an open method
2200 and doesn't check whether it's sharable, like it was before
2201 removing the shared generics hash. This brings IronPython
2202 performance back to what it was before that change.
2204 2009-01-14 Mark Probst <mark.probst@gmail.com>
2206 * method-to-ir.c: Handle delegate invocation optimization earlier,
2207 otherwise it would be handled (much more slowly) by the
2208 final/sealed optimization.
2210 2009-01-13 Zoltan Varga <vargaz@gmail.com>
2212 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
2213 domain is not set. Fixes #465864.
2215 2009-01-12 Mark Probst <mark.probst@gmail.com>
2217 * method-to-ir.c: Don't stop sharing of generic methods with catch
2218 clauses - we already handle those.
2220 2009-01-12 Mark Probst <mark.probst@gmail.com>
2222 * mini.c, mini.h: lookup_generic_method() is now
2223 mono_domain_lookup_shared_generic() and uses the jit_code_hash,
2224 making the shared_generics_hash obsolete.
2226 2009-01-12 Mark Probst <mark.probst@gmail.com>
2228 * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
2229 use the red zone. Make room on the stack first and then use it,
2230 not the other way around.
2232 2009-01-12 Zoltan Varga <vargaz@gmail.com>
2234 * mini.c (mini_init): Call mono_xdebug_init ().
2236 * aot-compiler.c (mono_xdebug_init): Make this non-static.
2238 2009-01-11 Zoltan Varga <vargaz@gmail.com>
2240 * TestDriver.cs: Add an --iter argument to run tests multiple times.
2242 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
2245 * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
2246 debug+unwind info for trampolines.
2248 * mini.c (mono_create_unwind_op): New helper function.
2250 * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
2252 2009-01-10 Zoltan Varga <vargaz@gmail.com>
2254 * aot-compiler.c: Fix the build.
2256 2009-01-09 Zoltan Varga <vargaz@gmail.com>
2258 * Makefile.am: Update dtrace-prelink.sh location.
2260 2009-01-08 Zoltan Varga <vargaz@gmail.com>
2262 * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr
2263 optimization. Fixes #464520.
2265 2009-01-07 Bill Holmes <billholmes54@gmail.com>
2267 * mini-amd64.c : Adding code to save/restore non-volatile registers
2270 * exceptions-amd64.c : Adding code to save/restore non-volatile
2271 registers on Winx64.
2273 Contributed under MIT/X11 license.
2275 2009-01-07 Zoltan Varga <vargaz@gmail.com>
2277 * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
2278 __GNUC_MINOR__ which can break when the major version changes.
2280 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
2282 * basic-simd.cs: Add tests for usage of the sizeof opcode.
2284 2009-01-07 Geoff Norton <gnorton@novell.com>
2286 * helpers.c: Allow mono -v -v -v to work on darwin.
2288 2009-01-05 Bill Holmes <billholmes54@gmail.com>
2290 * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
2293 Contributed under MIT/X11 license.
2295 2009-01-05 Zoltan Varga <vargaz@gmail.com>
2297 * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
2298 instead of directly accessing type->data.klass. Fixes #462016.
2299 (mono_allocate_stack_slots_full): Ditto.
2301 * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio
2302 <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
2304 * aot-compiler.c (emit_plt): Fix ARM build.
2306 2009-01-04 Zoltan Varga <vargaz@gmail.com>
2308 * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
2310 * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
2313 * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
2314 instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
2317 * iltests.il.in: Add a regression test.
2319 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
2321 * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
2323 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
2325 * basic-simd.cs: Add a regression test for #462457.
2327 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
2329 * mini-ops.h: Add a definition of XPHI.
2331 * mini.h (MONO_IS_PHI): Make is aware of simd instrincs.
2333 * ssa.c (op_phi_to_move): Handle XPHI.
2335 * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
2339 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
2341 * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
2343 2008-12-31 Geoff Norton <gnorton@novell.com>
2345 * mini-ppc.c: The prolog size allocated can be too small for darwin
2346 ppc32 under certain circumstances. Also fix a small logic bug.
2348 2008-12-29 Zoltan Varga <vargaz@gmail.com>
2350 * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
2351 while loading AOT methods.
2353 * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
2354 since only the former is nulled out after a successful cast. This prevents
2355 crashes with rethrown exceptions when using --debug=casts.
2357 2008-12-24 Mark Probst <mark.probst@gmail.com>
2359 * mini.h: New macro for checking whether a method is final,
2360 i.e. whether the method or its class is marked final.
2362 * method-to-ir.c: Use the new macro for all final-checks
2363 consistently. Fixes the crash in the System.ServiceModel tests.
2365 2008-12-23 Mark Probst <mark.probst@gmail.com>
2367 * mini-exceptions.c (get_exception_catch_class): Corrected another
2368 overly strict assertion.
2370 2008-12-23 Mark Probst <mark.probst@gmail.com>
2372 * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
2373 Clobbering it is not allowed because the caller might use it as
2374 the vtable register in the interface call.
2376 2008-12-19 Mark Probst <mark.probst@gmail.com>
2378 * mini-exceptions.c (get_exception_catch_class): Corrected an
2379 overly strict assertion.
2381 2008-12-18 Mark Mason <mmason@upwardaccess.com>
2383 * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
2385 * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
2387 * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
2389 * cpu-mips.md: correct lengths for certain long_ opcodes.
2391 * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
2393 * 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().
2395 2008-12-17 Mark Mason <mmason@upwardaccess.com>
2397 * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
2399 2008-12-17 Mark Mason <mmason@upwardaccess.com>
2401 * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
2403 2008-12-16 Rodrigo Kumpera <rkumpera@novell.com>
2405 * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
2408 2008-12-16 Mark Mason <mmason@upwardaccess.com>
2410 * 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
2412 * 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)
2414 2008-12-15 Mark Mason <mmason@upwardaccess.com>
2416 * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
2418 2008-12-14 Zoltan Varga <vargaz@gmail.com>
2420 * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
2421 gshared code. Fixes #458947.
2423 * generics.cs: Add a test.
2425 2008-12-12 Mark Mason <mmason@upwardaccess.com>
2427 * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
2429 * mini-mips.c: first pass n32 code generation.
2431 * mini-mips.h: datatypes and defines for n32 support.
2433 * exceptions-mips.c: first pass n32 code generation.
2435 * tramp-mips.c: first pass n32 code generation.
2437 * cpu-mips.md: add long_ opcodes.
2439 2008-12-12 Mark Mason <mmason@upwardaccess.com>
2441 * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
2443 * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
2445 * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
2447 * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
2449 * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
2451 * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
2453 * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
2455 * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
2457 * helpers.c: for mips/n32, don't pass -mips32 to objdump
2459 2008-12-12 Zoltan Varga <vargaz@gmail.com>
2461 * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
2463 2008-12-12 Andres G. Aragoneses <aaragoneses@novell.com>
2465 * driver.c: Sync --help-trace with man page (EXPR,EXPR).
2467 2008-12-12 Mark Probst <mark.probst@gmail.com>
2469 * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
2470 descriptors for helper functions directly in front of the code.
2472 2008-12-11 Mark Probst <mark.probst@gmail.com>
2474 * method-to-ir.c: Removed an unnecessary assertion.
2476 2008-12-10 Zoltan Varga <vargaz@gmail.com>
2478 * method-to-ir.c: Merge SGEN changes from the old JIT.
2480 2008-12-10 Zoltan Varga <vargaz@gmail.com>
2482 * driver.c (compile_all_methods_thread_main): Handle failure of
2485 2008-12-10 Mark Probst <mark.probst@gmail.com>
2487 * mini-ppc.c: Merged with mini-ppc64.c.
2489 * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
2491 * Makefile.am: Use the same sources for PPC and PPC64.
2493 * mini-ppc64.c: Removed.
2495 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
2497 * branch-opts.c (remove_block_if_useless): Extract fall through detection
2498 code to mono_bb_is_fall_through.
2500 * branch-opts.c (mono_remove_critical_edges): Same.
2502 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
2504 * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
2505 expect that an OP_BR_REG will be there.
2507 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
2509 * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
2510 for the many branch ops. The original check miss OP_BR_REG.
2514 2008-12-09 Mark Mason <mmason@upwardaccess.com>
2516 * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
2518 2008-12-09 Zoltan Varga <vargaz@gmail.com>
2520 * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
2521 while holding the aot lock.
2523 2008-12-09 Mark Mason <mmason@upwardaccess.com>
2525 * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
2527 2008-12-09 Bill Holmes <billholmes54@gmail.com>
2529 * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws
2530 to release all runtime callable wrappers held by the runtime.
2532 Contributed under MIT/X11 license.
2534 2008-12-09 Bill Holmes <billholmes54@gmail.com>
2536 * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
2539 Contributed under MIT/X11 license.
2541 2008-12-09 Zoltan Varga <vargaz@gmail.com>
2543 * aot-runtime.c (decode_exception_debug_info): Acquire the domain
2544 lock when calling mono_domain_alloc (). Hopefully fixes #415608.
2546 2008-12-09 Mark Mason <mmason@upwardaccess.com>
2548 * cpu-mips.md: fix ckfinite length
2550 * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
2551 (mono_arch_lowering_pass): cleanup, rearrange for clarity
2552 (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
2554 2008-12-08 Mark Mason <mmason@upwardaccess.com>
2556 * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
2558 2008-12-08 Geoff Norton <gnorton@novell.com>
2560 * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
2561 size by 8 bytes as well.
2563 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2565 * basic-simd.cs: Fix method names for Vector16b.
2567 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2569 * basic-simd.cs: Fix method names for Vector16sb.
2571 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2573 * basic-simd.cs: Fix method names for Vector8us.
2575 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2577 * basic-simd.cs: Fix method names for Vector8s.
2579 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2581 * basic-simd.cs: Fix method names for Vector4ui.
2583 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2585 * basic-simd.cs: Fix method names for Vector2l.
2587 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2589 * basic-simd.cs: Fix method names for Vector2d.
2591 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2593 * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
2594 that are extension methods.
2596 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2598 * basic-simd.cs: Fix method names for Vector4f.
2600 2008-12-08 Zoltan Varga <vargaz@gmail.com>
2602 * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
2603 as such. Fixes #456669.
2605 2008-12-07 Mark Mason <mmason@upwardaccess.com>
2607 * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
2609 2008-12-07 Mark Mason <mmason@upwardaccess.com>
2611 * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
2612 (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
2613 (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
2614 (mips_adjust_stackframe): handle FP spills
2616 * mini-ops.h: add mips_mtc1_s2
2618 * cpu-mips.md: add mips_mtc1_s2
2620 2008-12-07 Zoltan Varga <vargaz@gmail.com>
2622 * unwind.c: New file, move the unwind info encoding functions here from
2623 aot-compiler.c, so they could be used at runtime too.
2625 2008-12-05 Mark Mason <mmason@upwardaccess.com>
2627 * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
2628 (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
2630 2008-12-05 Mark Mason <mmason@upwardaccess.com>
2632 * mini-mips.c: cleanup warnings
2633 (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
2634 (mips_adjust_stackframe): handle case of taking the address of stack locals
2636 2008-12-05 Zoltan Varga <vargaz@gmail.com>
2638 * aot-compiler.c: Implement a few functions missing from the asm writer.
2639 (emit_method_code): Only write symbols for methods when using the bin
2640 writer, since the assembler can't deal with the characters in our method
2643 * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
2645 * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
2648 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
2649 a bit to also restore %rax.
2651 2008-12-05 Mark Probst <mark.probst@gmail.com>
2653 * mini-ppc.c: Some simple merges from mini-ppc64.c.
2655 2008-12-05 Zoltan Varga <vargaz@gmail.com>
2657 * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
2660 2008-12-05 Mark Probst <mark.probst@gmail.com>
2662 * exceptions-ppc.c: Merged with exceptions-ppc64.c.
2664 * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
2665 MONO_ARCH_FRAME_ALIGNMENT. Struct for PPC64 function descriptors.
2667 * exceptions-ppc64.c: Removed.
2669 * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
2671 2008-12-05 Mark Probst <mark.probst@gmail.com>
2673 * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
2676 * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
2678 * tramp-ppc64.c: Removed.
2680 2008-12-05 Zoltan Varga <vargaz@gmail.com>
2682 * aot-compiler.c (add_generic_instances): Skip non-generic classes in
2685 2008-12-05 Mark Probst <mark.probst@gmail.com>
2687 * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
2689 * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
2690 mini-ppc.h instead of mini-ppc64.h.
2692 * mini-ppc64.h: Removed.
2694 2008-12-04 Mark Mason <mmason@upwardaccess.com>
2696 * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
2698 * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
2700 2008-12-05 Mark Probst <mark.probst@gmail.com>
2702 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
2703 Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
2706 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
2708 * basic-simd.cs: Tests for operator == and != on Vector8us and Vector16b.
2710 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
2712 * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
2714 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
2716 * basic-simd.cs: Tests for operator == and != on Vector4f.
2718 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
2720 * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
2722 * simd-intrinsics.c: Kill useless enum.
2724 2008-12-04 Mark Mason <mmason@upwardaccess.com>
2726 * cpu-mips.md: add long_conv_to_ovf_i4_2
2727 * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
2729 2008-12-04 Mark Mason <mmason@upwardaccess.com>
2731 * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
2733 * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
2735 2008-12-04 Mark Mason <mmason@upwardaccess.com>
2737 * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
2739 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
2741 * basic-simd.cs: Add tests for new methods.
2743 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
2745 * simd-intrinsics.c: Add support for operator == and !=
2748 * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
2750 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
2752 * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
2754 2008-12-04 Zoltan Varga <vargaz@gmail.com>
2756 * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
2758 * mini.c (mono_resolve_patch_target): Allow pinvoke methods in
2759 MONO_PATCH_INFO_ICALL_ADDR.
2761 * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
2763 * aot-compiler.c: Resurrect full-aot support.
2765 2008-12-04 Mark Mason <mmason@upwardaccess.com>
2767 * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
2769 2008-12-04 Mark Mason <mmason@upwardaccess.com>
2771 * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
2773 2008-12-03 Rodrigo Kumpera <rkumpera@novell.com>
2775 * basic-simd.cs: Fix tests to work under ppc.
2776 Remove tests for methods that will be removed.
2778 2008-12-03 Mark Probst <mark.probst@gmail.com>
2780 * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
2781 generic type (via a typedef or typeref) correctly.
2783 2008-12-03 Zoltan Varga <vargaz@gmail.com>
2785 * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
2786 diagnose an assertion failure.
2788 2008-12-02 Mark Probst <mark.probst@gmail.com>
2790 * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
2791 Fix trampoline size.
2793 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
2794 conversion opcodes are implemented natively instead via emulation.
2796 2008-12-01 Mark Mason <mmason@upwardaccess.com>
2798 * cpu-mips.md: remove mips_xori
2800 * mini-ops.h: remove mips_xori
2802 * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
2804 * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
2806 * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
2808 2008-12-01 Mark Mason <mmason@upwardaccess.com>
2810 * cpu-mips.md: fix instruction lengths.
2812 * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
2814 * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
2816 * mini-ops.h: fix slti / sltiu op profiles.
2818 2008-12-02 Martin Baulig <martin@ximian.com>
2820 * method-to-ir.c (mono_method_to_ir): Disable debugging
2821 information for the init locals block to make the debugger stop
2822 after all locals have been initalized.
2824 2008-12-02 Martin Baulig <martin@ximian.com>
2826 * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
2827 running inside the debugger.
2829 2008-12-01 Zoltan Varga <vargaz@gmail.com>
2831 * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
2834 * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the
2835 alu->alu imm optimization which only shows if deadce is disabled.
2837 * aot-compiler.c: Rename the function names for the binary and asm writers
2838 so they can coexist in the same process. Rework the xdebug code to use the
2839 asm writer. This avoids the need to call into the runtime to dump the
2840 debugging info. Add more debugging info for types.
2842 * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
2844 * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
2845 cpu description tables, they can't occur in cpu-<ARCH>.md.
2847 * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
2848 the stack in CEE_LDFLDA. Fixes #450542.
2850 * generics.cs: Add a new test.
2852 2008-12-01 Mark Mason <mmason@upwardaccess.com>
2854 * mini-ops.h: updated MIPS opcodes
2855 * mini-mips.c: decompose long opts
2856 * mini-mips.h: decompose long opts
2858 2008-11-29 Mark Mason <mmason@upwardaccess.com>
2860 * cpu-mips.md: fix length on int_rem_un
2861 * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
2863 2008-11-29 Zoltan Varga <vargaz@gmail.com>
2865 * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
2867 * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
2869 2008-11-29 Martin Baulig <martin@ximian.com>
2871 * mini-exceptions.c (mono_handle_native_sigsegv): Check
2872 mono_debug_using_mono_debugger() in addition to the
2873 `no_gdb_backtrace' flag in the `MonoDebugOptions'.
2875 2008-11-28 Mark Mason <mmason@upwardaccess.com>
2877 * mini-ops.h: updated more MIPS opcodes
2878 * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
2879 * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
2881 2008-11-28 Mark Probst <mark.probst@gmail.com>
2883 * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
2885 2008-11-28 Mark Mason <mmason@upwardaccess.com>
2887 * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
2888 * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
2889 * mini-ops.h: correct selected mips opcode entries
2891 2008-11-28 Mark Probst <mark.probst@gmail.com>
2893 * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
2896 2008-11-28 Mark Probst <mark.probst@gmail.com>
2898 * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
2900 2008-11-28 Mark Mason <mmason@upwardaccess.com>
2902 * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
2903 * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
2904 * mini-mips.h: disable IMT
2905 * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
2907 2008-11-28 Mark Probst <mark.probst@gmail.com>
2909 * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
2911 2008-11-28 Mark Probst <mark.probst@gmail.com>
2913 * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
2915 2008-11-28 Zoltan Varga <vargaz@gmail.com>
2917 * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
2920 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
2922 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
2923 for Set/GetVector aligned versions.
2925 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
2927 * basic-simd.cs: Add tests for Get/SetVector.
2929 2008-11-27 Mark Probst <mark.probst@gmail.com>
2931 * mini.c: Removed g_slist_append_mempool(). Now in
2934 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
2936 * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
2937 size properly and make the bounds check optional.
2939 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
2940 for SetVector and IsAligned.
2942 2008-11-27 Zoltan Varga <vargaz@gmail.com>
2944 * mini.c: Remove unused mono_normalize_opcodes () function.
2946 2008-11-26 Mark Probst <mark.probst@gmail.com>
2948 * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
2949 using the new atomic add ops now.
2951 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
2954 2008-11-26 Mark Probst <mark.probst@gmail.com>
2956 * mini-ppc64.c: Several fixes.
2958 2008-11-25 Mark Mason <mmason@upwardaccess.com>
2960 * cpu-mips.md: added jump_table
2961 * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.
2963 2008-11-25 Mark Mason <mmason@upwardaccess.com>
2965 * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
2967 2008-11-25 Mark Mason <mmason@upwardaccess.com>
2969 * mini-ops.h: corrected a handful of MIPS opcodes.
2971 2008-11-25 Mark Mason <mmason@upwardaccess.com>
2973 * aot-compiler.c: MIPS to use ELF writer
2975 2008-11-25 Mark Mason <mmason@upwardaccess.com>
2977 * mini-codegen.c: remove MIPS specific assert.
2979 2008-11-25 Mark Probst <mark.probst@gmail.com>
2981 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
2982 fixes. PPC64 now passes most of the runtime regressions.
2984 2008-11-24 Zoltan Varga <vargaz@gmail.com>
2986 * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
2987 volatile intervals a bit.
2989 2008-11-24 Mark Probst <mark.probst@gmail.com>
2991 * basic-long.cs: New test case.
2993 2008-11-23 Zoltan Varga <vargaz@gmail.com>
2995 * mini.c (mini_method_compile): Disable globalra for large methods for
2998 * regalloc2.c (order_moves): Add fp support.
3000 * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
3001 source bblock ends with an OP_BR_REG.
3003 * ratests.cs: Add a new test.
3005 2008-11-23 Mark Probst <mark.probst@gmail.com>
3007 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
3008 sharing. PPC64 now passes generics.exe.
3010 2008-11-23 Mark Probst <mark.probst@gmail.com>
3012 * mini-ppc64.c: Several fixes. PPC64 now runs iltests.exe.
3014 2008-11-23 Zoltan Varga <vargaz@gmail.com>
3016 * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
3017 memory when mono_jit_info_table_find () can't find the method in the
3020 * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
3023 * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
3026 2008-11-23 Mark Probst <mark.probst@gmail.com>
3028 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
3029 Several fixes. PPC64 now runs exceptions.exe and
3030 devirtualization.exe.
3032 2008-11-22 Mark Probst <mark.probst@gmail.com>
3034 * mini-ppc64.c, tramp-ppc64.c: Small fixes. PPC64 now runs
3035 arrays.exe and basic-math.exe.
3037 2008-11-22 Mark Probst <mark.probst@gmail.com>
3039 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
3040 cpu-ppc64.md: Several fixes. PPC64 now runs objects.exe.
3042 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
3044 * simd-intrinsics.c: Add support ArrayExtension intrinsics.
3046 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
3048 * method-to-ir.c: Move bounds checking macros to ir-emit.h
3050 * ir-emit.h: Move macros from method-to-ir.c to here.
3052 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
3054 * mini-ops.h: Correct the long simd ops to use LREG.
3056 2008-11-21 Zoltan Varga <vargaz@gmail.com>
3058 * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
3060 * mini-ops.h: Correct the dreg type of a few long opcodes.
3062 * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
3065 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
3067 * mini-ppc.c: remove negative stack references in epilog
3068 for platforms that don't support the red zone.
3070 2008-11-21 Mark Probst <mark.probst@gmail.com>
3072 * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
3073 point regs. Now PPC64 passes basic-calls.exe.
3075 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
3077 * basic-simd.cs: Add tests for accessors of Vector2l.
3079 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
3081 * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
3083 * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
3085 * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
3087 2008-11-21 Mark Probst <mark.probst@gmail.com>
3089 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes. Now
3090 PPC64 passes basic-long.exe.
3092 2008-11-20 Mark Probst <mark.probst@gmail.com>
3094 * decompose.c: Decompose carry and overflow add on PPC64 like on
3095 other 64 bit archs. Don't decompose sub at all on PPC64.
3097 * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
3098 Several fixes and new opcodes. Now PPC64 runs (but doesn't pass)
3101 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
3103 * basic-simd.cs: Add tests for accessors of Vector2d.
3105 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
3107 * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
3111 * mini-x86.c (mono_arch_output_basic_block): Same.
3113 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
3115 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
3117 * basic-simd.cs: Add tests for accessors of Vector4f.
3119 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
3121 * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
3125 * mini-x86.c (mono_arch_output_basic_block): Same.
3127 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
3129 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
3131 * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
3133 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
3135 * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
3139 * mini-x86.c (mono_arch_output_basic_block): Same.
3141 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
3143 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
3145 * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
3147 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
3149 * simd-intrinsics.c: Enable setters for Vector16sb.
3151 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
3153 * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
3157 * mini-x86.c (mono_arch_output_basic_block): Same.
3159 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
3161 2008-11-19 Rodrigo Kumpera <rkumpera@novell.com>
3163 * simd-intrinsics.c: Implement setter for Vector8us.
3165 2008-11-19 Zoltan Varga <vargaz@gmail.com>
3167 * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
3170 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
3172 * mini-ppc.c: remove references to the red zone in the prolog
3173 (for systems that don't support it).
3175 2008-11-19 Mark Probst <mark.probst@gmail.com>
3177 * cpu-ppc64.md: Fixed a few instruction lengths.
3179 * mini-ppc64.c: Don't emit SETLRET. PPC64 passes basic-float.exe,
3182 2008-11-19 Mark Probst <mark.probst@gmail.com>
3184 * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes. PPC64 passes
3187 2008-11-19 Zoltan Varga <vargaz@gmail.com>
3189 * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
3191 2008-11-18 Rodrigo Kumpera <rkumpera@novell.com>
3193 * mini-ops.h: Added OP_INSERT_I2.
3197 * mini-x86.c (mono_arch_output_basic_block): Same.
3199 * simd-intrinsics.c: Implement setter for Vector8s.
3201 * simd-methods.h: Add the names of get setters of Vector8s.
3203 2008-11-18 Zoltan Varga <vargaz@gmail.com>
3205 * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
3207 * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
3210 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
3212 2008-11-18 Mark Probst <mark.probst@gmail.com>
3214 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
3215 for PPC64. An empty program runs now.
3217 2008-11-18 Zoltan Varga <vargaz@gmail.com>
3219 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
3221 * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
3222 a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
3223 info for JITted code is emitted into a shared library, loadable into gdb.
3225 2008-11-18 Mark Probst <mark.probst@gmail.com>
3227 * Makefile.am: Changes to build PPC64.
3229 * mini-arch.h: Include mini-ppc64.h on PPC64.
3231 2008-11-18 Mark Probst <mark.probst@gmail.com>
3233 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
3234 in PPC code up to r119147.
3236 2008-11-18 Mark Probst <mark.probst@gmail.com>
3238 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
3239 cpu-ppc64.md: Changes for PPC64.
3241 Based on code submitted by andreas.faerber@web.de at
3242 https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
3245 2008-11-18 Mark Probst <mark.probst@gmail.com>
3247 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
3248 cpu-ppc64.md: Copied from the corresponding PPC files from
3251 2008-11-18 Scott Peterson <lunchtimemama@novell.com>
3253 * mini-ops.h: Added OP_ROUND.
3255 * cpu-x86.md: Added round.
3257 * mini-x86.c: Added support for intrinsicing Math.Round (double).
3259 * basic-math.cs: Added test_0_round to test rounding.
3261 Contributed under MIT/X11 license.
3263 2008-11-17 Bill Holmes <billholmes54@gmail.com>
3265 * aot-compiler.c : Fix the Winx64 build.
3267 Contributed under MIT/X11 license.
3269 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
3271 * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
3272 in OP_EXTRACT_R8 to avoid possible stack corruption.
3274 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
3276 * mini-ops.h: Added OP_EXTRACT_R8/I8.
3278 * cpu-x86.md: Added extract_r8.
3280 * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
3282 * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
3283 a couple of OP_EXTRACT_I4.
3285 * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
3287 * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
3289 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
3291 * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
3294 2008-11-17 Zoltan Varga <vargaz@gmail.com>
3296 * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
3297 trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
3299 * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
3300 are not needed any more.
3302 * mini.h: Remove the unused INS_LIST macros.
3304 * mini.c (mini_method_compile): Remove a disable globalra case which is no
3307 * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
3310 * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
3311 mono_alloc_ireg () instead.
3313 * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
3316 * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
3319 * aot-runtime.c (load_aot_module): Disable AOT when running under
3322 * mini-amd64.h: Change the monitor fastpath defines to check for
3323 !PLATFORM_WIN32 so they work on *bsd too.
3325 * mini.h mini.c mini-hhpa.c: Remove more unused code.
3327 * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
3329 * mini.h (MonoCompile): Remove new_ir flag.
3331 * regalloc.h regalloc.c: Remove unused code.
3333 * cpu-*.md: Remove more unused opcodes.
3335 * simple-cee-ops.h simple-mini-ops.h: Removed.
3337 * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
3339 2008-11-17 Zoltan Varga <vargaz@gmail.com>
3341 * aliasing.h: Removed.
3343 * *.c: Remove references to aliasing.h and inssel.h.
3345 * mini.c: Remove additional unused functions.
3347 * mini-ops.h cpu-*.md: Remove unused opcodes.
3349 2008-11-16 Zoltan Varga <vargaz@gmail.com>
3351 Remove the old JIT code.
3353 * inssel*.brg: Removed.
3355 * ssa.c abcremoval.c aliasing.c: Removed.
3357 * ssa2.c: Renamed to ssa.c.
3359 * abcremoval2.c: Renamed to abcremoval.c.
3361 * *.c: Removed all !cfg->new_ir code.
3363 * mini-<ARCH>.c: Removed mono_arch_call_opcode (),
3364 mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
3366 * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
3368 2008-11-16 Zoltan Varga <vargaz@gmail.com>
3370 * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
3371 to simplify the code and cut back on the number of global symbols in the AOT
3374 * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
3376 2008-11-15 Zoltan Varga <vargaz@gmail.com>
3378 * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
3379 with the got/got_info tables.
3381 * mini.h: Bump AOT file format version.
3383 * unwind.h: New file, contains definitions for stack unwinding.
3385 * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
3388 * aot-compiler.c: Generalize the emitting of unwind information to use the
3389 information in cfg->unwind_ops.
3391 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
3393 * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
3394 AOT method frames. Enable writing symbols for methods by default.
3396 2008-11-14 Rodrigo Kumpera <rkumpera@novell.com>
3398 * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
3399 and make it work with vectors of element sizes 1, 2 and 4.
3401 * simd-intrinsics.c: Enable getter for all vectors with element size
3404 * simd-methods.h: Add the names of other getters.
3406 * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
3412 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
3414 * mini-ppc.h: portability fix.
3416 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
3418 * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
3419 buggy and will overwrite it.
3421 2008-11-14 Zoltan Varga <vargaz@gmail.com>
3423 * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
3424 Use it to emit local symbols for all methods so AOTed methods show up with
3425 their full name in gdb/valgrind output.
3427 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
3429 * mini-ppc.c: portability fixes.
3431 2008-11-14 Zoltan Varga <vargaz@gmail.com>
3433 * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
3434 entries out of the if (!generic_shared...) code so it is always done.
3435 (mono_class_init_trampoline): Do the patching when running under valgrind
3436 too, newer versions of valgrind have no problems with it.
3438 2008-11-13 Zoltan Varga <vargaz@gmail.com>
3440 * aot-compiler.c (emit_writeout): Rework this to make it easier to add
3443 2008-11-13 Mark Probst <mark.probst@gmail.com>
3445 * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
3448 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
3450 * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui.
3452 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
3454 * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
3460 * simd-intrinsics.c: Same.
3462 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
3464 * simd-intrinsics.c: Enable constructor intrinsics for all types.
3466 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
3468 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
3469 to work with more Vector types.
3471 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
3473 * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
3474 store the elemens directly instead of using and intermediate.
3476 2008-11-13 Zoltan Varga <vargaz@gmail.com>
3478 * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
3480 * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
3481 to preserve %eax for aot plt trampolines.
3483 * aot-compiler.c (compile_method): Don't skip synchronized methods.
3484 (encode_method_ref): Flag synchronized methods so they won't go through
3487 * aot-compiler.c: Additional work to support AOTing synchronized methods/
3490 * cpu-ia64.md (jmp): Increase max length.
3492 2008-11-12 Zoltan Varga <vargaz@gmail.com>
3494 * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
3495 open generic classes.
3497 * aot-compiler.c: Enable the ELF writer on ELF platforms.
3499 * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
3500 box+brtrue optimization since it causes test failures on x86.
3502 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
3504 * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
3510 * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
3511 for simd ctor values.
3513 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
3514 instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
3516 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
3518 * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
3521 * simd-instrincs.c: Same.
3523 * basic-simd.cs: Same.
3525 2008-11-12 Zoltan Varga <vargaz@gmail.com>
3527 * ratests.cs: Add more tests.
3529 * regalloc2.c (add_spill_code): Handle more corner cases.
3531 2008-11-11 Zoltan Varga <vargaz@gmail.com>
3533 * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
3534 (update_liveness): Avoid holes in the liveness ranges of hregs if they are
3535 both the source an destination of an instruction.
3537 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
3539 * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
3540 wapihandles.c: more portability changes.
3542 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
3544 * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
3545 * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
3546 safe to execute in a signal handler and the kernel provides better
3547 the info in /proc/self/smaps. Avoid the assert on sigaction during
3550 2008-11-11 Zoltan Varga <vargaz@gmail.com>
3552 * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
3553 do the bblock linking hack if it is actually needed.
3555 * Makefile.am (patch-libtool): New helper target to patch libtool to speed
3558 * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
3559 crash problem is fixed.
3561 * branch-opts.c (mono_remove_critical_edges): Link up newly added
3564 * mini.c (mini_method_compile): Compute unreachable bblocks properly even
3566 (mini_method_compile): Set the starting value of next_vreg to
3567 MAX_IREGS + MAX_FREGS when using globalra.
3569 * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
3570 filter clauses with BB_EXCEPTION_HANDLER.
3572 * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
3574 2008-11-10 Mark Probst <mark.probst@gmail.com>
3576 * mini-x86.c (mono_arch_get_argument_info): Don't align argument
3577 space for stdcall. Fixes regressions on Win32.
3579 2008-11-10 Zoltan Varga <vargaz@gmail.com>
3581 * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
3583 (linear_scan): Remove an assert which doesn't seem to be needed.
3585 * local-propagation.c (mono_local_deadce): Avoid a call to
3586 MONO_DELETE_INS which would screw up the instruction linking.
3588 * mini.c (mono_decompose_op_imm): Make this work with globalra.
3590 * regalloc2.c: Upgrade to work the current JIT code.
3592 2008-11-09 Zoltan Varga <vargaz@gmail.com>
3594 * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
3597 * aot-runtime.c: Remove some dead code.
3599 * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
3601 (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
3603 * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
3604 trampolines using sscanf since atoi doesn't work on large unsigned values.
3606 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full):
3607 Initialize code_size.
3609 2008-11-08 Mark Probst <mark.probst@gmail.com>
3611 * method-to-ir.c (mini_emit_inst_for_method): Make
3612 Interlocked.CompareExchange work for Int arguments on 32 bit
3615 2008-11-07 Mark Probst <mark.probst@gmail.com>
3617 * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
3619 2008-11-06 Bill Holmes <billholmes54@gmail.com>
3621 * main.c Fix MSVC build.
3623 Contributed under MIT/X11 license.
3625 2008-11-06 Mark Probst <mark.probst@gmail.com>
3627 * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
3628 alignment larger than 8 bytes are aligned correctly, too.
3630 * mini.c: Honor the min_align field of MonoClass when laying out
3633 2008-11-06 Zoltan Varga <vargaz@gmail.com>
3635 * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
3637 * aot-compiler.c (emit_plt): Fix a warning.
3639 * aot-compiler.c: Implement ARM support in the binary writer.
3641 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
3643 * basic-simd.cs: Add test for getter with byref arg.
3644 Fix the naming of a few tests.
3645 Add missing checks to a test.
3647 2008-11-05 Zoltan Varga <vargaz@gmail.com>
3649 * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
3651 * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
3652 most of the full-aot support for monitor enter/exit trampolines.
3654 * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
3655 enter/exit trampoline creation functions.
3657 * Makefile.am: Fix the generation of buildver.h so it is not invoked during
3660 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
3662 * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
3663 incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
3664 implement the needed functionality without adding crap to the runtime.
3666 2008-11-05 Zoltan Varga <vargaz@gmail.com>
3668 * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
3671 * mini.c (mono_build_date): New global version holding the build date in
3674 * Makefile.am (buildver.c): Generate a file containing the build date.
3676 * main.c: Set the build date from the generated file.
3678 * mini.c (mono_get_runtime_build_info): New helper function returning build
3679 information in a string format.
3681 * driver.c (mono_main): Print the build date in --version.
3683 * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
3684 file when the bind-to-runtime-version option is used.
3686 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
3688 * simd-intrinsics.c: Fix bug when using getters and byref args.
3690 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
3692 * simd-methods.h: Rename prefetch methods.
3694 * simd-intrinsics.c: Same.
3696 2008-11-05 Mark Probst <mark.probst@gmail.com>
3698 * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
3701 2008-11-04 Zoltan Varga <vargaz@gmail.com>
3703 * aot-compiler.c: Use the bundled elf header files instead of depending on
3706 * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
3709 * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
3712 2008-11-04 Rodrigo Kumpera <rkumpera@novell.com>
3714 * cpu-x86.md: Add store nta ops.
3720 * mini.h: Add an enum for simd prefetch modes.
3722 * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
3723 of store. Use the changed code to support store nta.
3725 * simd-intrinsics.c: Add prefetch ops for all vector types.
3727 2008-11-04 Zoltan Varga <vargaz@gmail.com>
3729 * aot-compiler.c: Add an option for JIT compiling the methods by multiple
3732 * aot-compiler.c: Use statically allocated buffers for constructing symbol
3735 * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
3738 2008-11-04 Mark Probst <mark.probst@gmail.com>
3740 * mini-x86.c: Fixed commit.
3742 2008-11-04 Zoltan Varga <vargaz@gmail.com>
3744 * aot-compiler.c (emit_plt): Align the plt section only on x86.
3746 2008-11-04 Mark Probst <mark.probst@gmail.com>
3748 * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
3749 and MONITOR_EXIT, for the ASM fastpaths.
3751 * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
3754 * mini.c, patch-info.h: Signature and patch infos for
3755 Monitor.Enter/Exit trampolines.
3757 * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
3759 * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
3760 Monitor.Enter/Exit ASM fastpath for Linux.
3762 2008-11-04 Zoltan Varga <vargaz@gmail.com>
3764 * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
3766 * objects.cs: Add a new test.
3768 * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
3770 * aot-runtime.c (load_method): Run class initialization in the PLT case even
3771 if MONO_LOG_LEVEL is set.
3773 * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
3775 * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
3777 * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
3779 * aot-compiler.c: Change the relocation code to use virtual addresses instead
3780 of file offsets. Align the sections belonging to the data segment to
3783 2008-11-03 Zoltan Varga <vargaz@gmail.com>
3785 * aot-compiler.c: Simplify the elf writer by depending on the definitions in
3786 elf.h. Port it to amd64.
3788 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
3790 * driver.c: Enable SIMD by default.
3792 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
3794 * cpu-x86.md: Add prefetch op.
3800 * mini.h: Add an enum for simd prefetch modes.
3802 * simd-methods.h: Add prefetch function names.
3804 * simd-intrinsics.c: Add prefetch ops for all vector types.
3806 2008-11-03 Zoltan Varga <vargaz@gmail.com>
3808 * aot-compiler.c (emit_bytes): Speed this up a little.
3810 2008-11-02 Zoltan Varga <vargaz@gmail.com>
3812 * aot-compiler.c: Add JIT time etc. statistics.
3814 * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
3816 * mini.h (MonoCompile): Add 'got_offset' field.
3818 * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
3819 method_got_offsets array.
3821 * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
3824 * aot-compiler.c (compile_method): Add generic method instances referenced
3825 by the method to the list of methods to be compiled, this is required so if
3826 A<T> references B<T>, and another assembly references A<int>, then it will
3827 also get a copy of B<int>.
3829 * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
3830 when checking for monitor enter/exit.
3832 2008-10-30 Mark Probst <mark.probst@gmail.com>
3834 * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
3835 for Monitor.Enter and Monitor.Exit if enabled.
3837 * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
3840 2008-10-30 Zoltan Varga <vargaz@gmail.com>
3842 * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
3843 of an OP_MOVE. Fixes #440046.
3845 * basic-long.cs: Add a new test.
3847 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
3849 * mini.h: Add synchronization note for the managed counter-part.
3851 * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
3852 returns the simd caps of the current cpu.
3854 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
3856 * basic-simd.cs: Remove Console.WriteLine.
3858 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
3860 * basic-simd.cs: New tests for Vector2ul.
3862 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
3864 * simd-intrinsics.c: Add new vector type Vector2ul.
3866 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
3868 * basic-simd.cs: New tests for Vector2l.
3870 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
3872 * cpu-x86.md: Add long version of most packed int ops.
3878 * simd-intrinsics.c: Add new vector type Vector2l.
3880 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
3882 * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
3884 * simd-methods.h: Remove SN_op_BitwiseXor.
3886 2008-10-28 Zoltan Varga <vargaz@gmail.com>
3888 * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
3891 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
3893 * basic-simd.cs: Test for Vector2d.
3895 * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
3898 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
3900 * cpu-x86.md: Add double version of all packed float ops.
3906 * simd-intrinsics.c: Add new vector type Vector2d.
3908 * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
3910 * simd-methods.h: Add Duplicate.
3912 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
3914 * basic-simd.cs: Test for packing with signed saturation.
3916 2008-10-28 Zoltan Varga <vargaz@gmail.com>
3918 * aot-compiler.c (add_generic_instances): Add all methods of generic instances
3919 found in the TYPESPEC table.
3921 2008-10-26 Zoltan Varga <vargaz@gmail.com>
3923 * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
3926 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3928 * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
3929 instead of the RVA, since the RVA can be changed by tools like the cil
3932 * method-to-ir.c (mono_method_to_ir2): Ditto.
3934 * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
3935 (deserialize_variable): Ditto.
3937 2008-10-25 Martin Baulig <martin@ximian.com>
3939 * debug-mini.c (write_variable): Use
3940 `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
3942 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
3944 * cpu-x86.md: Add unsigned variants of packd and packw.
3948 * mini-x86.h: Emit the right instruction for packd and packw.
3949 Add unsigned variants of packd and packw.
3951 * simd-intrinsics.c: Packd and packw were used in place of their
3952 unsigned variants. Change that.
3953 Add intrinsics for (Signed)PackWithSignedSaturation.
3955 * simd-methods.h: Add (Signed)PackWithSignedSaturation.
3957 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
3959 * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
3961 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
3963 * mini-ops.h: Remove dword packed add/sub with saturation ops.
3965 * cpu-x86.md: Remove dword packed add/sub with saturation ops.
3967 * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
3970 * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
3972 2008-10-24 Mark Probst <mark.probst@gmail.com>
3974 * method-to-ir.c, mini.c: Special casing for the synchronized
3975 wrapper for the ldtoken+GetTypeFromHandle case.
3977 2008-10-24 Zoltan Varga <vargaz@gmail.com>
3979 * mini.c (mono_replace_ins): Move this to branch-opts.c.
3981 * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
3982 created/split bblocks.
3984 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
3986 * mini-ops.h: Add packed signed mul high.
3990 * mini-x86.c (mono_arch_output_basic_block): Same.
3992 * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
3994 * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
3996 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
3998 * basic-simd.cs: Tests for Vector16sb.
4000 2008-10-24 Zoltan Varga <vargaz@gmail.com>
4002 * inssel.brg (stmt): Fix OP_HARD_NOP rule.
4004 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
4006 * mini-ops.h: Add packed signed min, max and compare greater.
4010 * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
4013 * simd-methods.h: Add CompareGreaterThan.
4015 * simd-methods.h: Remove CompareEquals.
4017 * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
4019 * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
4021 * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
4024 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
4026 * basic-simd.cs: Fix tests due to change in the API.
4028 2008-10-21 Zoltan Varga <vargaz@gmail.com>
4030 * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
4032 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
4034 * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
4036 * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
4037 inst_offset as this has invalid values for LDADDR.
4039 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
4041 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
4043 * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
4045 2008-10-21 Zoltan Varga <vargaz@gmail.com>
4047 * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
4048 for accessing field->data.
4050 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
4052 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
4054 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
4056 * simd-methods.h: Add SignedPackWithUnsignedSaturation.
4058 * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
4060 2008-10-21 Zoltan Varga <vargaz@gmail.com>
4062 * dominators.c (mono_compute_natural_loops): Allocate GList enties
4063 from the cfg mempool.
4065 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
4067 * basic-simd.cs: Tests for new methods in Vector8us.
4069 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
4071 * mini-ops.h: Add multiply and store high.
4075 * mini-x86.c (mono_arch_output_basic_block): Same.
4077 * simd-methods.h: Same.
4079 * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
4082 2008-10-19 Zoltan Varga <vargaz@gmail.com>
4084 * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
4085 mono_class_setup_vtable ().
4087 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
4088 mono_class_get_vtable_entry () for accessing klass->vtable.
4090 * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
4092 * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
4095 * method-to-ir.c (mono_save_token_info): Don't save references made from
4098 * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
4099 of generic instances.
4101 * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
4103 2008-10-19 Mark Probst <mark.probst@gmail.com>
4105 * cpu-ppc.md, mini-ppc.c: The length of the code generated for
4106 OP_JMP depends on the method signature. Calculate it properly.
4108 2008-10-19 Zoltan Varga <vargaz@gmail.com>
4110 * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
4113 * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
4115 (emit_extra_methods): Add another table mapping method indexes to
4116 offsets in the extra_method_info table.
4118 * mini.h: Bump AOT file format version.
4120 * aot-runtime.c: Merge most of the code from mono_aot_get_method
4121 and mono_aot_get_method_from_token () into one function.
4123 2008-10-19 Mark Probst <mark.probst@gmail.com>
4125 * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
4128 2008-10-18 Zoltan Varga <vargaz@gmail.com>
4130 * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
4133 * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
4136 * mini.c (mono_patch_info_equal): Compare the generic context as well.
4138 * mini.h: Bump aot file format version.
4140 * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
4141 AOT file can contain native code for methods which are not in the METHOD
4142 table. Generate code for non-sharable generic instances of generic methods
4143 found in the METHODSPEC table.
4145 * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
4146 encoding generic type handles.
4148 * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
4149 (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
4151 * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
4152 macros + MONO_ADD_INS.
4154 * mini.c (mono_jump_info_token_new2): New function which takes a generic
4157 * mini.h (MonoJumpInfoToken): Include fields for a generic context.
4159 * mini.h: Bump aot file format version.
4161 * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
4163 2008-10-17 Mark Probst <mark.probst@gmail.com>
4165 * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
4166 platforms, with definable stack alignment value. Set to 16 now
4169 * mini.c, mini.h, driver.c: Command line option for disabling
4172 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
4174 * basic-simd.cs: Tests for new methods in Vector4ui.
4176 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
4178 * mini-ops.h: Add packed int shuffle.
4182 * mini-x86.c (mono_arch_output_basic_block): Same.
4184 * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
4185 extract mask, max, min, shuffle.
4187 * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
4189 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
4191 * basic-simd.cs: Tests for new methods in Vector8us.
4193 2008-10-17 Mark Probst <mark.probst@gmail.com>
4195 * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
4196 RuntimeTypeHandle, not a TypedReference.
4198 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
4200 * simd-intrinsics.c: remove relocations.
4202 2008-10-17 Zoltan Varga <vargaz@gmail.com>
4204 * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM
4205 optimizations from the x86 backend.
4207 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
4209 * simd-methods.h, simd-intrinsics.c: debloat method names and
4210 prepare for no relocations.
4212 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
4214 * mini-ops.h: Add packed min/equal and sum of absolute differences.
4218 * mini-x86.c (mono_arch_output_basic_block): Same.
4220 * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
4221 extract mask, max, min and sum of absolute differences.
4223 * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
4226 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
4228 * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
4229 Renamed one test for consistency.
4231 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
4233 * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
4234 fix to the code that deal with other blocks.
4236 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
4238 * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
4240 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
4242 * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
4243 that deals with vreg interference. Explicitly check for OP_LDADDR to be
4244 able to process the source reg.
4246 2008-10-16 Martin Baulig <martin@ximian.com>
4248 * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
4250 * inssel.brg: Add `OP_HARD_NOP'.
4252 * mini.h (MonoCompile): Added `keep_cil_nops' flag.
4254 * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
4255 `OP_HARD_NOP' instruction when running inside the debugger.
4257 * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
4258 `OP_HARD_NOP' instruction when running inside the debugger.
4260 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
4262 * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
4263 now works. The issue with the regalloc tripping up no longer
4266 * simd-intrinsics.c (load_simd_vreg): Same.
4268 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
4270 * basic-simd.cs: Tests for new Vector8ui methods.
4272 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
4274 * simd-intrinsics.c (get_simd_vreg): Simplify code and test
4275 only for type. This fixes crashes where MonoInst::klass is checked
4276 for ops of type != VTYPE or OBJ.
4278 * simd-intrinsics.c (load_simd_vreg): Same.
4280 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
4282 * mini-ops.h: Add ops for packed shuffle/max/avg and
4287 * mini-x86.c (mono_arch_output_basic_block): Same.
4289 * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
4292 * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
4293 to emit extract mask op.
4295 * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
4296 to emit word shuffles.
4298 2008-10-15 Mark Probst <mark.probst@gmail.com>
4300 * mini.c (mono_allocate_stack_slots_full): Align stack frame to
4301 the largest alignment needed by a variable, but at least
4304 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
4306 * basic-simd.cs: Tests for the fixes in the last commit.
4308 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
4310 * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
4311 no longer handles STACK_PTR input.
4313 * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
4315 * simd-intrinsics.c (load_simd_vreg): New function that works like
4316 get_simd_vreg but handles STACK_PTR input.
4318 * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
4319 as the input can be an arbitrary pointer.
4321 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
4322 LDADDR local optimization directly otherwise use a store op.
4324 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
4326 * basic-simd.cs: Tests for dup low and dup high.
4328 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
4330 * mini-ops.h: Add dup low and dup high ops.
4334 * mini-x86.c (mono_arch_output_basic_block): Same.
4336 * simd-intrinsics.c (vector4f_intrinsics): Same.
4338 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
4340 * basic-simd.cs: Tests for recently added functionality.
4342 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
4344 * mini-ops.h: Add remaining sse1 fp ops.
4346 * cpu-x86.md: Add remaining sse1 fp ops.
4348 * mini-x86.c (mono_arch_output_basic_block): Same.
4350 * mini.h: Add enum for simd FP compare conditions.
4352 * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
4354 * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
4355 so the backed can generate the appropriate op.
4357 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
4358 This patch squeese one more byte from the SimdIntrinsc struct.
4360 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
4361 a a shift amount intead of simply or'ing it.
4363 * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
4365 * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
4366 byte so we can have an aditional flags field without increasing struct size.
4368 * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
4369 against the simd_supported_versions bitmask.
4371 * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
4373 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
4375 * mini.c: remove rawbuffer code (the only use here is unsafe because
4376 it takes locks during signal handling and the kernel now provides much
4377 better info in proc/pid/smaps these days).
4379 2008-10-13 Zoltan Varga <vargaz@gmail.com>
4381 * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
4382 OP_X86_PUSH_OBJ. Fixes #434620.
4384 * objects.cs: Add a test.
4386 2008-10-12 Rodrigo Kumpera <rkumpera@novell.com>
4388 * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
4389 that the packuswb/packusdw don't work with unsigned numbers for what
4390 would be negative numbers in signed format.
4392 * cpu-x86.md: Add doubleword forms of many ops and packing ones.
4393 Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
4395 * mini-ops.h: Add doubleword forms of many ops and packing ones.
4397 * mini-x86.c: Emit doubleword forms of many ops and packing ones.
4399 * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
4401 * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
4403 * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
4406 * simd-intrinsics.c (simd_version_name): New function, returns the name of the
4407 version as the enum in mini.h.
4409 * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
4410 for sse3 ops, check the simd_version field if present. This way the code
4411 works with all versions of sse.
4413 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
4415 * simd-intrinsics.c: Fixed intrinsic name typo.
4417 * mini.h: Added missing simd exported function.
4419 * basic-simd.cs: Added tests for Vector4ui.
4420 Fixed broken test for Vector16b.
4422 2008-10-10 Zoltan Varga <vargaz@gmail.com>
4424 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
4425 the max length to 64.
4427 2008-10-10 Mark Probst <mark.probst@gmail.com>
4429 * method-to-ir.c: Only do the fast virtual generic method call for
4430 non-wrapper methods.
4432 * mini.h, mini-trampolines.c: The new generic virtual remoting
4433 trampoline handles virtual method calls via the vtable (as done by
4434 the fast virtual generic method calls) to remoting proxies.
4436 * mini.c (mono_jit_create_remoting_trampoline): For generic
4437 methods reate a generic virtual remoting trampoline.
4439 * mini-amd64.h: Enable fast virtual generic method calls again.
4441 2008-10-10 Mark Probst <mark.probst@gmail.com>
4443 * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
4444 restore registers when doing tail calls.
4446 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
4448 * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
4451 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
4453 * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
4455 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
4457 * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
4459 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
4461 * basic-simd.cs: Retrofit for API changes.
4463 2008-10-10 Mark Probst <mark.probst@gmail.com>
4465 * mini-ppc.c: Handle integer stack arguments for tail calls.
4467 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
4469 * optflags-def.h: Removed sse3 optimization.
4473 * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
4476 * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
4478 * mini.h: Added enumeration with simd versions.
4480 * simd-intrinsics.c (emit_intrinsics): Use the new static var
4483 * simd-intrinsics.c: Added mono_simd_intrinsics_init.
4485 * mini.c (mini_init): Call mono_simd_intrinsics_init.
4487 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
4489 * basic-simd.cs: Added tests for Vector8u and Vector16u.
4491 * basic-simd.cs: Fixed test naming.
4493 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
4495 * mini-ops.h: Added ops for packed and saturated math, shifts
4496 and packing/unpacking.
4498 * cpu-x86.md: Added descriptors for the above ops.
4500 * mini-x86.c: Added code to emmit the above ops.
4502 * simd-intrinsics.c: Added support for Vector16u and Vector8u.
4504 2008-10-08 Zoltan Varga <vargaz@gmail.com>
4506 * aot-compiler.c (compile_method): Enable AOT for generic code.
4508 * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
4510 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
4512 * mini.c: add a workaround for a common screwup that ends up blamed
4513 to mono (other processes blocking signal delivery).
4515 2008-10-07 Zoltan Varga <vargaz@gmail.com>
4517 * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
4518 in the LDFLD/STFLD opcodes. Fixes #432673.
4520 * iltests.il.in: Add a new test.
4522 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
4524 * mini-arm.c: attach the thread in unmanaged->managed transitions
4525 using delegates (bug #433148).
4527 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
4529 * basic-simd.cs: Use new ShuffleSel constants.
4531 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
4533 * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
4535 * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
4536 only disable simd intrinsics if no sse2 is detected.
4538 * optflags-def.h: Added sse3.
4540 * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
4543 2008-10-07 Zoltan Varga <vargaz@gmail.com>
4545 * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
4546 when adding delegate-invoke wrappers.
4548 2008-10-07 Zoltan Varga <vargaz@gmail.com>
4550 * Makefile.am: Reenable the simd tests.
4552 2008-10-07 Bill Holmes <billholmes54@gmail.com>
4554 * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
4555 add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
4556 other vreg is allocated to that hreg.
4558 Contributed under MIT/X11 license.
4560 2008-10-07 Zoltan Varga <vargaz@gmail.com>
4562 * Makefile.am: Disable the simd tests for now as Mono.Simd is not
4565 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
4567 * basic-simd.cs: New test suite for SIMD intrinsics.
4569 * Makefile.am: Added new tests.
4571 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
4573 * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
4577 * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
4579 * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
4580 using SSE2 aware opcodes.
4582 * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
4583 is enabled, this code path is only reachable if conversion ops are emmited after
4586 * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
4588 This optimization saves 6 bytes per conversion against the old version.
4590 2008-10-06 Zoltan Varga <vargaz@gmail.com>
4592 * aot-compiler.c (compile_method): Don't skip methods referencing
4593 generic methods without a corresponding entry in token_info_hash, since
4594 encode_method_ref () can handle all generic methods now.
4596 * method-to-ir.c (mono_save_token_info): Don't save the token info if a
4597 generic context is set.
4599 * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
4600 generic sharing of LDTOKEN.
4602 2008-10-06 Mark Probst <mark.probst@gmail.com>
4604 * mini-amd64.h: Temporarily disabled fast virtual generic method
4605 calls because it breaks the System.Runtime.Remoting tests.
4607 2008-10-06 Zoltan Varga <vargaz@gmail.com>
4609 * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
4611 * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
4612 so inlining actually works.
4613 (check_inline_caller_method_name_limit): Ditto.
4615 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
4617 * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
4618 64 bit safety (from Olaf Hering and Andreas Farber).
4620 2008-10-06 Zoltan Varga <vargaz@gmail.com>
4622 * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
4623 mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
4624 unused virtual call support code.
4626 * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
4628 * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
4629 which can't use aot trampolines.
4630 (decode_patch): Don't create aot trampolines for methods which can't use
4633 * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
4634 use aot trampolines.
4636 * mini.h: Bump AOT image format version.
4638 2008-10-05 Zoltan Varga <vargaz@gmail.com>
4640 * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
4641 to save_token_info () since cmethod is inflated for constrained calls.
4643 * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
4645 2008-10-04 Andreas Farber <andreas.faerber@web.de>
4647 * Makefile.am: Add build rules for ppc64.
4648 This avoids the build failing at pedump with unresolved symbols
4649 due to lack of arch_sources. Instead it will now fail earlier
4650 due to lack of cpu-ppc64.md.
4652 Contributed under MIT/X11 license.
4654 2008-10-04 Mark Probst <mark.probst@gmail.com>
4656 * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
4659 * iltests.il.in: Add test case for tail call with many arguments.
4661 2008-10-03 Zoltan Varga <vargaz@gmail.com>
4663 * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
4664 to the fast virtual generic method code until the aot case is fixed.
4666 2008-10-03 Mark Probst <mark.probst@gmail.com>
4668 * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
4670 2008-10-03 Mark Probst <mark.probst@gmail.com>
4672 * mini-amd64.c, mini-amd64.h: Implement generic virtual method
4675 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
4677 * simd-intrinsics.c: Forgot to add this one.
4679 * mini-codegen.c: Fix macro in case SIMD is not supported.
4681 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
4683 This patch land initial JIT support for simd intrinsics.
4685 * mini-x86.h: Added new define to make --enable_minimal work on x86.
4687 * Makefile.am: Added simd-intrinsics.c
4689 * simd-intrinsics.c: New file with simd instrinsic related
4692 * cfold.c (mono_constant_fold_ins2): Fold XZERO.
4694 * cpu-x86.md: Add simd related instructions.
4696 * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
4698 * driver.c: Added two new --regression variants.
4700 * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
4702 * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
4704 * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
4705 extract some complicated logic to helper functions.
4707 * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
4709 * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
4711 * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
4712 the specialized simplification pass.
4714 * method-to-ir.c (mono_spill_global_vars): Use new macro.
4716 * mini-codegen.c: Added SIMD constants to all regbanks arrays.
4718 * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
4721 * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
4722 if MONO_ARCH_NEED_SIMD_BANK is defined.
4724 * mini-ops.h: Added the new simd ops.
4726 * mini-x86.c: Added mono_arch_xregname.
4728 * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
4730 * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
4732 * mini-x86.h: Define simd related MONO_ARCH macros.
4734 * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
4736 * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
4738 * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
4739 MONO_CLASS_IS_SIMD to deal with simd related IR.
4741 * mini.h (MonoInst): Added spill_var to the backend union.
4743 * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
4745 * mini.h: Added forward declarations of the new simd fuctions.
4747 * optflags-def.h: Added new optimization names SIMD.
4749 * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
4751 * regalloc.h: Added support for working with 3 register banks.
4753 * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
4755 * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
4757 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
4759 * mini-exceptions.c: remove 64 bit related ifdef clutter.
4761 2008-10-03 Zoltan Varga <vargaz@gmail.com>
4763 * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
4764 instead of one on 64 bit systems.
4766 * method-to-ir.c: Remove unused includes.
4768 2008-10-02 Zoltan Varga <vargaz@gmail.com>
4770 * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
4771 cfg->used_int_regs, since the two are different on arm.
4773 2008-10-02 Mark Probst <mark.probst@gmail.com>
4775 * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
4776 mono_method_get_vtable_index() to get the vtable index.
4778 2008-10-02 Mark Probst <mark.probst@gmail.com>
4780 * method-to-ir.c (mono_method_to_ir2): Don't create native
4781 wrappers for array methods, because they're never called (and if
4782 they were called they wouldn't work).
4784 2008-10-02 Mark Probst <mark.probst@gmail.com>
4786 * method-to-ir.c (mono_method_to_ir2): Array methods are
4787 special-cased and must not be invoked indirectly via the (M)RGCTX
4788 when generic sharing is turned on. Fixes #431413.
4790 2008-10-01 Mark Probst <mark.probst@gmail.com>
4792 * method-to-ir.c: When generic sharing is active, call
4793 non-interface virtual generic methods via the standard trampoline.
4795 * mini-trampolines.c: Handle virtual generic shared methods.
4797 * mini.h, mini-x86.c, mini-x86.h: New argument for
4798 mono_arch_build_imt_thunk() which is non-NULL for virtual generic
4799 method thunks and which is the trampoline to call if the lookup
4800 fails. Enable the virtual generic method thunk for x86.
4802 * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
4803 mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
4804 argument but assert that it's NULL, because these archs don't yet
4805 implement the virtual generic method thunk. Changes in the IMT
4806 thunk data structures.
4808 2008-10-01 Zoltan Varga <vargaz@gmail.com>
4810 * aot-compiler.c (emit_globals): Avoid invalid characters in
4811 the static linking symbol.
4813 * objects.cs: Add a test for the range check optimization. Fix warnings.
4815 * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
4816 optimization from the current JIT.
4818 * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
4819 later in decompose_array_access_opts () to allow more optimizations.
4821 * method-to-ir.c (mono_handle_soft_float): Rename this to
4822 mono_decompose_soft_float () for consistency.
4824 * mini-ops.h: Fix arguments of OP_STRLEN.
4826 * method-to-ir.c (save_cast_details): Extract the cast details saving code
4827 into a separate function.
4828 (reset_cast_details): Ditto.
4829 (handle_unbox): Save cast details. Fixes #431254.
4831 * method-to-ir.c: Remove some obsolete FIXMEs.
4833 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
4835 * ir-emit.h (alloc_dreg): Write a warning before crashing.
4837 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
4839 * mini-codegen.c: More work on macros to make them
4840 ready for multiple regbanks.
4842 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
4844 * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
4846 * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
4848 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
4850 * mini-codegen.c (mono_spillvar_offset): Proper support for
4853 2008-09-30 Zoltan Varga <vargaz@gmail.com>
4855 * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
4856 the stack overflow changes.
4858 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
4860 * mini-codegen.c: Make all bank macros depend on reg_bank.
4862 * mini-codegen.c (mono_local_regalloc): Make free mask
4863 initialization regbank aware.
4865 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
4867 * mini-codegen.c (mono_local_regalloc): Extract callee
4868 mask selection to a function and make it regbank aware.
4870 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
4872 * mini-codegen.c (mono_local_regalloc): Changed the cloberring
4873 code to deal with many regbanks.
4875 2008-09-30 Zoltan Varga <vargaz@gmail.com>
4877 * mini-codegen.c: More fp->regbank changes.
4879 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
4881 * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
4882 of a hardcoded constant.
4884 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
4886 * method-to-ir.c (type_from_stack_type): Fix typo.
4888 2008-09-29 Zoltan Varga <vargaz@gmail.com>
4890 * mini-ia64.c (emit_move_return_value): Convert float return values to
4893 * objects.cs: Add a new test.
4895 * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
4896 VARARG methods to fix an assert later.
4898 * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
4899 end so it at least compiles.
4901 2008-09-28 Zoltan Varga <vargaz@gmail.com>
4903 * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
4905 2008-09-28 Rodrigo Kumpera <rkumpera@novell.com>
4907 * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
4908 optimization to a new function (emit_optimized_ldloca_ir) and enable
4909 it for both ldloca and ldloca_s.
4911 2008-09-28 Zoltan Varga <vargaz@gmail.com>
4913 * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
4914 gshared CASTCLASS code.
4916 * driver.c (mono_main): Add a workaround for shutdown crashes seen on
4917 amd64, where the libc stack unwinder encounters stack frames referring to
4918 native code in unmapped memory.
4920 * method-to-ir.c (mini_emit_check_array_type): Add support for generic
4923 * generics.cs: Add new test.
4925 2008-09-27 Zoltan Varga <vargaz@gmail.com>
4927 * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
4928 add a check that one of the ARM_FPU_ constants is defined.
4930 * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
4932 * mini-exceptions.c: Fix build on non-altstack platforms.
4934 * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
4937 * ir-emit.h: Add a comment to NEW_PCONST.
4939 * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
4941 * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
4943 * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
4944 after the changes to MonoJitDomainInfo.
4946 2008-09-27 Mark Probst <mark.probst@gmail.com>
4948 * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
4950 2008-09-27 Mark Probst <mark.probst@gmail.com>
4952 * mini-ppc.c: Compiler warning fixes.
4954 2008-09-27 Mark Probst <mark.probst@gmail.com>
4956 * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
4959 2008-09-27 Mark Probst <mark.probst@gmail.com>
4961 * exceptions-ppc.c, mini-ppc.h: Compile
4962 mono_arch_handle_altstack_exception() on Darwin, too.
4964 2008-09-27 Mark Probst <mark.probst@gmail.com>
4966 * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
4967 work on archs which don't have generic sharing implemented, only
4968 without the vtable_arg.
4970 2008-09-26 Mark Probst <mark.probst@gmail.com>
4972 * mini.c: Added comment explaining why delegate ctor icall
4973 wrappers are compiled.
4975 2008-09-26 Mark Probst <mark.probst@gmail.com>
4977 * mini.c: Don't produce trampolines to delegate ctor icall
4978 wrappers but compile them upfront.
4980 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
4982 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
4983 runtime-set function when going back to managed code. Currently this
4984 is used to set back the protection on the soft ovf pages and/or to
4985 throw the stack overflow exception that happened in unmanaged code.
4987 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
4989 * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
4990 runtime-set function when going back to managed code. Currently this
4991 is used to set back the protection on the soft ovf pages and/or to
4992 throw the stack overflow exception that happened in unmanaged code.
4994 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
4996 * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
4997 the support code for restoring stack protection after stack overflows
4998 that happen in unmanaged code. Don't set the exec permission on the
5001 2008-09-26 Zoltan Varga <vargaz@gmail.com>
5003 * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
5004 delegate->method_ptr is set. Fixes #428054.
5006 2008-09-25 Zoltan Varga <vargaz@gmail.com>
5008 * tests.cs: Rename to ratests.cs.
5010 * method-to-ir.c: Merge the emit_get_rgctx () calls into the
5011 emit_get_rgctx_... functions.
5013 2008-09-25 Mark Probst <mark.probst@gmail.com>
5015 * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
5017 2008-09-25 Mark Probst <mark.probst@gmail.com>
5019 * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
5020 before asserting that method is sharable.
5022 2008-09-25 Mark Probst <mark.probst@gmail.com>
5024 * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
5025 whether method needs a static RGCTX wrapper used instead of
5028 * generic-sharing.c, mini.h: A few functions moved to
5029 metadata/generic-sharing.c.
5031 2008-09-25 Mark Probst <mark.probst@gmail.com>
5033 * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
5034 Generic code sharing for value types, which essentially means
5035 treating value type methods like static methods. The RGCTX is
5036 passed in the same way.
5038 2008-09-25 Zoltan Varga <vargaz@gmail.com>
5040 * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
5041 opcode when creating multi-dimensional arrays of open types.
5043 * generic-sharing.c (mono_method_check_context_used): Handle arrays of
5046 * generics.cs: Add a test.
5048 * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
5050 2008-09-24 Zoltan Varga <vargaz@gmail.com>
5052 * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
5054 * mini.c (mini_method_compile): Set it when running under the debugger.
5056 * method-to-ir.c (mono_handle_global_vregs): Disable global->local
5057 vreg optimization if the flag is set.
5059 * driver.c (mono_main): Add --attach= option to pass options to
5062 * mini.c (sigquit_signal_handler): Start the attach agent.
5064 * ssapre.c: Disable this to save space since it is not yet ported to
5067 * regalloc2.c: Disable this to save space.
5069 * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
5071 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
5073 * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
5074 the -v option useful again.
5076 2008-09-24 Zoltan Varga <vargaz@gmail.com>
5078 * mini-amd64.c (mono_arch_output_basic_block): Add support for
5081 * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
5082 arrays of arrays. Fixes #428406.
5084 * method-to-ir.c (mini_emit_castclass): Ditto.
5086 * objects.cs: Add new test.
5088 2008-09-23 Rodrigo Kumpera <rkumpera@novell.com>
5090 * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
5091 was wrong at it choked against target_type_is_incompatible for byref types.
5093 2008-09-23 Zoltan Varga <vargaz@gmail.com>
5095 * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most
5098 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
5100 * mini-exceptions.c: update a few more exceptions-related counters.
5102 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
5104 * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
5105 new functions to allocate from persistent mempools.
5107 2008-09-23 Zoltan Varga <vargaz@gmail.com>
5109 * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow
5110 multiple register banks in the future.
5112 * mini-codegen.c (mono_local_regalloc): Fix a warning.
5114 2008-09-22 Rodrigo Kumpera <rkumpera@novell.com>
5116 * mini.c (type_to_eval_stack_type): Remove duplicated function.
5118 * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
5120 * mini.h: Export type_to_eval_stack_type.
5122 This function was nearly duplicated in method-to-ir.c and mini.c. The difference
5123 is only ins->klass of byref types.
5125 2008-09-22 Zoltan Varga <vargaz@gmail.com>
5127 * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
5128 (mini_emit_memcpy2): Ditto.
5130 * mini-amd64.c: Fix a warning.
5132 2008-09-21 Mark Probst <mark.probst@gmail.com>
5134 * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
5137 2008-09-19 Rodrigo Kumpera <rkumpera@novell.com>
5139 * method-to-ir.c: Extract stloc micro-optimization to a
5140 function and apply it to all cases.
5142 2008-09-19 Mark Probst <mark.probst@gmail.com>
5144 * method-to-ir.c: Don't fail generic code sharing in cases we
5147 2008-09-18 Mark Probst <mark.probst@gmail.com>
5149 * mini-ppc.c: Handle structs in tailcalls on Darwin.
5151 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
5153 * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
5156 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
5158 * trace.c: make tracing more useful and correct, with per-thread
5161 2008-09-15 Mark Probst <mark.probst@gmail.com>
5163 * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
5164 doing a method call and the argument is an R4.
5166 2008-09-14 Zoltan Varga <vargaz@gmail.com>
5168 * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
5171 2008-09-13 Mark Probst <mark.probst@gmail.com>
5173 * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
5175 2008-09-12 Zoltan Varga <vargaz@gmail.com>
5177 * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
5178 (MONO_JUMP_TABLE_FROM_INS): Ditto.
5180 2008-09-11 Zoltan Varga <vargaz@gmail.com>
5182 * driver.c: Add a --agent argument (not supported yet) to load managed
5183 agent assemblies before loading the main assembly, similarly to how the
5184 Java VM handles agents.
5186 2008-09-11 Mark Probst <mark.probst@gmail.com>
5188 * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
5189 function to do stack layout of local variables.
5191 2008-09-11 Mark Probst <mark.probst@gmail.com>
5193 * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
5196 2008-09-11 Zoltan Varga <vargaz@gmail.com>
5198 * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
5199 abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
5200 JIT if DISABLE_JIT is defined.
5202 * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
5205 2008-09-10 Mark Probst <mark.probst@gmail.com>
5207 * iltests.il.in: Disable the fconv test on PPC (the result is
5208 undefined according to ECMA).
5210 2008-09-10 Mark Probst <mark.probst@gmail.com>
5212 * iltests.il.in: Enable tail call tests for PPC.
5214 * mini.h: Add variable for storing incoming valuetype argument
5215 addresses for tail calls.
5217 * mini-ppc.c: Implement valuetype arguments and return values for
5220 2008-09-09 Mark Probst <mark.probst@gmail.com>
5222 * mini-ppc.c: Partially implement tail calls (struct arguments and
5223 return values not supported).
5225 * method-to-ir.c: Enable tail calls on PPC.
5227 2008-09-08 Zoltan Varga <vargaz@gmail.com>
5229 * aot-compiler.c (emit_wrapper_info): Omit the klass name from
5230 runtime-invoke wrappers to work around the problem of them getting
5231 assigned to a random class.
5233 * aot-runtime.c (mono_aot_get_method): Ditto.
5235 2008-09-07 Zoltan Varga <vargaz@gmail.com>
5237 * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
5238 the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
5240 2008-09-07 Mark Probst <mark.probst@gmail.com>
5242 * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
5243 until they're implemented properly.
5245 * exceptions-ppc.c: Use arch-independent exception-handling code
5246 instead of custom one.
5248 * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
5251 * tramp-ppc.c, mini-ppc.c: Fixed warnings.
5253 * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
5254 applies when __powerpc__ is defined.
5256 2008-09-06 Zoltan Varga <vargaz@gmail.com>
5258 * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
5259 methods to their code to avoid computing the full name of wrappers and
5260 doing a lookup in a string hash table.
5262 2008-09-05 Zoltan Varga <vargaz@gmail.com>
5264 * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
5265 we identify bblocks before method_to_ir () is ran.
5267 * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
5268 Also avoid optimizing branches pointing to themselves.
5270 * mini.c (mini_method_compile): Ditto. Fixes #422947.
5272 2008-09-05 Rodrigo Kumpera <rkumpera@novell.com>
5274 * driver.c (mono_main): Enable the new verifier under core-clr and cas.
5276 2008-09-05 Zoltan Varga <vargaz@gmail.com>
5278 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
5279 (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
5280 (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
5283 * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all
5284 jumped to the same entry in plt_jump_table.
5286 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
5288 * method-to-ir.c (initialize_array_data): Handle field with RVA from
5291 2008-08-31 Zoltan Varga <vargaz@gmail.com>
5293 * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
5294 other assignment can be if converted. Saves 1.5% on corlib size and fixes
5297 2008-08-29 Geoff Norton <gnorton@novell.com>
5299 * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
5300 segment, and doesn't properly handle .space as .text. Fixes
5303 2008-08-29 Geoff Norton <gnorton@novell.com>
5305 * mini.c: Disable the mach exception handler when running on
5308 2008-08-29 Geoff Norton <gnorton@novell.com>
5310 * aot-compiler.c: Patch from Renaldas Zioma to properly register
5311 globals on Darwin/ARM
5313 2008-08-28 Zoltan Varga <vargaz@gmail.com>
5315 * mini.c: Avoid not initializing the runtime when doing AOT compilation,
5316 since too many things depend on it. Instead, call
5317 mono_runtime_set_no_exec ().
5319 * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
5322 * aot-compiler.c: Add an 'asm-only' AOT option.
5324 * mini.c: Avoid initializing the runtime when doing AOT compilation.
5326 * aot-compiler.c (compile_method): Disable gshared support for now as it
5329 2008-08-27 Bill Holmes <billholmes54@gmail.com>
5331 * mini-amd64.h : Fix a compiler warning.
5333 * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
5334 Changed to use a callback function to retrieve the unwind info.
5335 This avoids problems observed when code blocks were removed by
5336 unloading an app domain.
5338 * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole
5339 and branch excludes for Winx64. The fix in exceptions-amd64.c allows them
5342 Contributed under MIT/X11 license.
5344 2008-08-27 Bill Holmes <billholmes54@gmail.com>
5346 * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
5347 case to keep the stack aligned to 8.
5349 Contributed under MIT/X11 license.
5351 2008-08-26 Zoltan Varga <vargaz@gmail.com>
5353 * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
5354 avoid repeated linear searches.
5356 2008-08-25 Zoltan Varga <vargaz@gmail.com>
5358 * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
5359 methods it can't handle.
5361 * aot-compiler.c (add_method): Avoid adding a method twice.
5362 (add_wrappers): Add runtime invoke wrappers for all methods.
5364 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
5365 function to create an aot-compatible version of this trampoline.
5367 * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
5369 2008-08-24 Zoltan Varga <vargaz@gmail.com>
5371 * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
5373 * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
5374 with a generic sharing failure.
5376 * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
5378 * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
5379 CEE_RETHROW. Fixes #419634.
5381 * mini.c (mono_method_to_ir): Ditto.
5383 * exceptions.cs: Add a new test.
5385 * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
5386 to mono_type_stack_size_internal () since some callers might not pass in
5389 * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
5390 instrument_prolog. Fixes #419878.
5392 * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
5393 doubles in soft float mode volatile.
5395 2008-08-23 Zoltan Varga <vargaz@gmail.com>
5397 * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
5399 * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
5400 to handle soft float correctly.
5402 * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
5405 * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
5407 * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
5408 to sp, since the generics catch code requires it.
5410 * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
5413 * method-to-ir.c (emit_imt_argument): Pass imt_arg to
5414 mono_arch_emit_imt_argument ().
5416 * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
5418 * mini-arm.c tramp-arm.c: Generic sharing updates.
5420 2008-08-22 Zoltan Varga <vargaz@gmail.com>
5422 * mini-arm.c: Fix the arm build.
5424 * generic-sharing.c (mini_type_get_underlying_type): New helper function
5425 handling enums, generic instances and generic sharing.
5426 (mini_type_stack_size_full): Ditto.
5428 * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
5430 * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
5432 * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
5434 * tramp-arm.c: Implement the rgctx fetch and the generic class init
5437 * mini-arm.c: Various small generic sharing changes.
5439 * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
5441 (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
5444 * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
5445 helper function to return a generic class init trampoline.
5447 * method-to-ir.c mini.c: Use it.
5449 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
5450 arch-specfic function to return a generic class init trampoline.
5452 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
5453 the GENERIC_CLASS_INIT custom code.
5455 * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
5456 a fatal error, not a sharing failure.
5458 * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
5461 * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
5462 trampoline argument from MONO_ARCH_VTABLE_REG.
5464 * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
5465 order of the arguments to the C trampoline: pass 'slot' as the trampoline
5466 argument, and pass the vtable in VTABLE_REG.
5468 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
5469 order of the arguments to the C trampoline: pass 'slot' as the trampoline
5470 argument, and pass the vtable in VTABLE_REG.
5471 (mono_arch_create_trampoline_code_full): Remove some special casing for
5472 the rgctx fetch trampoline.
5474 * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
5477 * iltests.il: Add a test for it.
5479 2008-08-21 Zoltan Varga <vargaz@gmail.com>
5481 * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
5483 * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
5486 * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
5487 use mono_jit_info_table_find () to avoid recursion.
5488 (mono_delegate_trampoline): Add a sync wrapper here.
5490 * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
5493 * mini.c (mono_method_to_ir): Ditto.
5495 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
5496 add_sync_wrapper argument. Don't add a sync wrapper here.
5497 (mono_create_jump_trampoline): Don't add a sync wrapper here.
5499 * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
5501 2008-08-20 Bill Holmes <billholmes54@gmail.com>
5503 * exceptions-amd64.c (seh_handler): For Winx64 adding missing copy
5504 of nonvolatile registers back from MonoContext to CONTEXT.
5506 Contributed under MIT/X11 license.
5508 2008-08-20 Bill Holmes <billholmes54@gmail.com>
5510 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): When shifting the
5511 arguments on Winx64 there are only 4 argument registers. For this
5512 logic to work the last argument must be pulled from the stack.
5514 Contributed under MIT/X11 license.
5516 2008-08-20 Zoltan Varga <vargaz@gmail.com>
5518 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
5520 * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
5521 MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
5522 encode/decode_method_ref ().
5524 * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
5526 * aot-runtime.c (decode_patch): Ditto.
5528 * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
5529 MONO_PATCH_INFO_METHOD.
5531 * aot-runtime.c (decode_exception_debug_info): Decode the contents of
5534 * aot-compiler.c (emit_exception_debug_info): Emit the contents of
5537 * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
5539 * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
5540 one from the caller.
5542 * aot-runtime.c (decode_generic_inst): New function to decode and
5543 return a interned generic inst.
5544 (decode_klass_ref): Use it.
5545 (decode_method_ref): Ditto.
5547 * aot-compiler.c (emit_exception_debug_info): Save
5548 jinfo->has_generic_jit_info too.
5550 2008-08-19 Zoltan Varga <vargaz@gmail.com>
5552 * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
5554 * iltests.il.in: Add a test for fconv_to_i.
5556 * liveness.c: Disable the liveness2 pass for now to save space.
5558 * regalloc2.c: Include mempool-internals.h to fix warnings.
5560 * aot-compiler.c (encode_method_ref): Encode the context of generic
5563 * aot-runtime.c (decode_method_ref): Inflate generic methods using
5564 the context saved in the aot file.
5566 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
5568 * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
5570 * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
5571 volatile so they won't be optimized away.
5573 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
5579 * dominators.c: Remove duplicated functions that now are in
5580 mempool-internals.h.
5582 2008-08-19 Zoltan Varga <vargaz@gmail.com>
5584 * aot-compiler.c: Fix warnings.
5586 * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
5588 * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
5590 * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
5593 * mini.c (mono_resolve_patch_target): Ditto.
5595 * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
5596 (encode_klass_ref): Add support for encoding VARs/MVARs.
5598 * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
5600 * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
5601 the handling of the got entries into a separate 'decode_got_entry' function.
5602 Add support for RGCTX_FETCH.
5604 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
5605 clobbered by the trampoline code.
5607 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
5608 not clobbered by the indirect calling code.
5610 2008-08-18 Zoltan Varga <vargaz@gmail.com>
5612 * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
5615 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
5617 * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
5618 signature using the compilation mempool otherwise we would leak it.
5620 2008-08-18 Zoltan Varga <vargaz@gmail.com>
5622 * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
5623 mono_emit_abs_call ().
5625 * patch-info.h: Add GENERIC_CLASS_INIT.
5627 * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
5629 * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
5630 as their target as a near call.
5632 * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
5634 (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
5636 * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
5637 call to a runtime function described by a patch.
5639 * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
5640 mono_emit_abs_call, this has the advantage that the ABS handling code in
5641 mono_codegen () can handle them both, and can handle other stuff in the
5642 future without additional code.
5644 * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
5646 (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
5649 * mini.h: Add missing bblock related prototypes.
5651 * mini.h (MonoCompile): Remove unused reverse_inst_list and
5652 reverse_inst_list_len fields.
5654 * mini.c: Refactor this file a bit by moving branch optimizations to
5657 * method-to-ir.c: Merge generic sharing changes missed earlier.
5659 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
5661 * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
5662 shared patches. Process METHODCONST as a shared patch.
5664 * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
5665 as it crashes on the 2.0 mscorlib.
5667 * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
5670 * aot-compiler.c: Use is_plt_patch () in a few additional places.
5671 (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
5674 * aot-compiler.c: Reorganize the got handling code to be a bit more
5677 2008-08-17 Zoltan Varga <vargaz@gmail.com>
5679 * aot-compiler.c: Make the patch_to_plt_offset hash table use
5680 mono_patch_info_equals/hash, and use it to massively simplify
5683 * mini.c (mono_patch_info_hash): Simplify this and add support for
5686 * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
5688 * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
5689 handling code, since an offset is not enough to identify a trampoline.
5691 * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
5693 2008-08-17 Mark Probst <mark.probst@gmail.com>
5695 * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
5697 * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
5699 * mini-ops.h: Argument and result types for OVF_CARRY ops.
5701 * decompose.c: PPC decompositions for various ops.
5703 * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
5705 2008-08-17 Zoltan Varga <vargaz@gmail.com>
5707 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
5708 call the generic trampoline code using a call, instead of a jump, to
5709 remove some special casing from the generic trampoline code.
5711 * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
5712 (mono_codegen): Ditto.
5714 * aot-compiler.c aot-runtime.c: Ditto.
5716 * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
5718 * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
5719 helper function to find the offset corresponding to a lazy fetch trampoline.
5721 * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
5722 when doing generic sharing.
5724 * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
5727 * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
5728 mini-trampolines.c to be with the other trampoline creation functions.
5730 * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
5731 as it is equal to method->signature in most cases, add a
5732 mono_emit_method_call_full variant which takes a signature and an imt
5735 2008-08-16 Zoltan Varga <vargaz@gmail.com>
5737 * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
5738 to this function, since it could be computed easily from the method
5740 (mono_helper_compile_generic_method_wo_context): Removed, not needed any
5743 * method-to-ir.c mini.c: Remove references to
5744 compile_generic_method_wo_context.
5746 * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
5747 generic method calls.
5749 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
5750 dimensional non-szarrays.
5752 * mini.c (mini_init): Register mono_array_new_1.
5754 * jit-icalls.c (mono_array_new_1): New jit icall.
5756 * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
5757 pointing to the method.
5759 * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
5760 method addresses belonging to METHOD_JUMP patches in the
5761 jump_target_got_slot_hash.
5762 (mono_aot_load_method): Ditto.
5764 * aot-compiler.c (compile_method): Allow AOT compilation of methods with
5765 METHOD_JUMP patches.
5767 * mini.c (mini_create_jit_domain_info): New helper function which
5768 initializes/frees domain->runtime_info.
5769 (mini_free_jit_domain_info): Ditto.
5770 (mini_init): Install the domain hook functions with the runtime.
5772 * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
5773 information maintained by the JIT.
5775 * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
5776 insertion into jump_table_hash into mono_codegen (), also implement proper
5779 * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
5780 tail calls, it is already done by the aot code.
5782 * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
5785 * iltests.il.in: Make the jmp test a bit more complex.
5787 * aot-compiler.c (encode_method_ref): Handle references to normal methods of
5788 generic instances which doesn't have a token.
5790 * aot-runtime.c (decode_method_ref): Ditto.
5792 * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
5793 can handle this case now.
5794 (handle_box): Ditto.
5796 2008-08-15 Geoff Norton <gnorton@novell.com>
5798 * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
5801 2008-08-15 Zoltan Varga <vargaz@gmail.com>
5803 * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
5804 calling generic methods.
5806 * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
5808 * aot-runtime.c (decode_patch_info): Ditto.
5810 * mini.c (mono_resolve_patch_target): Ditto.
5812 * patch-info.h: Add METHOD_RGCTX.
5814 * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
5816 2008-08-14 Zoltan Varga <vargaz@gmail.com>
5818 * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
5819 arguments in registers.
5821 * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
5822 OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
5824 * mini.c (mini_method_compile): Abort aot compilation for generic
5825 methods if generic sharing is disabled.
5827 * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
5830 * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls
5831 requiring an mrgctx.
5833 * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
5834 store instructions when converting a vcall to a normal call.
5836 * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
5837 mono_arch_find_jit_info.
5839 2008-08-13 Zoltan Varga <vargaz@gmail.com>
5841 * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
5842 avoid calling mono_method_full_name () for every method even if the
5844 (check_inline_caller_method_name_limit): Ditto.
5846 2008-08-12 Zoltan Varga <vargaz@gmail.com>
5848 * driver.c (main_thread_handler): Allow AOT compilation of multiple
5849 assemblies in one run.
5851 * aot-compiler.c (mono_compile_assembly): Only print out a count of
5852 skipped methods if it is not 0.
5854 * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
5856 2008-08-12 Bill Holmes <billholmes54@gmail.com>
5858 * mini.c (mono_codegen): Changing a preprocessor check from WIN64 to
5859 MONO_ARCH_HAVE_UNWIND_TABLE.
5861 Contributed under MIT/X11 license.
5863 2008-08-12 Bill Holmes <billholmes54@gmail.com>
5865 * mini-amd64.c (mono_arch_cpu_optimizazions): Remove peephole and branch
5866 from default optimizaton list on Winx64.
5868 * mini-amd64.c (emit_tls_get): Added Winx64 specific implementation for GetTLS.
5870 * mini-amd64.c (mono_arch_emit_prolog): Adding an offset on Winx64 to get
5871 the LMF from the MonoJitTlsData structure.
5873 * mini-amd64.c (mono_arch_setup_jit_tls_data): Added Winx64 implementation.
5875 Contributed under MIT/X11 license.
5877 2008-08-12 Zoltan Varga <vargaz@gmail.com>
5879 * mini.c (sigsegv_signal_handler): Fix the build.
5881 * mini-amd64.c (emit_call_body): Use image->aot_module instead of
5882 assembly->aot_module.
5884 * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
5885 hash table. This simplifies and speeds up a lot of code, and fixes support
5888 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
5891 * mini-exceptions.c: Ditto.
5893 * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
5894 'native_offset' argument, since these are computed in the
5895 mono_find_jit_info () function.
5897 * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
5898 is used by exceptions-ppc.c.
5900 * exceptions-ppc.c: Call mono_find_jit_info () instead of
5901 mono_arch_find_jit_info ().
5903 * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
5904 mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
5905 generic code in mini-exceptions.c.
5907 2008-08-11 Zoltan Varga <vargaz@gmail.com>
5909 * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
5911 * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
5913 * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
5914 the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
5915 called while holding the loader lock. Fixes #415608.
5916 (mono_aot_get_method_from_token_inner): Ditto.
5918 2008-08-09 Zoltan Varga <vargaz@gmail.com>
5920 * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
5921 to reduce differences between this and the generic implementation in
5923 (ves_icall_get_frame_info): Ditto.
5925 * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
5927 * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
5930 * exceptions-ppc.c (arch_get_call_filter): Rename this to
5931 mono_arch_get_call_filter () and make it non-static, for consistency with the
5932 other architectures.
5934 2008-08-09 Rodrigo Kumpera <rkumpera@novell.com>
5937 * local-propagation.c:
5938 * mini-x86.c: Correct the name of arch defines.
5940 2008-08-09 Zoltan Varga <vargaz@gmail.com>
5942 * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
5943 NO_EMULATE_LONG_SHIFT_OPS define.
5945 2008-08-08 Zoltan Varga <vargaz@gmail.com>
5947 * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
5948 now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
5950 * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
5951 MACH fixes. Merged from the 2.0 branch.
5953 * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
5955 * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
5956 (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
5958 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
5960 * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
5961 mono_marshal_get_native_wrapper () signature changes.
5963 2008-08-07 Rodrigo Kumpera <rkumpera@novell.com>
5965 * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
5966 conversion bug under arm.
5968 2008-08-06 Rodrigo Kumpera <rkumpera@novell.com>
5970 * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
5972 * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
5973 with overflow checking.
5975 2008-08-05 Marek Habersack <mhabersack@novell.com>
5977 * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
5978 to the genmdesc.pl file
5980 2008-08-05 Zoltan Varga <vargaz@gmail.com>
5982 * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
5983 arg_array in the soft-float versions of the LOAD/STORE macros.
5985 * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
5988 * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
5990 2008-08-02 Zoltan Varga <vargaz@gmail.com>
5992 * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
5993 a float HFA. Fixes #413621.
5995 2008-08-02 Gert Driesen <drieseng@users.sourceforge.net>
5997 * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
5998 frame_size to args_size. Fixes build.
6000 2008-08-02 Zoltan Varga <vargaz@gmail.com>
6002 * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
6003 and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
6005 * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
6006 the stack are not unaligned. Fixes #413247.
6008 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
6010 * mini.c: update jitted methods performance counters.
6012 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
6014 * mini-exceptions.c: increase the exceptions thrown performance
6015 counter in mono_handle_exception ().
6017 2008-07-29 Zoltan Varga <vargaz@gmail.com>
6019 * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
6020 can work with netmodules.
6022 2008-07-28 Geoff Norton <gnorton@novell.com>
6024 * mini-x86.h: Correct the frame alignment on OSX. Fixes the jit
6027 2008-07-28 Zoltan Varga <vargaz@gmail.com>
6029 * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
6032 2008-07-28 Bill Holmes <billholmes54@gmail.com>
6034 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
6035 The float param registers and other param registers must be the
6036 same index on Windows x64.
6038 * mini-amd64.c (mono_arch_allocate_vars) : Implementing the
6039 ArgValuetypeAddrInIReg argument case. Setting the argument
6040 op to OP_VTARG_ADDR (OP_REGOFFSET)).
6042 * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix. Use the size
6043 variable computed above as the copy length for arguments of storage
6044 type ArgValuetypeAddrInIReg.
6046 * mini-amd64.c (mono_arch_emit_call) : Implementing the
6047 ArgValuetypeAddrInIReg argument case. This case will rely on
6048 mono_arch_emit_outarg_vt to emit the correct code later in the process.
6050 * mini-amd64.c (mono_arch_emit_call) : On Winx64 there always needs to be
6051 a 32 byte stack allocation for all calls. We will omit the adjustment for
6052 jump and tail call instructoins as they do not follow the typical call behavior.
6054 * mini-amd64.c (mono_arch_emit_outarg_vt) : Implementing the case for
6055 ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
6056 local variable and pass the local variable by reference to the called method.
6058 * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
6059 Implementing the ArgValuetypeAddrInIReg argument case. When the address
6060 of a struct is passed in a register it must be saved with the other
6061 volatile argument on the stack.
6063 * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix. When omitting the
6064 frame pointer the stack adjustment value must be saved to the unwind
6067 Contributed under MIT/X11 license.
6069 2008-07-28 Zoltan Varga <vargaz@gmail.com>
6071 * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
6072 which got lost in the merge.
6074 2008-07-27 Zoltan Varga <vargaz@gmail.com>
6076 * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
6079 * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
6081 * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
6082 icalls, since they won't be patched.
6084 * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
6085 different code sequence when running under valgrind to prevent some valgrind
6088 * iltests.il.in: Add new regression test.
6090 * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
6093 * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
6094 accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
6096 * iltests.il.in: Add new test.
6098 * aot-compiler.c: Fix some warnings.
6100 * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
6103 2008-07-27 Zoltan Varga <vargaz@gmail.com>
6105 * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
6106 (mini_usage_jitdeveloper): Add a missing --wapi option.
6108 2008-07-25 Zoltan Varga <vargaz@gmail.com>
6110 * mini-codegen.c: Simplify the is_fp macros.
6111 (free_up_ireg): Remove, use free_up_reg instead.
6112 (free_up_reg): Fix the fp case.
6114 2008-07-26 Zoltan Varga <vargaz@gmail.com>
6116 * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
6119 * exceptions-x86.c: Merge some changes which seemed to have got lost
6120 in the linear-ir merge.
6122 * liveness.c: Disable the liveness2 pass on 32 bit platforms.
6124 * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
6125 long vreg volatile even if the variable was already created.
6127 * liveness.c (update_liveness2): Avoid eliminating dead definitions of
6130 2008-07-26 Zoltan Varga <vargaz@gmail.com>
6132 * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
6134 * mini.c (mono_jit_compile_method_inner): Add support for
6135 MONO_EXCEPTION_BAD_IMAGE.
6137 * method-to-ir.c (mono_method_to_ir2): Avoid a crash if
6138 mini_method_get_context () returns NULL. Fixes #356531.
6140 * mini.c (mono_method_to_ir): Ditto.
6142 * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
6143 accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
6145 2008-07-25 Zoltan Varga <vargaz@gmail.com>
6147 * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
6148 in the LDFTN implementation.
6150 2008-07-25 Mark Probst <mark.probst@gmail.com>
6152 * mini-trampolines.c (mono_magic_trampoline): When sharing generic
6153 code, patch calls to icalls, too, even if they're not in the
6154 shared generic code hash. Fixes #411962.
6156 2008-07-25 Zoltan Varga <vargaz@gmail.com>
6158 * cpu-x86.md: Increase the length of the fcall opcodes.
6160 * mini-x86.c (emit_move_return_value): Avoid some precision issues for
6161 calls returning floats.
6163 * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
6166 * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
6169 * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
6170 into the domain->method_code_hash.
6172 * aot-compiler.c: Fix win32 build.
6174 * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
6176 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
6177 gshared NEWARR implementation.
6179 * cpu-sparc.md: Remove duplicate localloc_imm opcode.
6181 * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
6182 can be used outside of method_to_ir.
6184 * mini.h (MonoCompile): Add arg_types field.
6186 * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
6188 * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
6189 the values of the local arg_array and param_types array.
6191 2008-07-24 Zoltan Varga <vargaz@gmail.com>
6193 * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
6194 got accesses might only get generated later when NEWOBJ is decomposed.
6196 * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
6197 looking up the native code of the target method when a delegate is called
6200 * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
6203 * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
6205 * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
6206 AOT work on platforms without a working dlsym implementation.
6208 * mini.h: Bump AOT image format version.
6210 2008-07-24 Mark Probst <mark.probst@gmail.com>
6212 * mini-exceptions.c: Free a MonoType with
6213 mono_metadata_free_type() instead of g_free().
6215 * aot-runtime.c: Free a MonoType.
6217 2008-07-24 Zoltan Varga <vargaz@gmail.com>
6219 * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
6222 * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
6225 2008-07-23 Massimiliano Mantione <massi@ximian.com>
6226 * mini.c (sigprof_signal_handler): call the new "runtime initialized"
6229 2008-07-23 Zoltan Varga <vargaz@gmail.com>
6231 * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
6232 NEWOBJ calls on valuetypes.
6234 * iltests.il.in: Add new test.
6236 * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
6238 2008-07-22 Zoltan Varga <vargaz@gmail.com>
6240 * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
6241 is no longer needed.
6243 * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
6244 non register sized integer arguments.
6245 (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
6246 (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to
6249 * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
6252 * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
6253 two a binop with different sized arguments is emitted.
6255 * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
6256 instruction in the ins==NULL case.
6258 2008-07-23 Zoltan Varga <vargaz@gmail.com>
6260 * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
6262 * mini-x86.c: Fix osx build.
6264 * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
6267 * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
6268 instruction for non int sized variables.
6270 * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
6273 2008-07-23 Robert Jordan <robertj@gmx.net>
6275 * method-to-ir.c: Fix MSVC build.
6277 2008-07-22 Zoltan Varga <vargaz@gmail.com>
6279 * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
6280 a non int sized type, widen it to an int since newer versions of gcc seem to
6281 generate code which needs this.
6283 * ssa2.c abcremoval2.c: Fix warnings.
6285 * *: Merge the Linear IR branch.
6287 The original branch is at trunk/branches/vargaz/mini-linear-il, and
6288 the ChangeLog file there describes all the changes done over the years.
6289 Further documentation can be found at www.mono-project.com/Linear_IL.
6291 2008-07-21 Bill Holmes <billholmes54@gmail.com>
6293 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
6294 The float param registers and other param registers must be the
6295 same index on Windows x64.
6297 Contributed under MIT/X11 license.
6299 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
6301 * mini.c: Make the previous fix GC safe.
6303 2008-07-21 Raja R Harinath <harinath@hurrynot.org>
6305 * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
6307 2008-07-21 Bill Holmes <billholmes54@gmail.com>
6309 * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
6310 on Winx64. This type will not be passed on the stack (ArgOnStack), but
6311 ArgValuetypeAddrInIReg instead.
6313 Contributed under MIT/X11 license.
6315 2008-07-21 Zoltan Varga <vargaz@gmail.com>
6317 * mini-codegen.c (get_register_spilling): Fix a warning.
6319 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
6321 * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
6322 for types which the initialization fails. Raises the provided exception
6323 at the right stop after cleanup.
6325 2008-07-16 Zoltan Varga <vargaz@gmail.com>
6327 * aot-compiler.c: Free most of the memory allocated during compilation.
6329 * mini.c (mini_parse_debug_options): Fix a leak.
6331 * mini.c (mini_method_compile): Don't add the method to the jit info tables
6332 during aot compilation.
6334 2008-07-14 Zoltan Varga <vargaz@gmail.com>
6336 * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as
6337 it has too much register pressure.
6339 2008-07-13 Zoltan Varga <vargaz@gmail.com>
6341 * inssel.brg (CEE_CASTCLASS): Remove some dead code.
6343 2008-07-12 Zoltan Varga <vargaz@gmail.com>
6345 * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
6348 * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
6349 on amd64 similar to the way it is done on arm.
6351 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
6353 * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for
6354 consistency, normalize error messages, avoid loading aot-only modules in
6357 * driver.c (mono_main): Rename --aot-only command line option to --full-aot
6360 * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
6362 2008-07-11 Martin Baulig <martin@ximian.com>
6365 (MonoDebuggerInfo): Add `interruption_request'.
6367 2008-07-12 Zoltan Varga <vargaz@gmail.com>
6369 * aot-compiler.c (emit_plt): Remove some dead code.
6371 * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
6373 * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
6374 return the plt info offset belonging to a given plt entry.
6376 * mini-trampolines.c (mono_aot_plt_trampoline): Use
6377 mono_aot_get_plt_info_offset.
6379 * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
6380 similar to the amd64 code by makeing jumps through a separate jump table
6381 instead of embedding the jump addresses into the code.
6383 2008-07-11 Zoltan Varga <vargaz@gmail.com>
6385 * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
6388 2008-07-10 Martin Baulig <martin@ximian.com>
6390 * mini.c (mini_method_compile): Disable generics sharing when
6391 running in the debugger.
6393 2008-07-10 Zoltan Varga <vargaz@gmail.com>
6395 * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
6397 * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
6398 the local register allocator from running out of registers on x86 when
6401 2008-07-10 Bill Holmes <billholmes54@gmail.com>
6403 * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when
6404 expressing IntMin for the VS Compiler. See Compiler Warning (level 2)
6407 Contributed under MIT/X11 license.
6409 2008-07-10 Zoltan Varga <vargaz@gmail.com>
6411 * aot-compiler.c: Get rid of whitespace in the generated assembly file to
6412 speed up the assembler.
6414 2008-07-09 Zoltan Varga <vargaz@gmail.com>
6416 * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
6419 * mini.c: Move the soft float handling macros a bit earlier, add
6420 NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
6423 * mini.h: Add prototype for mono_arch_fixup_jinfo.
6425 * mini.c (mini_init): In aot-only mode, set the root domain code manager to
6426 read-only to help catch code allocation requests.
6428 * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
6429 and turn it off when using --aot-only or when compiling with --aot=full.
6431 * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
6432 jump table for switches from the normal domain mempool, not the code
6435 * mini-trampolines.c (get_unbox_trampoline): New function to return an
6436 unbox trampoline which handles aot-only mode too.
6438 * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
6439 an AOTed unbox trampoline.
6441 * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
6443 2008-07-09 Bill Holmes <billholmes54@gmail.com>
6445 * wapihandles.c: Fixing MSVC builds. Include statement changed from <> to
6448 Contributed under MIT/X11 license.
6450 2008-07-09 Bill Holmes <billholmes54@gmail.com>
6452 * mini.c (mono_codegen): Allocate space at the end of the code block and store
6453 the unwind information for the method at the end of the allocated block.
6455 * mini-amd64.h: Added declarations for the unwind routines and adding field to
6456 MonoCompileArch to hold the unwind info for SEH on Winx64
6458 * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
6459 frame pointer info for the method being compiled.
6461 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
6462 the call to mono_exception_from_token.
6464 * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations. This code is responsible
6465 storing the method prolog information in a format that the Winx64 SEH can understand. This
6466 information is stored a the end of the method block because it is all 32-bit offset based.
6468 Contributed under MIT/X11 license.
6470 2008-07-09 Zoltan Varga <vargaz@gmail.com>
6472 * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
6474 * wapihandles.c: Fix warnings.
6476 * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
6479 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling
6480 mono_jit_compile_method in aot-only mode since that calls the type
6483 * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
6484 get_delegate_invoke_impl in aot-only mode.
6486 * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
6488 2008-07-08 Zoltan Varga <vargaz@gmail.com>
6490 * trace.c (mono_trace_enter_method): Fix printing of Type instances.
6492 * aot-compiler.c (compile_method): Disable the check for GSHARED since it
6495 * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
6497 * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
6498 init trampoline from the AOT file as well.
6500 * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
6501 mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
6504 * mini.c (mini_init): Move the call to mono_exceptions_init () after
6507 * exceptions-amd64.c: Add _full variants for the remaining exception code
6508 creation functions as well, allow emission of relocatable code, remove
6509 caching since that is now done by the caller.
6511 * mini-exceptions.c: Add _full variants for the remaining exception code
6512 creation functions as well, add aot-only support.
6514 * aot-compiler.c (compile_method): Allow calls to methods of constructed types
6515 if we can determine a proper token for them.
6516 (add_wrappers): Add a few more wrappers.
6517 (emit_method_code): Remove some dead code.
6518 (emit_trampolines): Emit exception code too.
6520 * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
6522 * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
6523 mono_array_new_va which avoids varargs.
6525 * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
6527 * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
6528 mono_arch_create_specific_trampoline () in all places.
6530 * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
6531 a bit so it can be used for other things as well.
6533 * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
6536 * exceptions-amd64.c: Rename the caching from the exception code creation
6537 functions, it is done by the caller instead.
6539 * exceptions-amd64.c: Change the signature of the exception code creation
6540 functions to allow the creation of relocatable code later.
6542 * mini-exceptions.c: Add a set of functions to query the various
6543 runtime-generated exception functions.
6545 * mini.c mini-exceptions.c: Use the newly added functions instead of the
6546 mono_arch_.. () functions.
6548 2008-07-07 Zoltan Varga <vargaz@gmail.com>
6550 * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
6552 * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
6554 * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
6555 (mini_get_vtable_trampoline): Ditto.
6557 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
6558 code in the AOT case by returning the code size and a list of relocations to
6561 * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
6563 2008-07-07 Bill Holmes <billholmes54@gmail.com>
6565 * mini-amd64.c: On Winx64 the calling convention always requires the caller to
6568 Contributed under MIT/X11 license.
6570 2008-07-07 Zoltan Varga <vargaz@gmail.com>
6572 * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
6573 so the buffer size can be computed correctly. Fixes #404735.
6575 * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
6576 normally as cfg->debug_info is already freed.
6578 2008-07-06 Zoltan Varga <vargaz@gmail.com>
6580 * mini-amd64.c: For calls returning vtypes in registers, don't store
6581 the return address on the stack, instead allocate a separate local for
6584 2008-07-05 Mark Probst <mark.probst@gmail.com>
6586 * mini-trampolines.c, mini.h: Add an argument to
6587 mono_create_jit_trampoline_in_domain() for turning off the adding
6588 of the sync wrapper.
6590 * mini.c: Use the JIT trampoline without sync instead of
6591 ldftn_nosync in static RGCTX invoke wrappers so that the call can
6594 2008-07-04 Mark Probst <mark.probst@gmail.com>
6596 * driver.c: Turn on GSHARED optimization by default.
6598 2008-07-04 Zoltan Varga <vargaz@gmail.com>
6600 * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
6601 to MONO_TRAMPOLINE_JIT since it better reflects what it does.
6603 * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
6604 create a variant of the generic trampoline code callable from AOTed trampolines.
6606 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
6607 trampoline code callable from AOTed trampolines.
6609 * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
6611 2008-07-04 Mark Probst <mark.probst@gmail.com>
6613 * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
6614 pass-through manner.
6616 * mini.c: Generic method sharing. Pass MRGCTX to generic methods
6617 and don't fail sharing for them anymore.
6619 * mini-exceptions.c: Handle exceptions in shared generic methods.
6621 * generic-sharing.c: When checking the context of a generic
6622 method, also check its class's context. Don't treat wrappers as
6625 * mini-trampolines.c: Some code factored out to
6626 metadata/generic-sharing.c. Handle the MRGCTX case.
6628 * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
6629 we must deal with the method being of another instantiation of the
6630 class. Add static rgctx invoke wrappers to generic methods.
6632 2008-07-04 Mark Probst <mark.probst@gmail.com>
6634 * mini.c: Provide all jit infos of generic shared methods with a
6637 * mini-exceptions.c: Handle the new situation that a generic info
6638 might be available, but not info about the this/vtable/mrgctx
6641 2008-07-03 Mark Probst <mark.probst@gmail.com>
6643 * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
6646 2008-07-03 Zoltan Varga <vargaz@gmail.com>
6648 * dominators.c (check_dominance_frontier): Fix a warning.
6650 * mini.h: Add some missing prototypes.
6652 * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
6654 * driver.c (mono_jit_init_version): Correct the comments since the first
6655 argument should be the name of the root domain, not a filename.
6657 * aot-runtime.c (make_writable): Error out if this is called while running
6659 (load_aot_module): Ditto.
6661 * aot-compiler.c: Really fix the computation of method indexes.
6663 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous
6664 optimizations as this is no longer called frequently.
6666 * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
6667 method and the invoke impl code and pass it to the delegate trampoline instead of
6668 just the delegate class.
6670 2008-07-02 Zoltan Varga <vargaz@gmail.com>
6672 * aot-compiler.c: Fixup the computation of method indexes.
6673 (add_wrappers): Create the base methods of the runtime invoke wrappers using
6674 the method builder infrastructure.
6676 * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
6679 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
6680 mode, load the method right away instead of creating a trampoline.
6682 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
6684 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
6687 2008-07-01 Zoltan Varga <vargaz@gmail.com>
6689 * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
6690 (mono_aot_load_method): Use method_index instead of method->token.
6692 * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
6693 can handle icalls etc. properly.
6695 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
6697 * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
6699 * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
6700 (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
6701 JIT_ICALL_ADDR patch type.
6703 * patch-info.h: Add JIT_ICALL_ADDR patch type.
6705 * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
6707 (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
6709 * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
6711 2008-06-30 Zoltan Varga <vargaz@gmail.com>
6713 * mini.c: Use domain->jit_code_hash_lock for controlling access to
6714 domain->jit_code_hash.
6716 2008-06-29 Zoltan Varga <vargaz@gmail.com>
6718 * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
6720 2008-06-27 Zoltan Varga <vargaz@gmail.com>
6722 * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
6723 get_this_arg_from_call, let it compute it when needed.
6725 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
6726 gsctx from code only when needed.
6728 * mini-trampolines.c (get_generic_context): Rename this to
6729 mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
6730 it can be called by the arch backends.
6732 * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
6734 2008-06-26 Zoltan Varga <vargaz@gmail.com>
6736 * driver.c (mono_main): Add experimental --aot-only command line option.
6738 * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
6741 2008-06-26 Kornel Pal <kornelpal@gmail.com>
6743 * driver.c (DllMain): Remove mono_module_handle.
6745 Contributed under MIT/X11 license.
6747 2008-06-25 Zoltan Varga <vargaz@gmail.com>
6749 * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
6750 for emitting methods which are not in the source assembly. Detect and report
6751 failure of assembling+linking.
6753 * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
6755 * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
6757 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
6759 * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
6761 2008-06-24 Zoltan Varga <vargaz@gmail.com>
6763 * mini.h: Remove some obsolete prototypes.
6765 * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
6767 2008-06-24 Mark Probst <mark.probst@gmail.com>
6769 * mini.c (get_object_generic_inst): Variable-sized arrays are not
6770 supported by Visual Studio, so use alloca().
6772 2008-06-23 Zoltan Varga <vargaz@gmail.com>
6774 * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
6777 2008-06-23 Mark Probst <mark.probst@gmail.com>
6779 * mini.c: Fail sharing of a generic method if it contains an open
6780 catch clause (because we don't pass MRGCTXs yet).
6782 2008-06-23 Mark Probst <mark.probst@gmail.com>
6784 * mini.c: When compiling a method with generic sharing, insert the
6785 method instantiated with an all-Object generic context into the
6786 jit info table, instead of the context of the first instantiation
6787 of the method we happen to compile.
6789 2008-06-18 Martin Baulig <martin@ximian.com>
6791 * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
6792 `major_version' and `minor_version'.
6794 2008-06-17 Mark Probst <mark.probst@gmail.com>
6796 * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
6797 mono_method_is_generic_sharable_impl() takes an additional
6798 argument specifying whether to treat type variables as reference
6801 2008-06-17 Mark Probst <mark.probst@gmail.com>
6803 * mini.h: Removed obsolete prototypes.
6805 2008-06-17 Mark Probst <mark.probst@gmail.com>
6807 * mini.c: Don't fail generic sharing for initobj and sizeof - we
6808 already handle them.
6810 2008-06-17 Mark Probst <mark.probst@gmail.com>
6812 * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
6813 tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
6814 tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
6815 tramp-x86.c: Added a MonoGenericContext* argument to
6816 mono_arch_get_unbox_trampoline() so that it can call other
6817 functions which require it.
6819 2008-06-17 Mark Probst <mark.probst@gmail.com>
6821 * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
6822 mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
6823 mono_arch_get_this_arg_from_call() takes a
6824 MonoGenericSharingContext* as well.
6826 2008-06-17 Mark Probst <mark.probst@gmail.com>
6828 * mini.c: Factor out code for emitting unbox into emit_unbox() and
6829 implement generic sharing of unbox.
6831 2008-06-17 Mark Probst <mark.probst@gmail.com>
6833 * mini.c: Don't compute the vtable to determine whether a field is
6834 special static, because it might not work for open types.
6836 2008-06-17 Mark Probst <mark.probst@gmail.com>
6838 * mini.c: Removed the unused token_type and token_source arguments
6839 from get_runtime_generic_context_ptr().
6841 2008-06-17 Marek Habersack <mhabersack@novell.com>
6843 * mini.c (ADD_BINOP): fix the build
6845 2008-06-16 Zoltan Varga <vargaz@gmail.com>
6847 * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
6850 2008-06-16 Mark Probst <mark.probst@gmail.com>
6852 * mini.h: Removed class relations enum that's not used anymore.
6854 2008-06-16 Mark Probst <mark.probst@gmail.com>
6856 * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
6858 * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
6859 the lazy fetch trampoline access code.
6861 2008-06-15 Zoltan Varga <vargaz@gmail.com>
6863 * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
6865 2008-06-14 Zoltan Varga <vargaz@gmail.com>
6867 * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
6869 * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
6871 * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
6873 2008-06-13 Zoltan Varga <vargaz@gmail.com>
6875 * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
6878 * mini-ops.h: Add MIN/MAX_UN opcodes.
6880 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
6883 * basic-math.cs: Add more min/max tests.
6885 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
6887 2008-06-13 Mark Probst <mark.probst@gmail.com>
6889 * mini.c: Small fix in the prologue of emit_castclass.
6891 2008-06-13 Zoltan Varga <vargaz@gmail.com>
6893 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
6895 * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
6896 do not work even for unsigned types. Fixes #400014.
6898 * basic-math.cs: Add regression tests for unsigned Min/Max.
6900 2008-06-13 Mark Probst <mark.probst@gmail.com>
6902 * mini.c: Added additional context_used argument to several
6903 functions, which will be needed for sharing generic methods. Use
6904 GET_RGCTX macro wherever appropriate. Declare only one
6905 context_used in mono_method_to_ir().
6907 2008-06-13 Mark Probst <mark.probst@gmail.com>
6909 * mini.c, generic-sharing.c: Removed generic class relations.
6911 * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
6912 functions due to MRGCTX changes.
6914 2008-06-13 Mark Probst <mark.probst@gmail.com>
6916 * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
6917 graph.c, local-propagation.c, aliasing.c: New opcodes for calls
6918 with calculated IMT.
6920 * mini.c: Generic sharing of calls via generic interfaces.
6922 * jit-icalls.c, jit-icalls.h: Helper function for compiling a
6923 generic method with non-constant MonoGenericContext*. Instead,
6924 the context is taken out of the method itself.
6926 2008-06-13 Mark Probst <mark.probst@gmail.com>
6928 * mini.c: Generic sharing of ldvirtftn.
6930 2008-06-13 Mark Probst <mark.probst@gmail.com>
6932 * mini.c: Generic sharing of ldftn.
6934 2008-06-13 Mark Probst <mark.probst@gmail.com>
6936 * mini.c: Do pass VTable/RGCTX argument to static generic methods.
6938 2008-06-13 Mark Probst <mark.probst@gmail.com>
6940 * mini.c: Generic sharing of the special case of ldtoken followed
6941 by a call to GetTypeFromHandle.
6943 2008-06-13 Mark Probst <mark.probst@gmail.com>
6945 * mini.c: Generic sharing of box for nullable types.
6947 2008-06-13 Zoltan Varga <vargaz@gmail.com>
6949 * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
6950 are passed on the stack. Fixes #324807.
6952 2008-06-12 Bill Holmes <billholmes54@gmail.com>
6954 * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
6955 for the ArgValuetypeAddrInIReg case.
6957 * mini-amd64.c:mono_arch_allocate_vars: Adding a case for
6958 ArgValuetypeAddrInIReg to avoid asserts. Code needs to be added here.
6960 * mini-amd64.c: mono_arch_call_opcode: Adding Winx64 code for an ArgInfo of
6961 type ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
6962 local variable and pass the local variable by reference to the called method.
6964 * mini-amd64.c: mono_arch_emit_prolog: Adjust the stack for calls to
6965 mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
6967 Contributed under MIT/X11 license.
6969 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
6971 * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
6973 * debug-mini.c (mono_debug_print_vars): Release memory after printing
6976 2008-06-10 Martin Baulig <martin@ximian.com>
6979 (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
6981 2008-06-09 Kornel Pal <kornelpal@gmail.com>
6983 * main.c: Add and set argv [argc] to NULL to match C specification that fixes
6984 possible error when no arguments are passed.
6986 Contributed under MIT/X11 license.
6988 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
6990 * mini-exceptions.c (ves_icall_get_trace): Skip source locations
6991 where the file name is NULL.
6993 2008-06-09 Zoltan Varga <vargaz@gmail.com>
6995 * mini.c: Fix s390 build.
6997 2008-06-08 Zoltan Varga <vargaz@gmail.com>
6999 * trace.c (mono_trace_parse_options): Fix warnings.
7001 * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
7003 2008-06-07 Zoltan Varga <vargaz@gmail.com>
7005 * mini.c (remove_block_if_useless): Avoid printing the method name.
7007 * mini.c: Remove needless setting of ins->cil_code which is now done by
7010 * mini-amd64.c: Add some code to avoid saving callee saved registers in the
7013 * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
7014 translated code after it has been patched.
7016 2008-06-06 Zoltan Varga <vargaz@gmail.com>
7018 * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
7019 avoid problems during code patching on SMP systems.
7020 (emit_call): Avoid adding a patch info which is already added by
7022 (mono_arch_emit_exceptions): Ditto.
7024 2008-06-05 Zoltan Varga <vargaz@gmail.com>
7026 * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
7027 MONO_TYPE_ISSTRUCT already checks for it.
7029 2008-06-05 Bill Holmes <billholmes54@gmail.com>
7031 * mini-amd64.c:merge_argument_class_from_type: When marshaling
7032 structs with floats on Winx64 the float registers are not used.
7033 The integer registers are always used..
7034 * mini-amd64.c:add_valuetype: When marshaling structs on Winx64
7035 only one register will be used and only if the size of the struct
7036 is 1,2,4, or 8 bytes.
7038 * tramp-amd64.c : Adjusting size used for mono_global_codeman_reserve
7041 Contributed under MIT/X11 license.
7043 2008-06-05 Martin Baulig <martin@ximian.com>
7045 * debug-debugger.c (debugger_lookup_class): Also call
7046 mono_class_setup_methods() here; we're only called from RTI.
7048 2008-06-05 Andreas Farber <andreas.faerber@web.de>
7050 * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
7051 (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
7052 * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
7053 Post-process object files and add dtrace-generated object, if necessary.
7055 Contributed under MIT/X11 license.
7057 2008-06-04 Mark Probst <mark.probst@gmail.com>
7059 * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
7062 * mini.c: Generic sharing for unbox.any and castclass.
7064 2008-06-04 Mark Probst <mark.probst@gmail.com>
7066 * mini.c: Ignore tailcall prefix in shared generic code and when
7067 doing calls which require a vtable/rgctx argument.
7069 2008-06-04 Mark Probst <mark.probst@gmail.com>
7071 * mini.c: Don't free the JIT info.
7073 * driver.c: Changes in the JIT info table testing code.
7075 2008-06-03 Zoltan Varga <vargaz@gmail.com>
7077 * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread
7078 interruption. Fix some warnings.
7080 * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
7081 interruption_checkpoint.
7083 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
7085 * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
7086 from embedding applications.
7088 2008-06-02 William Holmes <billholmes54@gmail.com>
7090 * mini-amd64.c : Correcting some of the issues for Winx64 dealing with
7091 reserving 32 bytes on the stack when making calls.
7093 Contributed under MIT/X11 license.
7095 2008-06-01 Zoltan Varga <vargaz@gmail.com>
7097 * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
7098 the linear IL branch.
7100 * driver.c: Print out more information for --version on arm.
7102 2008-05-30 Zoltan Varga <vargaz@gmail.com>
7104 * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
7105 bb_exit instead, since out of line bblocks might not actually be emitted
7108 * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
7109 maximum epilog size for out of line bblocks if tracing is enabled.
7111 * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
7113 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
7115 * arrays.cs: Regression tests for allocating arrays with negative sizes.
7117 2008-05-28 Zoltan Varga <vargaz@gmail.com>
7119 * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
7120 CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE
7123 2008-05-27 Zoltan Varga <vargaz@gmail.com>
7125 * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
7126 the 'value' to store is a constant.
7128 * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
7130 * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
7131 of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
7133 2008-05-26 Zoltan Varga <vargaz@gmail.com>
7135 * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
7136 for accessing method->generic_container.
7138 2008-05-24 Zoltan Varga <vargaz@gmail.com>
7140 * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
7142 * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
7144 * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
7146 * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
7149 2008-05-23 Zoltan Varga <vargaz@gmail.com>
7151 * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
7153 * mini.c: Handle the case when mono_class_vtable () fails.
7155 2008-05-23 Massimiliano Mantione <massi@ximian.com>
7156 * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
7159 2008-05-22 Mark Probst <mark.probst@gmail.com>
7161 * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
7162 together with domain sharing.
7164 2008-05-22 Mark Probst <mark.probst@gmail.com>
7166 * mini.c: Treat callvirts to final methods like non-virtual calls
7167 when doing generic sharing, i.e. look them up in the runtime
7170 2008-05-22 Mark Probst <mark.probst@gmail.com>
7172 * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
7173 with computed types (for generic sharing).
7175 * mini.c: Generic sharing for mkrefany and refanyval.
7177 2008-05-22 Zoltan Varga <vargaz@gmail.com>
7179 * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
7182 * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
7183 the generic sharing code.
7185 * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
7188 2008-05-21 Zoltan Varga <vargaz@gmail.com>
7190 * mini.h: Remove the declaration of mono_aot_init_vtable ().
7192 2008-05-21 C.J. Adams-collier <cjac@colliertech.org>
7194 * driver.c: updated copyright date
7196 2008-05-21 Zoltan Varga <vargaz@gmail.com>
7198 * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
7201 2008-05-19 Martin Baulig <martin@ximian.com>
7203 * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
7204 pointing to the new `_mono_debug_using_mono_debugger' variable.
7207 (mono_main): Check mono_debug_using_mono_debugger() rather than
7208 the `MONO_INSIDE_MDB' environment variable to check whether we're
7209 inside the debugger.
7211 2008-05-19 Zoltan Varga <vargaz@gmail.com>
7213 * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
7216 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
7218 * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
7220 * mini.c: Added mini_assembly_can_skip_verification. This
7221 function checks if the assembly requested to skip verification.
7222 Fixes part of #387274.
7224 2008-05-07 Zoltan Varga <vargaz@gmail.com>
7226 * mini.c (mini_get_method): Disable the check for open generic classes when
7227 using generic sharing.
7229 * generics.cs: Add a test for #387034.
7231 * mini.c (mini_get_method): Check whenever the method class is an open generic
7232 type, and return NULL in that case, causing a verification error. Fixes
7235 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
7237 * driver.c (mono_main): Revert r102623. The right
7238 thing to do is to enable the verifier under verifiable
7239 unless a --security flag was passed.
7241 We need this non-trivial behavior for --verify-all otherwise
7242 mcs-compileall won't be able to use it. As it needs everything to
7243 be verified under validil.
7245 2008-05-06 Martin Baulig <martin@ximian.com>
7249 * debug-mini.c (mono_debugger_thread_created): Add proper locking.
7250 (mono_debugger_thread_cleanup): Likewise.
7251 (mono_debugger_extended_notification): Likewise.
7253 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
7255 * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
7256 against both inflated and non-inflated methods. We need to check against the
7257 generic definition for cases where the instantiated method is not visible.
7258 We need to check against the inflated types for cases where the instantiation
7259 changes any super type. This fixes #382986.
7261 Note that this doesn't need to be applied to other parts of mono_method_to_ir
7262 that check for visibiliy as generic params only appears as the type subject
7263 of tokens on call opcodes. Field manipulation and ldftn must always
7264 target an exact type.
7266 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
7268 * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
7269 if no related --security flag is passed.
7271 2008-05-05 Andreas Farber <andreas.faerber@web.de>
7273 * mini-arch.h: Prepare support for ppc64.
7275 Contributed under MIT/X11 license.
7277 2008-05-05 Andreas Farber <andreas.faerber@web.de>
7279 * aot-runtime.c: Prepare support for ppc64.
7281 Contributed under MIT/X11 license.
7283 2008-05-05 Andreas Farber <andreas.faerber@web.de>
7285 * mini-ops.h: Prepare support for ppc64.
7287 Contributed under MIT/X11 license.
7289 2008-05-04 Andreas Farber <andreas.faerber@web.de>
7291 * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
7293 Contributed under MIT/X11 license.
7295 2008-05-03 Zoltan Varga <vargaz@gmail.com>
7297 * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
7298 assemblies, since aot_name is not a full path, causing us to load MS.NET
7299 assemblies on windows.
7301 ?2008-04-28 Kornel Pal <kornelpal@gmail.com>
7303 * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
7304 for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
7305 * main.c: Use UTF-8 encoded command line instead of Windows default code
7306 page on Windows to support Unicode.
7307 * driver.c (DllMain): New function for mixed-mode assembly support.
7308 * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
7309 export __stdcall functions without decoration.
7311 Contributed under MIT/X11 license.
7313 2008-04-28 Mark Probst <mark.probst@gmail.com>
7315 * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
7316 saving it very early.
7318 2008-04-28 Mark Probst <mark.probst@gmail.com>
7320 * mini.h, mini.c: Lots of code for accessing the old RGCTX
7321 deleted. The only way to access the new RGCTX is via the
7324 * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
7325 vtable instead of the RGCTX to static methods.
7327 * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
7328 accessing the new RGCTX.
7330 * generic-sharing.c: There is no separation between self, type
7331 arguments and other types in the RGCTX anymore.
7333 2008-04-25 Jonathan Chambers <joncham@gmail.com>
7335 * mini-amd64.c (add_general): Remove previous stack adjustment.
7336 (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
7337 adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
7338 for 32 bytes of stack space reserved for all calls.
7340 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
7341 (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack
7344 Code contributed under MIT/X11 license.
7346 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
7348 * mini.c (mini_method_verify): Only verify non-inflated methods, check
7349 against the root definition, peeling out method and type instantiations.
7350 Cache verify success results, code that fails verification is still
7351 checked multiple times.
7353 2008-04-23 Zoltan Varga <vargaz@gmail.com>
7355 * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
7357 2008-04-23 Jonathan Chambers <joncham@gmail.com>
7359 * mini-amd64.c (add_general): Always increment stack on Win64.
7360 (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
7363 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for
7364 stack based argument handling on Win64.
7366 Code contributed under MIT/X11 license.
7368 2008-04-23 Raja R Harinath <harinath@hurrynot.org>
7370 * Makefile.am (version.h): Add support for git-svn.
7372 2008-04-22 Zoltan Varga <vargaz@gmail.com>
7374 * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
7375 so instead of calling g_spawn_command_line_sync, we do everything by hand,
7376 avoiding allocations and libc functions which might deadlock.
7378 * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
7379 'no-gdb-backtrace' option is set.
7381 * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
7383 * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
7385 2008-04-21 Martin Baulig <martin@ximian.com>
7387 * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
7388 and `get_lmf_addr'; `notification_address' is no longer a pointer.
7390 2008-04-21 Martin Baulig <martin@ximian.com>
7392 * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
7393 `thread_vtable', `event_handler_ptr' and `event_handler'.
7395 2008-04-21 Martin Baulig <martin@ximian.com>
7397 * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
7398 allows delayed initialization of the `executable_code_buffer' when
7401 2008-04-21 Martin Baulig <martin@ximian.com>
7403 * mini.h (mono_debugger_create_notification_function): Removed.
7404 * tramp-*.c (mono_debugger_create_notification_function): Removed.
7406 * mdb-debug-info64.s
7407 (MONO_DEBUGGER__notification_function): Added this in the .text section.
7409 * mdb-debug-info32.s
7410 (MONO_DEBUGGER__notification_function): Added this in the .text section.
7412 * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
7413 currently only works on x86 and x86_64, so don't create it on ppc.
7415 2008-04-21 Martin Baulig <martin@ximian.com>
7417 * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
7420 (mini_method_compile): In the fp elimination check, check
7421 `debug_options.mdb_optimizations' in addition to
7422 mono_debug_using_mono_debugger().
7424 * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
7425 disable some JIT optimizations which are only disabled when
7426 running inside the debugger.
7427 Added `--help-debug' option to describe the debugging options.
7428 (parse_debug_options): New static function to parse the `--debug'
7429 options, so we can easily add more stuff in future.
7431 2008-04-20 Zoltan Varga <vargaz@gmail.com>
7433 * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
7434 the method has no body.
7436 2008-04-19 Jonathan Chambers <joncham@gmail.com>
7438 * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
7439 assembly is not allowed in MSVC 64-bit compiler.
7440 (mono_arch_cpu_init): Don't set floating point precision on MSVC build
7441 as we get floating point exceptions everywhere.
7443 * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
7444 correctly align arguments for call to throw_exception.
7445 (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
7447 Code contributed under MIT/X11 license.
7449 2008-04-19 Zoltan Varga <vargaz@gmail.com>
7451 * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
7453 2008-04-17 Zoltan Varga <vargaz@gmail.com>
7455 * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
7457 * mini-amd64.c (NEW_INS): Set cil_code.
7459 * mini.c (mini_method_compile): Move the disabling of fp elimination to here
7460 from mini-amd64.c so all debugger related logic is in one place.
7462 * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
7463 later won't have a random ip assigned to them.
7465 2008-04-16 Zoltan Varga <vargaz@gmail.com>
7467 * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
7468 the arch specific function initializes code_size.
7469 (mono_create_delegate_trampoline): Ditto.
7471 * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
7472 tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
7475 * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if
7476 running under the debugger.
7478 * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
7481 * mini.c (mini_method_compile): Set a few flags in cfg if running under the
7482 debugger. Also move the disabling of optimizations here from driver.c.
7483 (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
7486 * mini.h (MonoCompile): Add a few new flags.
7488 2008-04-15 Zoltan Varga <vargaz@gmail.com>
7490 * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
7491 so the cil_code field of created MonoInst's is properly set.
7492 (mini_select_instructions): Ditto.
7494 * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
7495 (MONO_INST_NEW_CALL): Ditto.
7497 * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
7498 in many places so the ins->cil_code field is properly initialized.
7500 * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
7503 2008-04-14 Zoltan Varga <vargaz@gmail.com>
7505 * mini.c (mini_method_compile): Print a different message when compiling a
7508 * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
7511 2008-04-11 Zoltan Varga <vargaz@gmail.com>
7513 * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
7516 * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
7518 2008-04-11 Zoltan Varga <vargaz@gmail.com>
7520 * mini.c (handle_stack_args): Make this return void since its return value was
7521 never used. Also set cfg->unverifiable for invalid IL instead of calling
7524 2008-04-10 Mark Probst <mark.probst@gmail.com>
7526 * mini.c: Make sure "this" is live in catch clauses with type
7527 variables in shared generic code.
7529 2008-04-08 Mark Probst <mark.probst@gmail.com>
7531 * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
7532 generic_class_is_reference_type() to ensure the proper behaviour
7533 when sharing generic code and the type in question is a type
7536 2008-04-08 Zoltan Varga <vargaz@gmail.com>
7538 * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
7539 race conditions when printing thread dumps. Fixes #377738.
7541 2008-04-08 Massimiliano Mantione <massi@ximian.com>
7543 aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
7544 shows up when both MonoInst arguments can cause aliasig.
7545 There is likely no way in the current JIT to trigger this problem, but
7546 it showed up in the development of generics sharing, when in a new
7547 opcode both args of an OP_GROUP can be aliases (addresses of a local).
7548 When the generics sharing code will be committed, its tests will be
7549 valid also for this bug.
7551 2008-04-08 Zoltan Varga <vargaz@gmail.com>
7553 * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
7556 * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
7559 2008-04-07 Zoltan Varga <vargaz@gmail.com>
7561 * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
7562 use a more detailed exception message for InvalidCastException.
7564 * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
7566 * driver.c (mono_main): Add --debug=casts option to turn on better
7567 InvalidCastException message details.
7569 * mini.c (mini_get_debug_options): New helper function to return the address of
7570 the debug_options variable.
7572 * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
7573 the jit_tls TLS variable.
7575 * mini.c (mono_jit_tls): New TLS variable.
7577 * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
7580 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
7582 * mini.h: Removed verifer related stuff. This code was moved to verify.c
7584 * mini.c: Removed verifer related stuff, code moved to verify.c.
7586 * driver.c: Using code from verify.c instead of mini.c.
7588 2008-04-05 Zoltan Varga <vargaz@gmail.com>
7590 * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
7593 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
7595 * mini.c (check_for_method_verify): Enabling verification of
7596 corlib if mono_verify_all is set. Bugs in the verifier preventing that
7599 2008-04-04 Zoltan Varga <vargaz@gmail.com>
7601 * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
7602 caller saved registers as well.
7604 * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
7605 saved registers as well.
7607 2008-03-30 Zoltan Varga <vargaz@gmail.com>
7609 * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
7611 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
7614 2008-03-27 Zoltan Varga <vargaz@gmail.com>
7616 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
7618 (get_call_info): Take a gsctx argument instead of 'cfg'.
7620 2008-03-26 Zoltan Varga <vargaz@gmail.com>
7622 * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
7623 mono_verify_all is set.
7625 * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
7627 * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
7629 2008-03-25 Zoltan Varga <vargaz@gmail.com>
7631 * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
7634 * driver.c mini.c mini.h: Add a --verify-all development option to test the
7635 verifier and the code generated by the compiler.
7637 2008-03-25 Mark Probst <mark.probst@gmail.com>
7639 * mini.c: Generic sharing of the non-nullable case of the box
7642 2008-03-24 Zoltan Varga <vargaz@gmail.com>
7644 * inssel.brg: Fix the build.
7646 * iltests.il.in: Add a test for lconv.ovf.u8.un.
7648 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
7650 * mini.c (mono_method_to_ir): Implement readonly for ldelema and
7651 Array:Address. Fixes #372410.
7653 * iltests.il.in: New tests for readonly prefix.
7655 2008-03-23 Zoltan Varga <vargaz@gmail.com>
7657 * mini.h mini.c mini-trampolines.c: Move trampoline related code to
7660 * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to
7663 * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
7665 * mini.c (mono_decompose_op_imm): New helper function.
7667 * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
7668 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
7671 * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
7672 mono_arch_output_basic_block. Fix warnings.
7674 * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
7677 2008-03-22 Zoltan Varga <vargaz@gmail.com>
7679 * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
7680 since the extra frame is now detected automatically inside the loop.
7682 * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole
7683 opts which are now in mono_peephole_ins ().
7685 * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
7687 * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
7688 frames and skip duplicate managed-to-native frames. Fixes #367665.
7690 * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
7691 opts which are now in mono_peephole_ins ().
7692 (mono_arch_peephole_pass_2): Ditto.
7694 * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
7696 * mini-codegen.c (mono_peephole_ins): New helper function containing the
7697 arch independent peephole optimizations.
7699 * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
7700 opts which are now in mono_peephole_ins ().
7702 * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
7704 * mini-s390.c (mono_arch_output_basic_block): Fix build.
7706 * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
7709 * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
7710 CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
7713 2008-03-21 Zoltan Varga <vargaz@gmail.com>
7715 * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
7716 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
7719 * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
7720 mono_arch_output_basic_block. Fix warnings.
7722 2008-03-20 Zoltan Varga <vargaz@gmail.com>
7724 * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
7727 2008-03-20 Zoltan Varga <vargaz@gmail.com>
7729 * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
7732 * iltests.il: Add new tests.
7734 2008-03-20 Kornel Pal <kornelpal@gmail.com>
7736 * mini.c: Removed Windows version macros.
7738 2008-03-20 Mark Probst <mark.probst@gmail.com>
7740 * generic-sharing.c: Put reflection types in the extensible part
7741 of the runtime generic context.
7743 * mini.c: Generic sharing of the GetTypeHandle special case of the
7744 ldtoken instruction.
7746 2008-03-20 Zoltan Varga <vargaz@gmail.com>
7748 * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
7750 * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
7752 * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for
7753 consistency with the other version on the linear IR branch.
7755 * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
7757 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
7759 * iltests.il.in: Add new tests.
7761 2008-03-19 Zoltan Varga <vargaz@gmail.com>
7763 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
7765 * iltests.il.in: Add new tests.
7767 2008-03-19 Mark Probst <mark.probst@gmail.com>
7769 * mini.c: Two variables with the same name were declared in
7770 nesting contexts and one wasn't initialized. Fixed.
7772 2008-03-19 Mark Probst <mark.probst@gmail.com>
7774 * mini.c: Generic sharing of the initobj instruction.
7776 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
7778 * mini.c: make the test to optimize ldtoken from typeof() more
7781 2008-03-18 Mark Probst <mark.probst@gmail.com>
7783 * mini.c: Generic sharing of the initobj instruction for reference
7786 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
7788 * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
7789 the mono_breakpoint_clean_code() code to perform bound checks.
7791 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
7793 * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
7794 mono_arch_patch_callsite() to include the start of the managed method
7795 to be able to perform bound checks.
7797 2008-03-17 Mark Probst <mark.probst@gmail.com>
7799 * mini.c: Generic sharing for the isinst instruction.
7801 2008-03-17 Mark Probst <mark.probst@gmail.com>
7803 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
7804 inssel-long32-mips.brg: Added opcodes for doing indirect calls
7805 with the runtime generic context argument.
7807 * mini.c: Share calls to several types of unsharable methods by
7808 putting the address of the method code in the runtime generic
7809 context and doing an indirect call.
7811 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
7814 2008-03-16 Mark Probst <mark.probst@gmail.com>
7816 * generic-sharing.c: Change due to a change in the runtime genric
7819 2008-03-15 Martin Baulig <martin@ximian.com>
7822 (mono_arch_nullify_class_init_trampoline): Add call to
7823 mono_breakpoint_clean_code() to make things work when running
7824 inside the debugger.
7827 (mono_arch_nullify_class_init_trampoline): Add call to
7828 mono_breakpoint_clean_code() to make things work when running
7829 inside the debugger.
7831 2008-03-14 Zoltan Varga <vargaz@gmail.com>
7833 * inssel-long.brg (reg): Fix 64 bit build.
7835 2008-03-14 Mark Probst <mark.probst@gmail.com>
7837 * mini.c, mini.h: Share static generic code by passing it an
7838 implicit argument pointing to the runtime generic context.
7840 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
7841 inssel-long32-mips.brg: New opcodes for calling shared static,
7842 which need to be passed the runtime generic context.
7844 * mini-amd64.c, mini-x86.c: Save the runtime generic context
7845 argument on the stack in the prologue if needed. New function for
7846 finding the runtime generic context argument from the registers
7847 saved by the trampoline.
7849 * mini-amd64.h, mini-x86.h: Specify which register to use for the
7850 runtime generic context argument.
7852 * tramp-amd64.c: Also restore the register used for the runtime
7853 generic context argument.
7855 * mini-trampoline.c: Resolve shared static calls by consulting the
7856 runtime generic context via the new argument.
7858 * generic-sharing.c: Add an argument to sharability-checking
7859 functions that specifies whether type variables should be treated
7860 as sharable type arguments.
7862 * inssel-x86.brg: Removed a superfluous, buggy rule.
7864 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
7867 2008-03-14 Martin Baulig <martin@ximian.com>
7869 * debug-debugger.c (main_thread_handler): Call
7870 mono_runtime_run_main() without sending any notifications.
7872 * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
7874 2008-03-14 Zoltan Varga <vargaz@gmail.com>
7876 * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
7878 2008-03-14 Mark Probst <mark.probst@gmail.com>
7880 * tramp-x86.c: Fixed register restore offsets in the trampoline
7881 code for ECX and EDX.
7883 2008-03-12 Geoff Norton <gnorton@novell.com>
7885 * mini-arm.h: Add some #defines for locating sp, pc, r4 with
7886 different ucontext_t implementations.
7887 * exceptions-arm.c: Use the above defines to get exceptions working on
7888 iPhone (based on a patch by Luke Howard lukeh@padl.com)
7889 * mini-arm.c: Implement iPhone icache support (based on a patch by
7890 Luke Howard lukeh@padl.com)
7892 2008-03-12 Mark Probst <mark.probst@gmail.com>
7894 * mini.c: Enable generic sharing of calls to non-static
7895 non-interface non-generic non-value-type methods.
7897 * mini-trampolines.c: Resolve calls from shared generic code.
7899 2008-03-11 Zoltan Varga <vargaz@gmail.com>
7901 * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
7903 * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
7905 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
7907 * mini.c: some fixes for the AOT compiler.
7909 2008-03-07 Zoltan Varga <vargaz@gmail.com>
7911 * cpu-amd64.md: Add clob:1 to some float opcodes.
7913 2008-03-07 Rodrigo Kumpera <rkumpera@novell.com>
7915 * mini.h: Added MiniVerifierMode enumeration.
7917 * mini.c: Added mini_verifier_set_mode to control
7918 the usage of the new verifier.
7920 * mini.c (mono_method): Integrated the new verifier.
7922 * driver.c: Extended --security option with validil and
7923 verifiable options to activate the new verifier.
7925 2008-03-07 Zoltan Varga <vargaz@gmail.com>
7927 * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation
7928 optimization to ctors taking 0 or 2 arguments too.
7930 * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
7933 * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
7935 * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
7937 2008-03-06 Zoltan Varga <vargaz@gmail.com>
7939 * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
7940 non-aot case as well.
7942 * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
7944 * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
7947 * aot-compiler.c (encode_patch): Ditto.
7949 * mini.h (G_MININT32): Fix the definition of this.
7951 2008-03-05 Zoltan Varga <vargaz@gmail.com>
7953 * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
7955 * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
7957 2008-03-04 Zoltan Varga <vargaz@gmail.com>
7959 * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for
7960 methods returning vtypes in registers.
7961 (mono_arch_allocate_vars): Ditto.
7963 * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
7965 * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().
7967 * generics.cs: Add a test from the linear IR branch.
7969 * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
7971 * mini.c (inline_method): Cache failed inline attempts.
7973 2008-03-04 Mark Probst <mark.probst@gmail.com>
7975 * mini.c: For shared methods of generic classes put the location
7976 of "this" into the MonoGenericJitInfo.
7978 * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
7979 register out of a MonoContext by register number. Add the generic
7980 sharing context as an argument to mono_arch_find_this_argument().
7982 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
7983 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
7984 for new arch function.
7986 * mini-exception.c: Handle open exception clauses in shared
7989 * mini-trampolines.c: Supply additional argument to
7990 mono_arch_find_this_argument().
7992 2008-03-04 Zoltan Varga <vargaz@gmail.com>
7994 * Makefile.am (regtests): Run the bench.exe tests last.
7996 2008-03-03 Zoltan Varga <vargaz@gmail.com>
7998 * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
8001 2008-03-02 Zoltan Varga <vargaz@gmail.com>
8003 * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
8006 * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
8008 * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
8010 * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
8011 whose class has no cctor.
8013 * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
8015 2008-03-01 Zoltan Varga <vargaz@gmail.com>
8017 * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
8020 2008-02-29 Zoltan Varga <vargaz@gmail.com>
8022 * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
8023 to be in sync with the code on the linear IR branch.
8025 * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
8027 * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
8029 2008-02-27 Zoltan Varga <vargaz@gmail.com>
8031 * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
8033 * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
8035 * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
8037 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
8039 * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
8041 * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
8044 2007-11-14 Yoichi NAKAYAMA <nakayama@pixela.co.jp>
8046 * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
8047 OP_LOADR4_MEMBASE emission.
8049 * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
8050 (mono_spillvar_offset_float): Ditto.
8052 * mini-mips.c (mono_arch_emit_prolog): Ditto.
8054 * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
8057 * basic-long.cs: Add regression tests for them.
8059 * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
8061 (mono_arch_allocate_vars): Fix representation of single-precision float
8063 (mono_arch_output_basic_block): Ditto.
8065 * inssel-mips.brg: Ditto, remove duplicate items.
8067 * mini-mips.c (emit_load_volatile_arguments): New function to handle
8068 arguments of tail calls as on other platforms.
8069 (mono_arch_output_basic_block): Handle tail calls.
8071 * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
8074 * objects.cs (test_5_pass_static_struct): Add test for it.
8076 Contributed under MIT/X11 license.
8078 2008-02-26 Zoltan Varga <vargaz@gmail.com>
8080 * Makefile.am: Use gmcs for compiling the regression tests.
8082 * *.2.cs *.2.il: Rename to *.cs and *.il.
8084 2008-02-24 Zoltan Varga <vargaz@gmail.com>
8086 * regalloc.h: Make the vassign array smaller.
8088 * mini.c (mini_method_compile): Remove an unused field in cfg.
8090 * mini-codegen.c: Add a bunch of micro optimizations.
8092 2008-02-23 Zoltan Varga <vargaz@gmail.com>
8094 * regalloc.h: Remove some unused fields.
8096 2008-02-22 Zoltan Varga <vargaz@gmail.com>
8098 * mini-amd64.c (mono_arch_patch_code): Fix a warning.
8100 * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
8102 2008-02-22 Mark Probst <mark.probst@gmail.com>
8104 * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
8106 * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
8107 trampoline: Fetch an entry from the runtime generic context. If
8108 it's NULL, jump to the actual trampoline to fill the runtime
8109 generic context. Otherwise, return it.
8111 * mini.c: Call the lazy fetch trampoline to get entries out of the
8112 runtime generic context.
8114 * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
8115 tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
8116 tramp-sparc.c: Stubs for the lazy fetch trampoline.
8118 2008-02-21 Mark Probst <mark.probst@gmail.com>
8120 * mini.c: Fetch data out of the extensible part of the runtime
8121 generic context instead of calling a helper function.
8123 * generic-sharing.c: Some functions moved into
8124 metadata/generic-sharing.c. Helper function for fetching other
8125 types now checks and asserts against extensible rgctx (just for
8126 debugging purposes - the helper function isn't called anymore
8127 unless for debugging).
8129 2008-02-21 Zoltan Varga <vargaz@gmail.com>
8131 * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
8132 for tail calls up to the point that the tests in iltests.exe run. Also add a
8133 dummy CKFINITE implementation.
8134 (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
8135 needed for trampoline LMF frames.
8137 * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for
8138 trampoline LMF frames.
8140 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
8142 * mini.c (inline_method): clean any pending loader error when inlining fail.
8143 Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
8145 2008-02-21 Zoltan Varga <vargaz@gmail.com>
8147 * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
8149 * aot-runtime.c (decode_patch_info): Ditto.
8151 * mini.c (mono_resolve_patch_target): Ditto.
8153 * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
8156 * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
8158 * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
8159 if it references an icall address.
8161 2008-02-20 Zoltan Varga <vargaz@gmail.com>
8163 * cpu-s390x.md: Remove some more unused opcodes.
8165 * cpu-s390x.md: Remove some unused opcodes.
8167 * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
8168 mono_op_imm_to_op ().
8170 * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
8171 instead of a switch statement.
8173 * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
8174 the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
8176 * mini-codegen.c: Eliminate rassign macro which is no longer needed.
8178 * mini-codegen.c: Remove unused mono_regstate2_... functions.
8180 * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
8183 2008-02-19 Zoltan Varga <vargaz@gmail.com>
8185 * driver.c (mono_main): Improve error reporting when an assembly cannot be
8186 opened. Fixes #362607.
8188 * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
8190 * iltests.il.in: Add a test for static methods in interfaces.
8192 2008-02-18 Zoltan Varga <vargaz@gmail.com>
8194 * genmdesc.c (build_table): Fix a crash on older glib versions.
8196 * cpu-sparc.md: Remove some unused opcodes.
8198 * genmdesc.c: Error out if the .md contains CEE_ opcodes if
8199 MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
8201 * cpu-amd64.md: Remove some unused opcodes.
8203 * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
8204 like the other opcodes.
8206 2008-02-17 Zoltan Varga <vargaz@gmail.com>
8208 * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
8210 * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
8212 * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
8213 variables 'cfg' instead of 'm' for consistency.
8215 * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
8217 * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
8218 argument holding the vtype return address, to avoid the ambigious use of
8219 cfg->ret for this purpose.
8221 * mini.c (NEW_RETLOADA): Use vret_addr if set.
8223 * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
8225 * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
8226 new mono_print_ins () function which only takes one argument.
8228 2008-02-15 Zoltan Varga <vargaz@gmail.com>
8230 * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
8233 2008-02-14 Zoltan Varga <vargaz@gmail.com>
8235 * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
8237 * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
8239 * mini-x86.c: Sync with the version on the linear IR branch by adding new
8240 opcodes and other small changes.
8242 * mini-ops.h: Add some new opcodes from the linear IR branch.
8244 * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
8246 * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
8247 opcodes, use the REG_MEMBASE opcodes instead.
8249 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
8250 opcodes, use the REG_MEMBASE opcodes instead.
8252 * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
8255 * mini.c (mono_op_imm_to_op): New helper function.
8257 * mini-ops.h: Add some opcodes from linear IR branch.
8259 2008-02-13 Zoltan Varga <vargaz@gmail.com>
8261 * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov
8264 2008-02-12 Zoltan Varga <vargaz@gmail.com>
8266 * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to
8269 * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
8271 2008-02-09 Zoltan Varga <vargaz@gmail.com>
8273 * aot-compiler.c (emit_method_code): Add an assert.
8275 * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
8276 the IMT code so it is AOT friendly. Enable AOT for methods which call interface
8279 2008-02-08 Zoltan Varga <vargaz@gmail.com>
8281 * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for
8282 some load/store opcodes so they are consistent.
8283 (mono_arch_emit_prolog): Simplify some code.
8285 * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
8287 * objects.cs: Add tests for large argument offsets on ARM.
8289 * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large
8290 stack offsets. Fixes #359651.
8292 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
8294 * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
8296 * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
8298 * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
8300 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
8302 * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
8303 rid of CEE_CONV_R_UN.
8305 * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
8307 2008-02-07 Zoltan Varga <vargaz@gmail.com>
8309 * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
8311 * mini.c (mono_normalize_opcodes): Add some more opcodes.
8313 * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
8315 * cpu-amd64.md: Remove some unused opcodes.
8317 * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
8319 * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
8321 * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make
8322 arch specific functions for its parts. Call the peephole pass after local
8323 regalloc so the prolog can compute a more accurate max_offset.
8325 * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
8326 the corresponding OP_I/OP_L opcodes.
8328 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
8330 * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
8332 2008-02-06 Zoltan Varga <vargaz@gmail.com>
8334 * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
8335 as they are handled in mini.c.
8337 * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
8339 * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
8340 case since it is handled in mini.c.
8342 * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
8344 * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
8346 * *.c: Use the new opcodes in the IR and back end code.
8348 * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
8350 * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
8352 2008-02-06 Mark Probst <mark.probst@gmail.com>
8354 * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
8355 an assert because it has a race condition.
8357 2008-02-06 Zoltan Varga <vargaz@gmail.com>
8359 * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
8361 * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
8363 * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
8365 * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
8366 use OP_MOVE/OP_FMOVE/OP_ICONST instead.
8368 2008-02-05 Zoltan Varga <vargaz@gmail.com>
8370 * cpu-amd64.md (move): Correct the maximum size of move.
8372 2008-02-05 Mark Probst <mark.probst@gmail.com>
8374 * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
8375 the generic class init trampoline to return quickly if the class
8378 2008-02-04 Zoltan Varga <vargaz@gmail.com>
8380 * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
8381 issues where an 32 bit callsite cannot be patched by a 64 bit address.
8383 2008-02-03 Zoltan Varga <vargaz@gmail.com>
8385 * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
8388 2008-01-31 Zoltan Varga <vargaz@gmail.com>
8390 * objects.cs: Add some soft-float tests.
8392 * mini.c: Fix a couple more soft-float issues.
8394 * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
8396 * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
8399 2008-01-30 Zoltan Varga <vargaz@gmail.com>
8401 * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
8402 exception happens while compiling a virtual method.
8404 2008-01-29 Zoltan Varga <vargaz@gmail.com>
8406 * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
8408 * mini-sparc.c: Fix build.
8410 * mini-sparc.c (get_call_info): Add support for generic sharing.
8412 * mini-exceptions.c: Add a FIXME.
8414 2008-01-27 Zoltan Varga <vargaz@gmail.com>
8416 * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
8417 altstack handling code.
8419 * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
8421 * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
8423 * mini-s390.c: Add support for generic sharing.
8425 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
8427 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
8429 * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
8431 * mini-s390x.c: Add support for generic sharing.
8433 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
8435 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
8437 * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
8438 can be used since it takes a 16 bit signed immediate.
8440 * inssel-s390x.brg: Fix OP_SETRET.
8442 * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
8444 * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
8446 * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
8448 * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
8450 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
8453 * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
8456 * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
8457 of the unused mono_arch_patch_delegate_trampoline stuff.
8459 2008-01-26 Zoltan Varga <vargaz@gmail.com>
8461 * basic-long.cs: Move the fp related tests to basic-float.cs.
8463 * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
8465 * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
8467 * basic-calls.cs: Add a test for proper float argument passing.
8469 * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
8470 if the context corresponds to an exception received through a signal.
8472 * exceptions.cs: Add a test for nullref handling at the start of a try
8475 * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
8477 * jit-icalls.c (mono_break): New JIT icall.
8479 * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
8481 * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
8483 2008-01-25 Zoltan Varga <vargaz@gmail.com>
8485 * cpu-*.md: Get rid of unused opcodes.
8487 * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
8489 * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
8492 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
8495 * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
8496 the arch independent trampoline code in mini-trampolines.c.
8498 * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
8500 * mini.c (get_runtime_generic_context_ptr): Fix a warning.
8502 * mini-s390.h: Remove an unused define.
8504 * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
8505 the arch independent trampoline code in mini-trampolines.c.
8507 * mini-arm.c (mono_arch_emit_prolog): Fix build.
8509 2008-01-24 Zoltan Varga <vargaz@gmail.com>
8511 * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
8513 * mini-s390.c (mono_arch_emit_prolog): Fix build.
8515 * mini-s390x.c (mono_arch_emit_prolog): Fix build.
8517 * mini-ppc.c (mono_arch_emit_prolog): Fix build.
8519 * cpu-amd64.md: Use smaller sizes for int opcodes.
8521 * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
8523 * *.cs: Add some tests from the linear-ir branch. Move structs tests to
8526 * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
8529 * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
8530 instead of though a pointer to save an indirection when accessing elements of
8533 * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
8535 (NOT_IMPLEMENTED): New helper macro.
8536 (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
8539 * *.c: Use the new helper macro.
8541 2008-01-21 Zoltan Varga <vargaz@gmail.com>
8543 * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
8545 2008-01-20 Zoltan Varga <vargaz@gmail.com>
8547 * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
8550 2008-01-18 Zoltan Varga <vargaz@gmail.com>
8552 * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
8553 profiling is enabled.
8555 * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
8557 (mono_arch_emit_prolog): Add more first bblock optimizations.
8559 * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
8560 in order if possible.
8561 (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
8562 bblock, since the arguments are still in their original registers.
8564 * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
8566 2008-01-17 Zoltan Varga <vargaz@gmail.com>
8568 * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
8571 * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
8574 * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
8576 * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
8577 process async exceptions received while in unmanaged code.
8579 * mini.c (mini_init): Install a callback with the runtime which will be called
8580 when a thread receives an async exception while in unmanaged code.
8582 * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
8584 * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
8586 2008-01-16 Wade Berrier <wberrier@novell.com>
8593 2008-01-16 Zoltan Varga <vargaz@gmail.com>
8595 * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
8596 compilation with sun cc.
8598 * cpu-*.md: Fix the build.
8600 * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
8602 * mini-amd64.h: Add some comments to the MonoLMF structure.
8604 * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
8606 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
8607 in the LMF structure if possible. This saves two instructions in the
8608 managed->native wrappers.
8610 * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
8612 2008-01-16 Mark Probst <mark.probst@gmail.com>
8614 * generic-sharing.c: New type argument lookup code which uses the
8615 runtime generic context template.
8617 2008-01-15 Zoltan Varga <vargaz@gmail.com>
8619 * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
8621 * mini-arm.c (add_general): Fix arm eabi parameter passing.
8622 (mono_arch_output_basic_block): Fix localloc implementation.
8624 * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
8626 * mini-ia64.c (peephole_pass): Fix ia64 build.
8628 * mini-amd64.c (peephole_pass): Fix a warning.
8630 * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
8631 at a constant offset from sp/fp.
8633 * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
8634 instead of obtaining it from *lmf in the managed method case.
8636 2008-01-14 Zoltan Varga <vargaz@gmail.com>
8638 * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
8640 Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
8642 * mini.h (MonoInstList): New type.
8643 (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
8644 __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
8645 MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
8646 __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
8647 MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
8648 MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
8649 MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
8650 MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
8651 MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
8652 MONO_INST_LIST_FOR_EACH_PREV_SAFE,
8653 MONO_INST_LIST_FOR_EACH_ENTRY,
8654 MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
8655 MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
8656 mono_inst_list_first, mono_inst_list_last,
8657 mono_inst_list_next, mono_inst_list_prev): New instruction
8658 list handling interfaces.
8659 (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
8660 list head 'ins_list'.
8661 (MonoInst): Replace next pointer with list head 'node'.
8662 (MonoCallInst): Make 'out_args' a MonoInstList.
8663 (MONO_INST_NEW_CALL): Explicitly init ->out_args.
8664 (MonoCompile): Delete reverse_inst_list and
8665 reverse_inst_list_len.
8666 * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
8667 mono_arch_lowering_pass, mono_arch_local_regalloc,
8668 mono_arch_output_basic_block, mono_arch_emit_prolog):
8669 Convert to new instruction lists.
8670 (insert_after_ins): Delete.
8671 * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
8673 * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
8674 * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
8675 split_bblock, mono_add_ins_to_end, mono_emit_call_args,
8676 mono_emulate_opcode, mono_emit_load_got_addr,
8677 inline_method, mono_method_to_ir, mono_print_bb_code,
8678 print_dfn, decompose_pass, nullify_basic_block,
8679 replace_out_block_in_code, remove_block_if_useless,
8680 merge_basic_blocks, move_basic_block_to_end,
8681 try_unsigned_compare, optimize_branches, mono_print_code,
8682 mini_select_instructions, remove_critical_edges): Likewise.
8683 * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
8684 peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
8685 mono_arch_output_basic_block, mono_arch_emit_prolog):
8687 * mini-mips.c (mono_arch_call_opcode, peephole_pass,
8688 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
8689 mono_arch_output_basic_block): Likewise.
8690 (inst_list_prepend, insert_after_ins): Delete.
8691 * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
8692 MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
8694 * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
8695 peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
8696 mono_arch_emit_prolog): Likewise.
8697 * cfold.c (mono_constant_fold): Likewise.
8698 * liveness.c (visit_bb, mono_analyze_liveness,
8699 optimize_initlocals): Likewise.
8700 * ssapre.c (dump_code, process_bb, code_motion): Likewise.
8701 * graph.c (mono_draw_code_cfg): Likewise.
8702 * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
8703 mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
8704 mono_ssa_cprop): Likewise.
8705 * abcremoval (get_relations_from_previous_bb, process_block):
8707 * local-propagation (mono_cprop_invalidate_values,
8708 mono_local_cprop_bb): Likewise.
8709 * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
8710 peephole_pass, mono_arch_output_basic_block,
8711 mono_arch_emit_prolog): Likewise.
8712 * mini-arm.c (mono_arch_call_opcode, peephole_pass,
8713 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
8714 mono_arch_emit_prolog): Likewise.
8715 (insert_after_ins): Delete.
8716 * aliasing.c (print_code_with_aliasing_information,
8717 mono_build_aliasing_information, mono_aliasing_deadce):
8718 Convert to new instruction lists.
8719 * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
8720 peephole_pass, NEW_INS, mono_arch_lowering_pass,
8721 mono_arch_local_regalloc, mono_arch_output_basic_block):
8723 (insert_after_ins): Delete.
8724 * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
8725 peephole_pass, mono_arch_output_basic_block): Convert to
8726 new instruction lists.
8727 * mini-codegen (InstList, inst_list_prepend,
8728 insert_after_ins): Delete.
8729 (insert_before_ins, get_register_force_spilling,
8730 get_register_spilling, free_up_ireg, free_up_reg,
8731 create_copy_ins, create_spilled_store, alloc_int_reg,
8732 alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
8733 to new instruction lists.
8734 * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
8735 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
8736 mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
8737 (insert_after_ins): Delete.
8738 * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
8739 mono_arch_local_regalloc, mono_arch_output_basic_block,
8740 mono_arch_call_opcode): Convert to new instruction lists.
8741 (insert_after_ins): Delete.
8742 * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
8743 peephole_pass, mono_arch_output_basic_block,
8744 mono_arch_emit_prolog): Convert to new instruction lists.
8746 2008-01-11 Zoltan Varga <vargaz@gmail.com>
8748 * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
8750 * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
8753 * Makefile.am (version.h): Make this work with non-bash shells.
8755 2008-01-10 Zoltan Varga <vargaz@gmail.com>
8757 * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
8759 2008-01-08 Zoltan Varga <vargaz@gmail.com>
8761 * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
8762 the InitializeArray optimization.
8764 2008-01-06 Zoltan Varga <vargaz@gmail.com>
8766 * mini.c driver.c: Don't include os/gc_wrapper.h.
8768 2008-01-05 Zoltan Varga <vargaz@gmail.com>
8770 * mini.c (print_jit_stats): Print GC statistics if available.
8772 2008-01-04 Zoltan Varga <vargaz@gmail.com>
8774 * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
8776 2007-12-29 Zoltan Varga <vargaz@gmail.com>
8778 * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
8780 2007-12-26 Zoltan Varga <vargaz@gmail.com>
8782 * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
8784 * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
8786 * driver.c (mono_main): Ditto.
8788 2007-12-23 Zoltan Varga <vargaz@gmail.com>
8790 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
8792 * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
8793 in the vtable can't be encoded.
8794 (compile_method): Ditto.
8796 2007-12-21 Zoltan Varga <vargaz@gmail.com>
8798 * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
8801 * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
8804 * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
8805 the top LMF entry belongs to the current method.
8807 * mini.c: Update after renaming of mono_thread_get_pending_exception ().
8809 2007-12-20 Zoltan Varga <vargaz@gmail.com>
8811 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
8813 * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
8815 * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
8817 * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
8819 * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
8821 * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
8824 * basic-float.cs: Add an ulong->double cast test.
8826 2007-12-15 Zoltan Varga <vargaz@gmail.com>
8828 * mini.c (mono_method_to_ir): Fix a warning.
8830 2007-12-14 Zoltan Varga <vargaz@gmail.com>
8832 * mini-ops.h: Add OP_SWITCH.
8834 * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
8835 CEE_SWITCH in back-end code, use OP_SWITCH instead.
8837 2007-12-11 Geoff Norton <gnorton@novell.com>
8839 * mini-s390x.c: Minor change to the MAX() define to allow
8840 it to compile with other gcc versions.
8842 2007-12-11 Geoff Norton <gnorton@novell.com>
8845 * mini-s390x.c: Implement sext_i4 to fix the build on s390x
8847 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
8849 exceptions-arm.c (mono_arch_get_restore_context): Restore
8852 exceptions-arm.c (throw_exception): Save the frame pointer.
8853 This is a partial fix for #323747. Only the client side is
8856 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
8858 * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
8859 was using an unrelated variable to log the class which
8860 needed the cctor to be called. This was crashing on arm.
8862 2007-12-09 Robert Jordan <robertj@gmx.net>
8864 * mini-x86.c (mono_arch_emit_epilog):
8865 Consider all kinds of 64-bit types. Fixes #323114.
8867 2007-12-08 Zoltan Varga <vargaz@gmail.com>
8869 * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
8871 2007-12-07 Zoltan Varga <vargaz@gmail.com>
8873 * mini-amd64.c (peephole_pass): Add a missing instruction check.
8875 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
8877 * mini.c: run type ctor before allocating an object, not only
8878 when running it's constructor method (fixes at least part of bug #342507).
8880 2007-12-07 Zoltan Varga <vargaz@gmail.com>
8882 * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
8884 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
8885 * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
8888 * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
8889 mono_generic_class_init_trampoline () the same as it is done with the other
8892 * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
8893 aot-runtime.c aot-compiler.c: Implement AOT support.
8895 2007-12-07 Mark Probst <mark.probst@gmail.com>
8897 * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
8898 build for archs which don't have the vtable trampoline defined
8901 2007-12-07 Zoltan Varga <vargaz@gmail.com>
8903 * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
8905 * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
8907 * mini-trampolines.c (mono_get_trampoline_func): New helper function.
8909 * tramp-<ARCH>.c: Use the new helper function.
8911 2007-12-07 Mark Probst <mark.probst@gmail.com>
8913 * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
8914 trampoline call, which takes a vtable argument.
8916 * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
8917 OP_TRAMPCALL_VTABLEs like other calls.
8919 * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
8920 register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
8921 call. Implemented a support function which fetches the vtable
8922 from a register set.
8924 * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
8925 Implemented a generic class init trampoline, using the
8926 OP_TRAMPCALL_VTABLE opcode.
8928 * mini.c: Implemented static field access when sharing generic
8929 code. This implies initing the class using the new
8930 OP_TRAMPCALL_VTABLE call.
8932 2007-12-07 Mark Probst <mark.probst@gmail.com>
8934 * mini.c: Don't compile methods with sharing enabled if their
8935 classes are disabled for sharing.
8937 2007-12-06 Zoltan Varga <vargaz@gmail.com>
8939 * inssel.brg: Add a missing sign extension to the GETCHR and array access
8940 opcodes. Fixes #346563.
8942 * objects.cs: Add a new test.
8944 * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
8946 * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
8947 HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
8949 2007-12-06 Zoltan Varga <vargaz@gmail.com>
8951 * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
8953 2007-12-03 Zoltan Varga <vargaz@gmail.com>
8955 * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
8958 2007-12-02 Zoltan Varga <vargaz@gmail.com>
8960 * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
8962 * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
8963 optimization in the AOT case.
8965 2007-11-30 Zoltan Varga <vargaz@gmail.com>
8967 * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
8969 * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
8971 * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
8973 * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
8975 * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
8976 is created by the inlined delegate ctor.
8978 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
8980 * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
8982 2007-11-29 Zoltan Varga <vargaz@gmail.com>
8984 * cpu-x86.md: Fix the length of ckfinite.
8986 2007-11-28 Zoltan Varga <vargaz@gmail.com>
8988 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
8990 * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
8991 (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
8993 * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
8995 * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
8996 OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
8998 2007-11-28 Martin Baulig <martin@ximian.com>
9001 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
9002 after creating the trampoline.
9004 2007-11-27 Zoltan Varga <vargaz@gmail.com>
9006 * aot-runtime.c (load_aot_module): Check runtime version if needed.
9008 * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
9011 * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
9012 instead of the calling method to help AOT.
9014 * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
9016 2007-11-26 Zoltan Varga <vargaz@gmail.com>
9018 * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
9021 2007-11-23 Zoltan Varga <vargaz@gmail.com>
9023 * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
9025 * aot-compiler.c (compile_method): Correct check for generic method definitions.
9026 (encode_method_ref): No need to handle generic method definitions specially.
9028 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
9030 * aot-runtime.c (decode_klass_ref): Clean this up and rename from
9033 * aot-compiler.c (encode_klass_ref): Clean this up and rename from
9035 (compile_method): Enable generic sharing.
9037 2007-11-22 Zoltan Varga <vargaz@gmail.com>
9039 * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
9040 (mini_method_compile): Add preliminary support for AOTing shared generic code.
9042 * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
9045 * mini-trampolines.c: Fix a warning.
9047 * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
9049 (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
9050 (generic_class_is_reference_type): Remove unused function.
9052 * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
9053 in the generic vtable trampoline case.
9055 * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
9057 * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
9058 return an AOT method based on a vtable slot.
9060 * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
9062 * mini.c (mini_get_vtable_trampoline): Export this.
9064 2007-11-22 Martin Baulig <martin@ximian.com>
9067 (MonoDebuggerInfo): Move `debugger_version' up.
9069 2007-11-22 Martin Baulig <martin@ximian.com>
9072 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
9074 * mini-trampolines.c
9075 (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
9076 after compiling the method.
9078 2007-11-20 Martin Baulig <martin@ximian.com>
9081 (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
9082 (mono_debugger_remove_breakpoint): Likewise.
9083 (mono_debugger_check_breakpoints): Likewise.
9085 * debug-debugger.c: Implement the new breakpoint interface here.
9087 2007-11-18 Zoltan Varga <vargaz@gmail.com>
9089 * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
9090 CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
9092 * mini-x86.c (mono_arch_output_basic_block): Ditto.
9094 2007-11-17 Zoltan Varga <vargaz@gmail.com>
9096 * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
9098 * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
9101 * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
9104 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
9105 returning a vtype in a register.
9107 * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
9108 here from the arch specific code.
9110 * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
9113 * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
9114 (mono_arch_emit_prolog): Increment maximum prolog size.
9116 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
9117 START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
9119 * mini-x86.c (get_call_info): Receive a MonoCompile instead of a
9120 MonoGenericSharingContext.
9122 * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
9123 MonoGenericSharingContext. Allocate memory from the cfg mempool.
9125 2007-11-15 Mark Probst <mark.probst@gmail.com>
9127 * mini.c, mini.h, generic-sharing.c: Functions for producing code
9128 which extract fields out of the runtime generic context. Full
9129 sharing of the NEWARR opcode.
9131 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
9133 * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
9134 --enable-minimal=ssa.
9136 2007-11-13 Zoltan Varga <vargaz@gmail.com>
9138 * mini-trampolines.c (mono_delegate_trampoline): Update after
9139 mono_marshal_get_delegate_invoke () signature change.
9141 2007-11-13 Mark Probst <mark.probst@gmail.com>
9143 * mini.c: Removed the shared context in favor of the generic
9144 sharing context. Allocate the MonoJitInfo structure with room for
9145 the generic sharing context if it's needed.
9147 * mini.h: Remove MonoGenericSharingContext declaration. It's in
9148 domain-internals.h now.
9150 * mini-x86.c: Pass the generic sharing context to get_call_info ().
9152 * generic-sharing.c: Several changes for working without a shared
9153 context and instead operating on open types instead.
9155 2007-11-12 David S. Miller <davem@davemloft.net>
9157 * inssel-sparc.brg: Fix double instruction emit.
9159 2007-11-12 Zoltan Varga <vargaz@gmail.com>
9161 * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
9162 Get/Set/Address methods.
9164 * mini.c debug-debugger.c mini-trampolines.c: Update after
9165 mono_marshal_get_delegate_invoke signature change.
9167 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
9169 * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
9170 This can happens with dynamic methods. Fixes the other bug in #322722.
9172 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
9174 * tramp-arm.c (mono_arch_patch_callsite): Support patching
9177 * mini-arm.c (arm_patch): Implement patching of BX call
9178 sequence. Fixes one of the bugs in #322722.
9180 2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
9182 * mini-sparc.c (mono_arch_flush_icache): Make more efficient
9183 under Linux. We only need to flush every 32-byte cache line.
9185 2007-11-07 Massimiliano Mantione <massi@ximian.com>
9188 move_basic_block_to_end: Add branches when needed, eventually creating
9190 optimize_branches: added a parameter that tells if it's ok to create
9191 new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
9192 and avoid calling move_basic_block_to_end when it's not ok.
9195 2007-11-07 Mark Probst <mark.probst@gmail.com>
9197 * mini.c: Abort inlining call to InitializeArray if something
9198 looks wrong. Let the icall handle it, which now has proper safety
9201 2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
9203 * mini.c (mono_spill_call): add support for soft-float.
9205 * mini.c (mono_method_to_ir): add support for soft-float
9206 to inlined functions that return float.
9208 * mini.c (mono_method_to_ir): add support for soft-float
9209 to cee_stsfld opcode on float fields.
9211 2007-11-05 Geoff Norton <gnorton@novell.com>
9213 * mini-x86.h: Fix the structure access for X86 Leopard.
9216 2007-11-05 Martin Baulig <martin@ximian.com>
9218 * mini-trampolines.c
9219 (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
9220 after compiling the method to notify the debugger.
9222 2007-11-05 Martin Baulig <martin@ximian.com>
9224 * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
9226 2007-11-02 Zoltan Varga <vargaz@gmail.com>
9228 * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
9229 David Miller <davem@davemloft.net>. Allow larger offsets in branches.
9231 2007-11-01 Zoltan Varga <vargaz@gmail.com>
9233 * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
9234 native-to-managed wrappers.
9236 2007-11-01 Geoff Norton <gnorton@novell.com>
9238 * mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
9241 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
9243 * mini.c, mini-x86.c: when getting back from unmanaged code
9244 to managed via a marshaled delegate we also need to set the
9247 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9249 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
9252 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
9254 * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
9255 let the debugger or other external agents to tell the JIT when
9256 a sw breakpoint has been inserted in the code that the JIT needs
9257 to be able to inspect.
9259 2007-10-31 Martin Baulig <martin@ximian.com>
9262 (MonoDebuggerInfo): Remove `runtime_class_init'.
9264 2007-10-30 Martin Baulig <martin@ximian.com>
9267 (mono_debugger_thread_created): Added `MonoThread *' argument.
9268 (mono_debugger_extended_notification): New public method.
9269 (mono_debugger_trampoline_compiled): New public method.
9272 (MonoDebuggerThreadInfo): Added `thread' and
9273 `extended_notifications' fields.
9276 (debugger_executable_code_buffer): New static variable.
9279 (MonoDebuggerInfo): Added `executable_code_buffer',
9280 `executable_code_buffer_size', `breakpoint_info_area',
9281 `breakpoint_table' and `breakpoint_table_size'.
9283 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
9285 * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
9286 that IP either is an unused value or the vtable pointer. IMT
9287 calls use vtable + offset now. Reduced by almost half the size
9290 2007-10-26 Jonathan Chambers <joncham@gmail.com>
9292 * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
9293 defines to access param registers. Replace long usage with
9294 gsize as sizeof(long) != sizeof(void*) on Win64.
9296 * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
9297 on Win64. Fix intrinsic, use _AddressOfReturnAddress
9298 instead of non-existant _GetAddressOfReturnAddress.
9300 * tramp-amd64.c: Use AMD64_ARG_REG# defines to access
9301 param registers. Save/restore %rdi and %rsi in MonoLMF.
9303 * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
9304 param registers. Modify (throw_exception) signature to take
9305 %rdi and %rsi on Win64.
9307 Code is contributed under MIT/X11 license.
9309 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
9311 * helpers.c: unlink debugging output files.
9313 2007-10-25 Zoltan Varga <vargaz@gmail.com>
9315 * mini.c: Move mono_create_ftnptr () to object.c.
9317 2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
9319 * helpers.c (mono_disassemble_code): MonoCompile parameter is now
9320 optional. This function can now be used to disassemble code generated
9321 outside the JIT such as trampolines and IMT thunks.
9323 * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
9325 * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
9326 vtable pointer from a ldr instruction.
9328 * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
9329 new IMT call sequence.
9331 * mini-arm.c (mono_arch_output_basic_block): emit the IMT
9332 call sequence for interface invocations.
9334 * mini-arm.c (mono_arch_emit_imt_argument): added, required
9335 for imt support. This function is empty since IMT on ARM requires no
9336 special handling on the IR side.
9338 * mini-arm.c (mono_arch_find_imt_method): added, required for
9341 * mini-arm.c (mono_arch_find_this_argument): added, required
9344 * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
9345 a ldr instruction to load a value stored in the code stream.
9347 * mini-arm.c (mono_arch_build_imt_thunk):added, required
9351 2007-10-23 Zoltan Varga <vargaz@gmail.com>
9353 * mini.c (mini_init): Install the jump trampoline callback.
9355 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
9357 * mini-trampolines.c: handle synchronized methods with the common
9358 vtable trampoline (bug #335601).
9360 2007-10-17 Zoltan Varga <vargaz@gmail.com>
9362 * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
9364 * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
9367 * mini-ia64.h mini-ia64.c: Add support for IMT.
9369 * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
9370 prolog. Fixes #331958.
9372 2007-10-15 Zoltan Varga <vargaz@gmail.com>
9374 * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
9376 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
9378 * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
9381 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
9383 * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
9386 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
9388 * mini-x86.c, mini-x86.h: x86 support for the common vtable
9391 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
9393 * mini-trampolines.c: changed the magic rampoline to understand
9394 the common vtable trampoline method: the method to invoke is
9395 determined by the vtable displacement of the call.
9397 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
9399 * mini.c, mini.h: register the common vtable trampoline if the
9400 architecture supports it.
9402 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
9404 * cpu-amd64.md: use the correct max length for tls_get.
9406 2007-10-14 Zoltan Varga <vargaz@gmail.com>
9408 * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
9409 CEE_STELEM_ANY. Fixes #333696.
9411 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
9413 * exceptions-x86.c: provide more graceful handling of the case where
9414 we followed a bogus function pointer from managed code (bug #332866).
9416 2007-10-11 Mark Probst <mark.probst@gmail.com>
9418 * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
9419 replaces the generic_shared flag and will carry more information
9422 * generic-sharing.c: Added mini_type_stack_size() which allows
9423 allows open types if given a generic sharing context.
9424 mini_get_basic_type_from_generic() takes a
9425 MonoGenericSharingContext* instead of a MonoCompile* now.
9427 * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
9428 mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
9429 mini-sparc.c, mini-x86.c: Trivial changes required by the two
9430 changes above. Just passing arguments through to the right
9433 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
9435 * mini-arm.c: unify the call emission to emit_code_seq().
9437 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
9439 * tramp-arm.c: reduced the trampoline size.
9441 2007-10-10 Mark Probst <mark.probst@gmail.com>
9443 * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
9444 variable handling out of arch-specific code.
9446 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
9448 * mini-arm.c: implemented fast delegate dispatch.
9450 2007-10-09 Zoltan Varga <vargaz@gmail.com>
9452 * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
9453 that fp elimination is turned off if the space required by locals is too
9456 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
9458 * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
9459 ARM to the new style trampoline.
9461 2007-10-09 Zoltan Varga <vargaz@gmail.com>
9463 * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
9465 * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
9467 2007-10-09 Martin Baulig <martin@ximian.com>
9470 (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
9471 `field_info_offset_offset'.
9473 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
9475 * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
9476 removed more internal usage of the r11 register and made it available
9477 to the register allocator.
9479 2007-10-08 Mark Probst <mark.probst@gmail.com>
9481 * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
9482 when sharing generics and treat type variables as references.
9484 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
9486 * mini-ppc.c: started removing the internal uses of register r11
9487 to eventually allow the register allocator to manage it as an
9488 additional available register.
9490 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
9492 * tramp-amd64.c: fixed memory corruption in the trampoline generation.
9494 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
9496 * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
9497 specific trampolines as they are not performance critical as a jump
9498 target (maybe align as before only for AOT code?). This saves about
9499 200 KB of native code on x86 for monodevelop startup.
9501 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
9503 * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
9504 monodevelop startup.
9506 2007-10-06 Zoltan Varga <vargaz@gmail.com>
9508 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
9510 * mini-sparc.h mini-sparc.c: Implement IMT support.
9512 * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
9513 its smaller and doesn't clobber sparc_g1.
9515 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
9517 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
9519 * mini-ppc.c: optimized the size of the IMT thunks a bit.
9521 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
9523 * mini-ppc.c: implemented fast delegate invocation.
9525 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
9527 * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
9529 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
9531 * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
9532 code to the new style trampoline in preparation for IMT support.
9534 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
9536 * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
9537 systems already. This also reduces the specific trampiline sizes and
9538 prepares for the use of r12 as the IMT identifier register.
9540 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
9542 * mini-mips.h: endianess fix (simplified from a patch by
9543 Thomas Kunze <thommy@tabao.de>, bug #323737).
9545 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
9547 * exceptions-ppc.c, mini-ppc.h: refactor to use macros
9548 to access ucontext fields and enable netbsd support
9549 (partially from Magnus Henoch <mange@freemail.hu>).
9551 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
9553 * genmdesc.pl: patch from Henryk Plotz <henryk@openmoko.org> to
9554 use the preprocessor from the CPP env var if it is set.
9556 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
9558 * mini-trampolines.c: fixed an assertion and moved it earlier in the
9559 code, before interface_offset gets used.
9561 2007-10-02 Zoltan Varga <vargaz@gmail.com>
9563 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
9564 mono_class_setup_vtable () before accessing klass->vtable.
9566 2007-10-01 Zoltan Varga <vargaz@gmail.com>
9568 * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
9571 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
9573 * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
9574 IMT slots (this saves hundreds of KB of memory in programs like
9575 IronPython and Monodevelop).
9577 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
9579 * mini.c: print the delegate counter.
9581 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
9583 * mini-x86.c: make it easier to enable the debugging code for IMT
9586 2007-09-28 Martin Baulig <martin@ximian.com>
9589 (MonoDebuggerMetadataInfo): Add `klass_image_offset',
9590 `mono_method_klass_offset' and `mono_method_token_offset'.
9592 2007-09-20 Mark Probst <mark.probst@gmail.com>
9594 * mini.c: First generics sharing implementation. Can only share
9595 in very simple cases. If sharing doesn't work it falls back to
9596 dedicated compilation.
9598 * mini.h: Flag in MonoCompile to specify whether generic
9599 compilation is shared. Flags enum for marking which generic inst
9600 of a context is used. Prototypes for helper functions.
9602 * generic-sharing.c: Helper functions for generic method sharing.
9604 * optflags-def.h: Optimization flag (gshared) for enabling generic
9605 method sharing added.
9607 * Makefile.am: generic-sharing.c added.
9609 2007-09-19 Daniel Nauck <dna@mono-project.de>
9611 * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
9613 2007-09-19 Massimiliano Mantione <massi@ximian.com>
9614 * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
9617 2007-09-19 Martin Baulig <martin@ximian.com>
9619 * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
9620 mono_debug_cleanup() is now part of mono_cleanup().
9622 2007-09-18 Zoltan Varga <vargaz@gmail.com>
9624 * driver.c (mono_main): Fix a warning.
9626 2007-09-17 Zoltan Varga <vargaz@gmail.com>
9628 * aot-compiler.c: Optimize various parts when processing large assemblies.
9631 * mini.c (mono_patch_info_hash): Improve hash function.
9633 2007-09-14 Jonathan Chambers <joncham@gmail.com>
9635 * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
9637 Code is contributed under MIT/X11 license.
9639 2007-09-14 Zoltan Varga <vargaz@gmail.com>
9641 * mini.c (mini_init): Fix a leak.
9643 * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
9645 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
9647 * mini.c: redirect string.InternalAllocStr() to the managed allocator.
9649 2007-09-14 Zoltan Varga <vargaz@gmail.com>
9651 * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
9653 2007-09-13 Zoltan Varga <vargaz@gmail.com>
9655 * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
9658 * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
9660 * mini.c (handle_alloc): Enable managed allocators in AOT code.
9662 * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
9664 * aot-runtime.c (decode_patch_info): Ditto.
9666 2007-09-12 Jonathan Chambers <joncham@gmail.com>
9668 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
9669 static case. Cache delegates in architecture specific code,
9670 based on number of parameters.
9672 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
9673 in architecture specific code, based on number of parameters.
9675 * mini-trampolines.c (mono_delegate_trampoline): Architecture specific
9676 caching happen in architecture specific code now.
9678 Code is contributed under MIT/X11 license.
9680 2007-09-12 Jonathan Chambers <joncham@gmail.com>
9682 * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
9683 mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
9684 mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
9686 Code is contributed under MIT/X11 license.
9688 2007-05-15 Massimiliano Mantione <massi@ximian.com>
9689 * mini.c: (mono_thread_abort) Fixed bug #82416.
9691 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
9693 * mini.: hook the new managed GC allocation feature into the JIT.
9695 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
9697 * mini.c: implementation for the new runtime tls opcode.
9699 2007-09-11 Martin Baulig <martin@ximian.com>
9702 (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
9703 `mono_method_inflated_offset'.
9705 2007-09-07 Zoltan Varga <vargaz@gmail.com>
9707 * driver.c mini.h mini.c: Add a new devel command line option for injecting
9708 async exceptions into a method.
9710 * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
9711 purpose of testing whenever the unwinder works at every instruction.
9713 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
9715 * mini.c: check accessibility of method used in ldftn (fixes
9718 2007-09-04 Zoltan Varga <vargaz@gmail.com>
9720 * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
9722 * inssel.brg: Fix a warning.
9724 2007-09-03 Martin Baulig <martin@ximian.com>
9726 * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
9727 now takes the `main_method' as argument.
9729 2007-09-02 Zoltan Varga <vargaz@gmail.com>
9731 * cpu-sparc.md (endfilter): Add missing src1:i argument.
9733 2007-08-30 Jonathan Chambers <joncham@gmail.com>
9735 * driver.c: include the cil-coff.h header on Windows.
9737 Code is contributed under MIT/X11 license.
9739 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
9741 * mini.c, driver.c: don't include the cil-coff.h header.
9743 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
9745 * mini.c: flag places that needs fixes fo soft-float support.
9747 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
9749 * mini.h, inssel-float.brg: fix soft-float constant loads on big
9750 endian systems (partially from Dean Jenkins, bug #81924).
9752 2007-08-28 Mark Probst <mark.probst@gmail.com>
9754 * mini.c (check_linkdemand): Remove embedded reference object in
9755 call to LinkDemandSecurityException.
9756 (mono_jit_compile_method_inner): Call LinkDemandSecurityException
9757 with an IntPtr instead of a reference object.
9759 2007-08-28 Zoltan Varga <vargaz@gmail.com>
9761 * mini.c (handle_initobj): Handle alignment properly.
9763 * inssel.brg (mini_emit_memset): Ditto.
9765 * inssel.brg (mini_emit_memcpy): Ditto.
9767 * inssel-sparc.brg: Ditto.
9769 * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
9771 2007-08-26 Zoltan Varga <vargaz@gmail.com>
9773 * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
9774 exceptions raised in unmanaged code. Fixes part of #82594.
9776 2007-08-24 Mark Probst <mark.probst@gmail.com>
9778 * mini.c (mono_method_to_ir), declsec.c
9779 (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
9781 2007-08-22 Martin Baulig <martin@ximian.com>
9784 (MonoDebuggerThreadInfo): New typedef.
9785 (mono_debugger_thread_table): New global variable.
9786 (mono_debugger_thread_created): New public function.
9787 (mono_debugger_thread_cleanup): New public function.
9791 - removed `get_current_thread' and `lookup_assembly'.
9792 - removed `data_table'.
9793 - added `thread_table'.
9796 (mono_thread_start_cb): Call mono_debugger_thread_created().
9797 (mono_thread_attach_cb): Likewise.
9798 (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
9799 (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
9802 * driver.c (mono_main): Move mono_debug_init() up, before calling
9803 mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
9805 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
9807 * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
9808 together when passing several arguments of type double (gives a small
9809 speedup and saves a few bytes of generated code).
9811 2007-08-20 Jb Evain <jbevain@novell.com>
9813 * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
9815 2007-08-20 Jb Evain <jbevain@novell.com>
9817 * mini.c (mono_method_to_ir): throw MethodAccessException
9818 and FieldAccessException instead of InvalidProgramException.
9820 2007-08-20 Mark Probst <mark.probst@gmail.com>
9822 * mini.c: CoreCLR security checks.
9824 * mini.h: Removed MonoSecurityMode (moved to
9825 metadata/security-manager.h) and mono_security_mode global var
9826 (replaced by set/get functions in security-manager.h).
9828 * driver.c: Added "core-clr-test" security mode for testing. Used
9829 set-function for setting security mode.
9831 2007-08-17 Mark Probst <mark.probst@gmail.com>
9833 * mini.c: MonoJitInfo's are freed hazardously now. Statistics for
9834 the new jit_info_table.
9836 * driver.c: Test code for the new jit_info_table (enabled by the
9837 define MONO_JIT_INFO_TABLE_TEST).
9839 2007-08-14 Zoltan Varga <vargaz@gmail.com>
9841 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
9842 detection of call <REG> instruction sequence. Fixes build on freebsd.
9844 2007-08-13 Zoltan Varga <vargaz@gmail.com>
9846 * mini-exceptions.c: Fix a warning.
9848 2007-08-11 Zoltan Varga <vargaz@gmail.com>
9850 * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
9851 stack overflow handling code on amd64 too.
9853 * mini-exceptions.c (mono_setup_altstack): Make this use
9854 mono_thread_get_stack_bounds ().
9856 * mini-x86.h: Disable sigaltstack on solaris x86.
9858 2007-08-10 Zoltan Varga <vargaz@gmail.com>
9860 * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
9862 2007-08-10 Geoff Norton <gnorton@customerdna.com>
9864 * tramp-x86.c: Remove some unneeded alignment changes on Apple. Fixes #82387.
9866 2007-08-08 Zoltan Varga <vargaz@gmail.com>
9868 * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
9870 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
9872 2007-08-03 Neale Ferguson <neale@sinenomine.net>
9874 * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
9877 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
9879 * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
9880 to be emitted (bug #82281).
9882 2007-08-01 Martin Baulig <martin@ximian.com>
9884 Merged the `debugger-dublin' branch.
9886 * debug-debugger.h (MonoDebuggerInfo):
9887 Removed the `old_*' compatibility entries.
9888 Added `debugger_version' and `data_table'.
9889 Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
9890 Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
9893 (MiniDebugMethodBreakpointInfo): Add `address_list'.
9894 (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
9895 instead of a `gconstpointer'.
9896 (mono_debugger_insert_method_breakpoint): Return a
9897 `MonoDebugMethodAddressList *'.
9899 2007-06-28 Martin Baulig <martin@ximian.com>
9901 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
9903 2007-08-01 Zoltan Varga <vargaz@gmail.com>
9905 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using
9906 __builtin_frame_address () since it is broken on older gcc versions.
9908 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
9910 * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
9911 on the stack overflow handling and made the managed stack overflows
9912 catchable in most cases using soft guard pages.
9913 * exceptions-x86.c: added code to restore the protection in the soft
9914 guard pages at the end of exception handling.
9916 2007-07-31 Zoltan Varga <vargaz@gmail.com>
9918 * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
9920 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
9922 * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
9925 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
9927 * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
9928 signal handling support until it has been ported to the new mechanism.
9929 * mini.c: fixed stack overflow detection and use the new
9930 architecture code to handle signals on the altstack.
9932 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
9934 * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
9935 stack overflows on the alt stack.
9937 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
9939 * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
9940 stack overflows on the alt stack.
9942 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
9944 * exceptions-ppc.c: cleanup preparing for altstack support.
9946 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
9948 * exceptions-arm.c: cleanup preparing for altstack support.
9950 2007-07-27 Mark Probst <mark.probst@gmail.com>
9952 * mini.c (print_jit_stats): Output hazard pointer stats.
9954 2007-07-26 Mark Probst <mark.probst@gmail.com>
9956 * driver.c, mini.c: Replaced security mode flags with a single
9959 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
9961 * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
9963 2007-07-25 Mark Probst <mark.probst@gmail.com>
9965 * mini.c, mini.h, driver.c (mono_main): Added command-line flag
9966 (which doesn't do anything yet) for activating Core CLR
9967 (Silverlight) security.
9969 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
9971 * mini-codegen.c: work around a possible gcc bug on arm.
9973 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
9975 * driver.c, mini-x86.h, mini-amd64.h: print a nice error
9976 message for platforms that don't support AOT compilation.
9978 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
9980 * mini.h, mini.c, driver.c: temporary smcs hack.
9982 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
9984 * mini-arm.h, mini-arm.c: arm EABI fixes.
9986 2007-07-22 Zoltan Varga <vargaz@gmail.com>
9988 * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
9991 * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
9992 trampolines taking a method argument.
9994 * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
9996 * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
9997 * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
9999 * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
10000 JIT compilation throws an exception. Fixes #82050.
10002 2007-07-19 Mark Probst <mark.probst@gmail.com>
10004 * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
10005 with the MONO_EXCEPTION_ defines.
10007 2007-07-17 Zoltan Varga <vargaz@gmail.com>
10009 * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
10012 * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
10013 the cause of an assertion.
10015 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
10017 * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
10020 2007-07-15 Zoltan Varga <vargaz@gmail.com>
10022 * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
10023 assert. Should fix #82103.
10025 2007-07-14 Zoltan Varga <vargaz@gmail.com>
10027 * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
10028 here too. Fixes #82095.
10030 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
10033 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
10035 * mini-amd64.h: Enable IMT for amd64.
10037 * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
10039 2007-07-12 Zoltan Varga <vargaz@gmail.com>
10041 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
10043 2007-07-12 Mark Probst <mark.probst@gmail.com>
10045 * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
10046 as soon as check_linkdemand sets an exception_type.
10048 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
10050 * mini-x86.c: fixed offsets for IMT call sequence.
10051 * mini-x86.h: enable IMT again.
10053 2007-07-11 Zoltan Varga <vargaz@gmail.com>
10055 * trace.c (mono_trace_enter_method): Decode MonoType too.
10057 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
10059 * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
10061 * mini-amd64.c: Add preliminary IMT implementation.
10063 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
10065 * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
10066 understand the new IMT-base interface invocation (thanks to
10067 Daniel Nauck for the report and the remote debugging session).
10069 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
10071 * mini-x86.c: size and speed optimizations for the IMT bsearch.
10073 2007-07-11 Zoltan Varga <vargaz@gmail.com>
10075 * Makefile.am (aotcheck): Make this actually use the AOTed code.
10077 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
10079 * mini-trampolines.c: implement AOT IMT support.
10080 * mini-x86.h: enable IMT support for wider testing.
10082 2007-07-10 Zoltan Varga <vargaz@gmail.com>
10084 * inssel.brg (emit_imt_argument): Add aot support here.
10086 * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
10088 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
10090 * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
10091 of the IMT implementation, partially from massi, with my
10092 implementation of the bsearch sequence. Disabled by default until
10093 the AOT code is implemented.
10095 2007-07-10 Zoltan Varga <vargaz@gmail.com>
10097 * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
10099 * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
10101 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
10103 * inssel.brg, mini.c, mini.h, mini-trampolines.c:
10104 arch-independent IMT JIT code from Massimiliano
10105 Mantione (massi@ximian.com) with small cleanups from me.
10107 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
10109 * Makefile.am: fix svn invocation to get the svn revision to be
10110 independent of the local language (build fix).
10112 2007-07-09 Mark Probst <mark.probst@gmail.com>
10114 * mini.c (inline_method): Reset cfg->exception_type if the
10115 inlining is aborted. Fixes: 82049.
10117 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
10119 * mini.c: remove assert from exception handling code when exception_ptr
10122 2007-07-05 Zoltan Varga <vargaz@gmail.com>
10124 * mini.c (mono_codegen): Add an assert.
10126 * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method
10127 enter and leave code.
10128 * mini-amd64.c (mono_arch_emit_prolog): Likewise.
10130 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
10132 * mini-ppc.c: fixed memory corruption for localloc(0)
10135 2007-07-05 Zoltan Varga <vargaz@gmail.com>
10137 * mini.c: Fix warnings.
10139 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
10141 * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
10142 to emit better double->int conversions.
10144 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
10146 * mini.c: the provided Min/Max optimizations are valid for unisgned
10149 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
10151 * 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
10153 2007-06-28 Miguel de Icaza <miguel@novell.com>
10155 * mini.c (mono_running_on_valgrind): Add support for reporting the
10156 method and its boundaries to valgrind.
10158 2007-06-28 Martin Baulig <martin@ximian.com>
10160 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
10162 2007-06-25 Zoltan Varga <vargaz@gmail.com>
10164 * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
10166 * generic.2.cs: Add new test case.
10168 2007-06-25 Martin Baulig <martin@ximian.com>
10170 Merged the `debugger-dublin' branch.
10173 (mono_debugger_insert_method_breakpoint): New public method.
10174 (mono_debugger_remove_method_breakpoint): Likewise.
10175 (mono_debugger_check_breakpoints): New static method.
10176 (mono_debug_close_method): Call mono_debugger_check_breakpoints().
10178 * debug-debugger.h (MonoDebuggerInfo):
10179 Renamed (to keep backward compatibility in the vtable):
10180 `insert_breakpoint' -> `old_insert_breakpoint'.
10181 `remove_breakpoint' -> `old_remove_breakpoint'.
10182 `create_string' -> `old_create_string'.
10183 `lookup_class' -> `old_lookup_class'.
10184 `lookup_type' -> removed; changed into a dummy field.
10185 `lookup_assembly' -> `old_lookup_assembly'.
10186 Added (same functionality, but different signature):
10187 `create_string', `lookup_class', `lookup_assembly'
10189 `get_method_addr_or_bpt', `remove_method_breakpoint',
10190 `runtime_class_init'.
10192 * debug-debugger.c: Merged the `debugger-dublin' branch.
10194 2007-06-23 Zoltan Varga <vargaz@gmail.com>
10196 * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
10198 (peephole_pass): Likewise.
10200 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
10202 * driver.c: hopefully make setaffinity work also for ancient
10205 2007-06-22 Atsushi Enomoto <atsushi@ximian.com>
10207 * driver.c : win32 build fix.
10209 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
10211 * driver.c: check for the MONO_NO_SMP env var and bind to a single
10212 processor if it is set.
10214 2007-06-21 Martin Baulig <martin@ximian.com>
10216 * debug-mini.h: New file.
10219 (mono_debugger_insert_breakpoint_full): Moved here from
10220 ../metadata/mono-debug-debugger.c.
10221 (mono_debugger_remove_breakpoint): Likewise.
10222 (mono_debugger_breakpoint_callback): Likewise.
10224 2007-06-15 Raja R Harinath <rharinath@novell.com>
10226 * jit-icalls.c (mono_helper_compile_generic_method): Update to
10227 changes in MonoGenericClass.
10229 2007-06-14 Zoltan Varga <vargaz@gmail.com>
10231 * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
10233 2007-06-14 Raja R Harinath <rharinath@novell.com>
10235 * jit-icalls.c (mono_helper_compile_generic_method): Update to
10236 removal of MonoGenericMethod.
10238 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
10240 * mini-exceptions.c: hooks for the exception events profiling API.
10242 2007-06-14 Randolph Chung <tausq@debian.org>
10244 * Makefile.ma: Add hppa target.
10245 * mini-arch.h: Include mini-hppa.h
10246 * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
10247 mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
10248 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
10250 2007-06-14 Randolph Chung <tausq@debian.org>
10252 * inssel.brg: Add rules for "chained" compare-branch operations so that
10253 a single compare op can affect multiple branches. Adjust cost for
10254 OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
10255 * inssel-long32.brg: Update rules to use compare-branch macros. Adjust
10256 cost for some rules so that they can more easily be overridden by
10257 per-arch rules (with fixes from lupus).
10258 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
10260 2007-06-13 Randolph Chung <tausq@debian.org>
10262 * mini-ops.h: Reorder branch ops so that they match the order of the
10263 corresponding CEE_* ops. The code expects them this way.
10264 Add new ops for HPPA target.
10265 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
10267 2007-06-13 Randolph Chung <tausq@debian.org>
10269 * mini-exceptions.c: Handle cases where the stack grows towards
10271 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
10273 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
10275 * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
10277 * driver.c: explain where a non-matching corlib is found.
10279 2007-06-13 Mark Probst <mark.probst@gmail.com>
10281 * mini.c (print_jit_stats): Output dynamic code allocation stats.
10283 2007-06-10 Sanghyeon Seo <sanxiyn@gmail.com>
10285 * mini-exceptions.c: Generate a method profile leave event during
10286 an exception to ensure that the profiler gets notified.
10288 2007-06-07 Zoltan Varga <vargaz@gmail.com>
10290 * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir
10293 * cpu-amd64.md: Add long_and/or/xor opcodes.
10295 2007-06-06 Wade Berrier <wberrier@novell.com>
10297 * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
10298 (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction
10299 length of instruction shr_imm (expected 8, got 10)
10301 2007-06-06 Zoltan Varga <vargaz@gmail.com>
10303 * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
10305 2007-06-06 Mark Probst <mark.probst@gmail.com>
10307 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
10308 MonoInternalHashTable again (fixed bug in the internal hash table
10311 2007-06-06 Mark Probst <mark.probst@gmail.com>
10313 * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
10314 Have to figure out what makes it crash the SWF regression.
10316 2007-06-05 Zoltan Varga <vargaz@gmail.com>
10318 * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
10320 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
10322 * mini.c: optimize out the type check when storing null in a
10325 2007-06-04 Mark Probst <mark.probst@gmail.com>
10327 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
10328 MonoInternalHashTable.
10330 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
10332 * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
10333 signed integer methods.
10335 2007-06-02 Zoltan Varga <vargaz@gmail.com>
10337 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case
10338 permanently since the current approach doesn't work.
10340 2007-06-02 Zoltan Varga <vargaz@gmail.com>
10342 * inssel.brg (stmt): Only call delegate->invoke_impl if
10343 MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
10345 2007-06-01 Zoltan Varga <vargaz@gmail.com>
10347 * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
10348 the sreg2==rdx case.
10350 * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
10351 account if it contains a rex prefix.
10352 (peephole_pass): Handle OP_FMOVE as well.
10354 2007-06-01 Zoltan Varga <vargaz@gmail.com>
10356 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
10357 as it causes regressions.
10359 2007-05-31 Zoltan Varga <vargaz@gmail.com>
10361 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
10362 static case as well.
10364 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
10366 * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
10367 (mono_arch_get_this_arg_from_call): Ditto.
10369 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
10371 * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
10374 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
10375 (mono_arch_get_this_arg_from_call): Ditto.
10377 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
10379 * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
10380 try to create optimized invoke code and use that for further invocations.
10381 Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
10383 * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
10385 2007-05-29 Rodrigo Kumpera <kumpera@gmail.com>
10387 * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
10388 sealed classes or methods.
10389 *devirtualization.cs: tests for the new optimization
10391 2007-05-29 Zoltan Varga <vargaz@gmail.com>
10393 * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
10394 by the update_volatile () function.
10396 2007-05-27 Zoltan Varga <vargaz@gmail.com>
10398 * driver.c (mono_main): Call g_thread_init () early since newer glib versions
10401 * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
10403 2007-05-24 Jonathan Chambers <joncham@gmail.com>
10405 * mini.c: Add configure checks for header files.
10406 * mini-x86.c: Add configure checks for header files.
10407 * trace.c: Add configure checks for header files.
10408 * aot-runtime.c: Add configure checks for header files.
10409 * aot-compiler.c: Add configure checks for header files.
10410 * driver.c: Add configure checks for header files.
10411 * mini-codegen.c: Add configure checks for header files.
10413 Code is contributed under MIT/X11 license.
10415 2007-05-22 Zoltan Varga <vargaz@gmail.com>
10417 * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
10418 icompare_imm -128 + op_iclt. Fixes #81703.
10420 2007-05-19 Zoltan Varga <vargaz@gmail.com>
10422 * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
10424 2007-05-15 Massimiliano Mantione <massi@ximian.com>
10426 * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
10427 inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
10428 so that all isinst checks now use "interface_bitmap".
10430 2007-05-15 Zoltan Varga <vargaz@gmail.com>
10432 * cpu-amd64.md (jmp): Fix a warning.
10434 * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
10436 * basic.cs: Add new regression test.
10438 * basic.cs: Remove test which is now in basic-long.cs.
10440 * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
10442 * basic-long.cs: Add new test.
10444 2007-05-13 Zoltan Varga <vargaz@gmail.com>
10446 * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
10448 2007-05-12 Zoltan Varga <vargaz@gmail.com>
10450 * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
10452 * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
10455 * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception
10456 throwing code a bit.
10458 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of
10459 the exception throwing code a bit.
10461 * mini-x86.c (get_call_info): Allocate result from a mempool.
10463 2007-05-11 Zoltan Varga <vargaz@gmail.com>
10465 * aot-compiler.c (find_typespec_for_class): Fix the assert.
10467 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
10469 * mini.h (MonoCompile): Add 'token_info_hash' field.
10471 * mini.c: Save token->method associations during compilation so the AOT
10472 compiler can use it.
10474 * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
10475 which reference generic classes and methods.
10477 2007-05-10 Zoltan Varga <vargaz@gmail.com>
10479 * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
10481 * aot-compiler.c (compile_method): Fix a typo in a comment.
10483 * aot-runtime.c (decode_cached_class_info): Skip generic types.
10485 * aot-compiler.c: Add minimal support for AOTing generic code by skipping
10486 everything generic.
10488 * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
10490 2007-05-09 Zoltan Varga <vargaz@gmail.com>
10492 * mini.h (MonoCompile): Add 'args' field.
10494 * mini.c (mono_compile_create_vars): Store variables representing the arguments
10497 * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
10499 2007-05-08 Zoltan Varga <vargaz@gmail.com>
10501 * mini.c (mono_compile_get_interface_var): Remove this unused function.
10503 * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
10505 * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
10506 opcodes for some opcodes.
10508 * mini.h *.brg *.c: Use the new opcodes.
10510 2007-05-08 Massimiliano Mantione <massi@ximian.com>
10512 * mini.h: Bumped aot revision.
10514 * inssel.brg: modified code generation of type checks for interfaces
10515 to use the new "MonoClass.interface_bitmap" instead of the old
10516 "MonoClass.interface_offsets".
10518 2007-04-30 Zoltan Varga <vargaz@gmail.com>
10520 * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
10522 2007-04-29 Zoltan Varga <vargaz@gmail.com>
10524 * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
10527 2007-04-27 Neale Ferguson <neale@sinenomine.net>
10529 * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
10531 2007-04-27 Wade Berrier <wberrier@novell.com>
10533 * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in
10534 mini.h) to fix build.
10536 2007-04-26 Zoltan Varga <vargaz@gmail.com>
10538 * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
10540 * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
10541 causes the corlib unit tests to fail.
10543 2007-04-25 Zoltan Varga <vargaz@gmail.com>
10545 * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
10547 * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
10549 * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional
10550 opcodes to the comparison relations.
10552 * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional
10553 opcodes to their types.
10555 * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
10557 * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache
10558 it in cfg->arch.cinfo.
10560 * local-propagation.c (mono_local_cprop_bb): Fix a warning.
10562 * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in
10563 cfg->cil_offset_to_bb.
10565 2007-04-24 Zoltan Varga <vargaz@gmail.com>
10567 * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
10568 created becase of initlocals.
10570 2007-04-23 Zoltan Varga <vargaz@gmail.com>
10572 * mini-alpha.c cpu-alpha.md: More alpha port work from
10573 Sergey Tikhonov <tsv@solvo.ru>.
10575 2007-04-21 Andreas Faerber <andreas.faerber@web.de>
10577 * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
10579 2007-04-19 Zoltan Varga <vargaz@gmail.com>
10581 * cpu-s390.md (break): Correct the length of break instruction.
10583 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
10585 * mini.c: fix a couple of soft-float issues and comments.
10587 2007-04-15 Miguel de Icaza <miguel@novell.com>
10589 * trace.c (is_filenamechar): - is also a filename char.
10591 2007-04-15 Neale Ferguson <neale@sinenomine.net>
10593 * mini-s390.c: Correct checking for enum type in return value processing.
10595 2007-04-14 Raja R Harinath <rharinath@novell.com>
10597 * Makefile.am (BUILT_SOURCES): Add 'version.h'.
10598 (version.h): Makefile is in the build directory.
10600 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
10602 * mini-amd64.h: fix for assertion failure on Solaris/amd64
10604 2007-04-11 Martin Baulig <martin@ximian.com>
10606 * mini.c (can_access_member): Fix handling of generic classes;
10609 2007-04-10 Zoltan Varga <vargaz@gmail.com>
10611 * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
10613 2007-04-05 Zoltan Varga <vargaz@gmail.com>
10615 * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
10617 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
10619 * mini-codegen.c: make sure the right spill amount is
10620 used for fp or integer registers (fixes the float_sub_spill() on ppc).
10622 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
10624 * mini-ppc.c: fixes for the fp_branch_nan test.
10626 2007-03-23 Zoltan Varga <vargaz@gmail.com>
10628 * basic.cs: Comment out new test which still fails on ia64.
10630 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10632 * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
10634 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
10636 * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
10638 2007-03-22 Zoltan Varga <vargaz@gmail.com>
10640 * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
10641 on 64 bit machines. Fixes part of #80738.
10643 * basic.cs: Add regression test.
10645 2007-03-17 Zoltan Varga <vargaz@gmail.com>
10647 * inssel.brg basic.cs: Revert previous change to fix build.
10649 * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
10652 * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
10654 * basic.cs: Add new regression test.
10656 2007-03-17 Zoltan Varga <vargaz@gmail.com>
10658 * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
10661 2007-03-16 Neale Ferguson <neale@sinenomine.net>
10663 * cpu-s390x.md: Correct length of break instruction.
10665 2007-03-16 Neale Ferguson <neale@sinenomine.net>
10667 * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
10668 * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
10670 2007-03-15 Jonathan Chambers <joncham@gmail.com>
10672 * *.c: Begin WIN64 port.
10673 * mini.c: Use correct register in profiler.
10674 * mini-amd64.c: No inline assembly on Win64.
10675 * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
10676 Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
10677 * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
10678 is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
10679 mono_arch_ip_from_context for Win64.
10681 Contributed under MIT/X11 license.
10683 2007-03-15 Zoltan Varga <vargaz@gmail.com>
10685 * exceptions-amd64.c (seh_handler): Ditto.
10687 * exceptions-x86.c (seh_handler): Fix a memory leak.
10689 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
10691 * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
10692 mini-s390x.c: fixed peephole optimizations to deal
10693 correctly with 1 and 2 byte reload avoidance.
10695 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
10697 * cpu-s390.md, cpu-s390x.md: update localloc length.
10699 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
10701 * cpu-g4.md: added missing descriptions.
10703 2007-03-14 Miguel de Icaza <miguel@novell.com>
10705 * Makefile.am: Add support so the tail tests are not executed on
10706 PowerPC as that is a known limitation of the PowerPC port.
10708 2007-03-13 Jonathan Chambers <joncham@gmail.com>
10710 * runmdesc.bat: Move to msvc directory.
10712 2007-03-13 Jonathan Chambers <joncham@gmail.com>
10714 * runmdesc.bat: Run executable that was produced by the current
10715 target and sent via an argument.
10717 2007-03-11 Zoltan Varga <vargaz@gmail.com>
10719 * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
10722 * generics.2.cs: Add regression test.
10724 2007-03-09 Wade berrier <wberrier@novell.com>
10726 * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
10728 2007-03-09 Zoltan Varga <vargaz@gmail.com>
10730 * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
10731 AOT code depends on this.
10733 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
10735 * mini.c: more precise tracking of types in the eval stack
10736 (part of fix for bug #81044).
10738 2007-03-07 Zoltan Varga <vargaz@gmail.com>
10740 * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
10742 * aot-compiler.c (encode_patch): Remove an obsolete comment.
10744 2007-03-06 Zoltan Varga <vargaz@gmail.com>
10746 * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
10748 * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
10750 2007-02-22 Zoltan Varga <vargaz@gmail.com>
10752 * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
10753 a pointer on 64 bit systems. Fixes #80190.
10755 * iltests.il: Add new regression test.
10757 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
10759 * mini.c: inline a constant for Environment.IsRunningOnWindows.
10761 2007-02-19 Geoff Norton <gnorton@customerdna.com>
10763 * trace.c: Remove an erroneous alignemnt check when tracing.
10764 Fixes --trace on OSX86.
10766 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
10768 * mini-$(arch).h: initialize SP in context for all the archs.
10770 2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
10772 * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
10773 regressions in the thread tests.
10775 2007-02-14 Zoltan Varga <vargaz@gmail.com>
10777 * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
10778 - fixed implementation of LOCALLOC opcode
10779 - implemented non-un compare for floats
10781 - implementation of FDIV and CKFINITE opcodes
10782 - fixes for latest mono updates
10783 - additional arch opcodes
10785 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
10787 * Makefile.am: simplify and merge rules for cross-compilation.
10789 2007-02-07 Massimiliano Mantione <massi@ximian.com>
10791 * local-propagation.c: Actually *apply* the fix for bug 80591...
10793 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
10795 * mini-exceptions.c: backuot part of the last change
10796 (fixes cas tests on amd64 related to GetExecutingAssembly ()).
10798 2007-02-06 Massimiliano Mantione <massi@ximian.com>
10799 * inssel.brg: Fix bug 59286.
10802 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
10804 * mini-exceptions.c: patch from Zoltan to correctly check for
10805 stack boundaries (using the stack register, not the frame register),
10806 fixes bugs #80724, #79717.
10808 2007-02-03 Zoltan Varga <vargaz@gmail.com>
10810 * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
10811 OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
10813 * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
10814 presence of frame pointer elimination.
10816 2007-02-01 Geoff Norton <gnorton@customerdna.com>
10818 * mini-x86.h: NetBSD UCONTEX_REG defines.
10820 2007-02-01 Zoltan Varga <vargaz@gmail.com>
10822 * inssel-amd64.brg: Fix amd64 build.
10824 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
10826 * mini.h: remove extern to workaround what looks likes gcc bug 26905
10829 2007-01-31 Zoltan Varga <vargaz@gmail.com>
10831 * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
10834 * mini-<ARCH>.c: Use mono_is_regsize_var ().
10836 2007-01-30 Mark Mason <mason@broadcom.com>
10838 * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
10839 * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
10840 * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
10841 beginning support for CEE_JMP [not quite working yet]
10842 * tramp-mips.c: LMF handling now works
10844 2007-01-30 Zoltan Varga <vargaz@gmail.com>
10846 * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
10848 * mini.h (NULLIFY_INS): New macro.
10850 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
10852 * mini.c: statistical profiler fix for windows, patch
10853 from Tor Lillqvist (tml@novell.com).
10855 2007-01-30 Massimiliano Mantione <massi@ximian.com>
10856 * local-propagation.c: Fix bug 80591.
10858 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
10860 * Makefile.am: put back the --export-dynamic option as with
10861 the previous gmodule flags (thanks to Robert Jordan).
10863 2007-01-28 Zoltan Varga <vargaz@gmail.com>
10865 * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
10867 mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
10868 simplify and speed up the local register allocator. Also rename some fields
10869 like iassign->vassign.
10871 * regalloc.c: Remove some functions which are no longer used since their
10872 inlined version is in mini-codegen.c.
10874 * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
10876 * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
10878 2007-01-27 Zoltan Varga <vargaz@gmail.com>
10880 * mini-amd64.c (peephole_pass): Remove optimizations which omit a
10881 narrowing. Fixes #80622.
10883 * iltests.il: Add new regresssion test.
10885 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
10887 * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
10888 debug-debugger.c, debug-debugger.h: warning fixes.
10889 * driver.c: updated copyright year and made it fit in one line.
10891 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
10893 * aot-runtime.c: updated to use mono-dl instead of gmodule.
10895 2007-01-25 Zoltan Varga <vargaz@gmail.com>
10897 * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
10899 * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
10901 * iltests.il: Add new test for bug #80507.
10903 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
10905 * mini-arm.h: use soft-float also on vfp for now.
10907 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
10909 * mini.c: fix some more soft-float issues.
10911 2007-01-24 Zoltan Varga <vargaz@gmail.com>
10913 * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
10915 2007-01-24 Massimiliano Mantione <massi@ximian.com>
10916 * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
10917 mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
10918 MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
10920 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
10922 * mini-arm.c: typo fix.
10924 2007-01-23 Neale Ferguson <neale@sinenomine.net>
10926 * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
10928 2007-01-21 Zoltan Varga <vargaz@gmail.com>
10930 * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
10931 Share stack slots for scalar types. Avoid expensive g_list_free () calls.
10933 * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
10935 * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto.
10937 * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
10939 * inssel.brg: Fix a warning.
10941 * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
10943 * abcremoval.c ssa.c ssapre.c: Update after this change.
10945 * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
10947 * dominators.c (df_set): Use mono_bitset_union_fast.
10949 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
10951 * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
10952 mini-codegen.c: reduce relocations and memory usage for the cpu
10955 2007-01-20 Zoltan Varga <vargaz@gmail.com>
10957 * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
10959 * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
10960 to reduce their size.
10962 2007-01-19 Mark Mason <mason@broadcom.com>
10964 * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
10965 * mini-mips.c: more configuration macros, support long conditional branches, additional
10966 asserts, fix epilog instrumentation.
10967 * mini-mips.h: use standard stack walk
10968 * cpu-mips.md: increase size of div, rem and conditional branches
10970 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
10972 * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
10975 2007-01-19 Zoltan Varga <vargaz@gmail.com>
10977 * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
10978 (compile_method): Ditto.
10980 * aot-runtime.c (decode_klass_info): Ditto.
10982 * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
10983 needed by the code generated by inssel.brg. Also fix a warning.
10985 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
10987 * mini.c: deal with enums that become genericinsts by
10988 being nested in a generic class (bug #79956).
10990 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
10992 * mini.c: match the generic definition to check for
10993 private access with generic types (bug #78431).
10995 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
10997 * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
10998 to make life easier for people cross-compiling that insist on not
11001 2007-01-17 Mark Mason <mason@broadcom.com>
11003 * inssel-long.brg: patch to deal with mips missing flags
11004 * inssel-long32-mips.brg: implement overflow checks
11005 * insset-mips.brg: implement overflow checks
11006 * mini-mips.h: implement conditional exception handling
11007 * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
11008 Remove unused code, minor cleanups.
11009 * exceptions-mips.c: minor cleanups
11010 * mini-ops.h: add mips conditional exception ops
11011 * cpu-mips.md: add mips conditional exception ops
11014 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
11016 * inssel.brg: patch from Mark Mason <mason@broadcom.com>
11017 to deal with mips missing of flags.
11019 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
11021 * exceptions-ppc.c: execute fault handlers.
11023 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
11025 * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
11027 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
11029 * mini.c: handle also floating point values in initialize_array.
11031 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
11033 * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
11034 array initialization and make it conditional on the intrins option.
11036 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
11038 * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
11039 relocations and put the patch info names close to the enum definition.
11041 2007-01-15 Mark Mason <mason@broadcom.com>
11043 * basic.cs, exceptions.cs: break up large tests to increase debugability.
11045 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
11047 * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
11049 2007-01-12 Raja R Harinath <rharinath@novell.com>
11051 * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
11053 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
11055 * Makefile.am: distribute the mips sources.
11057 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
11059 * mini-codegen.h: handle bug #80489 here, by excluding ecx
11062 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
11064 * cpu-x86.md: back out for now as this triggers other regressions.
11066 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
11068 * cpu-x86.md: force src1 and dest regpair for long shift instructions
11069 to eax:edx, so ecx can't get allocated to them (bug #80489).
11071 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
11073 * mini.c, mini-exceptions.c: enabled running fault handlers
11076 2007-01-03 Miguel de Icaza <miguel@novell.com>
11078 * driver.c: If nothing fail, do not use the string "failed",
11079 because it makes it very annoying to view test result logs on the
11082 2006-12-30 Miguel de Icaza <miguel@novell.com>
11084 * debug-debugger.c (mono_debugger_main): Rename "main" to
11085 "main_method" to prevent a warning.
11087 Remove a warning for unused field.
11089 2006-12-28 Martin Baulig <martin@ximian.com>
11092 (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
11094 2006-12-22 Martin Baulig <martin@ximian.com>
11096 * mdb-debug-info32.s, mdb-debug-info64.s: New files.
11097 Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
11098 seperate `.mdb_debug_info' section, so we can access it from the
11099 debugger even if the binary is stripped.
11101 * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
11102 from the `.mdb_debug_info' here to prevent the linker from
11103 removing that section.
11105 * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
11106 mdb-debug-info64.s.
11108 2006-12-19 Robert Jordan <robertj@gmx.net>
11110 * mini-x86: enable the code to return small structures in
11111 registers for FreeBSD as well. Fixes bug #80278.
11112 * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
11114 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11116 * mini-x86.c: align the stack when calling the profiler
11117 function instrumenting the prolog (on OSX).
11119 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
11121 * mini.c: emit a break opcode where Debugger.Break () is called.
11123 2006-12-13 Miguel de Icaza <miguel@novell.com>
11125 * mini.c (mono_method_to_ir): Provide useful information on this
11126 assert, to prevent others from debugging like I did.
11128 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
11130 * mini.c: enable code which was incorrectly commented
11133 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
11135 * mini-x86.c: enable on OSX, too, the code to return small
11136 structures in registers.
11138 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
11140 * mini-x86.c: remove the use of the dynamic code manager here, too.
11142 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
11144 * mini.h, debug-debugger.c, tramp-*.c: fixed
11145 mono_debugger_create_notification_function() to use
11146 mono_global_codeman_reserve () instead of a dynamic code manager.
11148 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
11150 * mini.c, jit-icalls.h, jit-icalls.c: remove the
11151 ves_array_element_address() jit icall and use a generated
11152 managed method instead (which is about 4 times faster for a rank 3
11155 2006-11-29 Mark Mason <mason@broadcom.com>
11157 * basic-calls.cs: additional tests for passing
11158 structures as function arguments.
11160 2006-11-29 Mark Mason <mason@broadcom.com>
11162 * mini-mips.h: disable custom exception handling
11163 * mini-mips.c: throw/rethrow should use jalr to call
11164 exception stubs. Fixed bug with passing structures
11165 by value. More support for tracing floating point
11168 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11170 * mini.c: fixed typo in the soft-float ldind.r4 handling
11173 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
11175 * mini.c, mini.h, driver.c: added --runtime command line
11176 option to select a different runtime than the autodetected one.
11177 * jit.h: added API for embedders to initialize with a specific
11180 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
11182 * mini.c: handle also boxing of r4 values (bug #80024).
11184 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
11186 * mini-ppc.c: force indirect calls until we reserve
11187 enough address space for all the generated code.
11189 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
11191 * exceptions-arm.c: workaround bugs in the libc definition
11192 of struct ucontext.
11194 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
11196 * inssel.brg: fixes from me and Mark Mason.
11198 2006-11-23 Dick Porter <dick@ximian.com>
11200 * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
11201 semaphore display now we've fixed the initial value
11203 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
11205 * inssel.brg: partially revert the last change to fix the build.
11207 2006-11-21 Mark Mason <mason@broadcom.com>
11209 * inssel.brg: Add and use compare-and-branch macros to support
11210 architectures that do not have condition code registers (ie. MIPS).
11211 * *-mips.{c,brg,md}: Fix copyright statements
11213 2006-11-20 Mark Mason <mason@broadcom.com>
11215 * Makefile.am: remove mini-codegen.c from list of MIPS sources
11216 * mini.c: Allow GET_CONTEXT to be specified by the arch port
11217 * mini.h: Added declaration for mono_print_ins()
11218 * mini-codegen.c: added ins_spec initializer for MIPS
11219 * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
11220 vreg to be virtual and hreg to be non-virtual.
11221 * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
11222 is not yet working/implemented correctly.
11223 * mini-codegen.c (print_ins): rename to mono_print_ins(), make
11224 non-static, fixup calls to print_ins() from other parts in the file.
11226 2006-11-20 Mark Mason <mason@broadcom.com>
11228 * basic-calls.cs: added tests for passing structures as arguments
11231 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
11233 * inssel-long32.brg: optimize signed division by power of two.
11235 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
11237 * mini-arm.c: added support for interworking with thumb code
11238 (mono must be still be built using the ARM instruction encoding).
11240 2006-11-19 Miguel de Icaza <miguel@novell.com>
11242 * mini.c (type_from_op): Separate the conditions for OP_EQ as the
11243 verifier has different rules for it. Fixes a few verifier issues
11246 * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
11247 at the end, so people know what happened.
11249 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
11251 * brach-opts.c: in optimize_exception_target() make sure we
11252 are in a catch clause (fixes bug #79871).
11254 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
11256 * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
11257 more soft-float support fixes.
11259 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
11261 * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
11262 that are passed half on the stack and half in registers.
11264 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
11266 * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
11267 more mips integration work from Mark E Mason
11268 <mark.e.mason@broadcom.com>.
11270 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
11272 * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
11273 cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
11274 tramp-mips.c: added sources for the mips port, not
11275 integrated in the build yet. Contributed by
11276 Mark E Mason <mark.e.mason@broadcom.com>.
11278 2006-11-14 Neale Ferguson <neale@sinenomine.net>
11280 * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
11282 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
11284 * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
11285 put the soft-float rules in its own file since it seems to
11286 break s390 compilation.
11288 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
11290 * mini-arm.c: fixed wrnings.
11292 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
11294 * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
11295 inssel-arm.brg: ARM support for soft-float.
11297 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
11299 * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
11300 loads and stores of 32 bit fp values.
11302 2006-11-10 Zoltan Varga <vargaz@gmail.com>
11304 * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
11306 * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
11307 works. Fixes #79852 and #79463.
11309 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
11311 * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
11312 more soft-float support WIP and fixes.
11314 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
11316 * mini-arm.c: some VFP updates.
11318 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
11320 * mini-exceptions.c: 0 is a valid local var offset in some
11321 architectures, don't assert (bug #78508).
11323 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
11325 * exceptions-arm.c: fixed off by one error in stack walk code.
11327 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
11329 * mini.h, mini.c: more precise tracking of type load exceptions.
11331 2006-11-03 Robert Jordan <robertj@gmx.net>
11333 * Makefile.am: [WIN32] Add monow.exe target.
11334 * driver.c: [WIN32] Don't detach the console when debugging.
11337 2006-10-30 Miguel de Icaza <miguel@novell.com>
11339 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
11341 2006-10-23 Zoltan Varga <vargaz@gmail.com>
11343 * aot-compiler.c (emit_method_info): Add a case missed earlier.
11345 * driver.c (mini_regression): Fix --regression with AOT.
11347 * aot-compiler.c (emit_method_info): Fix AOT on amd64.
11349 2006-10-17 Zoltan Varga <vargaz@gmail.com>
11351 * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
11353 * mini-sparc.h: Don't use sigaction on sparc/linux.
11355 * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
11357 * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
11359 * mini-exceptions.c: Add proper include files for getpid ().
11361 2006-10-16 Zoltan Varga <vargaz@gmail.com>
11363 * aot-runtime.c (mono_aot_get_method): Change this to return the native code
11364 address instead of a MonoJitInfo* to avoid decoding the exception info for the
11367 * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
11368 name cache to reduce its size.
11370 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
11372 2006-10-15 Zoltan Varga <vargaz@gmail.com>
11374 * mini-x86.c: Save/restore the current LMF structure more efficiently using
11375 the mono_lmf TLS variable.
11377 * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in
11378 trampoline lmf frames.
11380 * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
11382 2006-10-14 Zoltan Varga <vargaz@gmail.com>
11384 * mini-amd64.c: Save/restore the current LMF structure more efficiently using
11385 the mono_lmf TLS variable.
11387 * mini-exceptions.c: Access the LMF structure through accessors.
11389 * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS
11390 variable instead of in jit_tls->lmf.
11392 * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
11394 * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in
11395 trampoline lmf frames.
11397 * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
11399 2006-10-12 Zoltan Varga <vargaz@gmail.com>
11401 * mini.c trace.c mini-x86.c: Revert these too.
11403 * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
11406 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
11408 * genmdesc.c: removed now dead code.
11410 2006-10-09 Robert Jordan <robertj@gmx.net>
11412 * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
11414 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
11416 * mini.h: do not leave gaps in the opcode values.
11418 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
11420 * jit-icalls.h: flag functions as internal here, too.
11422 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
11424 * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
11425 functions with the internal attribute.
11427 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
11429 * aot-compiler.c: fclose the file descriptor in the profile read loop.
11431 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
11433 * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
11436 2006-10-05 Zoltan Varga <vargaz@gmail.com>
11438 * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
11439 tail calls as on other platforms.
11441 * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
11443 * iltests.il: Add a few tailcall tests.
11445 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
11447 * driver.c: fix loop for old compilers (bug #79521).
11449 2006-10-02 Zoltan Varga <vargaz@gmail.com>
11451 * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
11453 * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
11455 * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
11456 metadata without any code.
11458 * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
11459 more precise debugging information using gdb.
11461 2006-09-30 Zoltan Varga <vargaz@gmail.com>
11463 * inssel-ia64.brg: Make the helper methods static.
11465 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
11467 * inssel-x86.brg: make the helper methods static.
11469 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
11471 * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
11473 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
11475 * mini.c: updates for monoburg changes.
11476 * inssel.brg: make a few helper functions static as they should.
11478 2006-09-27 Zoltan Varga <vargaz@gmail.com>
11480 * Makefile.am: Move mini-codegen.c to common_sources.
11482 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
11484 * mini.h: instroduce inst_call in MonoInst for use in OUTARG
11486 * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
11487 mini-ppc.h: port to use the common local register allocator.
11489 2006-09-26 Zoltan Varga <vargaz@gmail.com>
11491 * mini.h: Remove the comment too then.
11493 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
11495 * mini.h: put back backend.data which is to be used shortly and
11496 doesn't increase the size of MonoInst. If any 64 bit arch aligned
11497 pointers on 4 byte boundaries it'd have much bigger issues running
11498 and you can ifdef it out anyway.
11500 2006-09-26 Zoltan Varga <vargaz@gmail.com>
11502 * mini.h (MonoInst): Remove backend.data field since it is unused and increases
11503 MonoInst size by 4 bytes on 64 bit machines.
11505 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
11507 * *.{c,h,brg}: long due removal of the unused field in MonoInst and
11508 replacement with more meaningful field names. Arch maintainers, please
11509 check the assigned names are good enough for your arch.
11511 2006-09-26 Zoltan Varga <vargaz@gmail.com>
11513 * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the
11514 OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
11516 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
11518 * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
11519 relocations and memory requirements, put the optimization flags
11520 definitions in their own file.
11522 2006-09-24 Zoltan Varga <vargaz@gmail.com>
11524 * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
11526 * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
11528 2006-09-22 Zoltan Varga <vargaz@gmail.com>
11530 * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
11532 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
11534 * inssel.brg: use the correct function to get the size of an item
11535 in an array, given an element class.
11536 * aot-compiler.c: do not access class->class_size directly.
11538 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
11540 * mini.h, debug-mini.c: added a debugging function to print
11541 info about local variables and arguments in a jitted method.
11543 2006-09-20 Zoltan Varga <vargaz@gmail.com>
11545 * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
11547 * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
11549 2006-09-19 Zoltan Varga <vargaz@gmail.com>
11551 * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
11552 inner and outer loops when passing vtypes.
11554 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
11556 * mini-ppc.c: take into account the cpu errata for cache flushing
11557 which caused some random errors (bug #79381).
11559 2006-09-19 Zoltan Varga <vargaz@gmail.com>
11561 * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to
11562 mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
11564 2006-09-17 Zoltan Varga <vargaz@gmail.com>
11566 * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
11569 * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
11570 freebsd ports tree.
11572 * mini-amd64.c (emit_call): Avoid near calls on freebsd.
11573 (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
11575 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
11578 2006-09-13 Zoltan Varga <vargaz@gmail.com>
11580 * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
11582 2006-09-12 Zoltan Varga <vargaz@gmail.com>
11584 * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this
11585 macro does not have to be changed during debugging.
11587 * 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>.
11589 * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
11591 * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
11593 * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if
11594 MONO_ARCH_NO_EMULATE_MUL is defined.
11596 * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
11598 * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
11600 * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
11602 * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
11604 2006-09-11 Zoltan Varga <vargaz@gmail.com>
11606 * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
11607 stuff to mini-exceptions.c where it is used.
11609 * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
11610 setup code, the real one is in mini-exceptions.c.
11612 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
11613 layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
11614 some changes from the freebsd ports tree.
11616 * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
11619 * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
11621 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
11623 * mini.c: on Linux, check for /proc to be mounted
11624 (bug# 79351, novell bug#201204).
11626 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
11628 * mini.c: handle cases where pthread_attr_getstack() behaves
11629 incorrectly (bug #78096).
11631 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
11633 * mini-arm.c: support larger stack frames (bug #79272).
11635 2006-09-08 Zoltan Varga <vargaz@gmail.com>
11637 * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
11639 * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef
11642 * aot-runtime.c (mono_aot_get_class_from_name): New function used by
11643 mono_class_from_name () to find a class from its name.
11645 * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
11647 2006-09-07 Zoltan Varga <vargaz@gmail.com>
11649 * mini-amd64.c (emit_call): Avoid strstr () call if possible.
11651 2006-09-05 Kornel Pal <kornelpal@gmail.com>
11653 * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
11655 2006-09-04 Zoltan Varga <vargaz@gmail.com>
11657 * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
11658 callinfo->trampoline.
11660 * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
11662 (mono_arch_patch_code): Add some debug code to help track down similar failures in the
11665 2006-09-03 Zoltan Varga <vargaz@gmail.com>
11667 * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
11669 2006-09-02 Zoltan Varga <vargaz@gmail.com>
11671 * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
11672 stats.method_trampolines, it is already done by the generic trampoline code.
11674 * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
11676 2006-09-01 Zoltan Varga <vargaz@gmail.com>
11678 * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
11680 * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
11682 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
11684 * mini.c (print_jit_stats): Print mscorlib mempool size too.
11686 * mini.c (print_jit_stats): Print new stats.
11688 * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
11690 2006-08-31 Zoltan Varga <vargaz@gmail.com>
11692 * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
11693 Address on two dimensional arrays. Fixes #78729.
11695 * mini.h (MonoCompile): Add a 'skip_visibility' field.
11697 * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
11700 * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
11702 * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
11705 * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
11707 (mini_get_ldelema_ins): Ditto.
11709 2006-08-30 Zoltan Varga <vargaz@gmail.com>
11711 * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
11712 (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation.
11715 2006-08-29 Neale Ferguson <neale@sinenomine.net>
11717 * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
11718 mono_arch_get_patch_offset as a dummy entry point to allow successful link.
11720 * exceptions-s390x.c: Cosmetic change.
11722 * tramp-s390.c: Fix warning.
11724 * cpu-s390.md: Correct length of mul_imm.
11726 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
11728 * aot-compiler.c: added binary writer with ELF backend
11729 implementation (only on Linux/x86 for now).
11731 2006-08-18 Zoltan Varga <vargaz@gmail.com>
11733 * Makefile.am: Don't run net 2.0 AOT tests.
11735 * aot-compiler.c (compile_method): Skip methods with tail calls as well.
11736 (mono_compile_assembly): Skip net 2.0 assemblies as well.
11738 * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
11740 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
11742 * aot-compiler.c: simplified and refactored the asm-writing code
11743 to allow different backends.
11745 2006-08-18 Zoltan Varga <vargaz@gmail.com>
11747 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
11749 * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a
11750 little. Share patches of type TYPE_FROM_HANDLE as well.
11752 * mini.c (mono_patch_info_equal): New helper function.
11753 (mono_patch_info_hash): Ditto.
11755 * aot-compiler.c (emit_method_code): Fix s390 build.
11757 * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
11758 is not handled because it is stored as a flag and not as a type ctor. Fixes
11761 2006-08-17 Zoltan Varga <vargaz@gmail.com>
11763 * aot-compiler.c: Fix computation of GOT slot statistics.
11765 * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
11766 Also remove support for not PIC AOT.
11768 * mini.h: Bump AOT file format version.
11770 * objects.cs: Add a test for #78990.
11772 * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
11773 (peter.dettman@iinet.net.au). Fixes #79087.
11775 * basic-long.cs: Add a test for the above.
11777 2006-08-16 Zoltan Varga <vargaz@gmail.com>
11779 * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
11781 * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
11784 2006-08-15 Zoltan Varga <vargaz@gmail.com>
11786 * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
11789 2006-08-10 Jonathan Chambers <joncham@gmail.com>
11791 * mini.c: Don't verify COM proxy invoke calls
11794 2006-08-10 Dick Porter <dick@ximian.com>
11796 * wapihandles.c (mini_wapi_seminfo): More info, to help track down
11797 which process is holding semaphores locked.
11799 2006-08-08 Zoltan Varga <vargaz@gmail.com>
11801 * mini-ia64.c mini-amd64.c: Fix #79027.
11803 * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
11805 * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
11807 * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
11808 implicit arguments in a vararg call. Fixes #79027.
11810 2006-08-07 Zoltan Varga <vargaz@freemail.hu>
11812 * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
11813 (mono_get_array_new_va_signature): Ditto.
11815 2006-08-05 Zoltan Varga <vargaz@gmail.com>
11817 * aot-runtime.c: Call init_plt lazily.
11819 * inssel-long.brg: Fix unsigned long->int conversion.
11821 * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
11823 * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
11824 that most data is now in the .rss/.data section.
11826 2006-08-04 Zoltan Varga <vargaz@gmail.com>
11828 * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.
11830 * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
11832 * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
11834 * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
11836 * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
11837 virtual call. Fixes #79010.
11839 * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method
11840 and use the result as the this argument in the real call.
11842 * generics.2.cs: Add a new test for #79010.
11844 2006-08-03 Zoltan Varga <vargaz@gmail.com>
11846 * mini-x86.c: Fix a warning.
11848 * aot-compiler.c: Add a bunch of statistics.
11850 * mini.c (inline_method): Disable inlining in out-of-line bblocks.
11852 2006-08-02 Zoltan Varga <vargaz@gmail.com>
11854 * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
11856 2006-08-01 Zoltan Varga <vargaz@gmail.com>
11858 * 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>.
11860 2006-07-13 Miguel de Icaza <miguel@novell.com>
11862 * mini.c (mono_method_to_ir): Obtain the original method in the
11863 CIL stream and use this to perform validation.
11867 2006-07-19 Zoltan Varga <vargaz@gmail.com>
11869 * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
11870 (mono_arch_call_opcode): Ditto.
11872 * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
11875 * mini.c (mono_patch_info_dup_mp): New helper function.
11877 * aot-compiler.c (compile_method): Fix some of the memory allocated during
11878 compilation. Fixes #78827.
11880 2006-07-18 Kornel Pal <kornelpal@gmail.com>
11882 * declsec.c: Use original security informations for
11883 MONO_WRAPPER_MANAGED_TO_MANAGED.
11885 2006-07-15 Jonathan Chambers <joncham@gmail.com>
11887 * mini.c: Allow Com Interop methods/classes and
11888 don't verify COM wrapper calls
11891 2006-07-13 Zoltan Varga <vargaz@gmail.com>
11893 * inssel-long32.brg: Fix long->i4 checked conversion.
11895 * exceptions.cs: Add a test for the above.
11897 2006-07-08 Zoltan Varga <vargaz@gmail.com>
11899 * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
11901 * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown
11904 * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
11907 2006-07-03 Zoltan Varga <vargaz@gmail.com>
11909 * mini.c: Fix solaris/x86 exception handling.
11911 * Makefile.am: Get rid of $(ICU_LIBS).
11913 2006-07-02 Zoltan Varga <vargaz@gmail.com>
11915 * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
11916 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
11917 (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
11919 * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
11921 * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
11922 this function causes a SIGSEGV.
11924 2006-06-22 Zoltan Varga <vargaz@gmail.com>
11926 * mini.c: Remove unused solaris/x86 includes.
11928 2006-06-21 Zoltan Varga <vargaz@gmail.com>
11930 * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
11932 2006-06-20 Jb Evain <jbevain@gmail.com>
11934 * cpu-g4.md: fix max length of start_handler instruction.
11936 2006-06-20 Massimiliano Mantione <massi@ximian.com>
11937 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
11939 2006-06-16 Massimiliano Mantione <massi@ximian.com>
11940 * ssa.c: Fixed bug 78653 for SSA based deadce.
11941 * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
11942 MonoInst.flags, used in SSA based deadce.
11943 * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
11944 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
11946 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
11948 * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
11949 it can end up using non executable memory on ppc64 systems
11950 running ppc32 userspace (fix from Johannes Berg).
11952 2006-06-14 Dick Porter <dick@ximian.com>
11954 * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
11957 2006-06-13 Massimiliano Mantione <massi@ximian.com>
11958 * mini.c: Made so that inline is locally disabled if it would
11959 trigger a .cctor, because too many apps depend on this behavior
11960 (which seems to be also the one of the MS CLR).
11962 2006-06-13 Zoltan Varga <vargaz@gmail.com>
11964 * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
11965 No idea why this worked before.
11967 * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
11968 which branch to outer exception clauses since they could skip the
11969 inner finally clauses. Fixes #78633.
11971 * exceptions.cs: Add a test for the above.
11973 * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
11976 * iltests.il: Add a test for the above.
11978 2006-06-12 Zoltan Varga <vargaz@gmail.com>
11980 * mini.c (remove_block_if_useless): Do not remove the bblock immediately
11981 after the end of a try bblock, to prevent asserts in mini_method_compile ().
11983 * iltests.il: Add a test for the above.
11985 2006-06-10 Zoltan Varga <vargaz@gmail.com>
11987 * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
11989 * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
11990 methods as instrinsics.
11992 2006-06-09 Wade Berrier <wberrier@novell.com>
11994 * Makefile.am: Fix sources list for svn rename so that make dist succeeds
11995 (simple-cee-ops.h ssapre-mini-ops.h)
11997 2006-06-09 Neale Ferguson <neale@sinenomine.net>
11999 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
12000 * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
12002 * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
12003 * cpu-s390x.md: Fix max. length values for a couple of instructions.
12005 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
12007 * mini-exceptions.c: Minor fix for building mono in Visual Studio.
12009 2006-06-08 Massimiliano Mantione <massi@ximian.com>
12011 * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
12012 * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
12013 * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
12014 * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
12015 * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
12016 of opcodes, so that bug 78549 should not happen again.
12017 * ssapre.c: Updated to use the renamed files.
12019 2006-06-08 Zoltan Varga <vargaz@gmail.com>
12021 * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move
12022 in OP_ATOMIC_EXCHANGE_I4.
12024 2006-06-07 Wade Berrier <wberrier@novell.com>
12026 * tramp-s390.c: Fix s390 build (add missing pointer declarations
12027 in mono_debugger_create_notification_function)
12029 2006-06-06 Zoltan Varga <vargaz@gmail.com>
12031 * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
12033 * mini.c (type_from_stack_type): Disable some changes which do not
12036 * driver.c: Reenable opts.
12038 * mini.h (MonoStackSlot): New structure to keep track of the verification state
12039 of the evaluation stack.
12041 * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
12042 evaluation stack trace at entry to the bblock.
12044 * mini.c (merge_stacks): New function to perform verification of stack merges.
12045 Turned off by default.
12047 * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
12050 2006-06-06 Massimiliano Mantione <massi@ximian.com>
12052 * local-propagation.c: Fixed bug 78549.
12054 2006-06-04 Zoltan Varga <vargaz@gmail.com>
12056 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
12058 2006-06-02 Miguel de Icaza <miguel@novell.com>
12060 * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
12061 tramp-arm.c, tramp-ia64.c
12062 (mono_debugger_create_notification_function): Update signature to
12063 new signature and use new protocol for creating the notification
12066 Should fix the build.
12068 2006-06-02 Geoff Norton <gnorton@customerdna.com>
12070 * exceptions-ppc.c (mono_jit_walk_stack)
12071 (ves_icall_get_frame_info): Fix the build
12073 2006-06-02 Zoltan Varga <vargaz@gmail.com>
12075 * mini.c (mono_set_defaults): Fix the handling of -O=-all.
12077 2006-05-31 Raja R Harinath <rharinath@novell.com>
12079 * il2tests.2.il: New file for generics CIL tests. Add test for
12081 * Makefile.am: Update.
12084 * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
12087 2006-05-30 Massimiliano Mantione <massi@ximian.com>
12089 * aliasing.c: Fixed bug 78311.
12091 2006-05-29 Martin Baulig <martin@ximian.com>
12093 * mini-exceptions.c (mono_find_jit_info): When computing the
12094 native offset, check whether we're actually inside the method's
12095 code; call mono_debug_print_stack_frame() to format the frame.
12096 (ves_icall_System_Exception_get_trace): Call
12097 mono_debug_print_stack_frame() to format the stack frame.
12098 (ves_icall_get_trace): Update to the new debugging API.
12099 (mono_jit_walk_stack_from_ctx): Likewise.
12100 (ves_icall_get_frame_info): Likewise.
12102 * mini.c (get_method_from_ip): Use the new debugging API.
12103 (mono_print_method_from_ip): Likewise.
12106 (mono_jit_walk_stack): Use the new debugging API.
12107 (ves_icall_get_frame_info): Likewise.
12109 2006-05-27 Zoltan Varga <vargaz@gmail.com>
12111 * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
12113 2006-05-25 Massimiliano Mantione <massi@ximian.com>
12115 * mini.c: Added "limitator" to inline for debugging.
12117 2006-05-24 Martin Baulig <martin@ximian.com>
12119 * debug-debugger.c (mono_debugger_init): Create a private,
12120 malloc()-based code manager for the notification function and
12121 intentionally leak it on exit. This fixes the crash-on-exit race
12125 (mono_debugger_create_notification_function): Added
12126 `MonoCodeManager *' argument.
12129 (mono_debugger_create_notification_function): Added
12130 `MonoCodeManager *' argument.
12132 2006-05-23 Massimiliano Mantione <massi@ximian.com>
12134 * aliasing.c: Fixed 64 bit issue.
12135 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
12136 default since all known bugs are fixed (one more time!).
12138 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
12140 * mini.c: write barrier support.
12142 2006-05-23 Martin Baulig <martin@ximian.com>
12144 * debug-debugger.c: Revert Paolo's change. Add comment and #error
12145 check at the top of the file.
12147 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
12149 * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
12150 reverting changes without reason and without changelog entries.
12152 2006-05-18 Zoltan Varga <vargaz@gmail.com>
12154 * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
12155 to a few opcodes. Fixes #78439.
12157 * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
12158 consistency with other archs.
12160 * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
12162 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
12164 * debug-debugger.c: fix the build.
12166 2006-05-17 Martin Baulig <martin@ximian.com>
12169 (debugger_thread_vtable): Moved here from ../metadata/threads.c.
12170 (debugger_init_threads): Formerly known as mono_debugger_init_threads().
12171 (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
12172 (debugger_attach): Call GC_mono_debugger_add_all_threads().
12174 2006-05-11 Zoltan Varga <vargaz@gmail.com>
12176 * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
12178 2006-05-10 Zoltan Varga <vargaz@gmail.com>
12180 * mini-x86.c (mono_arch_instrument_epilog): Fix handling of
12181 MONO_TYPE_GENERICINST.
12183 * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of
12184 MONO_TYPE_GENERICINST.
12186 2006-05-09 Zoltan Varga <vargaz@gmail.com>
12188 * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
12191 2006-05-08 Zoltan Varga <vargaz@gmail.com>
12193 * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
12195 (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
12197 2006-05-06 Zoltan Varga <vargaz@gmail.com>
12199 * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
12200 mono_trace_cleanup ().
12202 * iltests.il: Fix problem with the newly added test.
12204 * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
12205 due to register constraints, free up the previous hreg. Fixes #78314.
12207 * iltests.il: Add new test for #78314.
12209 * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
12210 Interlocked.Add. Fixes #78312.
12212 * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
12214 2006-05-05 Zoltan Varga <vargaz@gmail.com>
12216 * inssel.brg (mini_emit_virtual_call): Fix a warning.
12218 2006-05-05 Martin Baulig <martin@ximian.com>
12220 * debug-mini.c (mono_debug_open_block): New method.
12223 (mono_arch_output_basic_block): Call mono_debug_open_block() at
12224 the beginning of each basic block.
12227 (mono_arch_output_basic_block): Call mono_debug_open_block() at
12228 the beginning of each basic block.
12230 2006-05-04 Massimiliano Mantione <massi@ximian.com>
12232 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
12233 default until I understand why they break the build on amd64.
12235 2006-05-04 Zoltan Varga <vargaz@gmail.com>
12237 * mini.c (mini_cleanup): Call mono_cleanup ().
12239 * mini.c (UNVERIFIED): New macro to make it easier to track down verification
12242 2006-05-04 Massimiliano Mantione <massi@ximian.com>
12244 * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
12245 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
12246 default since all known bugs are fixed, and I cannot reproduce bug
12247 77944... I'm asking Matt Hargett to test again after this commit.
12249 2006-04-28 Massimiliano Mantione <massi@ximian.com>
12251 * mini-codegen.c: Fixed typo that thrashed inline.
12253 2006-04-28 Zoltan Varga <vargaz@gmail.com>
12255 * dominators.c (compute_dominators): Avoid using a worklist since
12256 it is not correct in some cases. Instead, iterate over all bblocks as
12257 in the original paper. Fixes --compile-all -O=all System.Xml.dll.
12259 2006-04-28 Miguel de Icaza <miguel@novell.com>
12261 * mini.c (mono_jit_compile_method_inner): Use
12262 mono_prepare_exception_from_error that resets the value
12265 2006-04-27 Miguel de Icaza <miguel@novell.com>
12267 * mini.c: Move the mini_loader_error_to_exception to metadata.
12269 2006-04-27 Massimiliano Mantione <massi@ximian.com>
12271 * aliasing.c: Fixed bug 78210.
12273 2006-04-27 Massimiliano Mantione <massi@ximian.com>
12275 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
12276 default until all their problems (or the ones they trigger) are fixed.
12278 2006-04-26 Zoltan Varga <vargaz@gmail.com>
12280 * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
12282 * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
12283 as loaded only after resolving patches since that could invoke the same method.
12285 * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
12287 * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
12290 * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
12293 * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
12296 * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
12297 made from AOT code through the PLT table.
12299 * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
12300 holding the plt offset when a call is made to the aot plt trampoline.
12302 2006-04-25 Zoltan Varga <vargaz@gmail.com>
12304 * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the
12307 * Makefile.am (common_sources): Fix build breakage.
12309 * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
12310 calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
12311 intra-assembly calls if possible.
12313 * tramp-*.c: Add new functions for patching/nullifying PLT entries.
12315 * mini-trampolines.c: Handle PLT entries.
12317 * mini.c: Avoid creating a GOT var for calls.
12319 * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
12320 from mscorlib code.
12322 * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
12323 from mscorlib code.
12325 * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
12328 * mini.h: Bump AOT file format version.
12330 * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
12333 2006-04-25 Martin Baulig <martin@ximian.com>
12335 * driver.c: Disable copyprop, consprop and inline when running
12336 inside the debugger.
12338 2006-04-25 Martin Baulig <martin@ximian.com>
12340 * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
12341 with `get_current_thread' and added `detach'.
12342 (MonoDebuggerMetadataInfo): Added `thread_size',
12343 `thread_tid_offset', `thread_stack_ptr_offset' and
12344 `thread_end_stack_offset'.
12346 2006-04-25 Zoltan Varga <vargaz@gmail.com>
12348 * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and
12351 * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
12352 ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
12354 * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
12356 * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
12358 * aot.c: Add support for ADJUSTED_IID.
12360 2006-04-24 Zoltan Varga <vargaz@gmail.com>
12362 * aot.c (emit_method_order): Don't align method_order_end.
12364 * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
12365 the interface ID changes.
12367 2006-04-21 Dick Porter <dick@ximian.com>
12369 * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
12370 cleaning up a thread. Fixes the new part of bug 77470.
12372 2006-04-20 Geoff Norton <gnorton@customerdna.com>
12374 * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
12375 to managed wrapper.
12377 2006-04-19 Zoltan Varga <vargaz@gmail.com>
12379 * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
12381 * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
12382 SIGSEGV. Fixes #78072.
12384 * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
12385 unregister our SIGABRT handler.
12387 2006-04-19 Massimiliano Mantione <massi@ximian.com>
12389 * mini.c: Disabled inline where it can alter the call stack in a
12390 way visible from managed code.
12391 * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
12394 2006-04-16 Zoltan Varga <vargaz@gmail.com>
12396 * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
12397 on other platforms. Fixes #78089.
12399 2006-04-13 Martin Baulig <martin@ximian.com>
12401 * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
12402 determine whether we're inside the debugger.
12405 (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
12407 2006-04-12 Zoltan Varga <vargaz@gmail.com>
12409 * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
12410 handler clauses. Fixes #78024.
12412 * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
12413 in the CALL_MEMBASE opcodes. Fixes #78088.
12414 (mono_arch_get_vcall_slot_addr): Ditto.
12416 2006-04-10 Martin Baulig <martin@ximian.com>
12418 * debug-debugger.c: The thread handling code has now been moved
12419 into ../metadata/threads.c.
12421 2006-04-10 Zoltan Varga <vargaz@gmail.com>
12423 * driver.c (mono_main): Fix --with-gc=none build.
12425 * mini-codegen.c (mono_spillvar_offset): Improve alignment.
12426 (mono_spillvar_offset_float): Ditto.
12427 (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
12428 hreg, not when its !global, since on ia64, there is a third category: stacked
12431 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
12433 * mini.c: set MonoInst->klass for load field address and a few other
12436 2006-04-10 Zoltan Varga <vargaz@gmail.com>
12438 * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
12440 2006-04-07 Zoltan Varga <vargaz@gmail.com>
12442 * dominators.c (compute_dominators): Fix yet another bug which surfaced after
12443 the branch opt changes.
12445 2006-04-06 Dick Porter <dick@ximian.com>
12447 * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
12449 * wapihandles.c (mini_wapi_seminfo):
12450 * driver.c (mono_main): Add semaphore info option
12452 2006-04-05 Zoltan Varga <vargaz@gmail.com>
12454 * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
12455 branch optimization changes. Fixes #78009.
12457 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
12459 * mini.c: ignore accessibility of methods in managed->native wrappers.
12461 2006-04-04 Zoltan Varga <vargaz@gmail.com>
12463 * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
12465 * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
12467 2006-04-03 Zoltan Varga <vargaz@gmail.com>
12469 * mini.c: Modify the branch optimizations to preserve the invariant that
12470 the entries inside the in_bb and out_bb arrays are unique.
12471 (mono_unlink_bblock): Avoid creation of new arrays.
12473 2006-04-02 Zoltan Varga <vargaz@gmail.com>
12475 * mini.c (mono_unlink_bblock): Fix regression caused by previous
12478 2006-04-01 Zoltan Varga <vargaz@gmail.com>
12480 * mini.c (optimize_branches): Remove the "optimizations" in
12481 the cbranch1/cbranch2 -> branch cases which were causing several
12482 problems in the past. Fixes #77986.
12484 2006-03-31 Chris Toshok <toshok@ximian.com>
12486 * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
12487 default optimizations :(
12489 2006-03-31 Zoltan Varga <vargaz@gmail.com>
12491 * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
12494 2006-03-31 Massimiliano Mantione <massi@ximian.com>
12496 * local-propagation.c: Added comments to structs and removed
12497 "Mono" prefixes from local tree mover types.
12499 2006-03-30 Zoltan Varga <vargaz@gmail.com>
12501 * Makefile.am (arch_sources): Define this for each architecture so
12502 libmono_la_SOURCES is defined in one place.
12504 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
12506 * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
12509 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
12511 * driver.c: print the GC name supplied by configure.
12513 2006-03-29 Massimiliano Mantione <massi@ximian.com>
12515 * local-propagation.c: Added tree mover, and moved here all the
12516 local propagation code from mini.c
12517 * mini.c: Added support for treeprop, and moved all the local
12518 propagation code to local-propagation.c
12519 * mini.h: Added support for treeprop
12520 * driver.c: Added support for treeprop, enabled consprop, copyprop,
12521 treeprop, inline and deadce by default
12522 * Makefile.am: Added local-propagation.c
12524 2006-03-25 Zoltan Varga <vargaz@gmail.com>
12526 * exceptions-sparc.c: Applied patch from David S. Miller <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
12528 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
12530 * debug-debugger.c: make it compile without the Boehm GC.
12532 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
12534 * mini.c: fixed issue with mismatch when an icall is registered
12535 with multiple names but same address.
12537 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
12539 * declsec.c, mini-exceptions.c: use write barrier to set reference
12540 fields of managed objects.
12542 2006-03-19 Zoltan Varga <vargaz@gmail.com>
12544 * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
12545 (can_access_internals): Fix a warning.
12547 * mini.c (print_method_from_ip): Rename this to
12548 mono_print_method_from_ip so it gets exported.
12550 * trace.c: Deal with strings inside StringBuilder's containing garbage
12551 and fix memory leaks. Fixes #77848.
12553 2006-03-19 Zoltan Varga <vargaz@gmail.com>
12555 * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
12558 2006-03-16 Neale Ferguson <neale@sinenomine.net>
12560 * mini-s390.c: Remove OP_X86_TEST_NULL.
12562 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
12564 * mini.c: use the correct GetHashCode() for the moving collector.
12566 2006-03-16 Massimiliano Mantione <massi@ximian.com>
12568 * liveness.c: Regalloc spill cost tuning.
12570 2006-03-15 Neale Ferguson <neale@sinenomine.net>
12572 * mini-s390x.h: Correct S390_LONG macro.
12574 * mini-s390x.c: Cleanup unused code.
12576 2006-03-15 Zoltan Varga <vargaz@gmail.com>
12578 * jit-icalls.h: New file.
12580 * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
12581 icalls and include that instead of including jit-icalls.c.
12583 * mini-ppc.c (mono_arch_output_basic_block): Remove references to
12586 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
12588 * mini.c: when checking for member accessibility, also check for
12589 friend assemblies and for explicit interface implementations.
12591 2006-03-14 Zoltan Varga <vargaz@gmail.com>
12593 * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
12595 * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
12597 * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
12598 common cases are done first.
12600 * mini-ops.h: Only define platform specific opcodes on the given platform.
12602 * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
12605 2006-03-14 Martin Baulig <martin@ximian.com>
12607 Revert Paolo's change from r57348:
12609 * mini.h: don't use gboolean for bitfields.
12610 * mini.c: verifier changes for fields and methods accessibility.
12612 2006-03-13 Neale Ferguson <neale@sinenomine.net>
12614 * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
12616 * mini-s390x.c: Fix conv_r_un.
12618 * cpu-s390, cpu-s390x.md: Fix lengths.
12620 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
12622 * mini.c: nested types have access to all the nesting
12623 levels, not just the enclosing types.
12625 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
12627 * mini.c: added a few more verification checks.
12629 2006-03-12 Zoltan Varga <vargaz@gmail.com>
12631 * liveness.c: Merge optimizations from the linear-il branch.
12633 2006-03-11 Zoltan Varga <vargaz@gmail.com>
12635 * mini-ia64.c (emit_call): Add a comment.
12637 * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
12639 * tramp-ia64.c: Fix some warnings.
12641 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
12643 * mini.h: don't use gboolean for bitfields.
12644 * mini.c: verifier changes for fields and methods accessibility.
12646 2006-03-11 Zoltan Varga <vargaz@gmail.com>
12648 * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
12649 lazy icall wrapper changes.
12651 * dominators.c: Replace all the dominator algorithms with faster
12652 ones from the linear-il branch.
12654 * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
12657 * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
12658 common cases are done first.
12660 * mini-amd64.c: Fix some warnings.
12662 * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
12665 * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
12668 * mini.h: Add a missing prototype.
12670 2006-03-10 Zoltan Varga <vargaz@gmail.com>
12672 * mini.c: Compile icall wrappers lazily.
12674 * mini-codegen.c: Use printf instead of g_print since its much faster.
12676 * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
12679 * mini.c (optimize_branches): Cache the negative result from
12680 remove_block_if_useless ().
12682 * mini.c (optimize_branches): Avoid restarting the iteration after each change.
12683 Also fix some bblock linking issues.
12685 * helpers.c (mono_disassemble_code): Reduce the size of the temporary
12688 * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
12690 * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
12691 accessed fields first, for better cache behavior.
12693 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
12695 * mini.c: speedup IList<T> array accesses.
12697 2006-03-09 Zoltan Varga <vargaz@gmail.com>
12699 * mini.c (mono_method_to_ir): Handle large methods overflowing the
12700 inline_costs counter. Fixes #77190.
12702 2006-03-06 Zoltan Varga <vargaz@gmail.com>
12704 * mini-exceptions.c: Call mono_trace_is_enabled () before printing
12705 trace messages. Fixes #77706.
12707 2006-03-04 Martin Baulig <martin@ximian.com>
12709 * tramp-amd64.c, tramp-x86.c
12710 (mono_debugger_create_notification_function): Use
12711 mono_global_codeman_reserve() to allocate a buffer at runtime and
12714 * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
12716 * debug-debugger.c (mono_debugger_init): Dynamically allocate the
12717 notification function at runtime and then call `initialize' in the
12718 `MONO_DEBUGGER__debugger_info' vtable.
12720 2006-03-04 Zoltan Varga <vargaz@gmail.com>
12722 * iltests.il: Fix a visibility problem.
12724 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
12726 * driver.c, mini.c: add hooks for the counters API.
12728 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
12730 * driver.c: show disabled options.
12732 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
12734 * linear-scan.c: always use cost-driven selection.
12736 2006-02-28 Raja R Harinath <rharinath@novell.com>
12738 * jit-icalls.c (helper_compile_generic_method): Revert change from
12741 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
12743 * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
12745 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
12747 * inssel.brg: style fixes, mostly to force the updated monoburg
12748 to run for people using svn.
12750 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
12752 * mini.c: match monoburg changes.
12754 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
12756 * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
12757 ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
12758 declaration in the header file.
12760 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
12762 * helpers.c: reduce relocations and mem usage.
12764 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
12766 * mini.h, mini-codegen.c: disable logging features if
12767 requested by configure.
12769 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
12771 * mini.c: tiny verifier changes.
12773 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
12775 * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
12776 cpu-pentium.md: stack alignment changes for osx/x86,
12777 partially from Geoff Norton <gnorton@customerdna.com>.
12779 2006-02-24 Raja R Harinath <harinath@gmail.com>
12781 * jit-icalls.c (helper_compile_generic_method): Update to changes
12782 in metadata/class.c.
12784 2006-02-24 Zoltan Varga <vargaz@gmail.com>
12786 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
12788 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
12789 interface calls with large offsets.
12791 2006-02-23 Raja R Harinath <rharinath@novell.com>
12793 * jit-icalls.c (helper_compile_generic_method): Document the
12794 special-case we depend on so that we can inflate the method twice
12795 with the same context with no bad side-effects.
12797 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
12799 * mini-x86.c, mini-amd64.c: fix for case when xen support
12802 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
12804 * mini-x86.c, mini-amd64.c: generate code to access tls items
12805 in a faster way for Xen systems.
12807 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
12809 * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
12810 updates and compilation fixes for the OSX/x86 port, mostly from
12811 Geoff Norton <gnorton@customerdna.com>.
12813 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
12815 * inssel.brg: faster interface call implementation
12816 to sync with the interface_offsets MonoVTable changes.
12818 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
12820 * mini.c: more verification checks.
12822 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
12824 * mini.c: added a few more verification checks.
12826 2006-02-17 Neale Ferguson <neale@sinenomine.net>
12828 * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
12829 facility on the processor and use it if available.
12831 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
12833 * driver.c, aot.c, mini.c: throw exception if the IL code is
12834 invalid or unverifiable.
12836 2006-02-17 Raja R Harinath <rharinath@novell.com>
12838 * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
12841 2006-02-16 Zoltan Varga <vargaz@gmail.com>
12843 * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
12845 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12847 * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
12848 mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
12849 handling of instantiated generic valuetypes.
12851 2006-02-11 Zoltan Varga <vargaz@gmail.com>
12853 * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of
12854 MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
12857 * generics.2.cs: Revert the nullable reftypes tests.
12859 2006-02-10 Zoltan Varga <vargaz@gmail.com>
12861 * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
12862 using __builtin_frame_address (1) as it doesn't work in the presence
12863 of optimizations. Hopefully fixes #77273.
12865 * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
12866 -> generics.cs change as it doesn't work with some automake versions.
12868 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
12870 * mini.c: handle systems that sue a different way to
12871 retrieve the stack address of the current thread.
12873 2006-02-09 Zoltan Varga <vargaz@gmail.com>
12875 * Makefile.am generics.2.cs: Rename this to generics.cs and handle
12876 it specially in the makefile.
12878 * generics.2.cs: Add tests for nullable reference types.
12880 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12882 * mini.c: always handle the case when mono_jit_init()
12883 is called in a thread different from the main thread,
12884 confusing libgc (bug #77309).
12886 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
12888 * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
12890 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
12892 * mini.c: change optimize_branches () to use a single loop
12893 and introduce a new optimization to simplify some range checks.
12895 2006-02-03 Martin Baulig <martin@ximian.com>
12897 * debug-debugger.c (debugger_thread_manager_thread_created): Removed
12898 and merged with debugger_thread_manager_add_thread().
12899 (mono_debugger_main): Call debugger_thread_manager_add_thread() to
12900 inform the debugger about the main thread.
12902 2006-02-03 Zoltan Varga <vargaz@gmail.com>
12904 * basic.cs: Add test for div.un/rem.un constant folding.
12906 2006-02-03 Neale Ferguson <neale@sinenomine.net>
12908 * cpu-s390x.md: correct int_xor_imm length
12910 2006-02-03 Zoltan Varga <vargaz@gmail.com>
12912 * generics.2.cs: New test for #77442.
12914 * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
12917 2006-02-02 Martin Baulig <martin@ximian.com>
12919 * tramp-x86.c, tramp-amd64.c: It's now safe to #include
12920 <mono/metadata/mono-debug-debugger.h>
12922 * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
12924 2006-02-02 Martin Baulig <martin@ximian.com>
12926 * debug-debugger.h: New header file for debug-debugger.c.
12928 * debug-debugger.c: Big API cleanup; don't run the managed Main()
12929 function is a separate thread anymore; add support for attaching.
12931 2006-02-01 Zoltan Varga <vargaz@gmail.com>
12933 * tramp-x86.c: Fix a warning.
12935 2006-01-31 Zoltan Varga <vargaz@gmail.com>
12937 * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
12938 on very large methods.
12940 * aot.c (load_patch_info): Fix a warning.
12942 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
12944 * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
12945 mini-ops.h: alu membase optimizations.
12947 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
12949 * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
12950 to speedup StringBuilder.
12952 2006-01-27 Zoltan Varga <vargaz@gmail.com>
12954 * dominators.c (mono_compute_natural_loops): Fix detection of
12955 loop body start blocks.
12957 * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
12959 2006-01-26 Zoltan Varga <vargaz@gmail.com>
12961 * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
12964 2006-01-25 Massimiliano Mantione <massi@ximian.com>
12966 * aliasing.c: Fixed aliasing issue on 64 bit archs.
12968 2006-01-25 Martin Baulig <martin@ximian.com>
12970 * debug-debugger.c: Moved the `MonoDebuggerManager' and
12971 `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
12972 started to cleanup this file a little bit.
12974 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
12976 * mini.c: optimize a codepath frequently happening in generics code.
12978 2006-01-23 Martin Baulig <martin@ximian.com>
12980 * Makefile.am: Only compile debug-debugger.c on supported platforms.
12982 * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
12983 functions directly.
12985 * driver.c: debug-debugger.c is only available if
12986 `MONO_DEBUGGER_SUPPORTED' is defined.
12988 2006-01-23 Martin Baulig <martin@ximian.com>
12990 * debug-debugger.c: Only enable this on platforms where the Mono
12991 Debugger is working (x86 and x86_64).
12993 2006-01-21 Martin Baulig <martin@ximian.com>
12995 The Mono Debugger is now using the normal `mono' instead of the
12996 `mono-debugger-mini-wrapper' when executing managed code.
12998 * debug-debugger.c: New file; previously known as
12999 debugger/wrapper/wrapper.c.
13001 * debug-mini.c (mono_init_debugger): Removed.
13003 * driver.c (mono_main): Added new `--inside-mdb' command line
13004 argument which is used when running inside the debugger.
13006 2006-01-20 Zoltan Varga <vargaz@gmail.com>
13008 * liveness.c (mono_analyze_liveness): Remove some unused data
13011 2006-01-17 Zoltan Varga <vargaz@gmail.com>
13013 * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
13015 2006-01-16 Zoltan Varga <vargaz@gmail.com>
13017 * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
13018 depends on implementation details of monobitset.
13020 * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
13023 2006-01-15 Zoltan Varga <vargaz@gmail.com>
13025 * liveness.c: Update after monobitset changes.
13027 2006-01-14 Zoltan Varga <vargaz@gmail.com>
13029 * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
13031 2006-01-11 Neale Ferguson <neale@sinenomine.net>
13033 * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
13035 * mini-s390x.c: Remove warning messages.
13037 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
13039 * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
13041 2006-01-10 Zoltan Varga <vargaz@gmail.com>
13043 * generics.2.cs: Add ldelem/stelem_any test.
13045 2006-01-10 Neale Ferguson <neale@sinenomine.net>
13047 * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
13049 2006-01-07 Zoltan Varga <vargaz@gmail.com>
13051 * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
13053 2006-01-06 Zoltan Varga <vargaz@gmail.com>
13055 * generics.2.cs: Reenable vtype tests.
13057 * inssel-x86.brg: Remove an icorrect valuetype rule.
13059 2006-01-06 Neale Ferguson <neale@sinenomine.net>
13061 * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
13062 initial support for OP_ABS.
13064 2006-01-05 Neale Ferguson <neale@sinenomine.net>
13066 * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
13068 2006-01-05 Neale Ferguson <neale@sinenomine.net>
13070 * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int
13071 conversion and implement LADD/LSUB.
13073 * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
13076 2006-01-05 Neale Ferguson <neale@sinenomine.net>
13078 * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
13080 * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
13083 2006-01-05 Neale Ferguson <neale@sinenomine.net>
13085 * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when
13086 localloc is encountered. Fixes crash in test-183.cs when using gmcs
13087 (stack walk problem).
13089 2006-01-04 Zoltan Varga <vargaz@gmail.com>
13091 * aot.c (mono_aot_load_method): Fix a warning.
13093 2006-01-03 Neale Ferguson <neale@sinenomine.net>
13095 * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
13097 2006-01-03 Zoltan Varga <vargaz@gmail.com>
13099 * iltests.il: Add test for #77148.
13101 * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
13104 2006-01-03 Neale Ferguson <neale@sinenomine.net>
13106 * mini-s390x.c, inssel-s390x.brg: Remove debug statements
13108 2006-01-03 Neale Ferguson <neale@sinenomine.net>
13110 * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
13111 cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
13113 * basic-long.cs: Add lconv-to-r4/r8 tests.
13115 2006-01-03 Zoltan Varga <vargaz@gmail.com>
13117 * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
13119 * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
13120 here as on other archs.
13122 2005-12-29 Neale Ferguson <neale@sinenomine.net>
13124 * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
13126 2005-12-29 Neale Ferguson <neale@sinenomine.net>
13128 * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
13130 * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
13132 * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
13133 instrument_prolog; Add memory_barrier instruction.
13135 2005-12-26 Zoltan Varga <vargaz@gmail.com>
13137 * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
13139 2005-12-23 Zoltan Varga <vargaz@gmail.com>
13141 * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
13143 * aliasing.c inssel.brg: Fix warnings.
13145 * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
13146 could skip initialization of some parts of memory.
13148 * mini.c mini-ia64.c: Fix warnings.
13150 * inssel-sparc.brg: Add an implementation of lneg which actually works.
13152 2005-12-22 Zoltan Varga <vargaz@gmail.com>
13154 * aliasing.c (mono_build_aliasing_information): Add a workaround for
13155 a crash seen on sparc.
13157 * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
13159 * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
13161 2005-12-21 Neale Ferguson <neale@sinenomine.net>
13163 * mini-ops.h: Add s390_backchain instruction
13165 * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
13167 * cpu-s390.md: Add s390_backchain instruction
13169 * mini-s390.c: Significant ABI changes
13171 * mini-s390.h: Cater for zero length structures
13173 2005-12-20 Neale Ferguson <neale@sinenomine.net>
13175 * mini-s390.c: ABI fixes
13177 * inssel-s390.brg: Remove debug statements
13179 * cpu-s390.md: Fix length of ATOMIC_xx operations
13181 2005-12-19 Zoltan Varga <vargaz@gmail.com>
13183 * basic-float.cs: Add float<->long conversion tests.
13185 2005-12-16 Neale Ferguson <neale@sinenomine.net>
13187 * mini-s390.c: Fix LOCALLOC processing.
13189 * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
13191 2005-12-15 Zoltan Varga <vargaz@gmail.com>
13193 * iltests.il: Add tests for some opcodes not covered by the other
13196 2005-12-15 Neale Ferguson <neale@sinenomine.net>
13198 * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct
13199 register loading for Tail processing; Correct trace output.
13201 * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
13203 * cpu-s390.md: Correct size of jmp instruction.
13205 2005-12-13 Neale Ferguson <neale@sinenomine.net>
13207 * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
13209 2005-12-13 Neale Ferguson <neale@sinenomine.net>
13211 * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
13212 Bring s390 up to current level.
13214 2005-12-12 Zltan Varga <vargaz@gmail.com>
13216 * generics.2.cs: Disable the newly added tests as they do not work yet.
13218 * generics.2.cs: Add valuetype tests.
13220 2005-12-09 Zoltan Varga <vargaz@gmail.com>
13222 * basic-long.cs: Add i4->u8 test.
13224 * objects.cs: Add tests for JIT intrinsic.
13226 * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
13227 optimizations lost by a mistake.
13229 2005-12-07 Zoltan Varga <vargaz@gmail.com>
13231 * basic-long.cs: Remove a test moved to objects.cs.
13233 * arrays.cs: Add more array tests.
13235 2005-12-06 Zoltan Varga <vargaz@gmail.com>
13237 * arrays.cs: Add new tests for multi-dimensional arrays.
13239 2005-12-06 Raja R Harinath <rharinath@novell.com>
13241 * Makefile.am (test_sources2): Add generics.2.cs.
13242 (EXTRA_DIST): Add test_sources2.
13244 2005-12-05 Ben Maurer <bmaurer@ximian.com>
13246 Support for boxing and unboxing nullable types as well as the
13247 isinst operation on nullables, per the CLI ammendment.
13249 * inssel.brg (CEE_ISINST): Special case for nullable
13251 * mini.c (handle_unbox_nullable): new method
13252 (handle_box): Special case for nullable types
13253 (mono_method_to_ir): Call handle_unbox_nullable in correct
13256 * generics.2.cs: New test suite
13258 * Makefile.am: Support for regression tests with generics.
13260 2005-12-03 Zoltan Varga <vargaz@gmail.com>
13262 * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
13263 allocated to registers. Fixes #76800.
13265 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
13267 * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
13269 2005-11-30 Zoltan Varga <vargaz@gmail.com>
13271 * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot
13274 2005-11-29 Zoltan Varga <vargaz@gmail.com>
13276 * objects.cs basic-calls.cs: Move a test depending on valuetypes to
13279 * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
13281 * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
13282 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
13284 * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
13285 single precision before storing to a single precision location.
13287 2005-11-28 Raja R Harinath <rharinath@novell.com>
13289 * Makefile.am (ILASM): Use profile-dependent location of ilasm.
13291 2005-11-27 Zoltan Varga <vargaz@gmail.com>
13293 * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
13296 * basic.cs: Remove test_0_byte_compares test which was moved to
13297 objects.cs a long time ago.
13299 2005-11-22 Massimiliano Mantione <massi@ximian.com>
13301 * aliasing.c: Fixed aliasing issue on 64 bit archs.
13303 2005-11-20 Zoltan Varga <vargaz@gmail.com>
13305 * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
13306 handlers are called.
13308 * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
13311 * mini-ia64.c: Add support for the throw->branch exception
13314 * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
13316 2005-11-18 Massimiliano Mantione <massi@ximian.com>
13318 * mini.c: Enabled "fastpath" deadce :-)
13320 2005-11-18 Massimiliano Mantione <massi@ximian.com>
13322 * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
13323 alias analysis pass to support it.
13324 * mini.h: Likewise.
13326 * liveness.c: Likewise (liveness computation can use aliasing
13327 information to be more accurate).
13328 * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
13329 moreover made so that "--compile-all" uses the given optimization
13330 flags and not the default ones.
13331 * aliasing.c: Alias analysis (new file).
13332 * aliasing.h: Likewise.
13333 * Makefile.am: added "aliasing.c" and "aliasing.h".
13335 2005-11-17 Zoltan Varga <vargaz@gmail.com>
13337 * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
13340 2005-11-13 Zoltan Varga <vargaz@gmail.com>
13342 * mini-exceptions.c (mono_handle_exception_internal): Remove the
13343 fp >= end_of_stack exit condition, as it is not needed, and it might
13344 become true for fp eliminated frames.
13346 2005-11-11 Zoltan Varga <vargaz@gmail.com>
13348 * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
13351 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
13353 * mini-arm.c: fixed alignment of doubles/longs to match
13354 the C ABI (bug #76635).
13356 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
13358 * aot.c: fix compilation with --enable-minimal=aot.
13360 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
13362 * mini-arm.c: fixed compatibility with the new
13363 floating point emulator package for compares.
13365 2005-11-03 Atsushi Enomoto <atsushi@ximian.com?
13367 * mini.c : reverted sig->pinvoke changes (r51396-51397).
13369 2005-11-01 Zoltan Varga <vargaz@freemail.hu>
13371 * mini-exceptions.c (print_stack_frame): Output to stderr.
13372 (mono_handle_native_sigsegv): Ditto.
13374 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
13376 * mini-amd64.c (mono_arch_output_basic_block): Remove unused
13377 OP_LCONV_TO_OVF_I implementation.
13379 * mini-amd64.c: Add support for the throw->branch exception
13382 * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
13383 when the catch clause catches a more general exception, i.e. Object.
13385 2005-10-30 Zoltan Varga <vargaz@gmail.com>
13387 * cpu-ia64.md: Remove unused opcodes.
13389 * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
13390 specific defines for architectures defining USE_SIGACTION.
13392 * mini-ia64.c: Fix some warnings.
13394 * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
13395 version seemed to skip a frame.
13397 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
13399 * mini.c: Clean up the usage of sig->pinvoke flag. Now
13400 only calls which are made to native code use this flag.
13402 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
13404 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
13405 varargs methods as well.
13407 * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
13408 which have save_lmf set. Reorganize methods prologs a bit.
13410 * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
13411 debugger to the proper place.
13413 2005-10-29 Martin Baulig <martin@ximian.com>
13415 * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
13416 when running inside the debugger until the debugger has support
13419 2005-10-26 Zoltan Varga <vargaz@gmail.com>
13421 * mini.h: Fix a warning.
13423 2005-10-24 Miguel de Icaza <miguel@novell.com>
13425 * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
13426 we expose publicly, this returns the string.
13428 2005-10-22 Zoltan Varga <vargaz@freemail.hu>
13430 * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
13431 with fp elimination.
13433 2005-10-21 Zoltan Varga <vargaz@gmail.com>
13435 * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
13436 native stacktrace using the glibc 'backtrace' function if available.
13438 2005-10-20 Zoltan Varga <vargaz@gmail.com>
13440 * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
13442 * mini-exceptions.c (mono_handle_native_sigsegv): New function to
13443 handle SIGSEGVs received while in native code.
13445 * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
13446 code, call mono_handle_native_sigsegv which will abort the runtime
13447 after printing some diagnostics, instead of converting it into a
13448 confusing NullReferenceException.
13450 2005-10-18 Zoltan Varga <vargaz@gmail.com>
13452 * cpu-pentium.md: Remove unused opcodes.
13454 2005-10-18 Zoltan Varga <vargaz@freemail.hu>
13456 * mini-amd64.h (MonoLMF): Add rsp field.
13458 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
13461 2005-10-17 Zoltan Varga <vargaz@gmail.com>
13463 * mini-codegen.c (get_register_spilling): Fix some warnings.
13465 2005-10-16 Zoltan Varga <vargaz@freemail.hu>
13467 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
13468 elimination during exception handling. Enable fp elimination by
13471 * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
13474 2005-10-16 Martin Baulig <martin@ximian.com>
13476 * mini-exceptions.c
13477 (mono_debugger_run_finally): New public method for the debugger.
13479 2005-10-10 Zoltan Varga <vargaz@gmail.com>
13481 * debug-mini.c (mono_debug_init_method): Fix warning.
13483 * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
13484 the 'exname' parameter const to fix some warnings.
13486 2005-10-09 Zoltan Varga <vargaz@freemail.hu>
13488 * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
13489 introduced by the previous patch.
13491 2005-10-08 Zoltan Varga <vargaz@gmail.com>
13493 * basic-float.cs: Add test for precision of float arithmetic.
13495 * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
13496 when loading/storing single values from/to memory.
13498 * mini.c (mono_jit_compile_method_with_opt): Create the function
13499 pointers in the correct domain.
13501 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
13503 * mini-exceptions.c (mono_handle_exception_internal): Fix bug
13504 introduced by previous patch.
13506 * mini-exceptions.c (mono_handle_exception_internal): Handle the case
13507 when out_filter_idx is NULL.
13509 * mini-exceptions.c: Don't run filter clauses twice during exception
13510 handling. Fixes #75755.
13512 2005-10-07 Zoltan Varga <vargaz@gmail.com>
13514 * aot.c: Add support for ldflda wrappers.
13516 * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
13519 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
13521 * mini.c, mini.h: do not consider exception handlers blocks when
13522 setting up interface variables.
13524 2005-10-04 Zoltan Varga <vargaz@freemail.hu>
13526 * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
13528 2005-10-03 Zoltan Varga <vargaz@gmail.com>
13530 * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
13531 causes a regression.
13533 * mini.c (mini_thread_cleanup): Fix reading of freed memory.
13535 2005-10-02 Zoltan Varga <vargaz@freemail.hu>
13537 * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
13538 of the OP_P definitions.
13540 * TODO: Add a proposal for dealing with the CEE/OP mess.
13542 * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm
13543 optimizations from the x86 port.
13545 * cpu-amd64.md: Ditto.
13547 * basic.cs basic-long.cs: Add tests.
13549 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
13551 * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
13552 Patrik Torstensson's implementation of my exception-handling
13553 optimization idea, when the exception object is not used
13556 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
13558 * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
13559 of the mul_imm optimizations from the old jit.
13561 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
13563 * mini.c, liveness.c: patch by Patrik Torstensson and
13564 Zoltan Varga to improve performance in methods with
13567 2005-09-30 Zoltan Varga <vargaz@gmail.com>
13569 * driver.c: Remove 'Globalization' entry from --version.
13571 2005-09-28 Zoltan Varga <vargaz@gmail.com>
13573 * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
13574 there is a profiler interested in JIT events.
13576 * aot.c: Load profile files produced by the AOT profiling module, and
13577 reorder methods based on the profiling info. Add a 'method_order' table
13578 to the AOT file to make mono_aot_find_jit_info work with the reordered
13581 * mini.h: Bump AOT file version info.
13583 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
13585 * mini-arm.h: work around what looks like a gcc bug when optimizations
13588 2005-09-28 Raja R Harinath <rharinath@novell.com>
13590 * Makefile.am (AM_CFLAGS): Don't use += to append inside
13591 conditionals. Use ...
13592 (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
13594 2005-09-27 Zoltan Varga <vargaz@freemail.hu>
13596 * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
13597 to determine the amount of memory to copy when passing valuetypes.
13599 * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
13600 4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
13602 2005-09-27 Zoltan Varga <vargaz@gmail.com>
13604 * mini.h mini.c aot.c: Add infrastructure to collect pagefault
13605 information about aot.
13607 2005-09-27 Ben Maurer <bmaurer@ximian.com>
13609 * *.c: Replace the use of {Enter,Leave}CriticalSection with
13610 macros. This will allow a deadlock debugger to easily be plugged
13613 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
13615 * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
13617 2005-09-27 Raja R Harinath <rharinath@novell.com>
13619 * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
13620 (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
13621 (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
13622 ($(arch_built)) [CROSS_COMPILING]: Error out.
13624 2005-09-26 Zoltan Varga <vargaz@gmail.com>
13626 * aot.c: Add support for the no_special_static flag for classes.
13628 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
13630 * Reapply reverted patches.
13632 * *: Revert r50174 as well.
13634 * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
13636 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
13638 * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
13640 2005-09-23 Miguel de Icaza <miguel@novell.com>
13642 * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
13643 part of the SIG_HANDLER_SIGNATURE.
13645 2005-09-23 Zoltan Varga <vargaz@gmail.com>
13647 * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
13650 * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention
13651 introduced by previous patch.
13653 2005-09-21 Zoltan Varga <vargaz@gmail.com>
13655 * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
13656 saved registers too.
13658 * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based
13659 upon the information returned by get_call_info ().
13661 * mini-x86.c (add_float): Fix stack size calculation.
13662 (mono_arch_call_opcode): Rewrite this so it works based up the
13663 information returned by get_call_info ().
13664 (mono_arch_get_this_vret_args): Ditto.
13666 2005-09-21 Zoltan Varga <vargaz@freemail.hu>
13668 * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
13669 in cinfo to determine the registers which need to be used.
13671 2005-09-20 Miguel de Icaza <miguel@novell.com>
13673 * driver.c (mono_main): Add --server and --desktop flags.
13675 2005-09-16 Zoltan Varga <vargaz@gmail.com>
13677 * mini-ia64.h: Make register masks 64 bit. Don't treat argument
13678 registers as global registers.
13680 * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no
13681 longer needed with the new register allocator.
13683 * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
13685 * cpu-ia64.md: Remove unused opcodes.
13687 * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
13689 2005-09-16 Zoltan Varga <vargaz@freemail.hu>
13691 * cpu-amd64.md: Remove unused opcodes.
13693 * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
13694 needed with the new register allocator.
13696 * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
13699 2005-09-16 Raja R Harinath <rharinath@novell.com>
13701 * Makefile.am (check-local): Don't invoke semdel-wrapper.
13703 2005-09-16 Martin Baulig <martin@ximian.com>
13705 * exceptions-amd64.c
13706 (throw_exception): Don't call mono_debugger_throw_exception() if
13707 we're a rethrow - see the FIXME in the code.
13709 2005-09-15 Geoff Norton <gnorton@customerdna.com>
13711 * mini.c (mono_init_exceptions): This only works on some architectures.
13713 2005-09-15 Zoltan Varga <vargaz@gmail.com>
13715 * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
13718 * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
13720 * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
13721 now in mini-exceptions.c.
13723 2005-09-15 Zoltan Varga <vargaz@freemail.hu>
13725 * mini-amd64.h mini-am64.c: Remove the altstack support code which is
13726 now in mini-exceptions.c.
13728 2005-09-15 Zoltan Varga <vargaz@gmail.com>
13730 * exceptions-x86.c: Applied patch from Patrik Torstensson
13731 <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
13733 * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
13734 code into mini-exceptions.c. Add some assertions to it.
13736 2005-09-12 Zoltan Varga <vargaz@gmail.com>
13738 * aot.c (emit_section_change): Applied patch from "The Software Team"
13739 (<software@solmersa.com>). Fix as errors on windows.
13741 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
13743 * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
13744 method info into the LMF.
13746 2005-09-11 Zoltan Varga <vargaz@gmail.com>
13748 * mini-ia64.c: Add proper unwind info for method epilogs.
13750 * exceptions-ia64.c: Add some code to help debugging.
13752 * mini-ia64.c mini-ia64.h: Add sigaltstack support.
13754 * mini-exceptions.c: Fix warning.
13756 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
13758 * mini.c: Really fix build.
13760 * mini-x86.c mini-amd64.c: Fix build.
13762 2005-09-11 Zoltan Varga <vargaz@gmail.com>
13764 * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
13766 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
13767 some Interlocked methods as intrinsics.
13769 * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
13770 for Thread methods as well.
13772 * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
13774 * inssel.brg: Add rule for OP_MEMORY_BARRIER.
13776 * mini-ia64.c mini-x86.c mini-amd64.c
13777 cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of
13780 * mini.c (mono_init_exceptions): Fix build breakage.
13782 2005-09-10 Zoltan Varga <vargaz@gmail.com>
13784 * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
13785 of instructions. Use the new ia64_unw_op macros for emitting unwind
13788 * mini.c (mono_init_exceptions): Initialize exception handling
13789 related trampolines at startup.
13791 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
13793 * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
13795 2005-09-09 Zoltan Varga <vargaz@gmail.com>
13797 * mini.c: Handle type loading errors gracefully during compilation and
13798 throw the appropriate exception.
13800 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
13802 * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
13803 for the mono binary.
13805 2005-09-09 Martin Baulig <martin@ximian.com>
13807 * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
13810 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
13812 * mini-arm.h: use emulation for conv.r.un for the release.
13814 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
13816 * mini-arm.c, objects.cs: more fixes and tests for them.
13818 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
13820 * mini-arm.c: align structures to at least 4 bytes to be able
13821 to keep our current optimized memcpy.
13823 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
13825 * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
13827 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13829 * mini.c: ignore SIGPIPE.
13831 2005-09-04 Zoltan Varga <vargaz@gmail.com>
13833 * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
13835 * mini-ia64.h mini-ia64.c: Add some minor optimizations.
13837 2005-09-02 Zoltan Varga <vargaz@gmail.com>
13839 * mini.h: Add prototype for mono_allocate_stack_slots_full.
13841 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
13843 * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
13844 exception handling support.
13845 * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
13846 patch by Brian Koropoff <briank@marakicorp.com>).
13848 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
13850 * mini.c: revert another 'optimization' which breaks when
13851 items on the eval stack need to be saved at a basic block end
13854 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
13856 * jit-icalls.c: for arrays, ensure we always provide
13859 2005-08-30 Zoltan Varga <vargaz@gmail.com>
13861 * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
13863 * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
13865 2005-08-29 Zoltan Varga <vargaz@gmail.com>
13867 * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
13868 arguments in their original register.
13870 2005-08-28 Zoltan Varga <vargaz@gmail.com>
13872 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
13875 * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
13876 when ssapre is enabled.
13878 * inssel-long.brg: Fix bug in previous patch.
13880 * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize
13881 multiplication by a constant.
13883 2005-08-27 Zoltan Varga <vargaz@gmail.com>
13885 * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
13888 * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
13891 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
13893 * inssel-arm.brg: apply changes tested by Brian Koropoff
13894 <briank@marakicorp.com>.
13896 2005-08-25 Zoltan Varga <vargaz@gmail.com>
13898 * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
13900 2005-08-24 Zoltan Varga <vargaz@gmail.com>
13902 * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
13903 to the same register if dreg is just a base register.
13904 (print_ins): Improve printing of membase opcodes.
13906 * inssel-x86.brg: Add optimized ldind(reg) rules.
13908 * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
13910 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
13912 * mini.c: when running under valgrind, set the stack bottom for
13913 the GC at the actual approximate stack for the app (fixes running
13914 mono with valgrind).
13916 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
13918 * mini.c: do no break at the first valuetype to init found
13919 (fixes bug #75791).
13921 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
13923 * cpu-arm.md, mini-arm.c: more fixes and LMF support.
13925 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
13927 * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
13929 2005-08-23 Zoltan Varga <vargaz@freemail.hu>
13931 * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
13933 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
13935 * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
13937 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
13940 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
13943 * mini.c (optimize_branches): Don't quit after 1000 iterations on large
13946 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
13948 * tramp-arm.c: allocate less memory for the trampoline and fix typo.
13950 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
13952 * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
13953 in the tail recursion optimization.
13955 * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as
13956 debug info into the assembly file.
13958 * iltests.il: Add test for filter regions.
13960 * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
13961 initial stack of filter regions. Fixes #75755.
13963 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
13965 * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
13966 stack requirements.
13968 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
13970 * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
13971 the check for an already compiled method on non-ia64 platforms.
13972 (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
13975 * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
13977 * inssel-x86.brg: Add some optimized call rules.
13979 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
13981 * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
13984 * mini.h mini-trampolines.c: Pass the trampoline argument to
13985 mono_arch_patch_delegate_trampoline.
13987 * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
13989 * mini-trampolines.c: Fix build.
13991 * mini-amd64.h: Add delegate trampolines.
13993 * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
13995 * inssel-amd64.brg: Add optimized call rules.
13997 * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
13999 * inssel-ia64.brg: Add optimized ldind(reg) rules.
14001 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
14003 * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
14006 * mini-ia64.c: Remove LMF fixmes.
14008 * mini-ia64.h: Remove most fields from LMF.
14010 * inssel-ia64.brg (stmt): Fix unaligned access errors.
14012 * mini-trampolines.c: Add support for IA64 function descriptors.
14014 * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
14015 for IA64 function descriptors.
14017 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
14019 * tramp-arm.c: patch the vtable for virtual calls. Added
14020 support code to register/unregister the LMF.
14021 * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
14024 2005-08-19 Dick Porter <dick@ximian.com>
14026 * mini.c: Use a gsize to store the thread ID, so it can hold a 64
14027 bit value if needed.
14029 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
14031 * mini.c (mini_get_method): Move handling of wrapper data here.
14033 * mini.c (mono_method_to_ir): Add support for dynamic methods.
14035 * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
14038 * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so
14039 bblock->code does not remain empty.
14041 2005-08-17 Zoltan Varga <vargaz@freemail.hu>
14043 * arrays.cs: Add regression test for #75832.
14045 * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
14046 rules. Fixes #75832.
14048 * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
14049 instruction scheduling.
14051 2005-08-12 Zoltan Varga <vargaz@freemail.hu>
14053 * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
14055 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
14057 * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
14059 * mini-codegen.c: Fix VC build.
14061 * cpu-pentium.md: Increase length of atomic_exhange_i4.
14063 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14065 * mini.h: fix signature for mono_register_opcode_emulation.
14067 2005-08-09 Zoltan Varga <vargaz@freemail.hu>
14069 * mini.c: Get rid of most of the helper_sig_... constants using
14070 mono_create_icall_signature ().
14072 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
14074 * jit-icalls.c (helper_ldstr): New helper function.
14076 * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
14078 * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
14079 throw, load the string using a helper call instead of creating a string object.
14081 * aot.c: Update after LDSTR changes.
14083 * mini.h: Bump AOT file version.
14085 * aot.c: Save class size info into the AOT file. Print more statistics during
14088 * mini.h: Bump AOT file version.
14090 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
14091 ordering of disasm cases. Fixes #74957.
14093 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
14095 * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
14096 jit-icalls.c, mini-codegen.c, Makefile.am: changes in
14097 the generic code needed for the ARM port.
14099 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
14101 * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
14102 inssel-arm.brg: more ARM features and fixes.
14104 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
14106 * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
14107 ARM port work in progress.
14109 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
14111 * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
14113 * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
14115 * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
14117 * inssel.brg (mini_emit_memset): Add support for unaligned access.
14119 * *-ia64.*: Ongoing IA64 work.
14121 * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
14123 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
14125 * TODO: Remove out-of-data todo stuff.
14127 * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
14130 * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
14132 * mini.h: Bump corlib version.
14134 2005-07-27 Martin Baulig <martin@ximian.com>
14137 (create_copy_ins): Added `const unsigned char *ip' argument; set
14138 `copy->cil_code' from it.
14140 2005-07-27 Martin Baulig <martin@ximian.com>
14142 * mini-exceptions.c (mono_handle_exception): Don't call
14143 mono_debugger_handle_exception() for filters.
14145 2005-07-27 Zoltan Varga <vargaz@freemail.hu>
14147 * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
14150 2005-07-26 Martin Baulig <martin@ximian.com>
14152 Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
14154 * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
14155 helper_compile_generic_method() if the method is actually virtual
14158 2005-07-26 Martin Baulig <martin@ximian.com>
14161 (trampoline_code): Renamed to `mono_trampoline_code' and made it
14162 public; this is now accessed directly by the debugger.
14163 (mono_generic_trampoline_code): Removed.
14166 (mono_debug_init_method): Also add interncalls and wrappers.
14168 2005-07-23 Zoltan Varga <vargaz@freemail.hu>
14170 * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
14172 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
14174 * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
14176 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
14178 * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
14180 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
14182 * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
14183 getting TLS offsets on AMD64 too.
14185 2005-07-20 Kornel Pal <kornelpal@hotmail.com>
14187 * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
14189 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
14191 * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
14192 inssel-arm.brg, mini-arm.h: ARM port work in progress.
14194 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
14196 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
14198 * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
14201 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call
14202 mono_sparc_is_virtual_call ().
14204 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
14206 * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
14207 trampoline parameters.
14209 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
14211 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
14212 to mono_arch_get_vcall_slot_addr.
14214 * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
14217 * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
14219 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
14221 * mini-ia64.h mini-ia64.c: Finish pinvoke support.
14223 2005-07-19 Martin Baulig <martin@ximian.com>
14225 * exceptions-amd64.c (throw_exception): Call
14226 mono_debugger_throw_exception() here like we're doing it on i386.
14228 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
14230 * mini-ia64.c: Add optimized TLS access support.
14232 2005-07-18 Zoltan Varga <vargaz@freemail.hu>
14234 * mini-exceptions.c: Ongoing IA64 work.
14236 * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
14238 * mini.c: Use the default optimization set when embedding. Fixes
14241 2005-07-11 Zoltan Varga <vargaz@freemail.hu>
14243 * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts
14244 of trampolines to a separate file.
14246 * mini-trampolines.c: New file.
14248 * mini.h tramp-x86.c: Move arch independent parts of trampolines to a
14251 * tramp-x86.c: Reorganize the trampoline code to be similar to the
14254 * mini-codegen.c: Fix cygwin build.
14256 2005-07-10 Zoltan Varga <vargaz@freemail.hu>
14258 * mini.c: Add some minor changes needed by the IA64 port.
14260 * *-ia64.*: Ongoing IA64 work.
14262 2005-07-09 Zoltan Varga <vargaz@freemail.hu>
14264 * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split
14265 trampolines into arch-independent and arch-dependent parts.
14267 * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
14269 2005-07-08 Zoltan Varga <vargaz@freemail.hu>
14271 * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
14273 * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
14274 the xp-regalloc-branch for amd64.
14276 * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
14277 xp-regalloc-branch for x86.
14279 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
14281 * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
14283 2005-07-06 Martin Baulig <martin@ximian.com>
14286 (mono_jit_compile_method_inner): Call mono_get_inflated_method().
14287 (mono_jit_runtime_invoke): Likewise.
14289 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
14291 * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
14294 * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
14295 without loading their metadata. Reorganize the file format so exception handling+
14296 debug info is kept separate from normal method info. Create MonoJitInfo
14297 structures for methods lazily.
14299 * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
14301 (x86_class_init_trampoline): Patch AOT class init trampolines too.
14303 * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
14305 * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
14308 * mini.h: Bump AOT file version.
14310 2005-07-04 Zoltan Varga <vargaz@freemail.hu>
14312 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
14314 2005-07-01 Raja R Harinath <rharinath@novell.com>
14316 * Makefile.am (check-local): Call semdel-wrapper.
14318 2005-06-29 Zoltan Varga <vargaz@freemail.hu>
14320 * mini-x86.c: Revert the last change as it seems to break the build..
14322 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
14324 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
14326 * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
14328 2005-06-27 Ben Maurer <bmaurer@ximian.com>
14330 * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
14331 outside of the macro, so strange stuff doesn't happen with gcc4
14332 (NEW_AOTCONST_TOKEN): Likewise.
14334 2005-06-28 Martin Baulig <martin@ximian.com>
14336 * mini.c (mini_class_is_system_array): New static method; use this
14337 instead of `klass->parent == mono_defaults.array_class' everywhere
14338 since this also works for the new generic array class.
14340 2005-06-26 Ben Maurer <bmaurer@ximian.com>
14342 * inssel.brg: Remove warnings.
14344 2005-06-24 Zoltan Varga <vargaz@freemail.hu>
14346 * mini-ia64.c: Ongoing IA64 work.
14348 * basic-float.cs: Add float->i1 conversion test.
14350 * iltests.il: Add conv.u4 test.
14352 2005-06-23 Zoltan Varga <vargaz@freemail.hu>
14354 * inssel-long.brg: Fix bug caused by last change.
14356 2005-06-23 Geoff Norton <gnorton@customerdna.com>
14358 * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other
14359 BSDs. Allows the x86 JIT to work on OSX86
14361 2005-06-22 Zoltan Varga <vargaz@freemail.hu>
14363 * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
14366 * mini-ia64.c: Ongoing IA64 work.
14368 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
14370 * mini-ia64.c: Ongoing IA64 work.
14372 * driver.c: Clean up jit_code_hash as well when using --regression.
14374 * inssel-long.brg: Fix long->i4/u4 conversion rules.
14376 * basic-long.cs: Add tests for long->u4 conversion.
14378 2005-06-18 Ben Maurer <bmaurer@ximian.com>
14380 * mini.c: Take mono_get_domainvar out of macros. This makes sure
14381 that we do not depend on undefined C behavior: the order stuff
14382 gets evaluated within an expression. Fixes mono when compiled on
14385 2005-06-18 Zoltan Varga <vargaz@freemail.hu>
14387 * *-ia64.*: Ongoing IA64 work.
14389 * aot.c: Lower memory usage while loading AOT methods.
14391 * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
14393 * mini.h: Bump AOT file format version.
14395 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
14397 * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
14399 2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
14401 * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
14402 not on callee assembly). Fixed some comments.
14404 2005-06-16 Zoltan Varga <vargaz@freemail.hu>
14406 * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
14407 it gets proper disassembly.
14408 (emit_method_info): Remove some dead code.
14410 * mini.c (mini_method_compile): Allways allocate the GOT var in
14411 mono_method_to_ir for emulating opcodes.
14413 2005-06-13 Zoltan Varga <vargaz@freemail.hu>
14415 * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
14416 before freeing the code memory. Fixes #74990.
14418 * objects.cs: Add regression test for #74992.
14420 * liveness.c: Extend live ranges of arguments to the beginning of the
14421 method. Fixes #74992.
14423 * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
14424 so it points into the faulting instruction.
14426 2005-06-12 Zoltan Varga <vargaz@freemail.hu>
14428 * jit-icalls.c (mono_imul_ovf): Add exception handling.
14430 * *-ia64.*: Ongoing IA64 work.
14432 * mini.c (mini_init): Fix signature of mono_delegate_ctor.
14434 2005-06-11 Zoltan Varga <vargaz@freemail.hu>
14436 * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
14438 * *-ia64.*: Ongoing IA64 work.
14440 2005-06-10 Zoltan Varga <vargaz@freemail.hu>
14442 * basic-long.cs: Add tests for add/sub.ovf.
14444 * basic.cs: Add tests for sub.ovf.
14446 * *-ia64.*: Ongoing IA64 work.
14448 2005-06-09 Zoltan Varga <vargaz@freemail.hu>
14450 * *-ia64.*: Ongoing IA64 work.
14452 * basic.cs: Add conv.ovf.i4.un test.
14454 2005-06-09 Massimiliano Mantione <massi@ximian.com>
14456 * mini.c: (remove_block_if_useless) Fixed bug 75061.
14458 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14460 * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
14462 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
14464 * *-ia64.*: Ongoing IA64 work.
14466 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14469 * mini.c: added the ability to toggle trace on/off using SIGUSR2.
14471 2005-06-04 Zoltan Varga <vargaz@freemail.hu>
14473 * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
14475 2005-06-03 Zoltan Varga <vargaz@freemail.hu>
14477 * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
14479 * mini-amd64.c (amd64_patch): Add an assert to check that the destination
14480 of a call is callable by a near call.
14482 2005-05-31 Zoltan Varga <vargaz@freemail.hu>
14484 * mini-ia64.c: Ongoing IA64 work.
14486 2005-05-29 Zoltan Varga <vargaz@freemail.hu>
14488 * genmdesc.c: Make the generated array non-static.
14490 * inssel-long.brg: Fix LSHR_IMM rule.
14492 * *-ia64.*: Ongoing IA64 work.
14494 * *-ia64.*: Ongoing IA64 work.
14496 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
14498 * *-ia64.*: Ongoing IA64 work.
14500 * *-ia64.*: Ongoing IA64 work.
14502 * mini-ia64.c: Ongoing IA64 work.
14504 * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
14506 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
14508 * objects.cs basic-calls.cs: Move some tests to objects.cs.
14510 * objects.cs basic-long.cs: Move some tests to objects.cs.
14512 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
14514 * *-ia64.*: Ongoing IA64 work.
14516 * iltests.il: Add a new test.
14518 * mini.c (mono_method_to_ir): Initialize valuetypes when created using
14519 newobj. Fixes #75042.
14521 2005-05-22 Zoltan Varga <vargaz@freemail.hu>
14523 * *-ia64.*: Ongoing IA64 work.
14525 * *-ia64.*: Ongoing IA64 work.
14527 * *-ia64.*: Ongoing IA64 work.
14529 * basic.cs objects.cs: Move tests accessing static variables as well.
14531 * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
14533 2005-05-21 Zoltan Varga <vargaz@freemail.hu>
14535 * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
14537 * driver.c: Always print failed tests.
14539 * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
14542 * *ia64*: Ongoing IA64 work.
14544 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
14546 * basic.cs: Add tests for add.ovf. Fix warnings.
14548 2005-05-18 Miguel de Icaza <miguel@novell.com>
14550 * driver.c (mono_main): Avoid crash if no argument is passed to
14551 --break; Do not use g_error, but f_printf. And fix all other
14552 ocurrences of the same crash.
14554 2005-05-17 Zoltan Varga <vargaz@freemail.hu>
14556 * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
14557 and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
14560 2005-05-14 Zoltan Varga <vargaz@freemail.hu>
14562 * *-ia64.*: Add beginnings of IA64 backend.
14564 * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.
14566 2005-05-13 Zoltan Varga <vargaz@freemail.hu>
14568 * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
14571 * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
14573 * mini-amd64.c: Fix a warning.
14575 2005-05-10 Zoltan Varga <vargaz@freemail.hu>
14577 * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
14578 in float_neg. Fixes #74897.
14580 * mini-amd64.c (emit_call): Fix another near call bug.
14582 2005-05-06 Sebastien Pouliot <sebastien@ximian.com>
14584 * declsec.c: Keep the appdomain information in the structure. Added a
14585 missing "return FALSE" for Unmanaged if FullTrust is set (or else the
14586 value gets overwritten).
14587 * declsec.h: Set the default MonoArray for the the stack to 6. Added
14588 an MonoAppDomain member to MonoSecurityFrame.
14589 * mini-exceptions.c: Do not use a glist to keep GC allocated objects
14590 used in the stack walk. Now use a MonoArray which grow (double) when
14593 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
14595 * mini.c: Re-enabled runtime cleanup, since running threads should
14596 now properly stop when exiting.
14598 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
14600 * mini-codegen.c: New file contaning the arch-independent local
14601 register allocator. Not used by any architectures yet.
14603 * mini.h linear-scan.c: Merge some changes from the
14604 mini-xp-local-regalloc branch.
14606 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
14608 * mini-amd64.c (emit_call): Fix calls to native functions when the
14609 runtime is compiled as a shared library. Fixes #74756.
14611 * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
14612 on a literal field. Fixes #74751.
14614 2005-04-25 Raja R Harinath <rharinath@novell.com>
14616 * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
14618 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
14620 * objects.cs: Add missing null casting test.
14622 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
14624 * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
14625 in wrapper methods. Also rename 'address' variable to 'offset'.
14627 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
14629 * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
14632 * Makefile.am (MCS): Use -unsafe instead of --unsafe.
14634 * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
14637 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
14639 * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
14641 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
14643 * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
14644 just the last bytes.
14646 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
14648 * aot.c (mono_compile_assembly): Fix warning.
14650 * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
14651 by the _MSC_VER stuff.
14653 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
14655 * inssel-long.brg: Fix #74588.
14657 * cpu-amd64.md: Fix #74591.
14659 * iltests.il: Add new regression tests.
14661 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
14663 * trace.c (mono_trace_enter_method): Print enums as an int, not as a
14666 2005-04-11 Zoltan Varga <vargaz@freemail.hu>
14668 * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
14670 * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches
14671 from Bill Middleton <flashdict@gmail.com>.
14673 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
14675 * arrays.cs: Add new regression test. Fix warnings.
14677 2005-04-09 Zoltan Varga <vargaz@freemail.hu>
14679 * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
14680 and leakage in CKFINITE.
14682 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
14683 this to a null op since it is called on amd64 too.
14685 * exceptions-amd64.c (get_throw_trampoline): Align stack.
14687 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
14688 body since this is not used on amd64.
14690 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
14692 * mini-amd64.c: Remove obsolete fixmes.
14694 * mini.c (print_method_from_ip): Fix debugging support.
14696 2005-2-1 Massimiliano Mantione <massi@ximian.com>
14698 * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
14699 so that expressions that don't give much gain are not reduced.
14700 * ssapre.h: Likewise.
14702 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
14704 * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
14706 * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
14708 * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
14710 2005-04-01 Zoltan Varga <vargaz@freemail.hu>
14712 * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
14714 * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
14716 2005-03-31 Zoltan Varga <vargaz@freemail.hu>
14718 * mini-x86.c: If sigaltstack support is enabled, perform win32 style
14721 * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
14723 * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
14725 * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
14727 * mini-x86.h mini-x86.c exceptions-x86.c: Add support for
14728 MONO_ARCH_USE_SIGACTION. Fixes #74252.
14730 * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
14732 * mini-x86.c: Fix up stack overflow handling.
14734 * exceptions.cs: Add new regression test.
14736 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
14738 * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
14739 mono_jit_thread_attach.
14741 * mini.c (mono_method_to_ir): Verify called method is not abstract.
14743 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
14745 * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
14746 avoid calling constructors using callvirt.
14748 * inssel.brg: Fix #74073.
14750 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
14752 * aot.c, mini.h: Added mono-compiler.h header to allow/ease
14753 compilation with non-GCC compilers.
14754 * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
14755 possible using VS.NET. Adapted from the work of J Lothian (for VC6).
14757 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
14759 * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
14760 klass->interface_offsets (will likely fix bug#74073).
14762 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
14764 * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
14766 2005-03-28 Zoltan Varga <vargaz@freemail.hu>
14768 * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
14769 to amd64_div_reg_size ().
14771 * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
14773 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
14775 * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
14777 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
14779 * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
14781 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
14783 * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
14785 * mini.c (mono_precompile_assembly): Load and precompile referenced
14786 assemblies as well. Fixes #74015.
14788 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
14790 * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
14792 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
14794 * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
14795 a lot of checks and (anyway) permissions cannot work until corlib is
14798 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
14800 * mini-ppc.c: fixed ABI issue on sysv/ppc.
14802 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
14804 * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
14805 calls (fixes bug#72824).
14807 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
14809 * mini.c: fix tail recursion elimination (see test in bug#73936).
14811 2005-03-21 Zoltan Varga <vargaz@freemail.hu>
14813 * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
14814 some fp functions in sse2 mode.
14816 2005-03-20 Zoltan Varga <vargaz@freemail.hu>
14818 * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
14820 2005-03-19 Zoltan Varga <vargaz@freemail.hu>
14822 * mini.h mini.c: Add mono_get_jit_tls_key ().
14824 * mini-x86.c: Enable fast TLS support on windows.
14826 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
14828 * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
14829 * mini.c: Check for p/invoke method when generating code. If a
14830 p/invoke method, or it's class, isn't decorated with [Suppress
14831 UnmanagedCodeSecurity] then generate code to call System.Security.
14832 UnmanagedDemand (only if the security manager is active).
14834 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
14836 * tramp-amd64.c (create_specific_trampoline): Revert parts of the
14837 last change as it seems to cause strange crashes.
14839 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
14841 * *.c: handle unsafe function pointers where needed.
14843 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
14845 * mini.c (mono_jit_free_method): Remove the fixme too.
14847 2005-03-15 Miguel de Icaza <miguel@novell.com>
14849 * mini.c: As discussed, make the code actually free the delegate
14850 thunk now, to enable the debugging of delegate problems, use
14851 MONO_DEBUG=1 when running Mono.
14853 This takes also care of parts of the leaks as seen by Joe.
14855 2005-03-15 Zoltan Varga <vargaz@freemail.hu>
14857 * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable
14858 thread_tls_offset calculation.
14860 2005-03-14 Sebastien Pouliot <sebastien@ximian.com>
14862 * declsec.c: Reworked linkdemand checks for icall. The previous code
14863 was using the declaration code (untrusted) and didn't work as expected
14864 with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
14867 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
14869 * iltests.il: Add new localloc test.
14871 * mini-amd64.c: Handle large stack allocations the same way as on
14872 windows if stack overflow handling is working.
14874 * mini-amd64.c: Allocate the signal stack using mmap.
14876 * mini.c (sigsegv_signal_handler): Fix reading of context.
14878 * mini-exceptions.c: Fix up stack overflow handling.
14880 * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
14882 * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
14884 * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
14886 * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
14888 * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
14889 tramp_init functions as they are no longer needed.
14891 2005-03-12 Zoltan Varga <vargaz@freemail.hu>
14893 * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
14895 * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
14897 * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
14899 * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
14902 * mini-ops.h: Add OP_LMUL_IMM.
14904 * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
14905 long mul/div opcodes as intrinsic.
14907 * mini-amd64.c (emit_call): Handle the case when the callee might be
14910 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
14912 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
14915 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
14917 * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
14919 2005-03-09 Ben Maurer <bmaurer@ximian.com>
14921 * mini.c (mono_codegen): Don't leak here, to help people running
14924 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
14926 * mini-amd64.c (mono_arch_output_basic_block): Fix int->float
14927 conversions in sse2 mode.
14929 * basic-float.cs: Add regression test.
14931 * mini-amd64.c: Reenable sse2.
14933 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
14935 * mini-amd64.c: Disable sse2 until some regressions are fixed.
14937 2005-03-07 Joerg Rosenkranz <joergr@voelcker.com>
14939 * driver.c: Copyright text should include 2005.
14941 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
14943 * cpu-amd64.md (load_membase): Fix more max lengths.
14945 2005-03-06 Zoltan Varga <vargaz@freemail.hu>
14947 * cpu-amd64.md (load_membase): Fix max length.
14949 * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
14951 * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
14953 * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
14954 support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
14956 * basic-float.cs: Add rounding regression test.
14958 * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
14960 2005-03-04 Neale Ferguson <NealeFerguson@earthlink.net>
14962 * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
14963 structures in registers for pinvoke wrappers.
14965 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
14967 * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
14969 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
14971 * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
14972 wrapper to mono_jit_thread_attach.
14974 * mini.c (mini_jit_thread_attach): New jit icall.
14976 * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in
14977 native->managed wrappers.
14979 * exceptions.cs: Add new regression test.
14981 * mini.c (optimize_branches): Check regions in the cbranch to throw
14982 block case as well. Fixes #73242.
14984 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
14986 * mini.c: thread safety fixes.
14988 2005-02-27 Zoltan Varga <vargaz@freemail.hu>
14990 * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
14991 patching stuff, since delegates use jump trampolines so there is
14994 * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in
14997 * tramp-amd64.c: Fix build.
14999 * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
15000 it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
15002 * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
15003 Rename this to mono_arch....
15004 (mono_amd64_get_delegate_method_ptr_addr): Ditto.
15006 * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
15008 * mini-amd64.c (emit_call): If both the caller and the callee is
15009 guaranteed to have 32 bit addresses, emit a normal call.
15011 * tramp-amd64.c: Adapt to changes in mini-amd64.c.
15013 * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines.
15014 * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
15015 method_ptr inside delegates.
15017 2005-02-26 Zoltan Varga <vargaz@freemail.hu>
15019 * mini.c (mono_jit_free_method): Free the method info even if the native code is
15020 invalidated. Fixes #73001.
15022 * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
15024 * mini-x86.c: Only use stdcall for pinvokes on windows.
15026 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
15028 * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
15029 * mini-x86.c: remove unreliable __thread var offset detection,
15030 use the correct accessors and enable by default.
15032 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
15034 * mini.c (mono_jit_free_method): Fix memory leak.
15036 2005-02-22 Zoltan Varga <vargaz@freemail.hu>
15038 * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW.
15040 2005-02-21 Zoltan Varga <vargaz@freemail.hu>
15042 * cpu-amd64.md: Fix lengths of atomic opcodes.
15044 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
15046 * driver.c: try to not imply using ICU is any good.
15048 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
15050 * mini-amd64.c (mono_arch_get_inst_for_method): Implement more
15051 functions as inline ops.
15053 * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
15054 some Interlocked functions as inline ops.
15056 * mini.c (move_basic_block_to_end): Fix bug in last patch.
15058 * mini.h (MonoBasicBlock): Reorganize fields a bit.
15060 * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
15062 * mini.c: Add support for OP_NOT_TAKEN.
15064 * mini-amd64.h mini-amd64.c: Add support for passing/returning small
15065 structures in registers for pinvoke wrappers.
15067 * mini-amd64.c: Fix warnings.
15069 2005-02-19 Zoltan Varga <vargaz@freemail.hu>
15071 * mini.h (MonoCompile): Add 'ret_var_is_local' field.
15073 * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
15075 * mini.c (NEW_RETLOADA): If the ret variable is a local, use its
15076 address instead of loading the address from it.
15078 * mini-x86.c: Add support for returning small structs in registers
15079 on Win32. Fixes part of #70864.
15081 2005-02-18 Zoltan Varga <vargaz@freemail.hu>
15083 * trace.c (get_token): Improve error checking.
15085 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
15087 * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
15089 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
15091 * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
15092 it can be reused for MonoClass.
15093 * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
15096 2005-02-15 Sebastien Pouliot <sebastien@ximian.com>
15098 * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code
15099 instead of a MonoReflectionMethod. The method information wasn't used
15100 when displaying SecurityException details (but will be now).
15102 2005-02-15 Atsushi Enomoto <atsushi@ximian.com>
15104 * Makefile.am : windows build fix.
15106 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
15108 * iltests.il: Add new regression test.
15110 * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
15113 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
15115 * mini.c: Moved linkdemand check into helper function check_linkdemand
15116 to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP,
15119 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
15121 * declsec.c: Added statistics counter for different kinds of
15123 * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
15124 (and commented) declaration.
15125 * mini.c: Added statistics counter for security Demand code
15126 generation. Added display of security statistics.
15128 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
15130 * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
15131 Fix compilation errors under gcc-2.95.
15133 2005-02-12 Ben Maurer <bmaurer@ximian.com>
15135 * mini.c, driver.c: Use the new jit trampoline hashtable
15137 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
15139 * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
15141 2005-02-11 Martin Baulig <martin@ximian.com>
15143 * debug-mini.c (mono_debug_close_method): Free the line number array.
15145 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
15147 * aot.c: Break up large methods into smaller ones. Share GOT slots for
15150 * mini.h: Bump AOT file format version.
15152 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
15154 * declsec.c: Added LinkDemand support and it's special cases for ECMA,
15156 * declsec.h: Added macros to get/set lazyly initialized security
15157 informations about assemblies. Added new enum for different type of
15158 possible LinkDemand violation. Added function to check LinkDemands.
15159 * mini.h: Added a field to MonoCompile to hold any security violation
15160 detected when JITting a method (so it can be thrown later).
15161 * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL
15162 and CEE_CALLVIRT. Added code to throw exception at the end of
15163 mini_method_compile (note: the exception is unhandled right now).
15165 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
15167 * mini.c, jit-icalls.c: use the managed implementation of
15168 memset for initobj and memset, to avoid managed <-> unmanaged
15171 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
15173 * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
15174 optimization if it would need a GOT var.
15176 * basic.cs: Add tests for constant propagation and switch statements.
15178 * ssa.c: Fix out-of-range constant propagation and switch statements.
15180 2005-02-09 <vargaz@freemail.hu>
15182 * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
15184 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
15186 * cpu-amd64.md (load_membase): Fix max length of load_membase.
15188 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
15190 * mini.c: update to new signature of mono_class_get_allocation_ftn().
15192 2005-02-06 Neale Ferguson <NealeFerguson@earthlink.net>
15194 * cpu-s390.md, mini-s390.c: Correct bug with register usage on certain
15195 arithmetic operations.
15197 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
15199 * mini-ppc.c: add a workaround for broken user code that
15200 DllImports vararg functions with non-vararg signatures.
15202 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
15204 * mini.c (mono_jit_compile_method_inner): Add detection and a
15205 meaningfull error message for assemblies written in Managed C++.
15207 * tramp-amd64.c mini-amd64.h: Add support for
15208 create_trampoline_from_token ().
15210 * aot.c mini-x86.c abcremoval.c: Applied patch from
15211 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
15213 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
15215 * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline
15216 which takes a MonoImage/token as parameter instead of a MonoMethod.
15218 * aot.c: Use the new trampoline for initializing vtables.
15220 * aot.c: Add support for ldfld/stfld_remote wrappers.
15222 * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
15223 rules for compare <MEM>, IMM.
15225 * mini.h (MONO_AOT_FILE_VERSION): Bump it.
15227 * aot.c: Handle inherited finalizers correctly.
15229 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
15231 * inssel.brg (stmt): Add a missing _setup_... ().
15233 * aot.c: Save some parts of the class state to the AOT file and use it
15234 to recompute that state when a class is initialized.
15236 * mini.c: Install AOT hooks into the runtime.
15238 * mini.h: Bump AOT file format version.
15240 * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
15243 * iltests.il: Add new test.
15245 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
15247 * mini.c: fix typo.
15249 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
15251 * mini.c: setup the statistical profiler in the thread attach
15252 callback to cope with the new single thread code.
15254 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
15256 * mini-ppc.c: ensure we have enough room for the profiler
15257 calls (fixed bug#72084).
15259 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
15261 * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding
15264 2005-2-1 Massimiliano Mantione <massi@ximian.com>
15266 * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
15268 2005-2-1 Massimiliano Mantione <massi@ximian.com>
15270 * ssapre.c: Fixed an issue with down safety (this allows IronPython
15271 to succesfully execute parrotbench).
15272 * ssapre.h: Likewise.
15274 2005-2-1 Massimiliano Mantione <massi@ximian.com>
15276 * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
15277 variable for stores to method arguments (fixes a SSAPRE issue).
15279 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
15281 * mini.c: handle value types in dup, fixes gen-112.cs.
15283 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
15285 * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
15286 sequence for calls in dynamic methods to avoid thunks.
15288 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
15290 * mini.c: correctly remove dynamic methods from the hashtable.
15292 2005-1-20 Massimiliano Mantione <massi@ximian.com>
15294 * driver.c: Disabled SSAPRE until fix the bug that appears
15295 in IronPython's parrotbench.
15297 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
15299 * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
15301 * mini.c (mono_method_to_ir): Revert the previous change.
15303 * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
15304 when AOT compiling.
15306 * tramp-x86.c (x86_magic_trampoline): Avoid calls to
15307 mono_jit_info_table_find () etc. when running under valgrind.
15309 * inssel.brg: Fix warnings.
15311 * mini-exceptions.c: Fix warnings.
15313 2005-01-31 Martin Baulig <martin@ximian.com>
15315 * driver.c (compile_all_methods_thread_main): Don't try to compile
15316 generic methods or anything which has type parameters.
15318 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
15320 * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
15322 * TestDriver.cs: Add --verbose flags.
15324 * graph.c ssa.c: Fix 64 bit warnings.
15326 * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c
15327 trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
15328 Fix 64 bit warnings.
15330 * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
15331 variable not spotted by gcc.
15333 * mini-amd64.c inssel-amd64.brg: Applied patch from
15334 Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of
15335 X86_COMPARE_MEMBASE opcodes.
15337 * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
15339 2005-01-29 Ben Maurer <bmaurer@ximian.com>
15341 * *: MonoMethod->signature might be NULL now. You *MUST* use
15342 mono_method_signature.
15344 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
15346 * driver.c (compile_all_methods_thread_main): Compile the methods
15347 without invoking cctors.
15349 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
15351 * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
15352 * basic-calls.cs: test for the above.
15354 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
15356 * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after
15357 MonoJitInfo changes.
15359 2005-01-27 Zoltan Varga <vargaz@freemail.hu>
15361 * mini-exceptions.c (mono_handle_exception): Compute the stack trace
15362 eagerly if it contains dynamic methods.
15364 * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
15366 * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
15367 trace, it is now computed by an icall from trace_ips.
15369 * mini-exceptions.c: Fix a warning.
15371 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
15373 * mini-exceptions.c: don't bother getting stack trace info if
15374 it's not going to be used.
15376 2005-01-27 Raja R Harinath <rharinath@novell.com>
15378 * Makefile.am (common_sources): Add ssapre-cee-ops.h and
15381 2005-01-26 Zoltan Varga <vargaz@freemail.hu>
15383 * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
15385 * aot.c: Avoid calling mono_method_get_header () if not needed.
15387 * mini.h: Bump AOT file format version.
15389 * mini.c (mono_emit_native_call): Allocate a GOT var here.
15391 * mini.c (mono_print_tree): Print more info for calls.
15393 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
15395 * declsec.h: Remove warning by adding missing include for marshal.h
15397 2005-01-26 Martin Baulig <martin@ximian.com>
15399 * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
15402 2005-01-25 Zoltan Varga <vargaz@freemail.hu>
15404 * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
15407 * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
15409 * aot.c (mono_compile_assembly): Fix a warning.
15411 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
15413 * declsec.c: Look for security attributes on the original MonoMethod
15414 (and not the wrapped one). This fix permissions on icalls.
15416 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
15418 * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
15420 * mini.c (mono_allocate_stack_slots): Add a fixme.
15422 * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
15424 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
15426 * inssel.brg: optimize casts of sealed types (more
15427 optimizations waiting for fixes in remoting).
15429 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
15431 * inssel.brg (stmt): Add another dummy rule.
15433 * driver.c: Fix warnings.
15435 * driver.c (mono_main): If running under valgrind, instruct glib to use
15436 the system allocation functions so valgrind can track the memory
15437 allocated by the g_... functions.
15439 * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
15441 * mini-ops.h: Add OP_DUMMY_STORE opcode.
15443 * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
15445 * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
15446 variables in try regions.
15448 * mini.c (mini_method_compile): Don't disable optimizations on large
15449 methods when AOT compiling.
15451 * mini.c (mono_allocate_stack_slots): New arch independent method to
15452 allocate stack slots. Not yet used.
15454 2005-01-22 Ben Maurer <bmaurer@ximian.com>
15456 * debug-mini.c (mono_debug_close_method): Plug some leaks.
15458 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
15460 * mini-ppc.c: make the branch info relative as the code
15461 buffer can be reallocated.
15463 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
15465 * aot.c: Allow decoding of the new MONO_PATCH_INFO_DECLSEC.
15466 * driver.c: Removed the AOT/security restriction. Now initialize the
15467 security manager (in metadata) if --security is used.
15468 * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
15469 rather than the pointer to declarative security, when AOT is used.
15471 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
15473 * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
15474 basic blocks, reduced intrinsic exception throwing code size.
15476 2005-01-22 Miguel de Icaza <miguel@ximian.com>
15478 * driver.c (mini_usage): Reorder the usage screen.
15480 2005-01-21 Zoltan Varga <vargaz@freemail.hu>
15482 * mini.c (mono_resolve_patch_target): Fix warning.
15484 2005-01-20 Zoltan Varga <vargaz@freemail.hu>
15486 * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
15489 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
15491 * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
15492 breaks the amd64 build.
15494 * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem
15495 register allocation. Fixes #71454.
15497 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
15499 * arrays.cs: Add new regression test.
15501 2005-1-20 Massimiliano Mantione <massi@ximian.com>
15503 * ssapre.c: Turned usage of snprintf to GString.
15504 * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
15505 (I left it on by mistake in my previous commit).
15507 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
15509 * mini.c, cfold.c, basic-calls.cs: preserve side effects
15510 on cond branch optimization (fixes bug# 71515).
15512 2005-1-20 Massimiliano Mantione <massi@ximian.com>
15514 * abcremoval.c: Fixed bug 71062.
15515 * abcremoval.h: Likewise.
15517 2005-1-20 Massimiliano Mantione <massi@ximian.com>
15519 * mini.c: Added a new functionality to optimize_branches, the removal
15520 of useless basic blocks, and fixed some problem in the removal of
15521 critical edges; some utility functions added for both purposes.
15522 * ssapre.c: Added complex expression support, and fixed bug 70637.
15523 * ssapre.h: Likewise.
15524 * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
15526 * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
15527 * driver.c: Re-enabled SSAPRE.
15529 2005-01-19 Martin Baulig <martin@ximian.com>
15531 * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
15532 the result of mono_get_method_constrained().
15534 2005-01-18 Neale Ferguson <NealeFerguson@earthlink.net>
15536 * exceptions-s390.c tramp-s390.c: Allocate code using the global code
15539 2005-01-18 Geoff Norton <gnorton@customerdna.com>
15541 * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
15542 be detected. Fixes #59296.
15544 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
15546 * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
15547 which can happen. Fixes #71361.
15549 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
15551 * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
15554 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
15556 * mini.c (mono_create_jump_trampoline): Revert last change as it causes
15557 appdomain-unload.exe to fail.
15559 * mini.c: Fix some memory leaks.
15561 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
15563 * inssel.brg: handle the new size of rank, idepth, max_interface_id.
15564 Fixed bug and sped up some codepaths.
15566 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
15568 * mini.c: Fix some memory leaks.
15570 * exceptions.cs basic-long.cs: Add test for checked ulong->int
15573 * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
15575 * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
15578 * iltests.il: Add regression test for #71320.
15580 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
15582 * mini.c (mono_codegen): Fix installation of profiler hooks.
15584 * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
15586 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
15588 * mini.h, mini.c, cfold.c: optimize access to enum
15589 readonly fields, too. Eval conditional branches if possible
15590 to perform unreachable code removal in more cases.
15592 2005-01-15 Zoltan Varga <vargaz@freemail.hu>
15594 * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
15596 * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
15599 * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
15600 WinXP DEP. Fixes #71244.
15602 2005-01-14 Zoltan Varga <vargaz@freemail.hu>
15604 * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
15606 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
15608 * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
15610 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
15612 * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo
15615 * mini.h: Bump AOT version.
15617 * mini.h (MonoCompile): Change exvar to a hash table.
15619 * mini.c: Allocate a separate exvar for each handler block.
15621 * mini.c: Get rid of the computation of filter_lengths, its not needed.
15623 * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
15624 ex var with the pending exception and only throw if the two are equal.
15627 * exceptions.cs: Add tests for rethrow and nested catch clauses.
15629 * mini-x86.c: Fix warnings.
15631 * Makefile.am (common_sources): Move mini-exceptions.c here as it is
15632 used by all the ports now.
15634 * aot.c: Add write-symbols and save-temps options.
15636 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
15638 * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
15640 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
15642 * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx
15645 * tramp-s390.c: Check vtable slot belongs to the domain.
15647 * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
15648 as per other platforms.
15650 * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
15652 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
15654 * driver.c: we don't run the Main() code in a subthread anymore.
15656 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
15658 * mini.c: added experimental rtc support in the statistical
15659 profiler: if the user has the permission, more accurate statistics
15660 are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
15661 The MONO_RTC value must be restricted to what the linux rtc allows:
15662 power of two from 64 to 8192 Hz.
15664 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
15666 * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
15668 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
15670 * mini-ppc.c: better icache flush for smp.
15672 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
15674 * mini-amd64.c (emit_move_return_value): Fix memory leak.
15676 * mini-x86.c (get_call_info): Add the get_call_info () code from the
15677 amd64 port, not yet used.
15679 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
15681 * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
15684 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
15686 * driver.c: Added --security option to activate the security manager.
15687 Right now this will allow code generation for declarative demands and
15688 is disabled when AOT is specified.
15689 * mini.c: Add code generation for declarative security demands.
15690 * mini.h: Add mono_use_security_manager as an extern gboolean.
15692 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
15694 * aot.c (mono_compile_assembly): Speed up compilation a bit by
15695 emitting more dense assembly code.
15697 * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
15698 exception throwing stuff.
15700 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
15702 * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
15705 * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
15706 left in by mistake.
15708 * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is
15711 * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
15713 * tramp-*.c: Only patch vtable slots if the object is in the current
15714 domain. Fixes appdomain-unload.exe.
15716 * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
15718 * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
15721 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
15723 * mini.c (reverse_branch_op): New helper function.
15725 * mini.c (optimize_branches): Run the new optimization only on
15726 platforms which support it. Also reverse all kinds of branches.
15728 * mini.h (MonoBasicBlock): Add 'out_of_line' field.
15730 * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
15733 * mini.c (optimize_branches): Reverse not-equals branches if the false
15734 bblock is a throw. This happens a lot of time with argument checking in
15737 * mini.c (mono_codegen): Add support for placing basic blocks after
15738 the function epilogue.
15740 * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
15743 2005-01-05 Miguel de Icaza <miguel@ximian.com>
15745 * mini.c (setup_stat_profiler): Only set this up if the platform
15746 supports ITIMER_PROF.
15748 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
15750 * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
15753 * inssel.brg: Fix a warning.
15755 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
15757 * mini.c: added support for statistical profiler
15758 (run with: --profile=default:stat).
15760 2005-01-04 Zoltan Varga <vargaz@freemail.hu>
15762 * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
15764 * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
15766 * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes
15767 related to global registers from the amd64 port.
15769 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
15771 * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
15773 * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
15774 with global registers.
15775 (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
15777 * aot.c (emit_method_code): Fix the 'method emitted as' messages.
15779 2004-12-31 Zoltan Varga <vargaz@freemail.hu>
15781 * debug-mini.c (encode_value): Fix off-by-one.
15783 * aot.c (encode_value): Likewise.
15785 * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
15787 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
15789 * mini.c linear-scan.c: Add a workaround for the mcs crash when using
15792 * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
15794 * aot.c (emit_method_info): Increase size of temp buffer.
15796 * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in
15799 2004-12-28 Zoltan Varga <vargaz@freemail.hu>
15801 * aot.c (emit_method_info): Fix build.
15803 * aot.c: Further rework of the AOT file format to reduce the size of
15804 the method info data.
15806 * mini.h: Bump AOT file format version.
15808 2004-12-27 Martin Baulig <martin@ximian.com>
15810 * mini.c (mini_get_method): New static method; call
15811 mono_get_method_full() and mono_get_inflated_method().
15812 (mono_method_to_ir): Use mini_get_method() instead of
15813 mono_get_method_full().
15815 2004-12-26 Patrik Torstensson <patrik.torstensson@gmail.com>
15817 * mini-x86.c (atomic ops): fixed bug interlocked bug #70784.
15819 2004-12-25 Zoltan Varga <vargaz@freemail.hu>
15821 * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
15823 * inssel-amd64.brg: Add some optimization rules.
15825 2004-12-24 Ben Maurer <bmaurer@ximian.com>
15827 * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
15828 standard not GC'd stuff is fine.
15830 2004-12-24 Zoltan Varga <vargaz@freemail.hu>
15832 * aot.c: Rework the AOT file format to get rid of most of the global
15833 symbols. This reduces the size of the mscorlib.dll.so by 1MB.
15835 * mini.h: Bump AOT file format version.
15837 2004-12-23 Zoltan Varga <vargaz@freemail.hu>
15839 * mini.h: Bump AOT file format version.
15841 * aot.c (mono_aot_is_got_entry): New function to determine if an
15842 address is inside a GOT.
15844 * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
15846 * cpu-pentium.md: Increase the maximum size of some instructions which
15847 might involve a got access.
15849 * mini.c (get_method_from_ip): Another debug helper function.
15851 * mini.c: Call mono_get_got_var () in a couple places. Handle the case
15852 when got var accesses are created during the decompose phase.
15854 * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
15856 * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
15857 argument mini_compile_method and to MonoCompile, and use this to
15858 determine whenever a given method is compiled for AOT. This allows the
15859 other methods compiled during AOT compilation to be free of AOT stuff,
15860 so the backends does not need to add special support for them by
15861 creating a fake GOT etc.
15863 * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
15866 2004-12-21 Ben Maurer <bmaurer@ximian.com>
15868 * mini.c (mono_method_to_ir): It turns out that some of the
15869 x-appdomain wrappers are lax with types, so just ignore this for
15872 * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
15873 at the vtable->klass. If it is non-shared code we can just use the
15876 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
15878 * mini-ppc.c: access MonoDomain from tls, too.
15880 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
15882 * declsec.c: Removed unused variable (and related warning ;-)
15884 2004-12-21 Ben Maurer <bmaurer@ximian.com>
15886 * iltests.il: New test for LDELEMA on an array of ref types.
15888 * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
15889 all ldelema's on reftypes.
15890 (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
15891 it was the wrong place to put it.
15893 * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
15894 register to pop to make this cleaner, at the request of Paolo.
15896 2004-12-20 Ben Maurer <bmaurer@ximian.com>
15898 * mini-ops.h (OP_GETHASHCODE): New op.
15900 * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
15902 * mini.c (mini_get_inst_for_method): Create the intrinsic hash
15905 For a microbenchmark, this reduces the cost of Hashtable.get_Item
15908 * mini-x86.c (mono_arch_output_basic_block): Rather than
15916 The first is 3 bytes while the second is 1. This saves 36 kb on
15917 mscorlib, quite a big saving. When bootstraping mcs, I was able to
15918 see a small boost because of icache locality.
15920 * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
15922 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
15924 * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
15925 started code sharing with the generic code.
15927 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
15929 * mini-ppc.c, cpu-g4.md: added code for direct access to
15932 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
15934 * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
15935 mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
15938 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
15940 * declsec.c|h: Added functions to cache the declarative stack modifiers
15941 in MonoJitInfo and to create a security frame from a MonoJitInfo
15943 * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
15944 created. Register internal calls for System.Security.SecurityFrame::
15945 _GetSecurityFrame and _GetSecurityStack.
15946 * mini.h: Added definition for new icalls (in mini-exceptions.c) and
15947 the definitions for the new stack walk/callback mechanism.
15948 * mini-exceptions.c: Added internal call GetSecurityFrame (to get the
15949 first security frame for LinkDemands and InheritanceDemands) and
15950 GetSecurityStack for Demands. Both use the new mono_walk_stack code
15952 * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
15953 walk initialization (lupus).
15955 2004-12-20 Ben Maurer <bmaurer@ximian.com>
15957 * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
15959 (handle_loaded_temps): Do not create a temporary variable for
15960 things that we know are temps. They will never be modified.
15961 (mono_spill_call): Set MONO_INST_IS_TEMP
15962 (mono_emulate_opcode): ditto
15964 (mono_method_to_ir.CEE_DUP): ditto
15966 2004-12-19 Ben Maurer <bmaurer@ximian.com>
15968 * mini.c (type_to_eval_stack_type): Make this handle the void type
15969 (mono_emit_call_args): set the call->type with type_to_eval_stack_type
15970 (emit_tree): use ip_in_bb to special case some common idioms
15971 Update all callers to pass in the IP.
15972 (mono_method_to_ir): Make CEE_CALL* do the above as well.
15974 This gives us a nice 2% speedup in mcs bootstrap.
15976 * mini-x86.c (peephole_pass): Peephole pass to make
15985 * mini.c (ip_in_bb): new method.
15986 (mono_method_to_ir): use this method rather than doing the hash
15989 * linear-scan.c (mono_linear_scan): When expiring actives, you
15990 don't need to keep around variables that expire on this
15991 instruction. This makes it so that:
15994 store (ebx add (ebx, 1))
15998 2004-12-19 Zoltan Varga <vargaz@freemail.hu>
16000 * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc
16001 combination to avoid doing two copies. Fix up problems with previous
16004 * mini.c: Fix 64 bit warnings.
16006 * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
16008 2004-12-17 Zoltan Varga <vargaz@freemail.hu>
16010 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
16011 changes from the x86 code.
16013 * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
16015 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
16017 * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
16018 throwing code to reduce its size, unify the AOT and non-aot code and
16019 get rid of relocations in the AOT case.
16021 * mini-x86.h mini.c exceptions-x86.c
16022 (mono_arch_get_throw_corlib_exception): New arch specific function to
16023 raise corlib exceptions which doesn't require relocations in the
16026 * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
16028 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
16030 * mini.c (mono_emit_method_call): Only allocate the got var when it is
16033 * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
16036 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
16038 * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
16039 with add function when used from Inc/dec atomic
16040 functions. Re-enabled optimization on x86.
16041 * mini-ops.h: renamed atomic_add functions to
16042 allow _add to match the Interlocked::Add and
16043 _add_next to match Interlocked::Inc/Dec.
16045 2004-12-15 Massimiliano Mantione <massi@ximian.com>
16047 * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
16048 linking of BBs to the end BB, and enabled SSAPRE also with
16049 consprop and copyprop (which was prevented by that bug).
16051 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
16053 * mini-x86.c: disabling the Interlocked optimizing code.
16055 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
16057 * aot.c (load_aot_module): Move reading of got_addr after the AOT
16058 file version check.
16060 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
16062 * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm
16063 interlocked optimization due lack of support on x86, rewrote
16064 exchange to take into account that base may be in eax.
16066 xsp works again; activated Interlocked optimizing code.
16068 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
16070 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
16072 2004-12-13 Zoltan Varga <vargaz@freemail.hu>
16074 * mini-ops.h: Add new opcodes.
16076 * mini.h: Add new patch types. Add got_var to MonoCompile.
16078 * mini.h mini-x86.c mini-amd64.c aot.c: Rename
16079 mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
16080 make it work with all kinds of patchable code.
16082 * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
16083 address of the GOT, and referencing entries in the GOT.
16085 * mini.c: Add code to load the GOT address if needed by an opcode.
16087 * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position
16088 independent AOT code on the x86 using an elf-style Global Offset Table.
16090 2004-12-14 Raja R Harinath <rharinath@novell.com>
16092 * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
16094 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16096 * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
16099 2004-12-13 Patrik Torstensson <patrik.torstensson@gmail.com>
16101 * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
16102 of Interlocked:Increment/Decrement/Add as inline ops.
16103 (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
16105 2004-12-12 Geoff Norton <gnorton@customerdna.com>
16107 * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
16108 * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
16110 2004-12-12 Duncan Mak <duncan@ximian.com>
16112 * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
16113 again. `patch_info->table_size' is no longer valid after Zoltan's
16116 2004-12-12 Martin Baulig <martin@ximian.com>
16118 * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
16119 if we are the "real" method, ie. not an inlined method inside it.
16121 2004-12-11 Ben Maurer <bmaurer@ximian.com>
16123 * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
16124 before we look in the special fields table. This fixes
16125 ../tests/thread-static-init.cs.
16127 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16129 * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
16130 for Array get_Rank and get_Length. Fixes bug #70465.
16132 2004-12-11 Zoltan Varga <vargaz@freemail.hu>
16134 * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
16135 separate structure to reduce the size of MonoJumpInfo.
16137 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
16139 * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
16141 2004-12-10 Patrik Torstensson <patrik.torstensson@gmail.com>
16143 * mini.c (mini_get_inst_for_method): Changed to allow ports
16144 to return a MonoInst instead of opcode
16145 (renamed mini_get_opcode_for_method to better reflect the new functionality)
16147 * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method):
16148 Allow ports to return a created MonoInst instead of op-code, will enable
16150 (renamed mini_get_opcode_for_method to better reflected the functionality)
16152 2004-12-09 Zoltan Varga <vargaz@freemail.hu>
16154 * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
16156 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
16158 * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
16161 2004-12-08 Martin Baulig <martin@ximian.com>
16163 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
16164 if we're a CEE_CONSTRAINED call. Fixes gen-118.cs.
16166 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
16168 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
16171 * exceptions.cs: Disable some tests which depend on properties of x86 fp
16174 2004-12-08 Raja R Harinath <rharinath@novell.com>
16176 * Makefile.am (CLEANFILES): Add *.exe, *.dll.
16178 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
16180 * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
16181 bug introduced by the previous patch.
16183 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
16185 * mini-ppc.c, objectc.cs: handle large structs passed by value
16186 (fixes bug #69972).
16188 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
16190 * mini-ppc.c: OP_ARGLIST implementation from
16191 Geoff Norton <gnorton@customerdna.com>.
16193 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
16195 * inssel-x86.brg, inssel-ppc.brg: fix reference to register
16196 in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
16198 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
16200 * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
16202 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16204 * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
16207 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
16209 * mini-sparc.c: Zero out localled-ed memory.
16211 * iltests.il: Add tests for zeroing out localloc-ed memory.
16213 2004-12-04 Martin Baulig <martin@ximian.com>
16215 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
16216 mono_method_get_signature_full().
16218 2004-12-03 Massimiliano Mantione <massi@ximian.com>
16220 * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
16221 and some utility functions (always for SSAPRE), integrated SSAPRE.
16222 * mini.h: Likewise.
16223 * driver.c: Added ssapre option.
16224 * ssa.c: Small fix on OP_ARG handling.
16225 * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
16226 * Makefile.am: Likewise.
16228 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
16230 * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
16231 now in the xp code.
16233 * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
16236 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16238 * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
16240 * cpu-s390.md : Increase instruction length of oparglist.
16242 * mini-s390.c : Implement vararg and TYPEDEBYREF support.
16244 2004-11-30 Martin Baulig <martin@ximian.com>
16246 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
16247 virtual generic methods. We call a special helper_compile_generic_method()
16248 icall to retrieve the method from the vtable, inflate and compile
16249 it and then do a CEE_CALLI. Thanks a lot to Paolo for this idea.
16251 * jit-icalls.c (helper_compile_generic_method): New JIT icall.
16253 2004-11-30 Zoltan Varga <vargaz@freemail.hu>
16255 * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
16257 2004-11-29 Zoltan Varga <vargaz@freemail.hu>
16259 * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
16262 2004-11-27 Ben Maurer <bmaurer@ximian.com>
16264 * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
16265 platforms with PIC aot.
16267 2004-11-28 Martin Baulig <martin@ximian.com>
16269 * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
16272 2004-11-28 Martin Baulig <martin@ximian.com>
16274 * mini-x86.c (mono_arch_call_opcode): Use the original type, not
16275 the result of mono_type_get_underlying_type() to check whether
16278 2004-11-26 Martin Baulig <martin@ximian.com>
16281 (mono_method_to_ir): Use `!method->signature->has_type_parameters'
16284 2004-11-26 Zoltan Varga <vargaz@freemail.hu>
16286 * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
16287 the same way as the other arguments so they won't get clobbered.
16289 * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual
16290 calls through R11 since it is clobbered by the trampoline code.
16292 2004-11-26 Raja R Harinath <rharinath@novell.com>
16294 * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
16295 pick up in-tree mscorlib.dll.
16297 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
16299 * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
16301 * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to
16302 runtime data/code are now stored in a table similar to the GOT in ELF.
16303 This allows the code itself to be position independent.
16305 * aot.c: Fix loading of referenced assemblies after the lazy assembly
16308 * aot.c: Attach ELF type (object/function) directives to all global
16311 * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
16313 * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
16315 * mini-amd64.h: Turn on PIC AOT code.
16317 * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
16318 returning the offset within an OP_AOTCONST instruction where the GOT
16319 offset needs to be added.
16321 * mini.h: Bump AOT file format version.
16323 2004-11-25 Martin Baulig <martin@ximian.com>
16325 * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
16326 uninflated generic methods.
16328 2004-11-25 Martin Baulig <martin@ximian.com>
16330 * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
16332 2004-11-24 Martin Baulig <martin@ximian.com>
16334 * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
16335 original klass (this only applies for generic instances).
16337 2004-11-24 Martin Baulig <martin@ximian.com>
16339 * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
16340 `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
16343 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
16345 * mini.c (mono_method_to_ir): Disable inlining for methods containing
16346 localloc. Fixes #69678.
16348 * iltests.il (test_0_localloc_inline): Add regression test for #69678.
16350 2004-11-23 Zoltan Varga <vargaz@freemail.hu>
16352 * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
16353 used SSE registers on pinvoke calls. Fixes #69774.
16355 2004-11-23 Geoff Norton <gnorton@customerdna.com>
16357 * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
16358 vt->inst_vtype->data.klass. This fixes generic structs and bug #69766
16360 2004-11-23 Raja R Harinath <rharinath@novell.com>
16362 * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
16363 Refer directly to the mcs/ tree.
16365 2004-11-19 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16367 * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
16368 Check if a trampoline for a synchronized method is required.
16370 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
16372 * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
16373 with localloc if needed. Throe arithmetric exception in
16374 div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
16375 Adapted from a patch by Geoff Norton <gnorton@customerdna.com>.
16377 2004-11-19 Geoff Norton <gnorton@customerdna.com>
16379 * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
16380 types before switching on type. Fixes #69622.
16382 2004-11-19 Raja R Harinath <rharinath@novell.com>
16384 * Makefile.am (check-local): New. Integrate into 'make check'.
16385 (MCS,RUNTIME): Define using in-tree mono and mcs.
16387 (%.exe): Use $(ILASM).
16389 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
16391 * mini-ppc.c: adjust initial prolog size (bug #69691).
16393 2004-11-18 Zoltan Varga <vargaz@freemail.hu>
16395 * cpu-pentium.md (localloc): Increase max instruction len. Fixes
16398 2004-11-17 Raja R Harinath <rharinath@novell.com>
16400 * Makefile.am (clean-local): Rename from 'clean'.
16402 2004-11-15 Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16404 * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
16405 to mono_arch_is_int_overflow.
16406 * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
16409 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
16411 * declsec.c|h: New files to support declarative security attributes.
16412 Added function to check if a method has (applicable) security.
16413 * mini.c|h: Add check for declarative security attributes in
16414 mono_method_check_inlining.
16415 * Makefile.am: Added declsec.c and declsec.h to the build.
16417 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
16419 * mini.c, mini.h: update to keep dynamic code info per-domain.
16421 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
16423 * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
16424 (mini_init): Get rid of it from here too.
16426 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
16428 * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
16429 implemented OP_RETHROW (patch by Geoff Norton
16430 <gnorton@customerdna.com>).
16432 2004-11-10 Geoff Norton <gnorton@customerdna.com>
16434 * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
16435 between appdomains. Fixes appdomain-unload on PPC.
16437 2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
16439 * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
16440 mini-exceptions.c: handle the new wrapper types.
16441 * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
16442 token value as a MonoClass* when compiling a wrapper.
16443 mono_jit_create_remoting_trampoline now takes an additional
16444 MonoRemotingTarget parameter.
16446 2004-11-10 Martin Baulig <martin@localhost>
16448 * mini.c (mono_method_to_ir): Use `generic_container->context'
16449 rather than creating a new one.
16451 2004-11-09 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16453 * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
16455 * inssel-390.md, mini-s390.c: Correct register allocation for globals.
16457 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
16459 * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
16460 the experimental aot cache stuff.
16462 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
16464 * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
16465 mini-exceptions.c: update to exception clause structure changes.
16467 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
16469 * exceptions-x86.c (throw_exception): Fix warnings.
16471 * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support
16474 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
16476 * exceptions-sparc.c (get_throw_exception): Really fix this.
16478 2004-11-07 Ben Maurer <bmaurer@ximian.com>
16480 * tramp-*.c: we no longer support icalls without wrappers, so
16481 a bit of code can be removed here
16483 2004-11-07 Zoltan Varga <vargaz@freemail.hu>
16485 * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
16488 * cpu-sparc.md: Add op_rethrow.
16490 * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
16492 * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
16494 * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
16495 * mini-ops.h: Add OP_RETHROW.
16497 * mini.c inssel.brg: Distinguish between THROW and RETHROW.
16499 * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
16501 2004-11-05 Geoff Norton <gnorton@customerdna.com>
16503 * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
16504 Makes the output much easier to read
16506 2004-11-05 Ben Maurer <bmaurer@ximian.com>
16508 * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
16509 prevents another huge leak when compiling with ssa. Secondly, the
16510 performance of doing this rather than freeing the lists is much
16511 better. GList does a lock every time you allocate a list link,
16512 so that it can use a memory pool. So, it is better to just use
16513 a memory pool of our own.
16515 * ssa.c, linear-scan.c: replace g_list_remove_link with
16516 g_list_delete. The remove one does not free the GList, so we were
16517 leaking memory. On -O=all --compile-all with corlib, this cut down
16518 3 MB of allocations.
16520 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
16522 * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
16524 * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
16526 * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
16527 into a new function mono_create_jit_trampoline ().
16529 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
16531 * trace.c (get_spec): Allow tracing of classes without a namespace.
16533 2004-11-02 Sebastien Pouliot <sebastien@ximian.com>
16535 * mini.c: Fix pointer overwrite in mini_method_compile.
16537 2004-11-2 Geoff Norton <gnorton@customerdna.com>
16539 * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
16540 The darwin ABI needs some special handling for 1 and 2 byte structs
16541 Lets use lbz/lhz instead of lwz everywhere.
16542 * mini-ppc.c (calculate_sizes): The Darwin ABI needs from special handling
16543 for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
16544 Use stb/sth for the former, and put the latter always on stack instead of in
16545 argument registers.
16547 2004-10-30 Zoltan Varga <vargaz@freemail.hu>
16549 * trace.c (is_filenamechar): Add '_'.
16551 2004-10-29 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16553 * mini-s390.c: Fix prolog length to allow for large trace requirements.
16555 * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
16557 2004-10-29 Zoltan Varga <vargaz@freemail.hu>
16559 * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
16560 depends on libmonogc. Fixes #68805.
16562 2004-10-26 Miguel de Icaza <miguel@ximian.com>
16564 * mini.c (mono_jit_free_method): Provide extra information for
16565 this error. Currently this leaks, but will be turned into a
16566 developer option in the future.
16568 2004-10-26 Zoltan Varga <vargaz@freemail.hu>
16570 * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
16572 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
16574 * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte
16575 boundary. Fixes reading of PATCH_INFO_R4 and R8.
16576 (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
16578 2004-10-24 Zoltan Varga <vargaz@freemail.hu>
16580 * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
16581 trampolines for AOT code.
16583 2004-10-22 <vargaz@freemail.hu>
16585 * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
16586 constructed types. Fixes #68136.
16588 2004-10-21 Martin Baulig <martin@ximian.com>
16590 * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
16591 if it returns true, unwind the stack to the call instruction.
16593 2004-10-21 <vargaz@freemail.hu>
16595 * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
16597 * mini.h: Bump AOT version number.
16599 * objects.cs: Add another test for unbox trampolines.
16601 * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for
16604 2004-10-20 <vargaz@freemail.hu>
16606 * driver.c: Add SHARED to the set of optimizations tested.
16608 * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
16610 * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
16611 used by CEE_NEWARR.
16613 * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
16615 2004-10-20 Martin Baulig <martin@ximian.com>
16617 * mini-exceptions.c (mono_handle_exception): Call
16618 mono_debugger_handle_exception() to tell the debugger about
16619 catch/finally clauses.
16621 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
16623 * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
16625 * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
16628 2004-10-15 Geoff Norton <gnorton@customerdna.com>
16630 * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
16631 methods as their native size, fixed bug #57543, #57545.
16632 * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
16633 This saves a temporary register and mullw call down into 1 (minor perf
16634 increase for cases like sum = sum * 5; This use to translate into:
16637 It now translates to
16640 2004-10-15 Zoltan Varga <vargaz@freemail.hu>
16642 * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
16645 2004-10-11 Martin Baulig <martin@ximian.com>
16647 * mini.c (mono_method_to_ir): If we're a generic method, get the
16648 MonoGenericContainer from our MonoMethodNormal and create a
16649 MonoGenericContext from it.
16651 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
16653 * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
16655 * basic-long.cs: Add test for checked i8->i2 cast.
16657 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16659 * inssel-ppc.brg: added a couple of speedup rules.
16661 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
16663 * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
16664 to speed up rebuilds.
16666 2004-10-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16668 * mini-s390.c: Minor fix to OP_OR_IMM.
16670 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
16672 * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
16673 better. Fixes appdomain-unload.exe on sparc.
16675 2004-10-02 Massimiliano Mantione <massi@ximian.com>
16677 * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
16678 simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
16681 2004-10-02 Zoltan Varga <vargaz@freemail.hu>
16683 * jit-icalls.c: Handle a nonexisting trunc function more correctly.
16685 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
16687 * mini.c: Always generate a field read/write wrapper for members
16688 of the class MarshalByRefObject since the actual instance could
16691 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
16693 * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
16695 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
16697 * driver.c mini.h trace.c: Move the setting of the main assembly into
16698 a separate function called mono_trace_set_assembly () and call it after
16699 actually loading the main assembly. Fixes #66872.
16701 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
16703 * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
16704 using the code manager.
16706 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
16708 * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
16710 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
16712 * cpu-amd64.md: Fix bug in previous patch.
16714 * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
16717 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
16719 * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
16720 mini-exceptions.c: updates for changed stack walk interface.
16722 2004-09-21 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16724 * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
16726 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
16728 * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
16730 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
16732 * driver.c (mini_regression_list): Do not call mono_assembly_close
16733 since assemblies can't be unloaded.
16735 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
16737 * cpu-amd64.md: Fix more instruction lengths.
16739 * cpu-amd64.md: Fix lengths of some instructions.
16741 2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
16743 * inssel.brg: Make the array ldelema check aot friendly.
16745 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
16747 * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
16749 * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
16751 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
16753 * mini-x86.c: Fix build.
16755 * mini-sparc.c mini-x86.c mini-amd64.c: Use the new
16756 mono_type_get_underlying_type () helper function to simplify code.
16758 2004-09-09 Martin Baulig <martin@ximian.com>
16760 * mini-amd64.c: Don't access `type->data.klass' directly, call
16761 mono_class_from_mono_type() instead since the type may be a
16764 2004-09-09 Martin Baulig <martin@ximian.com>
16766 * mini-amd64.c (get_call_info): Fix support for generic instances.
16767 (add_valuetype): Use mono_class_from_mono_type() to get the class
16768 since we can be a generic instance.
16770 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
16772 * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
16774 2004-09-07 Ben Maurer <bmaurer@users.sourceforge.net>
16776 * liveness.c: reset spill costs on each scan: bug 62107
16778 2004-09-07 Bernie Solomon <bernard@ugsolutions.com>
16780 * exceptions-sparc.c (mono_arch_find_jit_info): remove
16781 unnecessary line that doesn't compile
16783 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
16785 * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
16786 trampolines, make them call an error function so people can fix their
16789 2004-09-06 Martin Baulig <martin@ximian.com>
16791 * mini.c (mono_method_to_ir): When initializing locals, handle a
16792 generic instances like a valuetype if it's a valuetype and like a
16793 class if it's a class.
16795 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
16797 * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
16798 stack. Fixes #64674.
16800 * exceptions.cs: Add test for unwinding of call arguments.
16802 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
16804 * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
16805 OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
16806 set the carry/borrow flag). The sparc and s390 implementations
16807 can now use optimized versions (and simplify the code). ppc bugfixes.
16809 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
16811 * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
16813 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
16815 * inssel-amd64.brg: Remove leftover 32 bit rule.
16817 * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
16819 2004-09-04 Zoltan Varga <vargaz@freemail.hu>
16821 * mini-exceptions.c (mono_find_jit_info): Refactor common code from
16822 mono_arch_find_jit_info functions into a new function. Fix a memory
16825 * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
16828 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
16830 * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
16833 * exceptions.cs: Add array size tests.
16835 * mini.c: Allocate a separate icall wrapper for each arity of
16836 mono_array_new_va. Fixes #59509.
16838 * exceptions.cs: Add testcase for 64578.
16840 * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
16842 * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
16844 2004-09-02 Martin Baulig <martin@ximian.com>
16846 * mini.c (mono_method_to_ir): When initializing the locals, call
16847 handle_initobj() on the generic instance itself, not its
16850 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
16852 * mini.h (MonoJitDynamicMethodInfo): New structure, extension of
16853 MonoJitInfo for dynamic methods.
16855 * mini.c: Rename trampoline_hash_mutex to jit_mutex.
16857 * mini.c: Add support for freeing JIT data for dynamic methods.
16859 2004-09-01 Martin Baulig <martin@ximian.com>
16861 * mini-x86.c (is_regsize_var): Added support for generic
16863 (mono_arch_emit_prolog): Make this compile again, use
16864 `x86_push_imm_template (code)'.
16866 2004-08-30 Ben Maurer <bmaurer@users.sourceforge.net>
16868 * mini-x86.c: make all push_imm instructions that get
16869 patched always emit the long form
16871 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
16873 * mini.c (mono_create_jump_trampoline): Store the jump trampolines
16874 in a per-domain hash.
16876 * mini-amd64.c (merge_argument_class_from_type): Handle generic
16879 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
16881 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
16884 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
16887 * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
16888 Beginnings of SSE2 support.
16890 * exceptions.cs: Add more tests for checked int<->uint casts.
16892 2004-08-28 Martin Baulig <martin@ximian.com>
16894 * mini-x86.c (mono_arch_instrument_epilog): Added support for
16898 (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
16899 Handle generic instances recursively.
16901 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
16903 * iltests.il: test for conv.u8 on a constant
16905 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
16907 * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
16908 LCONV_x4 (shrun_32 (membase)).
16910 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
16912 * inssel-x86.brg: c&p rules for push/setret of long
16914 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
16916 * inssel-x86.brg: c&p rules for compare (base, regvar) and
16917 compare (regvar, base)
16919 * inssel-x86.brg: more burg love
16921 * inssel.brg: more cleanup
16923 * inssel-x86.brg, inssel-long32.brg: burg cleanup.
16925 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
16927 * basic-long.cs, basic-calls.cs: new tests for optimization.
16929 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
16931 * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
16934 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
16936 * mini-amd64.c (read_tls_offset_from_method): Add another case.
16938 2004-08-25 Bernie Solomon <bernard@ugsolutions.com>
16940 * inssel.brg (mini_emit_memcpy): use
16941 NO_UNALIGNED_ACCESS to disable memcpy optimization
16943 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
16945 * mini-amd64.c: Handle generic types in various places.
16947 * mini.c (mono_method_to_ir): Handle generic types in init locals.
16949 2004-08-24 Zoltan Varga <vargaz@freemail.hu>
16951 * mini.c (handle_box): Fix warning.
16953 * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
16955 * mini-amd64.h: Enable the emit_state optimization.
16957 * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
16959 * mini-amd64.c: Add some new 64 bit peephole opts.
16961 * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
16963 * cpu-amd64.md: sreg1 of div instructions must be %rax.
16965 * mini-amd64.c: Register allocator fixes.
16967 * mini.c: Add an optimization to emit_state to avoid allocation of new
16968 registers on some platforms.
16970 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
16972 * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
16974 * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
16975 allocation. Fixes #63085.
16977 * basic-long.cs: Add new regression test.
16979 * mini-amd64.c: Register allocator improvements.
16981 2004-08-21 Zoltan Varga <vargaz@freemail.hu>
16983 * mini-amd64.c (read_tls_offset_from_method): Add another code
16986 * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
16987 instruction sequence for nullifying class init trampolines.
16989 * objects.cs: Add new regalloc test.
16991 * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
16993 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
16995 * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
16997 * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
17000 * driver.c: Fix profiling after TLS changes.
17002 * driver.c (mono_main): Set mono_stats.enabled if needed.
17004 * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
17007 2004-08-20 Ben Maurer <bmaurer@users.sourceforge.net>
17009 * mini-x86.c: use a 1 op rather than a 2 op tls access
17010 instruction -> faster.
17012 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
17014 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
17017 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
17019 * exceptions-sparc.c (throw_exception): fix typo
17021 2004-08-19 Ben Maurer <bmaurer@users.sourceforge.net>
17023 * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
17024 set tree->dreg correctly with tls. Allow any
17025 register to be used.
17027 * mini-x86.c (read_tls_offset_from_method): add new code
17028 generation pattern seen with GCC.
17031 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
17033 * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
17034 exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
17035 exceptions-sparc.c: fix some performance issues in exception
17036 handling and setting of the stack trace for exceptions that were
17039 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
17041 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
17044 * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible
17047 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
17049 This patch inlines tls access, when possible.
17051 * mini.h: new arch functions for TLS intrinsics.
17052 All platforms updated with a stub.
17054 * mini.c: use the new intrinsics
17056 * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
17057 arch specific intrinsic for tls variables
17059 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
17061 * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
17064 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
17066 * mini.c: thread local allocation
17068 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
17070 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
17072 * Makefile.am: Link against the static version of libmonogc.
17074 * Makefile.am: Link the static versions of the convenience libraries
17075 into the mono executable.
17077 * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
17079 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
17081 * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
17082 on integer overflow.
17084 * mini-amd64.c: Reorganize function call code.
17086 * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
17088 2004-08-14 Ben Maurer <bmaurer@ximian.com>
17090 * inssel-x86.brg: use xor eax,eax.
17092 * basic.cs: new tests
17094 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
17096 * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
17097 in exception throwing code.
17099 2004-08-14 Ben Maurer <bmaurer@ximian.com>
17101 * inssel-x86.brg: use xor esi,esi.
17103 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
17105 * driver.c (mono_main): Call mono_trace_parse_options earlier so it
17106 can trace methods compiled during mini_init () too.
17108 * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle
17111 2004-08-14 Ben Maurer <bmaurer@ximian.com>
17113 * Makefile.am: static link on x86 (r=zoltan)
17115 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
17117 * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
17118 code since it causes some programs to fail.
17120 2004-08-12 Zoltan Varga <vargaz@freemail.hu>
17122 * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
17124 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
17126 * mini.c: ovfops_op_map - add STACK_OBJ case for
17128 * basic.cs: add test_0_pin_string as test
17131 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
17133 * Makefile.am: build C# if srcdir != builddir
17135 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
17137 * dominators.c, mini.h, mini-x86.c: fix loop alignment with
17138 fall-through blocks.
17140 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
17142 * driver.c: enable loop by default again and include abcrem in -O=all.
17144 2004-08-08 Zoltan Varga <vargaz@freemail.hu>
17146 * iltests.il: Add some localloc tests.
17148 * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
17150 * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly.
17153 * inssel-amd64.brg: Add some optimizations.
17155 * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
17158 * Makefile.am: Statically link mono against libmono on AMD64.
17160 * mini-amd64.c inssel-amd64.brg: Optimizations.
17162 2004-08-07 Zoltan Varga <vargaz@freemail.hu>
17164 * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
17166 * tramp-amd64.c: Patch calling code in trampolines.
17168 2004-08-06 Zoltan Varga <vargaz@freemail.hu>
17170 * mini-amd64.c: pinvoke struct passing fixes.
17172 2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
17174 * mini-sparc.c: redo change, make mono_arch_cpu_init call
17175 mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
17177 2004-08-05 Duncan Mak <duncan@ximian.com>
17179 * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
17182 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
17184 * mini-amd64.c (emit_move_return_value): Move return value for normal
17187 2004-08-05 Martin Baulig <martin@ximian.com>
17189 * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
17190 `type->type'; just modify `type' itself when dealing with enums
17191 and generic instances.
17192 (check_call_signature): Make `simple_type' a `MonoType *'.
17194 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
17196 * mini.c: Use OP_PADD to add offsets to addresses.
17198 * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
17200 2004-08-04 Bernie Solomon <bernard@ugsolutions.com>
17202 * mini-sparc.c (mono_arch_emit_epilog): fix check
17203 for folding last op into restore instruction
17205 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
17207 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
17208 helper methods using the code manager.
17210 * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
17212 * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
17214 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17216 * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
17217 cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
17219 * mini-s390.c: fix tail processing
17221 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
17223 * mini-ppc.c: mul.ovf.un exception name fix.
17225 2004-08-03 Martin Baulig <martin@ximian.com>
17227 * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
17228 instances; before jumping to `handle_enum', also modify `ptype'.
17230 2004-08-02 Bernie Solomon <bernard@ugsolutions.com>
17232 * cpu-sparc.md: fcall maximal length too small.
17234 2004-08-02 Zoltan Varga <vargaz@freemail.hu>
17236 * mini-amd64.c mini.h: Add initial support for passing/returning
17237 structures to/from pinvoked methods.
17239 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
17241 * mini-ppc.c: reg allocator fix.
17243 2004-07-31 Zoltan Varga <vargaz@freemail.hu>
17245 * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
17247 * inssel.brg: Optimize memset on 64 bit machines.
17249 * mini-amd64.c: Fix some vararg cases.
17251 2004-07-30 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17253 * mini-s390.c: Corrected macro in emit_float_to_int
17255 * s390-abi.cs: Tests to exercise the s390 ABI
17257 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
17259 * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
17262 * basic.cs: Add a test for add.ovf.un.
17264 2004-07-30 Bernie Solomon <bernard@ugsolutions.com>
17266 * mini-sparc.c: add case for OP_IDIV_UN
17268 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
17270 * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
17272 * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
17274 2004-07-30 Ben Maurer <bmaurer@ximian.com>
17276 * basic.cs: regression tests.
17278 * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
17281 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
17283 * basic.cs: Add a new test.
17285 * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling
17286 and AOT. Various fixes and optimizations.
17288 * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
17290 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
17292 * mini-ppc.c: make sure temp regs are not used for global reg
17295 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
17297 * cpu-sparc.md: conv_i8 fix for 64bits
17299 * mini-sparc.c: add cases for OP_IXXX codes for 64bits
17301 2004-07-29 Ben Maurer <bmaurer@ximian.com>
17303 * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
17304 add opcode for cmp BYTE PTR [eax], imm.
17306 * inssel.brg: Make memcpy and memset takes bases.
17308 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
17310 * *-amd64.*: More AMD64 work.
17312 2004-07-28 Ben Maurer <bmaurer@ximian.com>
17314 * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
17315 add a compare-not-equal opcode.
17317 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
17319 * mini.c: Use mono_init_from_assembly instead of mono_init.
17321 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
17323 * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
17325 * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
17327 * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
17329 * inssel.brg: 64 bit fixes.
17331 * mini.h (MonoCallInst): Add some AMD64 specific data.
17333 * mini.h: Add some OP_P opcodes.
17335 2004-07-28 Ben Maurer <bmaurer@ximian.com>
17337 * basic.cs: tests for 61797 and 61740
17339 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
17341 * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
17342 numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
17344 2004-07-24 Zoltan Varga <vargaz@freemail.hu>
17346 * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
17348 * *-amd64*.*: Ongoing AMD64 work.
17350 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
17352 * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
17354 * *-amd64*: Ongoing AMD64 work.
17356 * mini-arch.h: Add AMD64 support.
17358 * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
17360 * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
17362 * mini-ops.h: Add new opcodes.
17364 * Makefile.am: Add AMD64 support.
17366 * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
17367 rules into the inssel-long*.brg files.
17369 * *-amd64.*: Add beginnings of AMD64 backend.
17371 2004-07-22 Ben Maurer <bmaurer@ximian.com>
17373 * mini.c (print_dfn): commenting out the code that prints
17374 the cil. With -O=deadce, this makes -v -v crash.
17376 * cpu-pentium.md: make checkthis have a length of 2
17378 2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
17380 * mini-sparc.h: fix implementations of __builtin
17381 functions for Sun compiler for V9.
17383 2004-07-16 Ben Maurer <bmaurer@ximain.com>
17385 * mini.c: use the new stelem.ref wrapper
17386 * exceptions.cs, arrays.cs: new stelem.ref tests
17388 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
17390 * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
17391 new XSP should work with these changes).
17393 2004-07-14 Ben Maurer <bmaurer@ximain.com>
17395 * inssel-{long32,x86,}.brg: trivial optimizations.
17397 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
17399 * mini.c: load value when emitting box operation in
17402 2004-07-12 Ben Maurer <bmaurer@ximian.com>
17404 * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
17405 is one byte shorter than cmp DWORD PTR [eax], 0.
17407 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
17409 * inssel-ppc.brg: arguments on the stack are always
17410 relative to the stack pointer (spotted by Neale Ferguson).
17412 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17414 * exceptions-x86.c: delay appending the method name to the trace until
17415 after mono_jit_info_table_find is called, as this gets the real
17418 2004-07-09 Ben Maurer <bmaurer@ximian.com>
17420 * aot.c: register roots
17422 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
17424 * aot.c : I could just use PLATFORM_WIN32 flag.
17426 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
17428 * aot.c : Reverting the previous fix. This time it broke linux build.
17430 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
17432 * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
17434 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
17436 * mini.c (handle_stack_args): Remove some more debugging code.
17438 * mini.c (handle_stack_args): Remove debug output left in by mistake.
17440 * driver.c mini.h aot.c: Allow additional options to be specified with
17441 --aot and pass them to mono_compile_assembly.
17443 * aot.c: Add experimental code to AOT compile all loaded assemblies
17444 on demand and save the code into a cache in the filesystem.
17446 * aot.c: Add support for more wrapper methods.
17448 * mini.c (handle_stack_args): Handle some corner cases. Fixes
17451 * cpu-*.md: Remove removed opcodes.
17453 * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
17454 CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
17455 related icalls to marshal.c.
17457 2004-07-06 Zoltan Varga <vargaz@freemail.hu>
17459 * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
17461 * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
17463 * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
17465 2004-07-06 Ben Maurer <bmaurer@ximian.com>
17466 * liveness.c: If liveness is recomputated we need to reset the information
17467 for each variable. This way, if the liveness range has been narrowed
17468 by optimizations that happened after the last computation, we can return
17471 For example, if you have
17476 // Tons of code that does not affect i
17482 i = 0 is dead code and will be removed by SSA. However, when
17483 linear scan gets to the code, i will still appear to be live
17484 throughout the entire block. This prevents good register allocation.
17486 2004-07-06 Martin Baulig <martin@ximian.com>
17488 * debug-mini.c (mono_debug_init_method): Allow
17489 MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
17490 (mono_debug_add_icall_wrapper): New method.
17492 * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
17494 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
17496 * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
17499 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
17501 * aot.c (mono_aot_load_method): Fix loading of debug info.
17503 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
17505 * aot.c: Add logging support.
17507 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
17509 * mini.h: Add prototype for mono_print_method_from_ip.
17511 * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
17513 * inssel.brg: 64 bit fixes.
17515 * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to
17518 * Makefile.am: Add SPARC64 support.
17520 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
17522 * aot.c: Fix alignment problems on 32 bit platforms.
17524 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
17526 * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
17529 * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
17532 * mini.h: Bump AOT file version. Some 64 bit fixes.
17534 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
17536 * inssel-sparc.brg: Add new rule to avoid register moves.
17538 * inssel.brg: Add ldind_to_load_membase helper function.
17540 2004-06-30 Ben Maurer <bmaurer@ximian.com>
17542 * mini.c: OffsetToStringData intrinsic.
17544 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
17546 * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
17548 * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
17551 * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
17552 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
17554 * mini.c: reinstated mono_compile_get_interface_var()
17555 on x86, too, since the change breaks the Gtk# build there as well.
17557 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17559 * driver.c: remove loop from the default optimizations: it seems to
17560 interact badly with some of the other options (see bug #60613).
17562 2004-06-25 Zoltan Varga <vargaz@freemail.hu>
17564 * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
17565 (fld@informatik.uni-bremen.de): Add Solaris x86 support.
17567 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
17569 * mini-ppc.c, cpu-g4.md: small updates to be able to compile
17570 vararg-using methods.
17572 2004-06-21 Martin Baulig <martin@ximian.com>
17574 * mini/mini-exceptions.c
17575 (mono_handle_exception): Added `gpointer original_ip' argument.
17576 After calling mono_unhandled_exception(), call
17577 mono_debugger_unhandled_exception() and if that returns true,
17578 restore the context and return.
17580 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
17582 * mini-ppc.c: prefer the use of relative branches so
17583 they won't need to be patched in aot code (patch from Patrick Beard).
17585 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
17587 * aot.c: patch from Patrick Beard to make the output assembly
17588 more correct for the MacOSX assembler. Small tweak to
17589 generate sane images on Linux/PPC, too.
17591 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17593 * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
17594 case until bug #59509 is fixed (shows up in #60332).
17596 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
17598 * mini.c: make sure the needed wrappers are compiled, too, with
17601 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
17603 * driver.c: remove NPTL reference in --version output.
17605 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17607 * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
17608 generate valid assembly for the Mach-O assembler.
17610 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
17612 * driver.c: don't include abcrem in the all optimization specifier
17613 since it slows down jit compilation too much for now.
17615 2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
17617 * mini.c: use BIGMUL only if both operands have the same signage.
17618 * iltests.il: Test for bug 60056. (errors related to signage in
17623 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
17625 * mini.c, aot.c: memory leak fixes.
17627 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
17629 * inssel-long32.brg: implemented a few missing ulong cast opcodes.
17631 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
17633 * Makefile.am: remove the -static hack completely, it links in
17634 statically glib as well.
17636 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
17638 * iltests.il, mini.c: fixed bug#59580 in branch optimization.
17639 * exceptions.cs: make it compile with new mcs/csc.
17641 2004-06-03 Massimiliano Mantione <massi@ximian.com>
17642 * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
17643 and added relevant test case.
17645 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
17647 * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
17648 regressions in gtk-sharp.
17650 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
17652 * exceptions.cs: New regression tests.
17654 * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
17656 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
17658 * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
17660 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
17662 * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
17664 * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
17666 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
17668 * mini.c (mono_jit_runtime_invoke): Init class in this
17669 method instead of trusting mono_jit_compile_method to
17670 do the work (because wrappers can be in object class)
17672 2004-05-27 Zoltan Varga <vargaz@freemail.hu>
17674 * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
17676 * basic-long.cs: New regression test.
17678 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
17680 * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
17681 and div/rem checks.
17683 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
17685 * Makefile.am: fix miguel's change to build mono statically against
17686 libmono (track build dependencies).
17688 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
17690 * cfold.c: Some glib versions do not have G_MININT32.
17692 2004-05-26 Massimiliano Mantione <massi@ximian.com>
17694 * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
17695 with precision of tan, atan, sin and cos, and implemented related
17696 regressions tests (fixes bug 54467, but one new problem appeared and
17699 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
17701 * cfold.c (FOLD_BINOPZ): Avoid division by zero.
17703 * exceptions.cs: Add test for constant folding && division by zero.
17705 * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
17706 since driver.c is in libmono too, so the optimization was useless.
17708 * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
17709 variable to driver.c so the compiler can emit more efficient code to
17712 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17714 * Makefile.am: don't distribute generated inssel.[ch] files.
17716 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
17718 * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
17719 into the default appdomain. Fixes #58707.
17721 * jit-icalls.c: Remove the broken approximation for truncl, doing
17722 no conversion is better.
17724 * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
17727 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
17729 * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
17730 of the mcrxr instruction which is not available on some processors
17731 even if it's documented to be. Implement add and sub overflow correctly
17732 (still not complete for long unsigned). Speed up icalls a bit.
17734 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
17736 * mini.c (mono_jit_compile_method_with_opt): Make sure that
17737 we run .cctor in the current domain instead of target_domain.
17739 Fixes bug #58558, .cctor not being called in -O=shared.
17741 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
17743 * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
17745 2004-05-24 Ben Maurer <bmaurer@users.sourceforge.net>
17747 * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
17748 which can be done with an imm8, do it that way.
17749 (mono_arch_output_basic_block): ditto for a jmp
17750 (mono_arch_emit_prolog): Computate maximum offset of a label.
17752 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
17754 * mini-x86.c (mono_arch_local_regalloc): the reg allocator
17755 now tries to allocate prefered physical reg's for virtual
17756 regs. This reduces the number of emited spills/loads with
17757 20-30% on our core assemblies.
17759 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
17761 * jit-icalls.c: truncl() is not needed and trunc() is
17762 the correct thing to do anyway (bug #58287).
17764 2004-05-24 Zoltan Varga <vargaz@freemail.hu>
17766 * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
17769 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
17771 * driver.c: enable loop optimizations by default.
17773 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
17775 * mini-x86.c: fix calc of max loop size when aligning loops start.
17777 2004-05-23 Zoltan Varga <vargaz@freemail.hu>
17779 * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
17782 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
17784 * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
17787 * basic-long.cs: Add tests for add/subtract of immediates with carry.
17789 * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
17791 * mini.c (inline_method): Allways inline some wrappers even if the cost
17792 is too large. Fixes #58785.
17794 * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
17796 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
17798 * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
17799 (crichton@gimp.org). Beginning of support for sparc/linux.
17801 * mini-sparc.c: Optimize retrieval of LMF address.
17803 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
17805 * exceptions-ppc.c: handle alloca in methods with clauses.
17807 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
17809 * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
17811 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
17813 * mini.c: Delegate most of the abort signal work to
17814 mono_thread_request_interruption, which also handles Stop and Suspend
17817 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
17819 * mini.c mini.h: Allow inlining of icall wrappers if the backend
17820 supports the save/restore lmf opcodes.
17822 2004-05-19 Zoltan Varga <vargaz@freemail.hu>
17824 * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
17825 by gcc-3.4 as well.
17827 * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
17829 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
17831 * mini.h mini.c (mini_method_compile): Only run abc removal pass on
17832 methods which contain array accesses.
17834 * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
17835 boundaries. Fixes #58537.
17837 * iltests.il: Add regression test for #58537.
17839 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
17841 * mini-x86.c (mono_arch_local_regalloc): Last part of
17842 fix for bug #58633 (releasing register to early).
17844 2004-05-18 Miguel de Icaza <miguel@ximian.com>
17846 * basic-long.cs: Add new regression test.
17848 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
17850 * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
17851 register too early on the chain.
17853 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
17855 * mini.c (create_helper_signature): Use a helper function to reduce
17856 the code which needs to be written. Also set the calling convention of
17857 icalls on windows. Fixes #57840.
17859 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
17861 * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
17862 exceptions-ppc.c: added helper function to get the instruction address
17863 from a signal handler context.
17865 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
17867 * helpers.c: use g_get_tmp_dir. Invokes happyness
17870 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
17872 * helpers.c: Add new env variable to pass args to objdump.
17873 Specifically for those of us who love -Mintel. r=miguel, gonzalo.
17875 2004-05-17 Radek Doulik <rodo@ximian.com>
17877 * Makefile.am (common_sources): added abcremoval.h so it get
17878 disted and daily mono packages on go-mono.com will build again
17880 2004-05-17 Massimiliano Mantione <massi@ximian.com>
17882 * abcremoval.c: Fixed coding style, added copyright header.
17884 * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
17886 * mini.h: Added prototype for abc removal main function.
17888 * build_relations_propagation_table.pl: Added copyright header.
17890 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
17892 * basic-long.cs: reg test for complex ceq_long bug.
17894 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
17896 * mini-x86.c (mono_arch_local_regalloc): Correctly free
17897 reg in long and clob case (bug #58343). Fixed/added comments.
17899 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
17901 * mini.c (mono_jit_runtime_invoke): Follow new convention
17902 of calling the invoke method with an function pointer.
17904 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
17906 * ChangeLog: Fix author of memory leak patch.
17908 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
17910 * Makefile.am: fix make dist as well...
17913 2004-05-14 Massimiliano Mantione <massi@ximian.com>
17915 * cfold.c: Made so that conversions from pointer to int4 are no-ops
17916 on archs where pointers are 4 bytes long.
17918 * Makefile.am: Added abcremoval.c source file.
17920 * abcremoval.c: Added abcremoval.c.
17922 * abcremoval.h: Added abcremoval.h.
17924 * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
17926 * inssel.brg: Enabled bounds check removal.
17928 * mini.c: Added support for abcrem optimization.
17930 * mini.h: Added abcrem optimization label.
17932 * driver.c: Added support for abcrem optimization.
17934 * propagated_relations_table.def: Added propagated_relations_table.def.
17936 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
17938 * mini.c, cfold.c: fix style.
17940 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
17942 * mini.c: handle issue with the low-level implementation of
17943 some long opcodes (bug #54209).
17945 2004-05-13 Ben Maurer <bmaurer@users.sourceforge.net>
17947 * basic.cs: test for my new cmov stuff.
17949 2004-05-13 Patrik Torstensson
17951 * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
17952 opt and added peephole documentation.
17954 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
17956 * tramp-ppc.c: rewrote the generic trampoline code.
17958 2004-05-11 Patrik Torstensson
17960 * mini-x86.c: optimize long shl/shr asm code (one less branch)
17962 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
17964 * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
17966 * mini.h mini.c dominators.c: Applied patch from Derek Woo
17967 (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
17969 * mini.c: Add new icalls for AsAny marshalling.
17971 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
17973 * tramp-ppc.c, mini-ppc.c: more cleanups.
17975 2004-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17977 * mini.c: no warnings.
17979 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17981 * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
17983 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
17985 * mini.c: In the thread abort signal handler, if the thread is in the
17986 process of being stoped, don't throw the Abort exception, just stop the
17989 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
17991 * tramp-ppc.c: removed old code.
17993 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17995 * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
17996 do some simple speed optimizations on ppc.
17998 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
18000 * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
18001 and large offsets in load/store.
18003 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
18005 * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
18006 it causes regressions.
18008 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
18010 * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
18013 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
18015 * jit-icalls.c: remove warnings.
18016 * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
18017 speedups for unsafe code.
18019 2004-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
18021 * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
18023 2004-05-06 Zoltan Varga <vargaz@freemail.hu>
18025 * basic-calls.cs: Add new regression test.
18027 * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
18030 * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
18032 * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
18035 2004-05-06 Patrik Torstensson
18037 * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
18038 long reg allocation in any reg (not only eax:edx) and implemented
18039 long shl/shr ops in asm instead of helpers.
18041 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
18043 * mini-sparc.h: Fix warnings.
18045 * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
18048 * mini-exceptions.c (mono_handle_exception): Call the filter in a
18049 separate statement for clarity.
18051 * mini-sparc.c: Update status.
18053 2004-05-04 Zoltan Varga <vargaz@freemail.hu>
18055 * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
18058 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
18060 * inssel-ppc.brg: another small pre-release workaround:
18061 we don't do overflow detection for long_sub_un.
18063 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
18065 * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
18066 (also works around a weird ppc bug: 57957).
18068 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
18070 * tramp-ppc.c: trampoline fixes.
18072 Fri Apr 30 15:54:26 EDT 2004 Paolo Molaro <lupus@ximian.com>
18074 * mini-ppc.c: fixed typos.
18076 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
18078 * mini-ppc.c, exceptions-ppc.c: more code saves registers
18079 at the top of the stack. Fixed typos. Use a frame registers
18080 for all the methods with exception clauses.
18082 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
18084 * exceptions-ppc.c: restore fp registers.
18086 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
18088 * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
18089 order from the stack top (moved the stack room to save the
18090 return value for trace after the param area). Fixed corruption
18091 in restoring registers on unwind.
18093 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
18095 * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
18097 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
18099 * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
18100 and prolog/epilog for methods that use it. Allow
18101 enough param area room for varargs methods. Fix miguel's
18102 breakage in exception handling.
18104 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
18106 * Makefile.am: run genmdesc only on current arch.
18108 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18110 * exceptions-x86.c:
18111 * mini-x86.h: fix the build on windows.
18113 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
18115 * 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.
18117 * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
18119 * mini-exceptions.c: New file.
18121 * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
18122 Move some parts of the x86 exception handling code to an
18123 arch-independent file so it can be shared with other ports.
18125 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
18127 * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
18129 2004-04-26 David Waite <mass@akuma.org>
18131 * driver.c: remove comma from end of enumeration declaration
18133 2004-04-26 Jackson Harper <jackson@ximian.com>
18135 * driver.c: parse config file before loading first assembly. This
18136 allows the user gac to be enabled/disabled.
18138 2004-04-23 Miguel de Icaza <miguel@ximian.com>
18140 * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
18141 simpler mechanism: we do not care what is encoded initially
18142 (branch absolute or relative), we care about the code and its
18143 target. I kept the old code for reference for now.
18145 The new code tries first to determine if the jump is anywhere in
18146 the -/+32 absolute meg range, if it succeeds, it encodes using the
18147 absolute branch; If not, it tried to find something in the
18148 relative range, if not, it uses the handle_thunk code.
18150 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
18152 * exceptions-ppc.c: use the correct ip register on macosx.
18154 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
18156 * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
18158 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
18160 * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
18161 Raise exception on integer divide by zero by hand since the hw
18162 doesn't support it. Handle NaNs in FP compares.
18164 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
18166 * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
18167 code reducing duplication between the platforms and enabled
18168 signal exception handling (on linux for now).
18170 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
18172 * exceptions-ppc.c: more macosx support.
18174 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
18176 * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
18178 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
18180 * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
18182 2004-04-19 Ben Maurer <bmaurer@users.sourceforge.net>
18184 * iltests.il: more tests.
18186 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
18188 * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
18191 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
18193 * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
18195 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
18197 * liveness.c: Mark variables as volatile in all basic blocks reachable
18198 from exception clauses.
18200 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
18202 * exceptions.cs (test_0_rethow_stacktrace): Make this work with
18205 2004-04-18 Ben Maurer <bmaurer@users.sourceforge.net>
18207 * iltests.il, basic.cs: more tests for regalloc.
18209 2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
18211 * iltests.il: Some tests for register allocation modifications
18214 2004-04-16 Zoltan Varga <vargaz@freemail.hu>
18216 * exceptions.cs: Add regression test for bug #56782.
18218 * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
18219 original stack trace if an exception is rethrown. Fixes #56782. Oh,
18220 the beauty of fixing the same thing in 5 different files...
18222 2004-04-15 Zoltan Varga <vargaz@freemail.hu>
18224 * mini.c (mono_method_to_ir): Do not compute coverage for inlined
18227 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
18229 * mini.c: Add support for STRWLPARRAY marshalling convention.
18231 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
18233 * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
18234 to init the context to setup the regs pointer).
18236 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
18238 * exceptions-ppc.c: more exceptions work.
18240 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
18242 * mini.c: avoid reusing the same MonoInst on multiple trees: this is
18245 2004-04-13 Miguel de Icaza <miguel@ximian.com>
18247 * inssel-x86.brg (reg): Add new rules for add, sub and mul that
18248 can use the memory directly.
18250 * cpu-pentium.md: Update documentation from a post from Zoltan.
18252 add x86_add_membase, x86_sub_membase, x86_mul_membase
18254 2004-04-13 Miguel de Icaza <miguel@ximian.com>
18256 * mini-ppc.c: Remove unused definitions FLOAT_REGS and
18257 GENERAL_REGS they were also hardcoded for all PPC ports.
18259 (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
18261 Remove hard-coded limit for floating point registers, use
18262 PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
18264 Notice that in MacOS X calling conventions you can fit a lot more
18265 floating point values in registers, so I should update the PInvoke
18266 test to excercise the passing of floating point values on the
18267 stack (currently broken).
18269 2004-04-06 Miguel de Icaza <miguel@ximian.com>
18271 * tramp-ppc.c (create_trampoline_code): Added
18272 JUMP_TRAMPOLINE_SIZE.
18273 (ppc_magic_trampoline): Follow the pattern from
18274 x86_magic_trampoline: if code is set to zero, return.
18275 (create_trampoline_code): Always pass MonoMethod to the jump
18276 trampoline, before it was passing a null.
18277 (mono_arch_create_jump_trampoline): Implement the jump stub, could
18278 share the code with mono_arch_create_jit_trampoline.
18280 * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
18282 (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
18285 * cpu-g4.md: Added length for jmp instruction, the worst case
18286 scenario is 92 bytes (4 mandatory bytes, potential 19 registers
18289 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
18291 * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
18293 2004-04-07 Zoltan Varga <vargaz@freemail.hu>
18295 * mini.c: Only set bblock->real_offset when adding a new bblock, and
18296 before each IL instruction.
18298 * mini.c (CEE_BOX): Fix warnings.
18300 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18302 * mini.c: removed a few unused vars and extra whitespace.
18304 2004-04-05 Ben Maurer <bmaurer@users.sourceforge.net>
18306 * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
18308 (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
18310 (OP_GETCHR): use the above
18311 (CEE_LDELEMA): use the above.
18313 * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
18314 version of the generic impl.
18315 (MONO_EMIT_BOUNDS_CHECK_IMM): the same
18316 (CEE_LDELEMA): use the above.
18318 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
18320 * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
18323 * iltests.il: Added new regression test for #56317.
18325 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
18327 * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
18328 under NetBSD. Fixes #56450.
18330 * liveness.c (update_gen_kill_set): Fix previous patch.
18332 2004-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18334 * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
18336 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
18338 * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
18339 ldsfld and ldsflda.
18341 * inssel-sparc.brg: Add more optimizations.
18343 * mini-sparc.c: Replace multiply/divide with shifts if possible.
18345 2004-04-01 Martin Baulig <martin@ximian.com>
18347 * mini.c (handle_box): New static function; moved the
18348 implementation of CEE_BOX here.
18349 (mono_method_to_ir): Added `constrained_call' variable.
18350 (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
18351 (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
18352 mono_method_get_constrained() to get the method.
18354 2004-04-01 Martin Baulig <martin@ximian.com>
18356 * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
18357 (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
18358 (mono_method_to_ir): We don't need these macros anymore since
18359 mono_class_get_full() already takes care of it.
18361 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18363 * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
18364 use @function (as doesn't accept #function here) and check the return
18365 value of system and stop if fails.
18367 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18369 * mini.c: set the timeout to 2s when calling mono_domain_finalize.
18371 2004-03-31 Zoltan Varga <vargaz@freemail.hu>
18373 * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
18375 * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
18377 * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
18380 * basic-long.cs: Add test for negation of Int64.MinValue.
18382 2004-03-30 Zoltan Varga <vargaz@freemail.hu>
18384 * mini-sparc.c: Update status.
18386 * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
18388 * exceptions-sparc.c: Fix return value in filters.
18390 * inssel-sparc.brg: Fix register allocation in some rules.
18392 2004-03-28 Martin Baulig <martin@ximian.com>
18394 * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
18397 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
18399 * mini-x86.c (mono_arch_patch_code): Fix warnings.
18401 * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if
18402 dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
18403 remove unused conv_u4 opcode.
18405 * mini-x86.c: Remove valgrind workaround since it slows down things
18406 even when mono is not run under valgrind.
18408 2004-03-26 Zoltan Varga <vargaz@freemail.hu>
18410 * mini-sparc.c: Update status.
18412 * inssel-sparc.brg: Add some optimizations.
18414 * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
18415 future delay slot filling. Add support for varargs, tail calls and JMP.
18417 * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of
18418 CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
18420 * inssel.brg: Fix register allocation in OP_ARGLIST.
18422 * inssel.brg: Fix warnings.
18424 2004-03-25 Martin Baulig <martin@ximian.com>
18426 * mini.c (inflate_generic_field): Removed.
18427 (mini_get_method): Removed, use mono_get_method_full(),
18428 (mini_get_class): Removed, use mono_class_get_full().
18429 (mono_method_to_ir): Pass our generic context to
18430 mono_field_from_token().
18432 2004-03-25 Martin Baulig <martin@ximian.com>
18434 * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
18435 of a `MonoMethod *'.
18436 (mini_get_method): Take a `MonoGenericContext *' instead
18437 of a `MonoMethod *'.
18438 (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
18439 a new local variable called `generic_context' which holds the
18440 current `MonoGenericContext *'; use it to lookup things.
18442 2004-03-24 Martin Baulig <martin@ximian.com>
18444 * mini.c (mini_get_class): New static method; if we're inside a
18445 generic instance, inflate the class if neccessary.
18446 (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
18448 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
18450 * iltests.il: New regression test for #55976.
18452 * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
18455 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
18457 * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
18460 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
18462 * liveness.c: Consider SSA stores as well as loads when making vars
18465 * exceptions.cs: New regression tests for register allocation.
18467 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
18469 * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
18470 * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
18471 domain lock only to protect puntual access to data structures.
18472 Added access lock for sighash, jit_icall_hash_name,
18473 jit_icall_hash_addr and domain->code_mp.
18475 2004-03-20 Zoltan Varga <vargaz@freemail.hu>
18477 * driver.c: Print SIGSEGV handling method.
18479 * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
18481 * mini.c (setup_jit_tls_data): Handle case when this is called
18482 multiple times for a thread.
18484 * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx
18485 is different from fbxx_un. Fixes #54303. Also use constants instead of
18486 magic numbers in a lot of places.
18488 2004-03-19 Zoltan Varga <vargaz@freemail.hu>
18490 * exceptions.cs: Fix cctor test when --regression is used.
18492 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
18494 * mini-ppc.c, exceptions-ppc.c: basic exceptions support
18497 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
18499 * inssel-ppc.brg: fixed register assignments for some rules.
18501 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
18503 * exceptions.cs: Add test for exceptions in static constructors.
18505 * mini.c (mono_jit_compile_method_with_out): Move the calling of
18506 static constructors outside the domain lock. Fixes #55720.
18508 2004-03-17 Martin Baulig <martin@ximian.com>
18510 * mini.c (get_generic_field_inst): Removed, this'll never happen.
18511 (inflate_generic_field): Take the `MonoMethod *' instead of the
18512 `MonoClass *' and added support for generic method.
18513 (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
18514 have a `field->parent->gen_params', only inflate the field if it's
18515 an open constructed type.
18517 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
18519 * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
18520 exception object instead of the preconstructed ones.
18522 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18524 * mini.c: reverted changed to sigsegv_signal_handler commited
18525 accidentally in the previous patch.
18527 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18530 (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
18531 running --aot with an old assembly.
18533 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
18535 * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
18538 * mini-sparc.c: Add support for v9 branches with prediction.
18540 2004-03-15 Bernie Solomon <bernard@ugsolutions.com>
18542 * mini.c (mini_init): #warning is GNUC only
18544 * mini-sparc.h: implement __builtin_frame_address
18545 and __builtin_return_address for Sun C compiler
18547 2004-03-15 Zoltan Varga <vargaz@freemail.hu>
18549 * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
18551 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
18553 * basic-calls.cs: Add test for unaligned byref long argument passing.
18555 * mini-ops.h: Add sparcv9 compare and branch instructions.
18557 * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
18558 v9 instructions if we have a v9 cpu.
18560 * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
18561 registers for global allocation.
18563 * exceptions-sparc.c: Fixes.
18565 2004-03-11 Zoltan Varga <vargaz@freemail.hu>
18567 * liveness.c (mono_analyze_liveness): Optimized version.
18569 * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
18571 * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
18574 * basic-float.cs basic-calls.cs: New regression tests.
18576 2004-03-10 Zoltan Varga <vargaz@freemail.hu>
18578 * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
18579 sigaltstack implementation.
18581 * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
18583 * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
18584 stuff if SIGSEGV_ON_ALTSTACK is not defined.
18586 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
18588 * mini.c: Fix warnings.
18590 * mini.c (mono_resolve_patch_target): New function which contains the
18591 arch independent part of the patching process.
18593 * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
18594 patching code to a separate function.
18596 2004-03-09 Bernie Solomon <bernard@ugsolutions.com>
18598 * mini.c (add_signal_handler): ifdef out on Windows
18600 2004-03-08 Zoltan Varga <vargaz@freemail.hu>
18602 * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c
18603 cpu-sparc.md: Add exception handling support + other fixes.
18605 * driver.c: Print --help output to stdout. Fixes #55261. Also fix
18606 typed GC detection in --version.
18608 * basic.cs exceptions.cs: New regression tests.
18610 * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
18611 the arch specific code can store data during a compilation.
18613 * mini-ops.h: Add OP_SETFRET.
18615 * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
18616 function, register a separate icall for each arity, so the icalls can
18619 * mini.c (mono_print_tree): Print negative offsets in a more readable
18622 * mini.c: Make signal handling work on sparc.
18624 * mini.c (mini_init): Add emulation for lconv_to_r8_un.
18626 * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
18628 * jit-icalls.c: Emulate truncl by aintl on solaris.
18630 * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
18632 2004-03-05 Zoltan Varga <vargaz@freemail.hu>
18634 * mini.c (mini_init): fconv_to_ovf can raise exceptions.
18636 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
18638 * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
18639 a MarshalByRef type, inline a method that performs the check, taking into
18640 account that the object can be a proxy. Also implemented tow new opcodes:
18641 CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
18642 * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and
18643 OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
18645 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
18647 * mini-ppc.c: if a relative branch displacement is too big
18648 but it points to and area reachable with an absolute branch,
18651 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
18653 * mini.c: optimize small copies in cpblk.
18655 2004-03-01 Zoltan Varga <vargaz@freemail.hu>
18657 * basic-calls.cs basic-float.cs: New regression tests.
18659 * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at
18660 negative offsets from %fp. Implement localloc. Fix local register
18661 allocation. Fix the case when the this argument needs to be saved to
18662 the stack. Implement some missing opcodes.
18664 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
18666 * mini.c (mini_method_compile): Reenable global regalloc in methods
18667 with exception handlers.
18669 * linear-scan.c (mono_varlist_sort): Fix warning.
18671 * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
18673 * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
18676 * liveness.c: Make all variables uses in exception clauses volatile, to
18677 prevent them from being allocated to registers. Fixes #42136.
18679 2004-02-25 Zoltan Varga <vargaz@freemail.hu>
18681 * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
18682 causes regressions.
18684 * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
18685 argument to mono_arch_regalloc_cost.
18687 * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs
18690 2004-02-24 Zoltan Varga <vargaz@freemail.hu>
18692 * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c:
18693 Make the cost of allocating a variable to a register arch dependent.
18695 * basic-calls.cs: Fix compilation of tests.
18697 * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
18698 helper function to cut back on the number of #ifdefs needed.
18700 * mini-ppc.c: Fix compilation.
18702 * basic-calls.cs: New regression tests.
18704 * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
18706 * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
18707 of l0 since that is callee saved.
18709 * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
18712 * mini-sparc.c: Ongoing work + flag virtual calls with a special kind
18713 of delay instruction.
18715 * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
18717 * mini.h (MonoCallInst): Add 'virtual' flag.
18719 * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
18721 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
18723 * *.cs: New regression tests.
18725 * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc
18728 * mini.c (mono_runtime_install_handlers): Fix build.
18730 * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
18731 'signal_stack_size' members.
18733 * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an
18734 alternate signal stack.
18736 * exceptions-x86.c: Add stack overflow handling.
18738 * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing
18739 functions to arch independent code.
18741 * mini.c (mono_print_tree): Print more detailed info for load_membase
18744 2004-02-23 Martin Baulig <martin@ximian.com>
18746 * mini.c (mini_get_method): Set `gmethod->generic_inst'.
18748 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
18750 * mini-x86.c: fixed reg allocation for div/rem.
18752 2004-02-22 Miguel de Icaza <miguel@ximian.com>
18754 * driver.c (mono_main): Report some configuratio options on --version.
18756 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
18758 * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
18759 low in the address space. Correctly flush memory in thunks where we
18760 output native code.
18762 2004-02-20 Martin Baulig <martin@ximian.com>
18764 * mini.c (mini_get_method): New static method; inflate all generic
18765 methods and methods in open generic instances.
18766 (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
18767 (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
18769 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
18771 * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
18773 * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
18775 2004-02-19 Bernie Solomon <bernard@ugsolutions.com>
18777 * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
18779 * mini-sparc.c (flushi mono_arch_output_basic_block): make
18780 it compile using Sun's compiler.
18782 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
18784 * 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.
18786 * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
18788 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
18790 * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
18792 * mini-ppc.c: handle calls outside of the allowed range with thunks
18793 allocated using the code manager.
18794 * tramp-ppc.c: use the code manager to hold generated native code.
18795 Fixed the magic trampoline to just patch vtable entries.
18797 2004-02-17 Zoltan Varga <vargaz@freemail.hu>
18799 * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
18802 2004-02-16 Zoltan Varga <vargaz@freemail.hu>
18804 * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
18807 * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
18808 if we have a working __thread implementation.
18810 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove
18811 OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
18813 2004-02-15 Zoltan Varga <vargaz@freemail.hu>
18815 * mini-x86.c: Fix compilation under gcc 2.
18817 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
18819 * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
18820 contains a call to the wrapped function.
18822 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add
18823 OP_<CALL>_IMM opcodes, and use them under X86.
18825 * mini.c (mono_jit_find_compiled_method): Fix warning.
18827 * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
18829 * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
18831 * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
18832 functionality to mini.c.
18834 * mini.c (mono_create_jump_trampoline): New function to create a jump
18835 trampoline. Return a compiled method instead of a trampoline if it
18836 exists. Add a cache for jump trampolines.
18838 * mini.c (mono_jit_find_compiled_method): New function to return a
18839 compiled method if it exists.
18841 * mini-x86.c: Call mono_create_jump_trampoline instead of
18842 mono_arch_create_jit_trampoline.
18844 * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
18845 a jump trampoline. Fixes #52092.
18847 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
18849 * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
18850 which is not up-to-date. Add check_corlib_version () instead.
18852 * mini.c (mini_init): Call mono_thread_attach () so embedders do not
18855 * mini.c (mono_runtime_install_handlers): Remove check for valgrind
18856 since newer valgrind versions do not need it.
18858 * mini.c (mono_jit_compile_method_with_opt): New helper function to
18859 compile a method with a given set of optimizations.
18861 * mini.c: Compile icall wrappers on-demand instead of at startup.
18863 * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
18864 wrapper for an icall.
18866 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
18868 * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
18871 * iltests.il: Add test for non-empty stack before switch instruction.
18873 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
18875 * mini.c: Add support for new stringbuilder marshalling conventions.
18877 * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
18879 2004-02-01 Martin Baulig <martin@ximian.com>
18881 * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
18882 in `ginst->mtype_argv'.
18884 2004-01-31 Miguel de Icaza <miguel@ximian.com>
18886 * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
18887 facilitate grepping.
18889 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
18891 * mini.c: fixed buglet in initobj generic implementation for references.
18893 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
18895 * Makefile.am: make the version script conditional.
18896 * jit-icalls.c: handle missing truncl().
18898 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
18900 * exceptions.cs: Add more tests for double->int conversion.
18902 * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
18903 we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
18905 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
18907 * driver.c: make --verbose --version emit an error
18908 if the loaded corlib doesn't match the runtime version.
18910 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
18912 * mini-ppc.h: export ppc_patch().
18913 * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
18914 * tramp-ppc.c: call convention fixes: Linux/PPC support should be
18915 on par or better than on MacOSX.
18917 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
18919 * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
18920 mono_lookup_pinvoke_call.
18922 * mini-x86.c: Under windows, the default pinvoke calling convention is
18923 stdcall. Fixes #52834.
18925 * mini.c (optimize_branches): Add an upper bound to the number of
18926 iterations to prevent infinite loops on strange loops. Fixes #53003.
18928 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
18930 * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
18931 and ISINST. Fixes #52093.
18933 * objects.cs (test_0_vector_array_cast): New tests.
18935 2004-01-15 Zoltan Varga <vargaz@freemail.hu>
18937 * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
18938 checking in Array.Set ().
18940 * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
18943 * object.cs (test_0_multi_array_cast): New regression test.
18945 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
18947 * exceptions-ppc.c: fix build on Linux/PPC.
18949 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
18951 * tramp-x86.c (x86_magic_trampoline): Disable code patching when
18952 running under valgrind.
18953 (x86_magic_trampoline): Fix build bustage.
18955 * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
18956 negative values as well. This is needed for the encoding of the line number
18957 info, since sometimes the line numbers are not in increasing order.
18959 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
18961 * cpu-pentium.md (localloc): Increase the size of the localloc
18962 instruction since it is a loop under Win32.
18964 * debug-mini.c (record_line_number): Get rid of unneccesary memory
18967 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
18969 * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c
18970 tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from
18971 Max Horn (max@quendi.de). Fix file names in comments.
18973 2004-01-03 Zoltan Varga <vargaz@freemail.hu>
18975 * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
18976 avoid stack overflow.
18977 (replace_usage): Avoid uninitialized variable warnings.
18979 * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
18980 and taking the address of valuetype variables.
18982 2004-01-03 Patrik Torstensson
18984 * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
18985 for other purposes than FP later on.
18987 2004-01-02 Zoltan Varga <vargaz@freemail.hu>
18989 * mini.c (mono_method_to_ir): Prevent register allocation for arguments
18992 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
18994 * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
18996 2003-12-30 Patrik Torstensson <p@rxc.se>
18998 * mini-x86.h: Decreased number of availiable fp regs.
18999 Solves corner cases with FP spilling.
19001 2003-12-23 Patrik Torstensson <p@rxc.se>
19003 * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
19004 for floating point stack tracking / spilling on x86.
19007 * basic-float.cs: added float mul overflow test.
19009 2003-12-23 Zoltan Varga <vargaz@freemail.hu>
19011 * mini.c (mono_method_to_ir): Add workaround for bug #51126.
19013 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
19015 * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
19016 supports for cond branches that overflow the immediate
19017 overflow offset. mcs can compile simple programs.
19019 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
19021 * exceptions-ppc.c: exception handling support wip:
19022 finally handlers get run on exception.
19024 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
19026 * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while
19029 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
19031 * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
19032 initial support for stack walking and unwinding.
19034 2003-12-18 Zoltan Varga <vargaz@freemail.hu>
19036 * driver.c (mono_main): Make corlib-out-of-sync message more
19037 descriptive. Also remove verify_corlib call.
19039 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
19041 * mini.c: make CEE_NEWARR calls and other emulated opcodes
19042 not overlap with other call's arguments, too.
19044 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
19046 * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c:
19047 move to arch-specific code the choice of arch-specific
19048 intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
19049 * mini.c: ensure emulation calls will not interleave
19052 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
19054 * tramp-ppc.c, basic-calls.cs: rework trampolines so that
19055 the magic trampoline stack frame is dropped before executing
19058 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19060 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
19061 and integer to fp conversions. Added support for overflowing
19062 arguments on the stack. Reserve a couple more registers as temps.
19063 Added support for aot compilation (as output still needs to be
19066 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
19068 * mini-ppc.c, basic-long.cs: fix jumps to known labels.
19069 Don't overwrite return register in some corner cases.
19071 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
19073 * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
19074 static constructors when AOT compiling.
19076 * driver.c (mono_main): Call mono_check_corlib_version.
19078 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
19080 * cpu-g4.md, basic.cs: fixed div target register.
19082 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
19084 * mini-ppc.c, basic.cs: shl_imm fix with test.
19086 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
19088 * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing
19089 structures by value. Misc fixes.
19090 * objects.cs: more tests.
19092 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
19094 * mini-ppc.c: lconv.ovf.i implemented.
19096 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19099 (mini_init): don't error out if someone already called g_thread_init.
19101 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
19103 * exceptions-x86.c, exceptions-ppc.c: allow the exception object
19104 to be any type per the spec. Fix abnormal memory usage when
19105 the same object is repeatedly thrown.
19107 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
19109 * mini.c: check for overruns in IL code.
19111 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
19113 * TODO: Add/remove some todo entries.
19115 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
19117 * driver.c (mono_main): Call mono_verify_corlib.
19119 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
19121 * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy.
19122 This has been moved to mini.c
19123 * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
19124 type being casted is marshalbyref it could be a proxy, so instead of
19125 emitting the type check code, emit a call to a runtime method that will
19126 perform the check by calling CanCastTo if needed.
19128 2003-12-06 Zoltan Varga <vargaz@freemail.hu>
19130 * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
19131 methods with large stack frames under Win32.
19133 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
19135 * Makefile.am: Distribute regression tests.
19137 * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
19138 at the end instead of inserting each variable into the sorted list.
19140 * linear-scan.c (mono_varlist_sort): New helper function.
19142 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
19144 * mini.c: ensure arguments and locals are within bounds.
19146 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
19148 * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and
19151 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
19153 * mini.c (mono_cprop_copy_values): Fix crash.
19155 * aot.c: Set verbosity back to 0.
19157 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
19159 * regalloc.c: complete memory leak fix by Laurent Morichetti
19162 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
19164 * driver.c (main_thread_handler): Revert the previous patch.
19166 * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
19169 * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
19170 memory from the memory pool.
19172 * driver.c (main_thread_handler): Turn on all optimizations when
19175 * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
19176 an array for better performance.
19178 * regalloc.c (mono_regstate_assign): Fix memory leak.
19180 * debug-mini.c (mono_debug_serialize_debug_info): New function to
19181 serialize the debug info.
19183 * debug-mini.c (mono_debug_add_aot_method): New function to load the
19184 debug info from the serialized representation.
19186 * aot.c: Save debug info into the generated file and load it when
19189 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
19191 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
19193 * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
19194 More FP-related fixes.
19196 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
19198 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
19199 and register allocation buglet. Hello world now runs.
19201 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
19203 * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
19204 * tramp-ppc.c: fixed class init trampoline.
19205 * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
19207 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
19209 * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
19210 mini.c: more ppc changes/fixes.
19212 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
19214 * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
19215 Also optimize the case when the arguments are the same in the caller
19218 * iltests.il: Add tests for tail calls with valuetype arguments.
19220 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
19222 * mini-ppc.c: fixes for struct return type.
19224 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
19226 * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move
19227 mono_spillvar_offset() to arch-specific code.
19229 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
19231 * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
19233 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
19235 * exceptions-x86.c: Fix stack space leaks.
19237 * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
19238 registers from the lmf if the method has save_lmf set.
19240 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
19242 * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
19243 of icall wrappers into InvokeInDomain, since these are now per-domain.
19245 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
19247 * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
19248 make some opcode emulation and intrinsic ops enabled/disabled
19249 according to the architecture. More fixes.
19251 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
19253 * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
19255 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
19257 * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
19258 arch-specific handling for 'this' and struct return type to
19259 arch-specific code.
19261 2003-11-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19263 * aot.c: prevent divide by zero error when reporting (it happened with
19264 Accessibility.dll).
19266 2003-11-25 Zoltan Varga <vargaz@freemail.hu>
19268 * mini.h (inst_switch): Remove unused macro.
19270 2003-11-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19273 (load_aot_module): free 'info->methods' and 'info' properly. No more
19274 "free(): invalid pointer blah" messages when you have an old aot
19277 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
19279 * jit-icalls.c, mini.c: Added support for context static fields.
19281 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
19283 * mini.c (mono_method_blittable): Methods which set LastError are not
19284 blittable either. Fixes #51108.
19286 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
19288 * mini.c: flush icache.
19289 * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
19291 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
19293 * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
19295 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
19297 * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
19300 * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with
19303 * inssel.brg (CEE_MKREFANY): Fix AOT case.
19305 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
19307 * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div
19308 instruction when the result is discarded.
19310 * iltests.il (test_0_div_regalloc): New regression test.
19312 * arrays.cs: Fix compilation error.
19314 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
19316 * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
19317 float rules to inssel-x86.brg: sane architectures with FP registers
19318 don't need to implement these rules.
19320 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
19322 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
19324 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
19326 * mini.h, inssel-long32.brg: fixed endianess issues in int64
19327 implementation of 32 bit systems.
19329 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
19331 * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
19332 (Jeroen Zwartepoorte).
19334 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
19336 * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
19337 the caller and the callee matches.
19339 * mini.c (mono_method_to_ir): Add comment.
19341 * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
19342 signbit is missing on some platforms.
19344 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
19346 * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
19348 * mini.c (setup_jit_tls_data): Call the new function.
19350 * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
19352 * mini-x86.c: Add experimental support for fast access to the lmf
19353 structure under NPTL/Linux 2.6.x.
19355 2003-11-06 Martin Baulig <martin@ximian.com>
19357 * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
19358 `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
19361 2003-11-02 Martin Baulig <martin@ximian.com>
19363 * mini.c (inflate_generic_field): New static method.
19364 (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
19365 generic instance and the field is declared in a generic type, call
19366 inflate_generic_field() to inflate it. Fixes gen-28.cs.
19368 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
19370 * mini.h mini.c (mono_method_same_domain): New function to return
19371 whenever the caller and the callee are in the same domain.
19373 * tramp-x86.c (x86_magic_trampoline): Use the new function.
19375 2003-10-30 Martin Baulig <martin@ximian.com>
19377 * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
19378 similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
19380 (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
19381 MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS().
19383 2003-10-29 Zoltan Varga <vargaz@freemail.hu>
19385 * mini.c mini-ops.h inssel.brg: Implement undeniable exception
19388 * mini.c (sigusr1_signal_handler): Move creation of the thread abort
19389 object here, so it is in the correct appdomain etc.
19391 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
19393 * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
19395 (mono_method_to_ir): Avoid freeing the type created returned from
19396 mono_type_create_from_typespec, since it is put into an internal cache
19397 by the function. Fixes pointer.exe.
19399 * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal
19400 trampolines for icalls and pinvokes as well. Fixes #33569.
19402 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
19404 * mini.c: Update after appdomain changes.
19406 * mini.c (mono_jit_compile_method_inner): Allways compile native
19407 method wrappers in the root domain, since there can only be one
19408 instance of them, whose address is stored in method->info.
19410 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
19412 * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
19413 environment variable. Instead detect automatically whenever running
19414 under valgrind using the magic macro RUNNING_ON_VALGRIND from
19417 2003-10-16 Miguel de Icaza <miguel@ximian.com>
19419 * trace.c, trace.h: New files that implement the new trace option
19422 * driver.c: Document new --trace options.
19424 * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
19427 - if (mono_jit_trace_calls)
19428 + if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
19430 * mini.h: prototypes.
19432 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
19434 * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
19436 * mini.c inssel.brg: Implement typedefbyref opcodes.
19438 * mini.c (mono_jit_compile_method): Remove unused local variable.
19440 * mini.c (mono_jit_compile_method_inner): Ditto.
19442 2003-10-12 Zoltan Varga <vargaz@freemail.hu>
19444 * tramp-x86.c (x86_class_init_trampoline): Fix build.
19446 * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
19448 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
19450 * mini.c (mono_no_aot): Remove unused global variable.
19452 * mini.c: Thread safety fixes.
19454 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
19456 * mini.c (mono_create_class_init_trampoline): Add a lock around
19457 class_init_hash_addr.
19459 * arrays.cs (test_0_newarr_emulation): Add new regression test for
19462 * mini.c: Decompose the NEWARR instruction before decomposing its
19463 arguments. Fixes #30073.
19465 2003-10-08 Zoltan Varga <vargaz@freemail.hu>
19467 * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
19470 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
19472 * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
19474 * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
19476 * driver.c: Add support for compiling icall wrappers to --compile.
19478 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
19480 * inssel.brg: The empty value in class->interface_offsets is -1, not
19483 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
19485 * objects.cs: New test for 'is' operator on an array of interfaces.
19487 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
19489 * tramp-ppc.c: update trampoline code to support jumps
19490 and class initialization.
19492 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
19494 * mini.c (mono_jit_compile_method): Fix reading of freed memory.
19496 * inssel.brg (OP_UNBOXCAST): Fix #46027.
19498 * inssel.brg (OP_UNBOX): Remove unused rule.
19500 * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
19501 region instead of one for each method. Fixes #47813.
19503 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
19505 * exceptions.cs (test_0_nested_finally): New regression test for
19506 nested exception handlers.
19508 * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
19510 * mini.c (mono_method_to_ir): Avoid inlining tail calls.
19512 * mini.c (mono_method_to_ir): Fix tail recursion in the presence of
19515 * mini.c (mono_method_check_inlining): Make the inlining limit
19516 configurable by an environment variable.
19518 * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
19520 * mini.h: Bump AOT file version.
19522 * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a
19523 token, store the image along with the token, since the token might not
19524 refer to the same image as the method containing the relocation,
19525 because of inlining.
19527 2003-09-27 Zoltan Varga <vargaz@freemail.hu>
19529 * mini.c (mono_precompile_assemblies): New function to compile
19530 all methods in all loaded assemblies.
19532 * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
19534 * regalloc.h regalloc.c (MonoRegState): Change the type of
19535 iassign and fassign to int*, since they can contain large negative
19536 values if the register is spilled. Also added some comments. Fixes
19539 * exceptions-x86.c (seh_handler): Fix handling of system exceptions
19540 under Win32. Fixes #42964.
19542 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
19544 * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
19546 * aot.c: Added support for AOT compiling methods which contain calls
19547 to wrappers. Currently, only remoting-invoke-with-check wrappers are
19550 * driver.c (compile_all_methods): Run the compilation in a thread
19551 managed by mono. Fixes #44023.
19553 * mini.c (mono_codegen): Print full method name in verbose output.
19555 * mini-x86.c (mono_arch_patch_code): Fix warning.
19557 * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
19558 jumps, since the method we are jumping to might be domain-specific.
19560 * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
19562 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
19564 * inssel.brg: string chars are unsigned.
19566 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
19568 * TODO: New todo item.
19570 * tramp-x86.c (x86_class_init_trampoline): New trampoline function
19571 which calls mono_runtime_class_init and patches the call site to
19572 avoid further calls.
19573 (mono_arch_create_class_init_trampoline): New arch specific function
19574 to create a class init trampoline.
19575 (create_trampoline_code): Generalized so it can create
19576 class init trampolines as well.
19578 * mini.c (helper_sig_class_init_trampoline): New helper variable.
19579 (mono_create_class_init_trampoline): New function to create and cache
19580 class init trampolines.
19581 (mono_find_class_init_trampoline_by_addr): New function to lookup the
19582 vtable given the address of a class init trampoline. Used by the
19584 (mono_codegen): Generate a call to a trampoline instead of
19585 mono_runtime_class_init in LDSFLD[A].
19586 (mono_codegen): Add relocations for the new trampoline.
19588 * mini.h mini-x86.c aot.c: Added a new relocation type:
19589 MONO_PATCH_INFO_CLASS_INIT.
19591 * mini.h: Bump AOT version number.
19593 * aot.c: Create a copy of the loaded code instead of using the original
19594 so methods which call each other will be close in memory, improving
19597 * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
19598 patch since it breaks the regression tests.
19600 * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
19601 for the register saving instruction sequence since the
19602 frame_state_for function in glibc 2.3.2 don't seem to detect it.
19604 2003-09-14 Zoltan Varga <vargaz@freemail.hu>
19606 * TODO: Fix todo item && remove another.
19608 2003-09-12 Zoltan Varga <vargaz@freemail.hu>
19610 * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
19613 * aot.c: Moved the check for MONO_LASTAOT into the initialization
19614 function of the module.
19616 * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
19617 turning on/off the usage of AOT code. Got rid of mono_no_aot and the
19618 --no-aot command line option.
19620 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
19622 * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
19623 by Bernie Solomon (bernard@ugsolutions.com).
19625 * inssel.brg: Refactor the interface offset table related code into
19626 its separate functions and add support for the AOT case.
19628 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
19630 * aot.c (mono_aot_get_method_inner): Fix memory leak.
19632 * aot.c: Added mono_aot_verbose variable and made all debugging
19633 output depend on the value of this variable.
19635 * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
19636 method_label and info_label.
19638 * mini.h mini-x86.c aot.c: Added a new relocation type
19639 MONO_PATCH_INFO_IID for klass->interface_id.
19641 * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
19642 the MonoJitInfo structure.
19644 * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
19645 a non-root appdomain in shared mode.
19647 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
19649 * aot.c: make aot loader less verbose. Remove free of unused variable.
19651 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
19653 * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
19655 * .cvsignore: Added *.dll.
19657 * mini.c (mono_print_tree_nl): New function callable while debugging.
19659 * mini.c (mono_print_code): Export this.
19661 * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
19664 2003-09-05 Zoltan Varga <vargaz@freemail.hu>
19666 * mini.h (MonoCompile): Added 'jit_info' field.
19668 * mini.c (mini_method_compile): Save the generated MonoJitInfo into
19669 the cfg structure, since it is needed by the AOT compiler.
19671 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
19673 * aot.c: A major rewrite. Changes include:
19674 - save exception tables for methods which have them.
19675 - cache failed lookups in aot_get_method () to avoid the (slow) calls
19676 to g_module_symbol.
19677 - reworked the file format so it is now much smaller and needs
19678 fewer relocation entries.
19680 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
19682 * aot.c (load_aot_module): Fix build bustage on platforms without
19685 2003-09-04 Martin Baulig <martin@ximian.com>
19687 * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
19689 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
19691 * TODO: Some new optimization ideas.
19693 * aot.c: Move AOT module loading logic here from mono_assembly_open.
19695 * aot.c: Save the optimization flags used to compile the code into
19698 * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
19699 support emitting domain specific code.
19701 * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is
19702 no longer domain neutral. It can be made domain neutral by compiling
19703 with --optimize=shared.
19705 * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
19706 between appdomains.
19708 * driver.c mini.h mini.c: New --no-aot debugging option which disables
19709 loading of AOT code.
19711 * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
19713 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
19714 if there is no domain neutrality information.
19716 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
19718 * aot.c (mono_compile_assembly): Emit a symbol containing the file
19719 format version into the generated library.
19721 * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
19722 callee method into the caller since one of them could be shared.
19724 * mini.h mini-x86.c aot.c: Added two new relocations so throwing
19725 system exceptions from AOT code now works.
19727 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling
19728 method if it is domain neutral and the callee is not.
19730 * graph.c (cfg_emit_one_loop_level): Fix warning.
19732 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
19734 * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
19737 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
19739 * mini.c (mini_init): Call mono_marshal_init () explicitly since it
19740 is needed by code which is executed before mono_runtime_init ().
19741 Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
19743 * mini.c (mono_thread_abort): Fix warning.
19744 (mono_jit_compile_method): Call static constructor in the AOT case too.
19746 * aot.c (mono_compile_assembly): Fix warning.
19748 2003-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19750 * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
19752 2003-08-28 Zoltan Varga <vargaz@freemail.hu>
19754 * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
19756 * cpu-pentium.md: Fix the length of call opcodes so they include the
19757 ESP restoring instruction. Fixes #47968.
19759 2003-08-28 Martin Baulig <martin@ximian.com>
19761 * mini-x86.c (mono_arch_call_opcode): Added support for
19762 MONO_TYPE_GENERICINST.
19764 * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.
19766 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
19768 * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
19769 a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
19771 * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
19774 2003-08-26 Martin Baulig <martin@ximian.com>
19776 * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
19777 when reporting an error, set this to the actual error location.
19778 (mono_method_to_ir): Report the correct error location if
19779 get_basic_blocks() returned an error.
19781 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
19783 * mini.c (mono_type_blittable): OBJECT is not blittable.
19784 (mono_method_blittable): Methods which have marshalling descriptors
19785 are not blittable either. Fixes #47842.
19787 2003-08-22 Zoltan Varga <vargaz@freemail.hu>
19789 * driver.c mini.c: Use an environment variable instead of a global
19790 variable. Also fix the build.
19792 * mini.c (mini_init): Call g_thread_init () to make glib thread-safe.
19793 Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
19796 * driver.c mini.c: Added --with-valgrind option to turn off some
19797 code which prevents mono from running under valgrind.
19799 * mini.c (mono_emit_call_args): Fixed warning.
19801 * mini.c (mono_emulate_opcode): Fixed warning.
19803 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
19805 * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
19806 * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
19807 regalloc.c, regalloc.h: specify available registers in arch-specific
19808 code and support floats in the regallocator (patch by Laurent Morichetti
19811 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
19813 * mini.c: mono_thread_current() can be called only after
19814 mono_runtime_init(): rearrange code to not call it early on.
19816 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
19818 * mini.c: allocate jump tables in the code mempools.
19820 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19822 * mini.c, mini.h: make sure per-thread data allocated by the jit is
19825 2003-08-10 Miguel de Icaza <miguel@ximian.com>
19827 * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
19828 12 to 16. This fixes bug #47453.
19831 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
19833 * mini-ppc.c: fixed indexed load and unsigned compares.
19835 2003-08-06 Lluis Sanchez Gual <lluis@ximian.com>
19837 * mini.c: reenabled installation of handler for
19838 thread abort signal.
19840 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
19842 * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
19843 by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
19844 until it's fixed and actually useful.
19846 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
19848 * inssel-long32.brg: couple more opcodes implemented.
19850 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
19852 * mini-sparc.c: Even more opcodes implemeted.
19854 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
19856 * mini-sparc.c: More opcodes implemented.
19858 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
19860 * mini-sparc.c: More opcodes implemented.
19862 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
19864 * inssel-sparc.brg: Add some needed rules. Direct
19866 * Makefile.am: Use inssel-sparc.brg
19867 * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
19868 an assert happy for now.
19870 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
19872 * mini-sparc.c: Fixed compile errors.
19873 * exceptions-sparc.c: Same. We now produce a mono binary
19874 on sparc-linux. Yea.
19876 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
19878 * mini-sparc.c: Renamed registers. Also some macro cleanups.
19879 * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
19880 They compile, but do not work.
19882 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
19884 * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
19885 mini-sparc.h, tramp-sparc.c: Beginning of sparc support
19886 from Mark Crichton <crichton@gimp.org> and Christopher Taylor
19889 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
19891 * mini.c: more opcodes implemented and better support for generics.
19893 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
19895 * cpu-g4.md, cpu-pentium.md: updates for new instructions.
19896 * mini.c, mini.h: first cut at generics support: some new instructions
19897 added and changed the behaviour of some of the existing ones.
19899 2003-07-21 Miguel de Icaza <miguel@ximian.com>
19901 * mini.c: Removed definition of metadata_shared mutex here.
19903 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
19905 * mini-x86.c: make vararg calls work for instance methods.
19907 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
19909 * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
19910 returns the arguments in a separte list, now.
19912 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
19914 * aot.c, mini.c: updates for array type representation changes.
19916 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
19918 * mini.c: register function to perform jit shutdown.
19920 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
19922 * mini.c: use a faster allocator if possible.
19924 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
19926 * aot.c: some cleanups and portability changes.
19928 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
19930 * mini.c: use faster allocation for CEE_BOX if possible.
19932 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
19934 * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
19935 Moved inlined mempcy code to its own function so that is can be
19936 reused. Added an inline memset function as well (optimized initobj).
19937 * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
19939 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
19941 * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
19943 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
19945 * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
19946 arch code can setup the cpu for CLR execution, if needed.
19947 We use it on x86 to set the precision of FP operations.
19949 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
19951 * mini.c: disable some optimizations if we can guess they'll cost too
19952 much for a given method.
19954 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
19956 * mini.h mini.c: Rework last patch based on suggestions by Paolo.
19958 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
19959 * mini.h mini.c mini-x86.c: Added instruction level coverage
19960 info collection support.
19962 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
19964 * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
19965 is now implemented in the profiling API. Get rid of a couple of
19966 unnecessary global variables.
19968 2003-06-15 Nick Drochak <ndrochak@gol.com>
19970 * basic-long.cs: tests for negative values for bigmul, and unsigned.
19971 * cpu-g4.md: add op_bigmul and op_bigmul_un
19972 * cpu_pentium.md: add op_bigmul_un
19973 * inssel-long32.brg: add rule for unsigned bigmul
19974 * mini-ops.h: define OP_BIGMUL_UN
19975 * mini-x86.c: THE BUG: handle (un)signed properly
19976 * mini.c: choose unsigned opcode if needed.
19977 This set of patches fixes bug #44291
19979 2003-06-13 Dietmar Maurer <dietmar@ximian.com>
19981 * mini.c (optimize_branches): improved to handle all kinds of
19982 conditional branches.
19984 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
19986 * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
19987 don't raise exceptions.
19989 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
19991 * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
19992 to arch-specific files.
19994 2003-06-09 Martin Baulig <martin@ximian.com>
19996 * Makefile.am (libs): Added $(LIBGC_LIBS).
19998 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
20000 * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
20001 and OP_ATAN (fixes bug#44293).
20003 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
20005 * Makefile.am, mini-x86.c: rename cpu description array to
20006 pentium_desc, since some compilers define the 'pentium' preprocessor
20009 2003-05-28 Dietmar Maurer <dietmar@ximian.com>
20011 * mini.c (mini_select_instructions): add explicit branch if the
20012 following block is not the false target of a conditional branch -
20013 we need this with any optimization that reorder or remove bblocks
20015 * mini.c (optimize_branches): bug fixes
20017 2003-06-06 Dietmar Maurer <dietmar@ximian.com>
20019 * mini.c (mono_method_to_ir): inline static readonly fields
20021 * ssa.c (fold_tree): start cfold support for long (very simple
20024 * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
20026 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
20028 * inssel.brg: fixed memcpy (bug #44219).
20030 2003-06-05 Dick Porter <dick@ximian.com>
20032 * driver.c: Set the glib log levels to not abort if g_message
20035 g_set_prgname() has to happen before mini_init() so that the
20036 process handle gets the info.
20038 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
20040 * driver.c: add intrins to the default optimizations to get wider
20043 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
20045 * mini.h: some large basic blocks will overflow a 16-bit
20046 integers for symbolic registers.
20048 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
20050 * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
20051 (mono_arch_output_basic_block): fix bug 43499
20053 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
20055 * mini.c: kill duplicated definition of mono_debug_format.
20057 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
20059 * mini-x86.c, arrays.cs: fixed register allocation bug.
20061 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
20063 * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
20065 * mini.c (mini_get_opcode_for_method): inline IEEERemainder
20067 2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20070 (print_method_from_ip): also print source location information if
20073 2003-06-02 Dietmar Maurer <dietmar@ximian.com>
20075 * mini.c (mono_find_block_region): bug fix in region code
20076 (mini_method_compile): enable removing unreachable code again, but
20077 only in methods without exception clauses.
20079 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
20081 * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
20082 Implemented arglist opcode and handling of TypedReference type.
20083 Fixed x86 call convention when a structure is returned.
20084 Minimal support for calling static vararg methods.
20086 2003-05-30 Dietmar Maurer <dietmar@ximian.com>
20088 * mini.c (mini_method_compile): always remove unreachable code,
20089 because the code in them may be inconsistent (access to dead
20090 variables for example).
20092 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
20094 * driver.c, debug-mini.c: warning fixes.
20096 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
20098 * Makefile.am, jit.h, mini.h: install header for embedding mono.
20100 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
20102 * mini.c: thread-static fields are registered in mono_class_vtable(),
20103 so ensure the function is called before checking for them.
20105 2003-05-27 Dietmar Maurer <dietmar@ximian.com>
20107 * mini.c (optimize_branches): fix for bug 43586
20109 * jit-icalls.c (mono_llmult_ovf): added an additional check for
20110 overflow (fixes Bug #43639)
20112 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
20114 * mini.c, objects.cs: allow the use of stobj for primitive types.
20116 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
20118 * mini.c: be less strict about argument checking until we support
20119 running the verifier.
20121 2003-05-27 Nick Drochak <ndrochak@gol.com>
20123 * basic-long.cs: tests for (ulong)int * (ulong)int also
20124 * mini.c: use the same trick for (ulong)int * (ulong)int
20126 2003-05-27 Nick Drochak <ndrochak@gol.com>
20128 * basic-long.cs: add regression test for (long)int * (long)int
20129 * cpu-pentium.md: add op_bigmul specification
20130 * inssel-long32.brg: add OP_BIGMUL rule
20131 * mini-ops.h: add OP_BIGMUL
20132 * mini-x86.c: register allocator: handle case where src1 needs to be
20134 * mini.c: substitute special BIGMUL opcode in the tree for
20135 (long)int * (long)int
20137 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
20139 * jit-icalls.c: call the type ctor on field access if needed.
20141 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
20143 * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
20144 to a method (including results of ldelema, bug#43207).
20146 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
20148 * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
20149 colors to show exception handler blocks.
20151 * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
20152 (fix for pinvoke7.cs).
20154 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
20156 * mini.h, mini.c: ensure correct initialization order for types that
20157 require it. Prepare for lazy compilation of jit icall wrappers.
20158 Provide a name for opcode emulation to reduce unneeded mallocing.
20160 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
20162 * mini-x86.c: better register restoring code and profiling
20163 support for tail calls.
20165 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
20167 * mini.h, driver.c: prepare for leaf methods optimization.
20169 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
20171 * mini.c: get targets of branches before converting a method.
20173 2003-05-23 Dietmar Maurer <dietmar@ximian.com>
20175 * mini.c (optimize_branches): added some experimental code (disbaled)
20177 2003-05-22 Dietmar Maurer <dietmar@ximian.com>
20179 * mini.c (optimize_branches): fix branch to branch optimization
20181 * exceptions-x86.c (mono_arch_handle_exception): bug fix.
20183 * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
20185 * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
20187 * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
20190 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
20192 * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
20193 enable use of interface variables again.
20195 * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
20196 I1 to registers because there is no simply way to sign extend 8bit
20197 quantities in caller saved registers on x86.
20199 * inssel-float.brg: set costs of some rules to 2 so
20200 that monobure always select the arch. specific ones if supplied,
20201 regardless of the order we pass the files to monoburg.
20203 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
20205 * mini.c, mini-x86.c: since the magic trampoline for jumps
20206 can't patch the code directly, we do it as soon as the
20207 method gets compiled.
20209 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
20211 * mini-x86.c, mini.h: introduce a new patching method
20212 to support CEE_JMP and tail calls.
20213 * mini.c: obey tail.call. Don't precompile methods target
20215 * tramp-x86.c: new trampoline code to handle methods
20216 reached through a jump.
20218 2003-05-20 Dietmar Maurer <dietmar@ximian.com>
20220 * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
20221 bit values to registers
20223 2003-05-19 Dietmar Maurer <dietmar@ximian.com>
20225 * mini.c (mono_compile_get_interface_var): share interface
20226 variables if possible.
20228 2003-05-16 Martin Baulig <martin@ximian.com>
20230 * debug-mini.c (mono_init_debugger): New function to initialize
20231 the debugger. This is not in the debugger since it needs to
20232 access some of mini's internals.
20234 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
20236 * mini.c (mono_method_to_ir): inlining fixes/cleanups
20238 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
20240 * mini.c, mini-opts.h, inssel.brg: inline small memcpy
20241 for value type handling.
20243 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
20245 * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
20246 (mono_method_check_inlining): enable inlining of all kinds of wrappers
20248 2003-05-15 Lluis Sanchez Gual <lluis@ideary.com>
20250 * mini.c: fixed little bug in CEE_NEWOBJ case when calling
20251 the constructor through a proxy.
20253 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
20255 * jit-icalls.c, inssel.brg: fixes to array element address
20258 2003-05-15 Dietmar Maurer <dietmar@ximian.com>
20260 * mini-x86.c (is_regsize_var): allocate pointer to registers
20262 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
20264 * driver.c: fixed typo, added intrins to the set of optimizations
20265 tested with regressions.
20267 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
20269 * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
20270 * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
20273 2003-05-14 Dietmar Maurer <dietmar@ximian.com>
20275 * inssel.brg: remove some common pop instructions without side effects
20277 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
20279 * inssel-x86.brg: fixed thinko in int to double conversions.
20281 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
20283 * mini.c, jit-icalls.c: added runtime thread-static variable support.
20285 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
20287 * inssel-long32.brg: two more missing instructions.
20289 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
20291 * mini.c (mono_emit_call_args): set the cil_code for all arguments
20292 if not already set.
20294 2003-05-12 Zoltan Varga <vargaz@freemail.hu>
20296 * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
20299 * basic-float.cs: Added tests for negative zero.
20301 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
20303 * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
20304 a couple of missing operations for long casts, with test cases.
20306 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20308 * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
20310 2003-05-09 Dietmar Maurer <dietmar@ximian.com>
20312 * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
20313 code size estimation.
20315 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
20317 * mini.c (mono_jit_create_remoting_trampoline): make it work with
20318 abstract methods (fix bug 42542)
20320 * aot.c: add ability to handle array types
20322 2003-05-08 Zoltan Varga <vargaz@freemail.hu>
20324 * mini.c: Call the _specific versions of the object allocation
20325 functions if possible.
20327 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
20329 * driver.c: call setlocale ().
20331 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
20333 * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
20336 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
20338 * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
20340 * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
20341 wrappers (fix bug 42122)
20343 2003-05-04 Martin Baulig <martin@ximian.com>
20345 * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
20347 * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
20348 s/mini_set_defaults/mono_set_defaults/g.
20350 2003-05-04 Martin Baulig <martin@ximian.com>
20352 * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
20354 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
20356 * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
20357 (reported by Don Roberts).
20359 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
20361 * mini.c: temporarily work around two bugs for this release.
20363 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
20365 * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
20366 that contains -export-dynamic and it makes using the ld script
20368 * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
20370 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
20372 * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
20375 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
20377 * mini.c: make sure leave calls all the needed finally blocks,
20378 even when the target jumps out of multiple exception clauses.
20380 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
20382 * ldscript, Makefile.am: add linker script to reduce the number of
20383 exported symbols (should also fix the issues with libwine defining
20384 some of the same symbols in io-layer).
20386 2003-05-01 Zoltan Varga <vargaz@freemail.hu>
20388 * driver.c (mini_main): Avoid assertion when no file name is given on
20391 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
20393 * driver.c: added --version/-V command line option.
20394 Added the inline optimization in the regression tests.
20396 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
20398 * mini.c, basic-calls.cs: when inlining, save arguments to locals according
20399 to the type in the method signature (fixes bug#42134).
20401 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
20403 * mini.c: when inlining, check this is not null only when needed (bug #42135).
20405 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
20407 * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
20409 2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20411 * driver.c: fixed bug #42100.
20413 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
20415 * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
20417 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
20419 * mini.c: moved most of the code required to do inlining to its own
20420 function so it can be reused. Inline also ctors if appropriate.
20422 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
20424 * Makefile.am: Link with -export-dynamic so shared libs loaded by
20425 the runtime can call mono API functions.
20427 2003-04-27 Martin Baulig <martin@ximian.com>
20429 * debug-mini.c (mono_debug_init_method): Added
20430 `guint32 breakpoint_id' argument; if the method has a breakpoint,
20431 send a notification to the debugger.
20433 * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
20434 running in the Mono Debugger, just pass the breakpoint number to
20435 mono_debug_init_method().
20437 * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
20439 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
20441 * mini.c: allow some more unsafe compares.
20443 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
20445 * mini-x86.c, Makefile.am: make distcheck works (partially from
20446 a patch by Richard Lee <r.h.lee@attbi.com>).
20447 * regset.c, regset.h: removed, they are unused.
20449 2003-04-25 Dick Porter <dick@ximian.com>
20451 * driver.c: Usage reports the name as 'mono' not 'mini'
20452 * exceptions-x86.c: Build and run on freebsd
20454 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
20456 * Makefile.am: install the program with the 'mono' name and
20457 the library as libmono instead of mini and libmini.
20459 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
20461 * driver.c: provide the APIs for the embedding interface of the old jit.
20463 2003-04-23 Dietmar Maurer <dietmar@ximian.com>
20465 * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
20467 2003-04-23 Martin Baulig <martin@ximian.com>
20469 * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
20471 * driver.c: Added `--debug' command line argument to enable
20474 2003-04-23 Martin Baulig <martin@ximian.com>
20476 * debug.[ch]: Removed. The code is now in
20477 ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
20479 * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
20482 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
20484 * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
20486 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20489 (mini_cleanup): moved mono_runtime_cleanup call after the call to
20490 mono_domain_finalize.
20491 (mini_method_compile): use mono_method_profile* if the the option is
20494 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
20496 * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
20497 methods with their wrapper.
20499 * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
20500 methods with their wrapper.
20502 * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
20505 * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
20508 * mini.c (mono_method_check_inlining): Avoid inlining synchronized
20511 2003-04-17 Dietmar Maurer <dietmar@ximian.com>
20513 * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
20515 2003-04-16 Dietmar Maurer <dietmar@ximian.com>
20517 * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
20518 of the mempool. This is slightly faster and uses less memory
20520 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
20522 * mini.c: avoid O(n) allocation for variables.
20524 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
20526 * mini.c: handle items on the stack after inlining methods.
20528 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
20530 * mini.c: make the method->opcode optimization dependent
20531 on MONO_OPT_INSTRINS and do it lazily.
20533 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
20535 * driver.c: print overall results at the end of regression run.
20537 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
20539 * inssel.brg: don't overwrite symbolic registers.
20541 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
20543 * inssel-x86.brg: fix conversion from long to float.
20545 2003-04-11 Dietmar Maurer <dietmar@ximian.com>
20547 * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
20549 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
20551 * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
20553 * driver.c: Added --print-vtable option as in the old JIT.
20555 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
20557 * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
20559 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
20561 * inssel.brg, basic.cs: fixed checked conversions to byte and short.
20563 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
20565 * mini.c regalloc.c regalloc.h: Fix memory leak.
20567 2003-04-09 Dietmar Maurer <dietmar@ximian.com>
20569 * aot.c (mono_aot_get_method): register all used strings
20571 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
20573 * mini.c: always intern strings references with ldstr at compile time.
20575 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
20577 * Makefile.am: add BUILT_SOURCES.
20579 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
20581 * driver.c: give a better error message when the assembly to execute
20582 doesn't have an entry point.
20584 2003-04-07 Dietmar Maurer <dietmar@ximian.com>
20586 * Makefile.am: added hack for automake
20588 * mono/mini/mini.c (mono_save_args): always copy arguments to keep
20591 * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
20593 22003-04-07 Martin Baulig <martin@ximian.com>
20595 * Makefile.am: Added Makefile.am.
20597 * debugger-main.c: Removed, this is now in the debugger where it
20600 * mini.pc.in: Call this package `mini' for the moment.