1 2009-12-09 Zoltan Varga <vargaz@gmail.com>
3 * debugger-agent.c (start_runtime_invoke): Fix a crash if this is called
4 on the debugger thread.
6 2009-12-08 Zoltan Varga <vargaz@gmail.com>
8 * mini-llvm.c (mono_llvm_emit_method): Add more SIMD opcodes.
10 * mini.c (mono_print_method_from_ip): Fix the lookup of trampolines.
12 * mini-codegen.c (mono_local_regalloc): Allow non-call opcodes with cloc:c.
14 * cpu-<ARCH>.md: Make call_handler clob:c.
16 * mini.c: Reenable SSA for methods with clauses.
18 * mini.c (mini_method_compile): Disable SSA for now for methods with clauses,
19 as it causes failures on x86.
21 2009-12-08 Sebastien Pouliot <sebastien@ximian.com>
23 * driver.c: Fail gracefully with --compile-all if mono_method_signature
24 returns NULL (e.g. a bad assembly).
26 2009-12-08 Geoff Norton <gnorton@novell.com>
28 * debugger-agent.c: Refactor the mono_runtime_invoke guarding against
29 stepping out into native code. There were issues with nested invokes
32 2009-12-07 Zoltan Varga <vargaz@gmail.com>
34 * mini.c (mini_method_compile): Do the disable_llvm checks early
35 and avoid the LLVM compile pass if the checks fail.
37 * mini.c ssa.c abcremoval.c: Enable SSA for methods with exception clauses.
39 * mini-llvm.c: Put our methods/globals into the 'llvm.used' array, so the
40 LLVM optimizations don't try to remove them.
42 * aot-compiler.c (emit_llvm_file): Save the result of opt into a
43 different file so the original remains.
45 2009-12-06 Zoltan Varga <vargaz@gmail.com>
47 * mini-llvm.c mini.c: Fix alignment issues with SIMD vars.
49 * aot-runtime.c (decode_arm_exidx): Handle most descriptors created by gas.
51 * aot-runtime.c (decode_arm_exidx): Refactor this into two functions, add
52 support for non-inline unwind descriptors.
54 2009-12-07 Geoff Norton <gnorton@novell.com>
56 * debugger-agent.c: Darwin can colesce signals, so we need to handle
57 the interrupt_count slightly differently. Native threads were never
60 2009-12-05 Zoltan Varga <vargaz@gmail.com>
62 * aot-runtime.c (decode_arm_exidx): New function to initialize a MonoJitInfo
63 based on the contents of the ARM .exidx section. Not yet used since llvm doesn't
64 yet generate this info.
66 * mini-llvm.c: Fix the conversion of call results if they are unsigned.
68 * debugger-agent.c (buffer_add_value): Treat I/U as a valuetype, so the
69 client can distinguish between intptrs and longs.
71 2009-12-05 Zoltan Varga <vargaz@gmail.com>
73 * aot-compiler.c (emit_trampoline): Emit the trampoline info into the global
76 * aot-runtime.c (load_function): Update after the change above.
78 * mini.h: Bump AOT file format version.
80 * method-to-ir.c (mono_method_to_ir): Disallow the delegate optimization
81 if the delegate class is dynamic.
83 * method-to-ir.c (handle_delegate_ctor): Allow the method_code optimization
84 in gshared code too using the new rgctx info type
85 MONO_RGCTX_INFO_METHOD_DELEGATE_CODE.
87 2009-12-04 Geoff Norton <gnorton@novell.com>
89 * debugger-agent.c: When doing a func-eval invoke on a suspended runtime,
90 we need to track the original suspend count so the thread properly
91 wakes up in resume_thread.
93 2009-12-04 Zoltan Varga <vargaz@gmail.com>
95 * method-to-ir.c (handle_delegate_ctor): Add support for using this from gshared
98 * generics.cs: Add a test.
100 * method-to-ir.c (emit_get_rgctx_method): Make this work even if context_used
101 is 0. Simplify a lot of code using this.
103 * mini-trampolines.c (mono_delegate_trampoline): Call
104 mono_create_static_rgctx_trampoline () before saving the final address in
105 delegate->method_code, to avoid calling it each time a delegate is first called.
107 * method-to-ir.c (mono_method_to_ir): Allow fast delegate creation for methods
108 which need static rgctx trampolines.
110 * mini-trampolines.c (mono_create_static_rgctx_trampoline): Use a cache
111 keyed on the method+addr pair, since addr could be either the method addr or
112 an unbox trampoline in the AOT case. Fixes #560246.
114 2009-12-03 Zoltan Varga <vargaz@gmail.com>
116 * mini.c (mini_method_compile): Call handle_exception_clauses () in the same
117 place it was called before too.
119 2009-12-03 Zoltan Varga <vargaz@gmail.com>
121 * mini.c (mono_jit_runtime_invoke): Avoid the call to mono_class_setup_vtable ()
122 if no security manager is present, to speed up the AOT case. Call
123 mono_class_vtable () full with raise_on_error == TRUE instead.
125 2009-12-03 Zoltan Varga <vargaz@gmail.com>
127 * mini.c (mini_method_compile): Call handle_exception_clauses earlier so
128 the local optimization passes can take its result into account. Fixes
131 * exceptions.cs: Add a test.
133 2009-01-24 Steven Munroe <munroesj@us.ibm.com>
135 This patch is contributed under the terms of the MIT/X11 license
137 * cpu-ppc64.md (load_memindex): Add loadi8_memindex.
139 2009-12-03 Zoltan Varga <vargaz@gmail.com>
141 * mini.h (MonoInst): Remove unused 'ssa_op' field.
143 * debugger-agent.c: Rework the handling of stack traces of running threads to
144 avoid crashes if compute_frames () tries to walk the stack of running thread.
146 * mini.c (mono_print_method_from_ip): Use mini_jit_info_table_find.
148 * mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): Set frame->lmf.
150 * mini.h (StackFrameInfo): Add an 'lmf' field.
152 2009-12-02 Zoltan Varga <vargaz@gmail.com>
154 * debugger-agent.c (suspend_current): Always set really_suspended.
156 * debugger-agent.c (clear_event_request): Clear method entry/exit requests too.
158 * exceptions-x86.c (mono_arch_get_restore_context): Restore EAX too.
160 2009-12-01 Zoltan Varga <vargaz@gmail.com>
162 * debugger-agent.c (vm_commands): Don't allow invokes on threads which are not
165 2009-12-01 Zoltan Varga <vargaz@gmail.com>
167 * cpu-ppc64.md (store_memindex): Add storei8_memindex.
169 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
171 * mini-trampolines.c: Fix MSVC build.
173 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
175 * mini-trampolines.c: Check for mono_method_get_vtable_slot failures.
177 2009-11-30 Zoltan Varga <vargaz@gmail.com>
179 * mini-arm.c (mono_arch_lowering_pass): Fix an assert which is hit when
180 the instruction following an OP_FCOMPARE is optimized away.
182 2009-11-30 Zoltan Varga <vargaz@gmail.com>
184 * aot-compiler.c (arch_emit_autoreg): Extract the auto-registration code from
185 emit_autoreg () into this arch-specific function.
187 * aot-compiler.c (emit_exception_debug_info): Don't emit the length of the
188 code, it is no longer needed.
190 * aot-runtime.c (decode_exception_debug_info): Don't read the code length.
192 * mini.h: Bump AOT file format version.
194 * aot-runtime.c (mono_aot_find_jit_info): Compute the length of the method
195 using the sorted_code_offsets array, instead of reading it from the
196 exception debug info.
197 (load_method): Call mono_aot_find_jit_info instead of
198 decode_exception_debug_info ().
200 * aot-compiler.c (emit_exception_debug_info): Emit whenever the method was
201 LLVM compiled as a flag.
203 2009-11-29 Zoltan Varga <vargaz@gmail.com>
205 * debugger-agent.c (resume_thread): Fix a warning.
207 * aot-compiler.c: Add an option to set the number of static rgctx trampolines
210 2009-11-28 Zoltan Varga <vargaz@gmail.com>
212 * aot-compiler.c aot-runtime.c: Get rid of a few global symbols, move their
213 contents to MonoAotFileInfo.
215 2009-11-27 Zoltan Varga <vargaz@gmail.com>
217 * aot-compiler.c aot-runtime.c: Reorganize the AOT file format once again.
218 Put all binary data into a giant blob, similarly to the way .net assemblies
219 store binary data. Emit offset tables in a compact form to reduce their size.
221 * mini.h: Bump AOT file format version.
223 * aot-compiler.c (emit_globals_table): Use temp_prefix instead of .L in a few
226 * aot-compiler.c (emit_globals_table): Emit a hash table for the globals, to
227 avoid linear searches at runtime.
229 * aot-runtime.c (find_symbol): Update this to use the hash.
231 * mini.h: Bump AOT file format version.
233 2009-11-26 Zoltan Varga <vargaz@gmail.com>
235 * aot-compiler.c (emit_klass_info): Save whenever the class has a generic
238 * aot-runtime.c (decode_cached_class_info): Set the is_generic_container field
241 * aot-compiler.c (mono_compile_assembly): Add a 'stats' option to print out
242 the distribution of got slot types.
244 * mini.h (MonoDebugOptions): Add 'explicit_null_checks' option.
246 * method-to-ir.c: Add support for generating explicit null checks.
248 2009-11-25 Zoltan Varga <vargaz@gmail.com>
250 * debugger-agent.c (vm_commands): Implement EXIT by invoking Environment.Exit ()
251 on a random thread if possible.
253 * aot-runtime.c (mono_aot_plt_resolve): Clean up the handling of function
254 descriptors a bit, add comments, handle RGCTX_FETCH/GENERIC_CLASS_INIT_TRAMPOLINE
257 * exceptions-ppc.c (mono_arch_find_jit_info_ext): Use mgreg_t as the type of
258 regs. Pass the real size of the regs array to mono_unwind_frame ().
260 * unwind.c (mono_unwind_frame): Remove an incorrect assert, add more correct
263 2009-11-24 Geoff Norton <gnorton@novell.com>
265 * mini-darwin.c: Work around apple bug rdar://7209349 See
266 http://openradar.appspot.com/7209349 for details. Synopsis,
267 CoreFoundation SIGTRAP's if you dlopen it off the main thread if its
268 never been initialized before.
270 2009-11-24 Zoltan Varga <vargaz@gmail.com>
272 * tramp-arm.c: Use blx instead of mov pc, reg to improve support for thumb.
274 * mini-arm.c (mono_arm_thumb_supported): New helper function.
276 2009-11-24 Zoltan Varga <vargaz@gmail.com>
278 * cfold.c (mono_constant_fold_ins): Fix a problem in the previous change,
279 OP_SHL_IMM is not 32 bit.
281 2009-11-24 Zoltan Varga <vargaz@gmail.com>
283 * aot-compiler.c (encode_patch): Fix the encoding of R8 on big-endian systems.
285 2009-11-24 Zoltan Varga <vargaz@gmail.com>
287 * aot-compiler.c: Avoid infinite recursion when generic virtual recursion is
290 * debugger-agent.c (resume_vm): Signal the suspend_cond even if suspend_count
291 > 0 since some threads can resume if their resume_count is > 0.
292 (invoke_method): Avoid reading freed memory.
294 * debugger-agent.c (process_suspend): Extract the suspend code from
295 process_single_step_inner () to a separate function. Rework the code to prevent
296 races between this function and thread interrupts.
298 * debugger-agent.c (suspend_current): Check the resume_count field instead
299 of resume_one so suspends+resumes during single threaded invokes work
302 2009-11-23 Zoltan Varga <vargaz@gmail.com>
304 * aot-compiler.c (emit_llvm_file): Enable some llvm optimizations which seem
305 to make the generated code smaller.
307 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Add a code
308 sequence generated by recent LLVM versions.
310 * mini-llvm.c: Add support for a few simple cases which weren't supported
313 * mini-trampolines.c (mono_magic_trampoline): Don't call
314 mono_arch_get_vcall_slot () when llvm is enabled.
316 * aot-compiler.c (emit_llvm_file): Add code to run the 'opt' llvm tool.
318 * mini-trampolines.c (mono_magic_trampoline): Extract the bulk of this function
319 into a new function called common_call_trampoline () which is used by the
320 llvm vcall trampoline as well.
322 * debugger-agent.c: Implement single threaded invokes.
324 * debugger-agent.c: Revert change which broke the agent on linux.
326 * method-to-ir.c (inline_method): Prevent infinite recursion. Fixes
329 * generics.cs: Add a test.
331 2009-11-22 Zoltan Varga <vargaz@gmail.com>
333 * debugger-agent.c: Fix the cygwin build.
335 2009-11-21 Zoltan Varga <vargaz@gmail.com>
337 * cprop.c: Remove this unused file.
339 2009-11-21 Zoltan Varga <vargaz@gmail.com>
341 * cfold.c (mono_constant_fold_ins): Fix constant folding of shr_imm. Fixes
344 * basic.cs: Add a test.
346 2009-11-21 Zoltan Varga <vargaz@gmail.com>
348 * method-to-ir.c (mono_method_to_ir): Use mono_use_llvm instead of ENABLE_LLVM
351 2009-11-20 Zoltan Varga <vargaz@gmail.com>
353 * mini.c mini-trampolines.c driver.c: Add a 'mono_use_llvm' flag to control
354 whenever the runtime uses LLVM code. Add a '--llvm' command line option to set
355 it. Use this flag to control llvm related code paths instead of #ifdef
356 ENABLE_LLVM, so a runtime configured without --enable-llvm can use LLVM compiled
359 * aot-runtime.c aot-compiler.c: Add a 'flag' field to MonoAotFileInfo.
361 * mini.h: Bump AOT file format version.
363 * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline_full): These
364 receive their argument in MONO_ARCH_VTABLE_REG, not in the first argument reg.
366 * debugger-agent.c (create_event_list): Fix a crash if an empty assembly list
367 was used as an assembly filter.
369 2009-11-19 Zoltan Varga <vargaz@gmail.com>
371 * unwind.c: Fix support for ppc.
373 * exceptions-ppc.c (mono_arch_find_jit_info): Change this to use dwarf frame
374 unwind info. Change to the mono_arch_find_jit_info_ext () interface.
376 2009-11-19 Zoltan Varga <vargaz@gmail.com>
378 * mini-ppc.c (mono_arch_emit_prolog): Fix a copy-paste error to fix the ppc64
380 (mono_arch_cpu_init): Don't set cpu_hw_flags to 0 at the end, this was somehow
381 added by the ps3 changes.
383 2009-11-19 Zoltan Varga <vargaz@gmail.com>
385 * mini-gc.c: Resurrect this, so at least it compiles.
387 * debugger-agent.c (assembly_commands): Implement GET_NAME command.
389 2009-11-18 Zoltan Varga <vargaz@gmail.com>
391 * debugger-agent.c (mono_debugger_agent_handle_exception): Pass a MonoJitInfo to
392 create_event_list () so assembly filters can be used.
394 * exceptions-ppc.c (mono_arch_find_jit_info): Fix the restoration of registers
397 2009-11-17 Zoltan Varga <vargaz@gmail.com>
399 * debugger-agent.c (mono_debugger_agent_breakpoint_hit): Fix a warning.
400 (mono_debugger_agent_thread_interrupt): Make this return FALSE if the agent
403 * aot-compiler.c (add_generic_instances): Emit instances of common generic
404 classes for char/bool too.
406 * debugger-agent.c (DebuggerTlsData): Honor the DISABLE_SOFT_DEBUG option.
408 * debugger-agent.c (DebuggerTlsData): Add a 'really_suspended' flag, not yet
411 * debugger-agent.c: Add some definitions to make backporting to 2.6 easier.
414 2009-11-15 Andreas Faerber <andreas.faerber@web.de>
416 * debugger-agent.c (mono_debugger_agent_thread_interrupt): Signature fix.
418 Code contributed under MIT/X11 license.
420 2009-11-14 Zoltan Varga <vargaz@gmail.com>
422 (mono_debugger_agent_thread_interrupt): Save the context so stacktraces for
423 threads in native code work.
425 * debugger-agent.c: Pass the 'flags' argument to VM_INVOKE_METHOD earlier in
426 the parameter list, so it can be acted upon by vm_commands (). Bump protocol
429 2009-11-13 Jonathan Chambers <joncham@gmail.com>
431 * debugger-agent.c: Implementation for Windows platform.
433 * mini-x86.c: Add support for Windows. Use mono-* synchronization
434 primitives. Use SEH to implement breakpoints and single stepping.
436 * mini-x86.h: Enable soft debugger on Windows.
438 Code contributed under MIT/X11 license.
440 2009-11-13 Zoltan Varga <vargaz@gmail.com>
442 * mini-amd64.c (emit_call_body): Disable usage of near calls when running
443 under XEN. Fixes #522894.
445 * patch-info.h: Add LLVM_IMT_TRAMPOLINE.
447 * mini-llvm.c aot-compiler.c aot-runtime.c mini.c: Add support for making
448 interface calls in LLVM AOT code.
450 * aot-compiler.c mini-llvm.c: Abort llvm compilation if a non-encodable patch
453 * mini-llvm.c: Add support for OP_VPHI.
455 * objects.cs: Add a test.
457 2009-11-13 Zoltan Varga <vargaz@gmail.com>
459 * debugger-agent.c (mono_debugger_agent_single_step_event): Avoid a crash if
460 this is called on the debugger thread.
462 2009-11-12 Zoltan Varga <vargaz@gmail.com>
464 * mini-llvm.c: Add soft-float support.
466 * method-to-ir.c (mono_decompose_soft_float): Restart after decomposing an
467 FCALL which returns an R4.
469 * driver.c (mono_main): Add a missing '\n'.
471 * mini-trampolines.c (mono_create_llvm_imt_trampoline): Fix the build on
472 platforms which doesn't support the LLVM IMT trampoline.
474 2009-11-11 Zoltan Varga <vargaz@gmail.com>
476 * mini-llvm.c (mono_llvm_emit_method): Fix LOCALLOC.
478 * mini-llvm-cpp.cpp: Update to latest LLVM SVN.
480 * mini-llvm.c (mono_llvm_emit_method): Avoid creating plt entries for
483 * aot-runtime.c: Don't define HAVE_DL_ITERATE_PHDR, configure now does that.
485 2009-11-10 Zoltan Varga <vargaz@gmail.com>
487 * aot-compiler.c aot-runtime.c: Change how mono_arch_find_jit_info () works.
488 Instead of emitting a method_order table, sort the contents of the code_offsets
489 table and do a binary search in the sorted table. The previous approach doesn't
490 work with LLVM which emits methods in a arbitrary order.
492 * aot-runtime.c: Add support for creating MonoJitInfo structures by searching
493 in the .eh_frame section in ELF files.
495 * mini.h: Bump corlib file format version.
497 * mini-llvm.c aot-compiler.c: Add support for AOT to the LLVM back end.
499 * exceptions-arm.c (mono_arch_get_call_filter_full): Update after the
500 LDMIA->LDM macro name change.
502 2009-11-09 Zoltan Varga <vargaz@gmail.com>
504 * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Fix and enable this for
507 * mini-llvm-cpp.cpp (JITMemoryManager): Fix compilation with LLVM 2.7
510 * aot-compiler.c: Ditto.
512 * mini-arm.c (mono_arch_allocate_vars): Fix the previous change by passing
513 &align to mini_type_stack_size_full ().
515 * mini-arm.c (mono_arch_emit_prolog): Implement support for varargs.
517 * mini-ops.h: Add documentation for the OP_ARGLIST opcode.
519 2009-11-08 Zoltan Varga <vargaz@gmail.com>
521 * mini-arm.c: Compute the stack space used by arguments using
522 mini_type_stack_size_full ().
524 2009-11-08 Zoltan Varga <vargaz@gmail.com>
526 * optflags-def.h: Remove dead TREEPROP optimization.
528 2009-11-08 Rodrigo Kumpera <rkumpera@novell.com>
530 * mini-ppc.h: Make mono compiler under FreeBSD/ppc64.
532 Patch by Justin Hibbits <chmeeedalf@gmail.com>.
534 2009-11-07 Zoltan Varga <vargaz@gmail.com>
536 * driver.c (mono_jit_parse_options): New public API function to parse options
537 as done by the runtime executable.
539 * debugger-agent.c (buffer_add_cattrs): Fix reading an uninitialized variable
540 when handling named arguments.
542 2009-11-07 Zoltan Varga <vargaz@gmail.com>
544 * mini-arm.c: Implement support for returning vtypes in registers, fix support
545 for passing small vtypes in registers, make the CallInfo structures more
546 similar to the code on the other platforms.
548 * mini-arm.c (mono_arch_allocate_vars): Align small vtypes to 4 bytes too since
549 the code in the prolog requires it.
551 2009-11-06 Zoltan Varga <vargaz@gmail.com>
553 * mini-arm.c debugger-agent.c: Android changes from Koushik K. Dutta
554 (koush@koushikdutta.com).
556 * mini-arm.c (handle_thunk): Add a domain argument to control the domain
557 where the thunk memory should be allocated from. Fixes appdomain unloading
560 2009-11-06 Zoltan Varga <vargaz@gmail.com>
562 * mini-arm.c exceptions-arm.c: Make ctx->regs map directly to the 16 hardware
563 registers, instead of r4..r11,ip,lr. Make restore_context () restore r0..r3 too.
565 2009-11-05 Zoltan Varga <vargaz@gmail.com>
567 * mini-amd64.c (mono_arch_output_basic_block): Don't allow OP_SEQ_POINT in
568 AOT, as it is not implemented yet.
570 * mini-x86.c (mono_arch_output_basic_block): Ditto.
572 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
574 * debugger-agent.c: Fix windows build.
576 2009-11-05 Zoltan Varga <vargaz@gmail.com>
578 * debugger-agent.c (debugger_thread): Call mono_set_is_debugger_attached ()
579 after the client connects/disconnects.
581 * debugger-agent.c: Add an 'onthrow' option to start the debugger agent
582 when an exception of a given type is thrown.
584 * debugger-agent.c: Add a 'onuncaught' option to start the debugger agent
585 only on an uncaught exception.
587 * mini-exceptions.c: Notify the debugger agent on an uncaught exception.
589 * debugger-agent.c: Add a 'launch' option.
591 2009-11-05 Zoltan Varga <vargaz@gmail.com>
593 * debugger-agent.c: Add a 'timeout' option.
595 2009-11-05 Zoltan Varga <vargaz@gmail.com>
597 * debugger-agent.c: Implement the 'server' and 'suspend' options supported by
600 2009-11-05 Zoltan Varga <vargaz@gmail.com>
602 * debugger-agent.c (set_breakpoint): Emit a log message.
604 2009-11-04 Zoltan Varga <vargaz@gmail.com>
606 * mini-arm.c: Fix the arm build.
608 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
610 * aot-compiler.c: don't leak the value returned from
611 mono_type_full_name().
613 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
615 * debugger-agent.c: defer including mono-mutex.h until we know the
618 2009-11-04 Jonathan Chambers <joncham@gmail.com>
620 * debugger-agent.c: Changes to build on windows. Use mono-mutex instead
621 of pthreads directly.
623 * mini.c (mono_sigfpe_signal_handler): Changed signature of Windows
624 exception handlers. Pass info argument.
626 * mini.h: Adjust signatures of soft debugger functions to pass void*
627 instead of siginfo_t. Adjust SIG_HANDLER_SIGNATURE on Windows.
629 * mini-amd64.c (mono_arch_is_single_step_event): Adjust signature to pass void*
630 instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
631 (mono_arch_is_breakpoint_event): Adjust signature to pass void*
632 instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
634 * mini-amd64.h: Adjust MonoW32ExceptionHandler signature.
636 * mini-x86.c (mono_arch_is_single_step_event): Adjust signature to pass void*
637 instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
638 (mono_arch_is_breakpoint_event): Adjust signature to pass void*
639 instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
641 * mini-x86.h: Adjust MonoW32ExceptionHandler signature.
643 * exceptions-x86.c: Adjust W32_SEH_HANDLE_EX for new signature.
645 * exceptions-amd64.c: Adjust W32_SEH_HANDLE_EX for new signature.
647 * mono-semaphore.h: Skeleton implementation for Windows.
649 Code contributed under MIT/X11 license.
651 2009-11-04 Jonathan Chambers <joncham@gmail.com>
653 * simd-intrinsics.c (simd_intrinsic_emit_setter): Unfix my fix.
655 Code contributed under MIT/X11 license.
657 2009-11-04 Jonathan Chambers <joncham@gmail.com>
659 * simd-intrinsics.c (simd_intrinsic_emit_setter): Fix windows build.
661 Code contributed under MIT/X11 license.
663 2009-11-04 Zoltan Varga <vargaz@gmail.com>
665 * aot-compiler.c (mono_save_xdebug_info): Bump the threshold for flushing
666 debug info to 100 because 10 still slows down gdb too much.
668 * method-to-ir.c (mono_method_to_ir): Avoid rethrowing thread abort exceptions
669 inside runtime invoke wrappers. This avoids the need to call ResetAbort () on
670 them in the wrappers.
672 2009-11-03 Zoltan Varga <vargaz@gmail.com>
674 * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
676 * simd-intrinsics.c (simd_intrinsic_emit_setter): Fix a warning.
678 * aot-runtime.c (mono_aot_get_method): Refactor some code into a new helper
679 function mono_aot_get_array_helper_from_wrapper ().
681 * aot-compiler.c (add_generic_class): Refactor the code a bit, really emit
682 array helper methods.
684 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
686 * simd-intrinsics.c (load_simd_vreg): Add extra argument to signal if
687 the value was loaded from memory.
689 * simd-intrinsics.c (simd_intrinsic_emit_setter): Store back to memory if
690 the value was loader from there.
692 * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Fail correctly for Shuffle
693 without constant swizzle.
695 2009-11-02 Jonathan Chambers <joncham@gmail.com>
697 * mini-amd64.c: Put soft debugger functions behind a
698 #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED.
700 * mini-amd64.h: disable the soft debugger in windows.
702 Code contributed under MIT/X11 license.
704 2009-11-02 Jonathan Chambers <joncham@gmail.com>
706 * mini-x86.c: Put soft debugger functions behind a
707 #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED.
709 Code contributed under MIT/X11 license.
711 2009-11-02 Jonathan Chambers <joncham@gmail.com>
713 * exceptions-x86.c (win32_handle_stack_overflow): Fix parameters
714 to mono_arch_find_jit_info_ext.
716 Code contributed under MIT/X11 license.
718 2009-11-03 Zoltan Varga <vargaz@gmail.com>
720 * debugger-agent.c: Include netinet/in.h to fix the bsd build.
722 * debugger-agent.c: Add support for filtering events by assemblies.
724 * debugger-agent.c (mono_debugger_agent_thread_interrupt): Return false if
725 the agent is not enabled.
727 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
729 * exceptions-x86.c: hopefully last change to fix the windows build.
730 This one courtesy of Jonathan Chambers.
732 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
734 * debugger-agent.c: remove unused function.
736 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
738 * debugger-agent.c: add #ifdefs for a few header files.
739 * mini-x86.h: disable the soft debugger in windows.
740 Step 1 of 2 to make this compile on windows with gcc.
742 2009-11-02 Zoltan Varga <vargaz@gmail.com>
744 * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Comment this out for now
745 as it breaks the build.
747 2009-07-01 Zoltan Varga <vargaz@gmail.com>
749 Merge the soft debugger branch.
751 * debugger-agent.h debugger-agent.c: New files containing the soft
752 mode debugger module.
754 * method-to-ir.c (mono_method_to_ir): Generate OP_SEQ_POINT opcodes
755 at the appropriate locations.
757 * mini-<ARCH>.c (mono_arch_output_basic_block): Handle OP_SEQ_POINT
760 * mini-<ARCH>.c: Add new arch-specific functions to set/clear breakpoints,
761 enable/disable single stepping.
763 * exceptions-<ARCH>.c (mono_arch_find_jit_info_ext): New stack unwinding api
764 which returns all information in a StackFrameInfo structure, and can handle the
765 LMF frames added by the debugger.
767 * mini-<ARCH>.h (MonoLMFExt): New structure containing additional information
770 * mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): New stack
771 walker function which works on a specific thread and passes a StackFrameInfo
772 structure to its callback.
774 * mini.c (mini_init): Initialize the debugger agent.
776 * aot-compiler.c aot-runtime.c: Add soft-debug support.
778 * mini-ops.h: Add OP_SEQ_POINT opcode.
780 * driver.c (mono_main): Add new '--debugger-agent' option for passing
781 arguments to the debugger agent.
783 2009-11-02 Zoltan Varga <vargaz@gmail.com>
785 * mini.c (mini_method_compile): Disable llvm for methods with an lmf here to
788 * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOCALLOC.
790 * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Implement this for x86.
792 * mini.c (mini_init): Avoid using the IMT trampoline in the LLVM case.
794 * mini-trampolines.c (mono_llvm_vcall_trampoline): Add a static rgctx trampoline
796 (mono_create_llvm_imt_trampoline): New function to create a trampoline which
797 sets the IMT argument and makes a virtual call.
799 * mini-llvm.c: Enable interface calls using the llvm imt trampoline.
801 2009-11-01 Zoltan Varga <vargaz@gmail.com>
803 * Makefile.am (llvm_sources): Enable the llvm option since it no longer breaks
806 2009-10-30 Zoltan Varga <vargaz@gmail.com>
808 * mini.c (mini_cleanup): Call profiler shutdown before shutting down the
809 runtime. Fixes #551228.
811 2009-10-29 Zoltan Varga <vargaz@gmail.com>
813 * mini-x86.c (mono_arch_output_basic_block): Fix % 1. Fixes #550970.
815 * basic.cs: Add a test.
817 * method-to-ir.c (mono_method_to_ir): Use EMIT_NEW_LOAD_MEMBASE_TYPE to
818 load vtypes instead if OP_LOADV_MEMBASE in the implementation of
819 CONSTRAINED. Fixes #550964.
821 * generics.cs: Add a test.
823 2009-10-28 Mark Probst <mark.probst@gmail.com>
825 * mini-posix.c (add_signal_handler): Use
826 mono_gc_get_suspend_signal() instead of GC_get_suspend_signal().
828 2009-10-28 Jerry Maine <crashfourit@gmail.com>
830 Contributed under the terms of the MIT/X11 license by
831 Jerry Maine <crashfourit@gail.com>.
833 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
834 sse4a for simd intrinsics.
836 * mini-amd64.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
837 sse4a for simd intrinsics.
839 2009-10-27 Zoltan Varga <vargaz@gmail.com>
841 * ir-emit.h method-to-ir.c: Change a few _IMM macros to assign to inst_imm
842 instead of inst_p1 which is not the same on ILP32 platforms.
844 2009-10-24 Zoltan Varga <vargaz@gmail.com>
846 * mini-ppc.c (mono_arch_emit_prolog): Load the current got address,
847 not the mscorlib one before calling mono_get_lmf_addr.
849 * tramp-ppc.c (mono_arch_create_trampoline_code_full): Fix the storing
850 of the ip to the LMF.
852 * method-to-ir.c (mono_method_to_ir): Fix the handling of the
853 immediate in the op->op_imm optimization.
855 * mini-ppc.c: Add a 'vtregs' field to ArgInfo to make the code easier to
856 understand. VTypes now work, but are not abi compliant, as they are
857 split into 4 byte parts instead of 8.
858 (emit_memcpy): Fix the unrolled case to work on the PS3.
860 * mini-ppc.c (get_delegate_invoke_impl): Fix this for the PS3.
862 * aot-compiler.c (mono_compile_assembly): Make the autoreg option
863 the default when static linking.
865 * mini-ppc.c (mono_arch_emit_prolog): Fix handling of I8 arguments.
867 * aot-compiler.c: Add an autoreg option to automatically register
868 statically linked aot modules using ELF .ctors.
870 * genmdesc.pl: Add __ppc64__ to allowed defines.
872 2009-10-25 Zoltan Varga <vargaz@gmail.com>
874 * mini-posix.c (add_signal_handler): Delay the GC suspend signal while
875 executing a SIGSEGV handler on an altstack, since libgc can't handle that.
877 2009-10-24 Mark Probst <mark.probst@gmail.com>
879 * exceptions-x86.c (mono_arch_find_jit_info): Fix build.
881 2009-10-24 Zoltan Varga <vargaz@gmail.com>
883 * mini-exceptions.c (mini_jit_info_table_find): Add an 'out_domain' argument
884 which will contain the domain where the method was found.
886 * exceptions-<ARCH>.c mini-exceptions.c: Update callers of
887 mini_jit_info_table_find ().
889 * aot-compiler.c (xdebug_end_emit): Remove so stray debug code.
891 * branch-opts.c (mono_if_conversion): Avoid running deadce if it is disabled.
893 2009-10-22 Zoltan Varga <vargaz@gmail.com>
895 * mini-x86.c (mono_arch_emit_prolog): Disable aot for methods with save_lmf
896 set, its not supported yet.
898 2009-10-22 Zoltan Varga <vargaz@gmail.com>
900 * aot-runtime.c (mono_aot_get_method): Avoid asserting if a array generic
901 iface wrapper is not found.
902 (mono_aot_get_method): Ditto for GetGenericValueImpl.
904 2009-10-21 Zoltan Varga <vargaz@gmail.com>
906 * aot-runtime.c (mono_aot_get_method): Fix support for the IList<T> wrappers,
907 which have a different name.
909 * aot-runtime.c (mono_aot_get_method): Special case the array generic iface
910 wrappers and Array.GetGenericValueImpl ().
912 * aot-compiler.c: Avoid emitting some wrappers which are not needed anymore
913 because of the change above.
915 * generics.cs: Add a test for full aot + generic array ifaces.
917 2009-10-19 Sebastien Pouliot <sebastien@ximian.com>
919 * aot-compiler.c (emit_plt): Remove duplicate 'debug_sym' variable
920 that hides the previous one.
922 2009-10-18 Zoltan Varga <vargaz@gmail.com>
924 * aot-compiler.c (can_marshal_struct): Allow some System.dll structs to be
925 marshalled. Fixes #541623.
927 2009-10-16 Zoltan Varga <vargaz@gmail.com>
929 * aot-compiler.c (emit_extra_methods): Remove some asserts which are not needed.
931 2009-10-15 Zoltan Varga <vargaz@gmail.com>
933 * mini.c (mono_op_imm_to_op): Handle OP_AND/OR/XOR_IMM.
935 2009-10-14 Massimiliano Mantione <massi@ximian.com>
937 * mini-posix.c (sigprof_signal_handler):
938 Implemented support for building stat call chans in different ways.
940 2009-10-14 Massimiliano Mantione <massi@ximian.com>
942 * mini-exceptions.c (mono_find_jit_info):
943 Also check that a jit info has been found (fixes a profiler crash).
945 2009-10-14 Massimiliano Mantione <massi@ximian.com>
947 * mini.c (mono_codegen):
948 Call mono_profiler_code_buffer_new with correct code address.
950 2009-10-14 Zoltan Varga <vargaz@gmail.com>
952 * driver.c (mono_main): Change the date in the copyright.
954 2009-10-14 Mark Probst <mark.probst@gmail.com>
956 * method-to-ir.c (mono_method_to_ir): Don't use a managed array
957 allocator in shared generic code for open classes, because we
958 can't get those classes' vtables. We need to make managed
959 allocators not depend on the vtable at compile-time to solve this.
961 2009-10-13 Martin Baulig <martin@ximian.com>
963 * debug-mini.c (mono_debugger_trampoline_compiled): Add
964 `const guint8 *trampoline' argument; send both the old and the new
967 2009-09-30 Zoltan Varga <vargaz@gmail.com>
969 * aot-compiler.c (add_wrappers): Add a runtime invoke wrapper which is used by
970 mono_runtime_capture_context () without calling mono_runtime_invoke ().
971 (can_marshal_struct): Skip structures with auto layout.
973 * tramp-arm.c (GEN_TRAMP_SIZE): Increase this by 4.
975 2009-10-02 Zoltan Varga <vargaz@gmail.com>
977 * mini-sparc.c (mono_arch_emit_setret): Emit long return values using OP_LMOVE.
978 (mono_arch_create_vars): Instead of allocating a stack slot by hand, allocate
979 a variable to hold the stack slot used by the int<->float conversion opcodes.
981 * mini-sparc.c (mono_arch_build_imt_thunk): Implement support for fail_tramp.
983 2009-10-04 Zoltan Varga <vargaz@gmail.com>
985 * aot-compiler.c (add_generic_class): Only add GetGenericValueImpl wrappers
988 2009-10-06 Zoltan Varga <vargaz@gmail.com>
990 * aot-compiler.c (add_generic_class): Add an instance of GenericComparer<T> for
991 each instance of Comparer<T>.
993 * generics.cs: Add a new test.
995 2009-10-09 Zoltan Varga <vargaz@gmail.com>
997 * driver.c (parse_debug_options): Add a 'gdb' option.
999 * mini.c (mini_parse_debug_options): Add a 'gdb' option.
1001 * image-writer.c: Add support for emitting the image into a memory buffer.
1003 * dwarfwriter.c: Add support for sharing one IL file between multiple images.
1005 * aot-compiler.c: Add support for registering debug info with GDB using the
1006 new JIT debugging interface in GDB 7.0. It can be turned on by setting
1007 MONO_XDEBUG to 'gdb'.
1009 2009-10-10 Zoltan Varga <vargaz@gmail.com>
1011 * aot-compiler.c (mono_save_trampoline_xdebug_info): Implement this for the
1014 2009-10-11 Zoltan Varga <vargaz@gmail.com>
1016 * aot-compiler.c (mono_save_xdebug_info): Emit a symbol for the method which
1017 can be used to set breakpoints in gdb.
1019 * image-writer.c (bin_writer_emit_writeout): Add support for setting the text
1020 segment to an absolute address.
1022 2009-10-13 Mark Probst <mark.probst@gmail.com>
1024 * method-to-ir.c: Use the managed array allocator method if
1027 2009-10-13 Bill Holmes <billholmes54@gmail.com>
1029 * aot-compiler.c : Fix the MSVC builds
1031 Code is contributed under MIT/X11 license.
1033 2009-10-13 Zoltan Varga <vargaz@gmail.com>
1035 * aot-compiler.c (mono_save_xdebug_info): Group methods into groups of 10 to
1036 avoid registering 1 symbol file per method with gdb.
1038 2009-09-29 Zoltan Varga <vargaz@gmail.com>
1040 * mini-sparc.c: Fix the handling of enums with base type long.
1042 * mini-sparc.c (mono_arch_output_basic_block): Fix IREM_UN_IMM.
1044 * mini-sparc.c (mono_arch_allocate_vars): Use mono_class_from_mono_type ()
1045 instead of using type->data.klass as the later doesn't work with generics.
1047 2009-09-25 Mark Probst <mark.probst@gmail.com>
1049 * method-to-ir.c, mini.h, mini-alpha.c, mini-amd64.c, mini-arm.c,
1050 mini-hppa.c, mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c,
1051 mini-s390x.c, mini-sparc.c, mini-x86.c: Thread.get_CurrentThread
1052 works differently now and we don't handle it in the JIT anymore.
1054 * mini.c, mini-exceptions.c, mini-posix.c, debug-debugger.c,
1055 debug-mini.c, tramp-amd64.c, tramp-x86.c: Changes resulting from
1056 the Thread class split.
1058 2009-09-25 Zoltan Varga <vargaz@gmail.com>
1060 * driver.c: Don't run tests with the obsolete treeprop optimization.
1062 * mini-sparc.c (mono_arch_create_vars): Make the component vars of a long ret
1063 variable volatile. Fixes #541577.
1065 * basic-calls.cs: Add a new test.
1067 * basic-long.cs: Remove tests which are now in basic-calls.cs.
1069 2009-09-24 Zoltan Varga <vargaz@gmail.com>
1071 * dwarfwriter.c (emit_debug_info_end): Disable this as it doesn't seem to
1072 work/required with recent iphone sdk versions.
1074 * aot-compiler.c (add_wrappers): Generate PtrToStructure wrappers for more
1077 * decompose.c (mono_decompose_vtype_opts): Avoid reading uninitialized memory
1078 in the VCALL decomposition code.
1080 2009-09-22 Zoltan Varga <vargaz@gmail.com>
1082 * mini-ia64.c (mono_arch_output_basic_block): Fix ISHR/ISHR_IMM.
1084 * basic.cs: Add a test.
1086 * mini-ia64.c (mono_arch_build_imt_thunk): Implement support the virtual
1089 * mini-exceptions.c (mini_jit_info_table_find): New helper function which
1090 searches all the domains of the current thread.
1092 * exceptions-<ARCH>.c: Use it. Fixes #539394.
1094 2009-09-21 Zoltan Varga <vargaz@gmail.com>
1096 * exceptions-arm.c (mono_arm_throw_exception): Set ctx->ebp to fp instead of sp
1097 so catching exceptions thrown in the same method works. Fixes exception17.exe.
1099 * tramp-arm.c (mono_arch_create_trampoline_code_full): Store NULL into lmf->method
1100 for non-jit trampolines.
1102 * mini.c (mono_jit_runtime_invoke): Allow string ctors with dyn runtime invoke.
1104 * aot-compiler.c (add_wrappers): Ditto.
1106 * mini-arm.c: Implement support for passing vtypes and floats, and increase
1107 the size of the param area used by dyn_call to 6 which covers the majority of
1110 * mini.c aot-compiler.c: Allow dyn_call for string methods except ctors.
1112 * mini-arm.c: Implement support for passing/receiving
1113 longs and receiving floats in the dyn_call code.
1115 * mini-amd64.c: Implement support for receiving vtypes in registers in
1118 * mini.c mini-amd64.c: Implement partial support for passing vtypes in
1121 2009-09-20 Zoltan Varga <vargaz@gmail.com>
1123 * mini-arm.c (get_call_info): Return more precise information in
1125 (dyn_call_supported): Use the information in CallInfo.
1127 * mini-arm.c: Enable support for returning vtypes in the dyn_call code.
1129 * mini.c mini-amd64.c: Enable support for returning vtypes in the dyn_call
1132 * mini-arm.c: Update after the dyn_call api changes.
1134 * mini.c (mini_create_jit_domain_info): Register a destructor function
1135 for the runtime_invoke_hash.
1137 * mini-amd64.c (mono_arch_get_dyn_call_args): Rename this to
1138 'mono_arch_dyn_call_start'. Pass the pointer to the return value buffer to
1140 (mono_arch_get_dyn_call_ret): Rename this to 'mono_arch_dyn_call_finish'.
1141 (dyn_call_supported): Simplify this by using get_call_info ().
1142 (mono_arch_dyn_call_free): New destructor function.
1144 * generics.cs: Remove a printf.
1146 * method-to-ir.c (mono_method_to_ir): Allocate some param area for DYN_CALL.
1148 * mini-arm.c: Add support for enum return values and passing a few arguments
1151 * mini.c (mono_jit_runtime_invoke): Add support for enum return values to
1154 * mini-amd64.c (mono_arch_get_dyn_call_ret): Ditto.
1156 * aot-compiler.c (add_wrappers): Add a few restrictions for the use of
1157 the dynamic invoke wrappers.
1159 * mini-arm.c: Implement OP_DYN_CALL for arm.
1161 * aot-compiler.c (add_wrappers): Avoid aot-ing runtime invoke wrappers
1162 supported by the dynamic runtime invoke wrapper.
1164 * aot-compiler.c aot-runtime.c: Add support for encoding the dynamic
1165 runtime invoke wrapper.
1167 * mini.c (mono_jit_runtime_invoke): Use the dynamic runtime invoke wrappers
1168 if possible when running with full-aot.
1170 * mini-ops.h: Add OP_DYN_CALL opcode.
1172 * mini-amd64.c method-to-ir.c: Add infrastructure for making method calls
1173 with dynamic arguments lists similar to libffi.
1175 2009-09-19 Zoltan Varga <vargaz@gmail.com>
1177 * method-to-ir.c: Fix the previous change on 64 bit platforms.
1179 * method-to-ir.c: Applied patch from Rodrigo Kumpera. Allow an i8 argument
1182 * iltests.il.in: Add a new test.
1184 2009-09-18 Zoltan Varga <vargaz@gmail.com>
1186 * aot-compiler.c (add_generic_instances): Add more instances of
1187 GenericEqualityComparer.
1189 2009-09-18 Rodrigo Kumpera <rkumpera@novell.com>
1191 * mini.c: Add asserts for mono_class_vtable calls that are not meant to fail.
1193 2009-09-18 Rodrigo Kumpera <rkumpera@novell.com>
1195 * method-to-ir.c: Handle failures from mono_class_vtable. Added some
1196 comments on some functions that now can fail.
1198 2009-09-17 Andrew Jorgensen <ajorgensen@novell.com>
1200 * Makefile.am: Add Info.plist to EXTRA_DIST
1202 2009-09-16 Zoltan Varga <vargaz@gmail.com>
1204 * method-to-ir.c (mono_method_to_ir): Allow AOT for CEE_LDTOKEN in
1205 static synchronized wrappers. Fixes #539500.
1207 2009-09-14 Rodrigo Kumpera <rkumpera@novell.com>
1209 * jit-icalls.c (mono_class_static_field_address): handle vtable failure
1212 2009-09-16 Zoltan Varga <vargaz@gmail.com>
1214 * mini-exceptions.c (mono_handle_exception_internal): Store the computed
1215 lmf before calling filter clauses as well. Fixes #539550.
1217 * exceptions.cs: Add a test.
1219 2009-09-14 Zoltan Varga <vargaz@gmail.com>
1221 * aot-compiler.c (add_generic_class): Add instances of
1222 Array.GetGenericValueImpl as well.
1224 * Makefile.am (fullaotcheck): Copy and aot more assemblies so linq
1227 * generics.cs: Add a fullaot linq test.
1229 2009-09-10 Zoltan Varga <vargaz@gmail.com>
1231 * aot-compiler.c (arch_emit_static_rgctx_trampoline): Don't clobber argument
1234 2009-09-10 Bill Holmes <billholmes54@gmail.com>
1236 * mini-trampolines.c (mono_delegate_trampoline) : Call
1237 mono_cominterop_get_invoke if the delegate target object
1240 Code is contributed under MIT/X11 license.
1242 2009-09-09 Sebastien Pouliot <sebastien@ximian.com>
1244 * method-to-ir.c: For CoreCLR throw a SecurityException if an
1245 internal call is defined outside platform code. Reduce code
1246 duplication with existing [Method|Field]AccessException
1248 2009-09-08 Rodrigo Kumpera <rkumpera@novell.com>
1250 * mini-x86.c (mono_arch_emit_call): Don't reduce stack usage by 4
1251 if the return value is a small struct passed on regs.
1253 2009-09-09 Zoltan Varga <vargaz@gmail.com>
1255 * cpu-arm.md mini-arm.c: Remove unused opcodes.
1257 * mini-codegen.c: Enable the cpu description validation for arm.
1259 2009-09-08 Zoltan Varga <vargaz@gmail.com>
1261 * basic-calls.cs: Move the test_0_float_load_and_store_with_big_offset ()
1262 test which depends on structs to objects.cs.
1264 * basic-calls.cs: Remove calls to Console.WriteLine and throws, since those
1265 require object model related stuff working.
1267 * cpu-x86.md mini-x86.c: Remove more unused opcodes.
1269 * mini-ops.h: Fix OP_BIGMUL instruction descriptions.
1271 * mini-codegen.c (mono_local_regalloc): Validate the cpu description
1272 against the instruction metadata in mini-ops.h. amd64 only for now.
1274 * mini-ops.h: Fix some instruction descriptions.
1276 * mini-ops.h mini-x86.c mini-amd64.c cpu-<ARCH>.md: Remove some
1277 unused instructions.
1279 2009-09-06 Zoltan Varga <vargaz@gmail.com>
1281 * exceptions.cs: Add a new test.
1283 2009-09-05 Rodrigo Kumpera <rkumpera@novell.com>
1285 * mini-x86.c (needs_stack_frame): OSX requires full frames to keep proper alignment.
1287 2009-09-06 Zoltan Varga <vargaz@gmail.com>
1289 * mini-llvm.c (mono_llvm_emit_method): Add a few more missing casts,
1290 skip empty phi opcodes.
1292 * mini-llvm.c (mono_llvm_emit_method): Handle unsigned volatile variables
1293 correctly by zero extending after loads. Skip methods containing calls
1294 to the monitor enter/exit trampolines.
1296 * tramp-x86.c (mono_arch_create_trampoline_code): Align the stack
1297 when calling mono_thread_force_interruption_checkpoint ().
1299 * mini.c (mini_method_compile): Disable llvm when AOT compiling.
1301 * tramp-amd64.c (mono_arch_patch_callsite): Add support for 32 bit ->
1303 (mono_arch_nullify_class_init_trampoline): Read 'buf' instead of 'code'.
1305 * mini-llvm.c (mono_llvm_emit_method): Add a few missing conversions so a
1306 bootstrap could run.
1308 2009-09-04 Zoltan Varga <vargaz@gmail.com>
1310 * mini.c (mini_init): Set callbacks.get_runtime_build_info ().
1312 2009-09-03 Zoltan Varga <vargaz@gmail.com>
1314 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass the start
1316 mono_breakpoint_clean_code () when using LLVM as the prologues generated by
1317 LLVM might be very short.
1319 * mini-x86.c (mono_arch_output_basic_block): Maintain stack alignment
1320 in OP_THROW/RETHROW.
1322 * exceptions-x86.c: Rewrite the throw trampolines so they maintain stack
1325 2009-09-03 Zoltan Varga <vargaz@gmail.com>
1327 * mini-amd64.c (mono_arch_get_vcall_slot): Pass the start of the method to
1328 mono_breakpoint_clean_code () when using LLVM as the prologues generated by
1329 LLVM might be very short.
1331 2009-09-01 Zoltan Varga <vargaz@gmail.com>
1333 * exceptions-x86.c (throw_exception): Fix the previous change by substracting
1334 the alignment for the value of sp.
1336 2009-09-01 Geoff Norton <gnorton@novell.com>
1338 * mini.c (mono_get_lmf_addr): Fix jit_thread_attach for native to
1339 managed wrappers in full aot.
1341 2009-08-31 Zoltan Varga <vargaz@gmail.com>
1343 * exceptions-x86.c (get_throw_exception): Align the stack on osx.
1345 2009-08-28 Zoltan Varga <vargaz@gmail.com>
1347 * mini-llvm-cpp.cpp mini-llvm.c: Update to latest llvm api.
1349 2009-08-25 Zoltan Varga <vargaz@gmail.com>
1351 * aot-compiler.c (emit_exception_debug_info): Emit ei->flags too.
1353 * aot-runtime.c (decode_exception_debug_info): Decode ei->flags from the
1356 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
1358 * aot-runtime.c aot-compiler.c: Emit exception causes fully so we don't
1359 depend on the info MonoMethodHeader which could be missing in IL stripped
1362 2009-08-25 Zoltan Varga <vargaz@gmail.com>
1364 * mini-arm.c (add_general): Fix the passing of 64 bit values on darwin, where
1365 they are only 4 byte aligned.
1367 2009-08-21 Zoltan Varga <vargaz@gmail.com>
1369 * mini-arm.c (mono_arch_allocate_vars): Use FP as the frame pointer as
1370 was done previously, since using SP causes too many problems.
1372 * exceptions-arm.c: Fix the handling of sp/fp so unwinding through
1373 frames without a frame pointer works.
1375 * mini-arm.c (mono_arch_get_global_int_regs): Avoid using V5 as a
1376 global register in methods with calls, since the calls can go through
1377 a static rgctx trampoline which doesn't save it.
1379 2009-08-19 Zoltan Varga <vargaz@gmail.com>
1381 * mini-arm.c (mono_arch_context_get_int_reg): Handle SP as well.
1383 2009-08-18 Zoltan Varga <vargaz@gmail.com>
1385 * aot-compiler.c (add_generic_instances): Fix the net 1.1 build.
1387 2009-08-18 Christian Hergert <chris@dronelabs.com>
1389 * method-to-ir.c: Fix warnings for uninitialized variables.
1391 2009-08-18 Christian Hergert <chris@dronelabs.com>
1393 * mini-exceptions.c:
1394 * aot-compiler.c: Fix printf warnings.
1396 2009-08-18 Zoltan Varga <vargaz@gmail.com>
1398 * aot-compiler.c (add_generic_instances): Add string[] wrapper methods.
1399 Add GetGenericValueImpl<string>.
1401 * aot-compiler.c (add_generic_instances): Add instances of
1402 GenericEqualityComparer<T> for primitive types. Only emit the array
1403 wrappers into the mscorlib image.
1405 2009-08-15 Zoltan Varga <vargaz@gmail.com>
1407 * aot-runtime.c (load_method): Rename 'aot_module' -> 'amodule'. Allocate
1408 the methods_loaded array using amodule->info->nmethods.
1410 * mini.h (MonoAotFileInfo): Add an 'nmethods' field.
1411 (MONO_AOT_FILE_VERSION): Bump this.
1413 * aot-compiler.c: Emit more generic instances allowing some parts of linq
1416 * aot-runtime.c (mono_aot_get_unwind_info): Handle the case when the
1417 MonoJitInfo doesn't belong to its methods aot image.
1419 2009-08-14 Zoltan Varga <vargaz@gmail.com>
1421 * mini-arm.c (mono_arch_allocate_vars): Use SP as the default frame reg.
1423 * mini-arm.c: Fix warnings.
1425 * mini-arm.c (mono_arm_emit_load_imm): Only emit a movt if needed.
1427 * mini-arm.c (mono_arm_emit_load_imm): Use movt/movw if the cpu
1430 2009-08-12 Zoltan Varga <vargaz@gmail.com>
1432 * aot-compiler.c (arch_emit_imt_thunk): Rework the arm code to
1433 avoid clobbering IP.
1435 * mini-trampolines.c (mono_magic_trampoline): Allocate a local to
1436 hold the trampoline argument, so its initial value is available during
1439 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1442 * exceptions-hppa.c:
1444 * exceptions-s390x.c:
1445 * exceptions-mips.c:
1447 * exceptions-sparc.c:
1448 * exceptions-alpha.c:
1450 * mini-trampolines.c:
1452 * exceptions-s390.c: add and use #define's instead of sizeof()
1453 for MonoJitInfo and MonoJitInfoTable.
1455 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
1460 * tramp-x86.c: use a #define instead of sizeof() for a few
1461 structures that use a zero-length array.
1463 2009-08-07 Rodrigo Kumpera <rkumpera@novell.com>
1465 * method-to-ir.c (mono_method_to_ir/CEE_CONSTRAINED_): Handle the
1466 case when the method is dynamic. Fixes #529238.
1468 2009-08-06 Zoltan Varga <vargaz@gmail.com>
1470 * mini.c (mono_jit_compile_method_inner): Throw an exception instead
1471 of asserting when a method is JIT compiled in full-aot mode.
1473 2009-08-03 Jerry Maine <crashfourit@gmail.com>
1475 Contributed under the terms of the MIT/X11 license by
1476 Jerry Maine <crashfourit@gail.com>.
1478 * fixed wrong dates in changelog.
1480 2009-08-03 Jerry Maine <crashfourit@gmail.com>
1482 Contributed under the terms of the MIT/X11 license by
1483 Jerry Maine <crashfourit@gail.com>.
1485 * basic-simd.cs: added test for packed double square root.
1486 * cpu-amd64.md: added opcode info for packed double square root.
1487 * cpu-x86.md: added opcode info for packed double square root.
1488 * mini-ops.h: added IR opcode for packed double square root.
1489 * mini-x86.c: added IR to native translation code for packed double square root.
1490 * mini-amd64.c: removed todo for packed double square root.
1491 * simd-intrinsics.c: added method to IR opcode converstion for
1492 packed double square root.
1494 2009-08-03 Jerry Maine <crashfourit@gmail.com>
1496 Contributed under the terms of the MIT/X11 license by
1497 Jerry Maine <crashfourit@gail.com>.
1499 * mini-amd64.c: Added a change to help tell the difference as
1500 to what perpose the xmm register is being used--mainly to help
1502 * mini-amd64.h: Changed callee regs to use 15 out of 16
1503 (one used for special cases) xmm registers for both fp
1504 and simd ops. Added define to turn on new feature in the regalloc
1505 that allows fp and simd ops to share the xmm regs happily.
1506 * codegen.c: Added code to detect for which perpose an xmm reg is
1507 being used (fp or simd) and to translate back and forth to the
1508 correct logical reg bank (fp or simd) for 'spill load's.
1510 2009-08-03 Jerry Maine <crashfourit@gmail.com>
1512 Contributed under the terms of the MIT/X11 license by
1513 Jerry Maine <crashfourit@gail.com>.
1515 * basic-simd.cs: Added tests for stressing the regalloc when running with
1516 16 simd regs and when simd and fp ops share the same reg bank.
1518 2009-08-01 Mark Probst <mark.probst@gmail.com>
1520 * method-to-ir.c (mini_emit_stobj): If we call mono_value_copy()
1521 in shared generic code, we might have to look up the class in the
1522 RGCTX. If we use the class directly, compute its GC descriptor.
1524 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
1526 * mini.c (mono_jit_runtime_invoke): Fix a warning.
1528 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
1530 * mini.c (mono_jit_runtime_invoke): Initialize the class and
1531 check for errors. Fixed the case when the class with the Main
1534 2009-07-31 Jerry Maine <crashfourit@gmail.com>
1536 Contributed under the terms of the MIT/X11 license by
1537 Jerry Maine <crashfourit@gail.com>.
1539 * cpu-amd64.md: Fixed simple bug in machine discrition file.
1541 2009-07-31 Zoltan Varga <vargaz@gmail.com>
1543 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_IREM_UN_IMM.
1545 2009-08-30 Rodrigo Kumpera <rkumpera@novell.com>
1547 * method-to-ir.c: Fix naming of stelem and ldelem.
1549 2009-07-30 Zoltan Varga <vargaz@gmail.com>
1551 * driver.c (main_thread_handler): Check that the assembly loaded
1552 matches the filename when doing AOT.
1554 2009-07-30 Mark Probst <mark.probst@gmail.com>
1556 * mini.c: get_ip_from_sigctx installer has been removed, so don't
1559 * mini-x86.h, mini-amd64.h, mini-ppc.h: UCONTEXT macros moved (to
1560 utils/mono-sigcontext.h).
1562 * exceptions-amd64.c: Use the UCONTEXT_GREGS macro instead of an
1565 2009-07-29 Massimiliano Mantione <massi@ximian.com>
1567 * mini.c (mono_codegen):
1568 Call profiler hook to keep track of method code buffers.
1570 2009-07-27 Mark Probst <mark.probst@gmail.com>
1572 * method-to-ir.c: Invoke write barriers for the
1573 Interlocked.(Compare)Exchange JIT intrinsics.
1575 2009-07-26 Raja R Harinath <harinath@hurrynot.org>
1577 * Makefile.am (version.h): Fix issues when built out of tree.
1578 Remove some redundant 'grep's piped through 'sed's.
1580 Fri Jul 24 17:28:37 CEST 2009 Steven Munroe <munroesj@us.ibm.com>
1582 This patch is contributed under the terms of the MIT/X11 license
1584 * mini-ppc.c (mono_arch_output_basic_block):
1585 (OP_STOREI1_MEMBASE_REG): Handle 32-bit offsets combining addis
1586 for bits 32-47 with signed load/store diplacements for bits
1587 48-63. Use prefered base/offset order for indexed form.
1588 (OP_STOREI2_MEMBASE_REG, OP_STORE_MEMBASE_REG): Same.
1589 (OP_LOAD_MEMBASE, OP_LOADI4_MEMBASE, OP_LOADU4_MEMBASE,
1590 OP_LOADI1_MEMBASE, OP_LOADU1_MEMBASE, OP_LOADU2_MEMBASE,
1591 OP_LOADI2_MEMBASE): Same.
1592 (OP_STORER8_MEMBASE_REG, OP_LOADR8_MEMBASE,
1593 OP_STORER4_MEMBASE_REG, OP_LOADR4_MEMBASE): Same.
1594 (OP_STOREI1_MEMINDEX): Use prefered base/offset order for
1596 (OP_STOREI2_MEMINDEX, OP_STORE_MEMINDEX): Same.
1597 (OP_LOAD_MEMINDEX, OP_LOADI4_MEMINDEX, OP_LOADU4_MEMINDEX,
1598 OP_LOADU2_MEMINDEX, OP_LOADI2_MEMINDEX, OP_LOADU1_MEMINDEX,
1599 OP_LOADI1_MEMINDEX): Same
1600 (OP_LOADR4_MEMINDEX, OP_LOADR8_MEMINDEX, OP_STORER4_MEMINDEX,
1601 OP_STORER8_MEMINDEX): Same
1602 (OP_JMP): Use addis/addi sequence for int cfg->stack_usage
1604 (mono_arch_emit_prolog): Handle 32-bit offsets combining addis
1605 for bits 32-47 with signed load/store diplacements for bits
1606 48-63. Use prefered base/offset order for indexed form.
1608 Fri Jul 24 16:57:12 CEST 2009 Steven Munroe <munroesj@us.ibm.com>
1610 This patch is contributed under the terms of the MIT/X11 license
1612 * mini-ppc.c: Define PPC_MOVE_FPR_GPR and PPC_ISA_64.
1613 (mono_arch_get_vcall_slot): Fx pointer to int cast warning.
1614 (mono_arch_decompose_opts): Make OP_ICONV_TO_R4 and
1615 OP_ICONV_TO_R8 decompose conditional on !PPC_ISA_64.
1616 (mono_arch_output_basic_block) [OP_JMP]: Use ppc_load32 for
1617 cfg->stack_usage to avoid size warnings.
1618 (mono_arch_output_basic_block) [__mono_ppc64__]: Replace
1619 store/load sequence with mffgpr if PPC_MOVE_FPR_GPR is true.
1620 (mono_arch_output_basic_block) [!__mono_ppc64__]: For
1621 OP_ICONV_TO_R4 or OP_ICONV_TO_R8 and PPC_ISA_64 use fcfid
1623 (mono_arch_emit_prolog): Move mono_emit_unwind_op_def_cfa
1624 after code varible is initialized.
1625 Add g_assert ppc_is_imm16 for ainfo->offset. Handle
1626 ainfo->size == 8 when ainfo->offset !ppc_is_imm16.
1627 (mono_arch_emit_epilog):
1628 Move Use ppc_load32 for cfg->stack_usage to avoid size
1631 2009-07-24 Mark Probst <mark.probst@gmail.com>
1633 * method-to-ir.c: The write barrier doesn't do the store anymore,
1634 so we have always to emit it. Also, emit the wbarrier after the
1637 2009-07-24 Zoltan Varga <vargaz@gmail.com>
1639 * mini-arm.c (mono_arch_get_delegate_invoke_impls): Add a trampoline
1640 for argument count 3 too.
1642 2009-07-23 Zoltan Varga <vargaz@gmail.com>
1644 * mini.c (mono_jit_compile_method_with_opt): Add an 'ex' argument to let
1645 the caller handle the exceptions.
1646 (mono_jit_runtime_invoke): Handle exceptions thrown while compiling the
1647 method. Fixes #524498.
1649 2009-07-22 Geoff Norton <gnorton@novell.com>
1651 * mini-exceptions.c: Fix build on ia64.
1653 2009-07-22 Mark Probst <mark.probst@gmail.com>
1655 * mini-exceptions.c (ves_icall_get_frame_info): Use write
1658 2009-07-21 Zoltan Varga <vargaz@gmail.com>
1660 * mini-arm.c (mono_arch_emit_prolog): Fix thread attaching in aot
1663 2009-07-20 Zoltan Varga <vargaz@gmail.com>
1665 * basic-simd.cs (Main): Pass args to the test driver.
1667 2009-07-20 Geoff Norton <gnorton@novell.com>
1669 * mini-x86.h: Fix the x86 version guards to use Apple's
1670 properly defined macros.
1672 2009-07-20 Geoff Norton <gnorton@novell.com>
1674 * mini-x86.c: Fix --trace on darwin-x86 and other systems which require
1677 2009-07-20 Zoltan Varga <vargaz@gmail.com>
1679 * mini.c (mono_jit_runtime_invoke): Speed this up by adding a hash to
1680 MonoJitDomainInfo which maps MonoMethod's to a structure containing all
1681 the information which is needed for invokes, so only one locking+hash table
1684 * aot-compiler.c: Add a 'tool-prefix' option to be used when cross-compiling.
1686 * aot-compiler.c (add_generic_instances): Emit instances of
1687 GenericComparer<T> for primitive types.
1689 2009-07-19 Rodrigo Kumpera <rkumpera@novell.com>
1691 * mini-posix.c: Fix linux build.
1693 2009-07-19 Geoff Norton <gnorton@novell.com>
1695 * mini.h: Add prototypes for mono_runtime_syscall_fork and
1696 mono_gdb_render_native_backtraces
1697 * mini-darwin.c: Apple's syscall(SYS_fork) is very weird on x86,
1698 so we implement the sane semantics to the runtime here
1699 (mono_gdb_render_native_backtraces). Apple also uses an ancient gdb
1700 so we need to call it differently (mono_gdb_render_native_backtraces)
1701 * mini-posix.c: Move the old semantics from mini.c to the prototypes
1702 here for default implementations.
1703 * mini.c: Refactor mono_handle_native_sigsegv so that we can properly
1704 support Apple's weird syscall (SYS_fork) implementation and not busy
1705 loop in abort() on native crashes on OSX anymore.
1707 2009-07-18 Zoltan Varga <vargaz@gmail.com>
1709 * aot-runtime.c (load_method): Change the handling of the
1710 MONO_LASTAOT env variable so MONO_LASTAOT=0 means that no aot methods
1713 * mini.c (mono_patch_info_equal): Really fix the handling of RGCTX_FETCH.
1715 2009-07-17 Zoltan Varga <vargaz@gmail.com>
1717 * mini.c (mono_patch_info_equal): Revert the last change for now as it
1718 seems to break the aot tests.
1720 * mini.c (mono_patch_info_equal): Fix the handling of
1721 MONO_PATCH_INFO_RGCTX_FETCH.
1723 2009-07-16 Zoltan Varga <vargaz@gmail.com>
1725 * unwind.c: Use TARGET_AMD64 instead of __x86_64__.
1727 * mini.c (mono_patch_info_hash): Fix the handling of
1728 MONO_PATCH_INFO_INTERNAL_METHOD.
1729 (mono_patch_info_equal): Ditto.
1731 2009-07-16 Zoltan Varga <vargaz@gmail.com>
1733 * mini-llvm.c (mono_llvm_emit_method): Use module instead of ctx->module
1736 * mini-llvm.c: Add some infrastructure for AOT support.
1738 2009-07-15 Zoltan Varga <vargaz@gmail.com>
1740 * mini-llvm-cpp.c: Update to the latest llvm api.
1742 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Set the EnablePrettyStackTrace
1743 option to false to prevent llvm from installing signal handlers which
1746 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
1749 * cpu-amd64.md: Revert previous change as those instructions
1750 take 2 separate arguments. Remember to read the arch docs more
1751 carefully next time.
1753 2009-07-15 Zoltan Varga <vargaz@gmail.com>
1755 * mini-llvm-cpp.cpp (mono_llvm_build_alloca): Update to latest llvm api.
1757 Wed Jul 15 17:20:27 CEST 2009 Paolo Molaro <lupus@ximian.com>
1759 * mini-ppc.c: exploit multiple load/store units if available (rest of
1760 the change from Steven Munroe (<munroesj@us.ibm.com>) first patch at
1761 http://bugzilla.novell.com/show_bug.cgi?id=487846).
1763 Wed Jul 15 16:24:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
1765 * mini-ppc.c: integrate most of Steven Munroe (<munroesj@us.ibm.com>)
1766 first patch at http://bugzilla.novell.com/show_bug.cgi?id=487846.
1768 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
1770 * cpu-x86.md: Fix missing clobbering from trancendental simd
1773 * cpu-amd64.md: Same.
1775 2009-07-14 Jerry Maine <crashfourit@gmail.com>
1777 Contributed under the terms of the MIT/X11 license by
1778 Jerry Maine <crashfourit@gail.com>.
1780 * basic-simd.cs: Added tests for single and doulble indexers.
1782 * cpu-amd64.md: Added simd opcode information.
1784 * mini-amd64.c: Added IR to native simd generation code.
1785 Added simd register names and function that returns them.
1787 * mini-amd64.h: Added marcos to turn on simd code compilation in
1788 amd64. Added max simd register count marco. Added caller/callee
1789 register mask marcos. Added marcos to use simd register bank.
1791 * mini.h: Added helper marco for shufling dwords and simple
1794 2009-07-14 Zoltan Varga <vargaz@gmail.com>
1796 * mini-llvm-cpp.cpp: Update to latest llvm SVN api.
1798 * Makefile.am (mono_LDADD): Pass LLVM_LDFLAGS to the linked.
1800 * unwind.c (mono_unwind_get_ops_from_fde): Make this return
1801 the length of the native code as well.
1803 * basic-simd.cs: Add a test for #521662.
1805 Mon Jul 13 17:58:50 CEST 2009 Paolo Molaro <lupus@ximian.com>
1807 * mini-ppc.c: fixed bug introduced by Steven's TLS changes.
1809 2009-07-13 Mark Probst <mark.probst@gmail.com>
1811 * mini.c: Register function for getting the IP from a signal
1812 context with metadata.
1814 2009-07-13 Zoltan Varga <vargaz@gmail.com>
1816 * method-to-ir.c (mono_method_to_ir): When calling a gshared method,
1817 call a generic class init trampoline if needed. Fixes #519336.
1819 * generics.cs: Add a test.
1821 2009-07-09 Mark Probst <mark.probst@gmail.com>
1823 * method-to-ir.c: When doing a call which might be remote from
1824 shared generic code to other shared code with open type arguments,
1825 get the remoting invoke wrapper from the RGCTX and do an indirect
1828 2009-07-03 Zoltan Varga <vargaz@gmail.com>
1830 * mini-trampolines.c (get_unbox_trampoline): Add an rgctx trampoline
1831 after the unbox trampoline in the full-aot case.
1833 2009-07-02 jonas echterhoff <jonas@unity3d.com>
1835 * mini.c: Move initialization of jit_mutex before debugger initialization
1840 * Info.plist: added Info.plist and link flag to enable the mono executable
1841 to access other processes. Requires codesigning of the executable to work.
1843 * mdb-debug-info32-darwin.s: The same as mdb-debug-info32.s, changed to
1848 2009-06-30 Zoltan Varga <vargaz@gmail.com>
1850 * driver.c (mini_regression): Handle loading errors. Fixes #508869.
1852 2009-06-29 Zoltan Varga <vargaz@gmail.com>
1854 * mini-exceptions.c (get_generic_context_from_stack_frame): Fix the case
1855 when the generic instance is an instantiation of a subclass of the
1856 methods class. Fixes #517166.
1858 2009-06-26 Zoltan Varga <vargaz@gmail.com>
1860 * mini-amd64.c (mono_arch_emit_prolog): Fix thread attaching in AOTed
1863 * mini.c (mono_jit_thread_attach): Allow domain to be NULL for calls from
1866 * CMakeLists.txt: Add minimal support for installation.
1868 2009-06-25 Zoltan Varga <vargaz@gmail.com>
1870 * aot-compiler.c (emit_and_reloc_code): Factor out the code to
1871 determine whenever a method is directly callable to a separate function.
1873 * mini-<ARCH>.c tramp-<ARCH>.c: Remove needless casts and add new
1874 needed ones as a result of the previous change.
1876 * mini-<ARCH>.c tramp-<ARCH>.c: Use mgreg_t* as the
1877 type of register arrays.
1879 * mini-trampolines.c tramp-<ARCH>.c aot-runtime.c: Use mgreg_t* as the
1880 type of register arrays.
1882 2009-06-24 Jerry Maine <crashfourit@gmail.com>
1884 Contributed under the terms of the MIT/X11 license by
1885 Jerry Maine <crashfourit@gail.com>.
1887 * mini-amd64.c: Added code to convert simd IR to native amd64 sse.
1889 2009-06-24 Zoltan Varga <vargaz@gmail.com>
1891 * aot-compiler.c (emit_plt): Define debug labels for most plt entries.
1893 2009-06-24 Neale Ferguson <neale@sinenomine.net>
1895 * mini-s390x.c: Correct LCONV_TO_Ix and ICONV_TO_Ix routines. Fix leave_method
1896 dump of structure return value. Fix some formatting.
1897 * cpu-s390x.md: Fix lengths of instruction sequences.
1898 * mini-s390.c: Minor formatting changes.
1900 2009-06-24 Zoltan Varga <vargaz@gmail.com>
1902 * mini-x86.h: Applied patch from Romain Tartiere (romain@blogreen.org).
1903 Use sigaction on freebsd as well.
1905 2009-06-23 Zoltan Varga <vargaz@gmail.com>
1907 * mini.h: Don't define MONO_ARCH_HAVE_TLS_GET to 0, as some code
1910 * mini.c (mini_init): Revert a change which breaks cross-compilation.
1912 2009-06-22 Mark Probst <mark.probst@gmail.com>
1914 * mini-ppc.c, cpu-ppc.md: Enable TLS on Darwin/G4.
1916 2009-06-22 Mark Probst <mark.probst@gmail.com>
1918 * mini.c, mini.h: Tell the runtime whether we support MONO_TLS.
1920 2009-06-20 Martin Baulig <martin@ximian.com>
1923 (MonoDebuggerThreadFlags): New enum typedef.
1924 (MonoDebuggerThreadInfo): Added `guint32 thread_flags'.
1925 (mono_debugger_thread_created): Added `gpointer func' argument;
1926 initialize the new `thread_flags' field.
1928 2009-06-18 Martin Baulig <martin@ximian.com>
1930 * debug-debugger.h (MonoDebuggerRuntimeFlags): New enum typedef.
1931 (MonoDebuggerInfo): Renamed the `dummy' field info `runtime_info'.
1934 (mini_debugger_set_attach_ok): New function; sets the attach-ok
1935 flag in `MONO_DEBUGGER__info.runtime_info'.
1938 (mono_main): Call mini_debugger_set_attach_ok() if generics
1939 sharing is disabled.
1941 2009-06-22 Zoltan Varga <vargaz@gmail.com>
1943 * aot-compiler.c (add_wrappers): Fix a warning.
1945 * mini-ppc.c tramp-ppc.c exceptions-ppc.c aot-compiler.c: Update after
1946 the ppc load/store macro changes.
1948 2009-06-21 Zoltan Varga <vargaz@gmail.com>
1950 * tramp-ppc.c (mono_arch_patch_plt_entry): Implement this.
1952 * aot-compiler.c (mono_compile_assembly): Sanitize the plt symbol too,
1953 not just the got symbol.
1955 * mini-ppc.c aot-compiler.c unwind.c: Implement generation of unwind info
1958 * aot-compiler.c unwind.c: Add infrastructure for unwind support on
1961 * aot-compiler.c: Remove some fixmes.
1963 * driver.c (mono_main): Print a helpful message when cross-compiling.
1965 * mini.c (mini_init): Disable signal handlers when cross-compiling.
1967 * method-to-ir.c (initialize_array_data): Do the optimization if the
1968 target byte order is little endian, instead of the host byte order.
1970 * aot-compiler.c: Emit sizes for most symbols, only emit runtime-invoke
1971 wrappers into the mscorlib image, Emit a unique plt symbol for each
1972 image, emit symbols for plt entries.
1974 * image-writer.c (img_writer_emit_symbol_size): New function to emit
1977 2009-06-20 Zoltan Varga <vargaz@gmail.com>
1979 * aot-compiler.c (add_wrappers): Avoid calling
1980 mono_marshal_get_type_info () since it can assert for some types.
1982 * method-to-ir.c (mono_method_to_ir): Disable aot when some forms of
1983 ldtoken are used inside wrappers.
1985 * helpers.c: Add support for prefixing tools with the arch name.
1987 * mini.h (OP_LOADR_MEMBASE): New opcodes to load/store pointer sized
1988 quantities when using ilp32.
1990 * mini-codegen.c: Use OP_LOADR_MEMBASE/OP_STORER_MEMBASE for loading/storing
1991 spill slots. Use sizeof(mgreg_t) for the spill slot size.
1993 * image-writer.c: Use .long on ilp32.
1995 * aot-compiler.c: Use 32 bit loads on ilp32.
1997 2009-06-19 Zoltan Varga <vargaz@gmail.com>
1999 * tramp-ppc.c (mono_arch_create_trampoline_code): Fix the ppc build.
2001 * mini-ops.h: Use TARGET_POWERPC define for consistency.
2003 * patch-info.h: Add 'MSCORLIB_GOT_ADDR' patch type.
2005 * aot-compiler.c aot-runtime.c: Put the mscorlib got address into the
2006 second got slot of every aot image.
2008 * aot-compiler.c aot-runtime.c mini-trampolines.c: Add support for
2009 aot on platforms with function pointers.
2011 * mini-ppc.h mini-ppp.c cpu-ppc.md exceptions-ppc.c tramp-ppc.c: Add
2012 support for aot/full aot on ppc/ppc64.
2014 * tramp-<ARCH>.c (mono_arch_patch_plt_entry): Add 'got' and 'regs'
2015 arguments which are needed on ppc.
2017 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Add 'regs'
2020 * mini-trampolines.c aot-runtime.c: Update after the above changes.
2022 * liveness.c (BITS_PER_CHUNK): Use MONO_BITSET_BITS_PER_CHUNK.
2024 * regalloc2.c (BITS_PER_CHUNK): Ditto.
2026 * aot-compiler.c (emit_got_info): Fix reading unused memory.
2028 * ir-emit.h (alloc_dreg): Add a 'return -1' to quiet some compilers.
2030 2009-06-17 Geoff Norton <gnorton@novell.com>
2032 * aot-compiler.c: Ensure we dont try to close a null dwarf writer.
2034 2009-06-17 Zoltan Varga <vargaz@gmail.com>
2036 * dwarfwriter.c (mono_dwarf_writer_create): Add an 'appending' parameter
2037 to control whenever the dwarf writer is in xdebug or aot mode.
2038 (emit_class_dwarf_info): Use a separate abbrev for structures without
2041 * aot-compiler.c: Pass the appending parameter to
2042 mono_dwarf_writer_create ().
2044 * branch-opts.c (mono_merge_basic_blocks): Fix the case when bbn
2045 falls through to its next bblock. Fixes #513931.
2047 * iltests.il: Add a test.
2049 * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Emit some line number
2050 infor even if emit_line is FALSE, as the apple linker seems to require it.
2052 * image-writer.c (asm_writer_emit_symbol_diff): Call get_label ().
2054 * dwarfwriter.c (emit_cie): Emit a separate symbol for the cie start, as
2058 2009-06-15 Zoltan Varga <vargaz@gmail.com>
2060 * exceptions-mips.c (mono_arch_get_throw_exception_by_name): Fix the
2063 2009-06-13 Zoltan Varga <vargaz@gmail.com>
2065 * mini.h (struct MonoBasicBlock): Add 'has_jump_table' and
2066 'has_call_handler' fields.
2068 * method-to-ir.c (mono_method_to_ir): Set them if needed.
2070 * branch-opts.c (mono_merge_basic_blocks): Avoid iterating through the
2071 first bblock if not needed. Fixes #512790.
2073 2009-06-11 Zoltan Varga <vargaz@gmail.com>
2075 * aot-compiler.c (mono_compile_assembly): Fix a warning.
2077 * aot-compiler.c (add_wrappers): Don't emit remoting-invoke-with-check
2080 * aot-runtime.c (mono_aot_get_method): Use the original method's code for
2081 remoting-invoke-with-check wrappers, which are not needed when running with
2082 full-aot, since it doesn't support remoting.
2084 2009-06-10 Zoltan Varga <vargaz@gmail.com>
2086 * aot-compiler.c (emit_got_info): Don't emit offsets for the plt got entries.
2088 * aot-compiler.c aot-runtime.c: Don't emit the first got offset in the
2089 method info, it is not used anymore.
2091 * mini.h: Bump AOT file format version.
2093 * aot-compiler.c (arch_emit_plt_entry): Make the arm plt entries one
2096 * aot-runtime.c (mono_aot_get_plt_info_offset): Update after the
2099 * tramp-arm.c (mono_arch_patch_plt_entry): Ditto.
2101 * mini.h: Bump AOT file format version.
2103 2009-06-10 Zoltan Varga <vargaz@gmail.com>
2105 * image-writer.c (asm_writer_emit_symbol_diff): Disable the
2106 TARGET_ASM_APPLE stuff for now, as it doesn't seem to work on the
2109 * mini-arm.c (mono_arch_output_basic_block): Fix the implementation
2110 of CKFINITE and FBGE for VFP.
2112 2009-06-09 Zoltan Varga <vargaz@gmail.com>
2114 * aot-compiler.c: Don't align code to 16 bytes on arm.
2116 * aot-compiler.c (emit_method_code): Emit the unbox trampolines right
2117 before the methods they belong to.
2119 * aot-runtime.c (mono_aot_plt_resolve): Avoid creating trampolines in
2120 the full-aot case if possible, since the trampoline will be called right
2123 * aot-compiler.c (mono_compile_assembly): Decrease the number of full aot
2124 trampolines to 1024 after the change above.
2126 * aot-compiler.c (arch_emit_specific_trampoline): Rework the arm
2127 trampoline to save 8 bytes per trampoline.
2129 * tramp-arm.c (mono_arch_create_trampoline_code_full): Update after the
2132 2009-06-08 Zoltan Varga <vargaz@gmail.com>
2134 * aot-compiler.c: Use acfg->temp_prefix instead of .L to prefix labels.
2136 2009-06-08 Martin Baulig <martin@ximian.com>
2139 (MonoDebuggerExceptionAction): Moved into debug-mini.h.
2140 (_mono_debugger_throw_exception): Don't make this static.
2141 (_mono_debugger_unhandled_exception): Likewise.
2142 (mono_debugger_handle_exception): Moved to mini-exceptions.c
2145 (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
2146 (_mono_debugger_throw_exception): Add function prototype.
2147 (_mono_debugger_unhandled_exception): Likewise.
2150 (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
2151 arg; return the first exception handler if the exception is caught
2152 and we're running inside the debugger.
2153 (mono_debugger_handle_exception): Moved here from debug-mini.c;
2154 improve exception handle inside runtime-invoke, check whether the
2155 exception is actually caught in the method being invoked and not
2156 by the runtime-invoke-wrapper.
2158 2009-06-08 Zoltan Varga <vargaz@gmail.com>
2160 * image-writer.c: Improve support for the osx assembler.
2162 * dwarfwriter.c: Avoid the usage of subsections if the assembler doesn't
2165 2009-06-08 Martin Baulig <martin@ximian.com>
2168 (MonoDebuggerExceptionAction): Moved into debug-mini.h.
2169 (_mono_debugger_throw_exception): Don't make this static.
2170 (_mono_debugger_unhandled_exception): Likewise.
2171 (mono_debugger_handle_exception): Moved to mini-exceptions.c
2174 (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
2175 (_mono_debugger_throw_exception): Add function prototype.
2176 (_mono_debugger_unhandled_exception): Likewise.
2179 (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
2180 arg; return the first exception handler if the exception is caught
2181 and we're running inside the debugger.
2182 (mono_debugger_handle_exception): Moved here from debug-mini.c;
2183 improve exception handle inside runtime-invoke, check whether the
2184 exception is actually caught in the method being invoked and not
2185 by the runtime-invoke-wrapper.
2187 2009-06-07 Zoltan Varga <vargaz@gmail.com>
2189 * image-writer.c (append_subsection): Don't align subsections of the
2190 debug_line section as a workaround.
2192 * dwarfwriter.c: Emit line number info in the AOT case as well.
2194 2009-06-06 Steven Munroe <munroesj@us.ibm.com>
2196 This patch is contributed under the terms of the MIT/X11 license
2198 * mini-ppc.c (mono_arch_emit_exceptions): Change assert to
2199 code_len <= code_size
2201 2009-06-06 Zoltan Varga <vargaz@gmail.com>
2203 * mini-mips.c (mips_emit_exc_by_name): Fix the mips build.
2205 2009-06-04 Zoltan Varga <vargaz@gmail.com>
2207 * aot-compiler.c aot-runtime.c: Delete references to static rgctx
2208 invoke wrappers, we now use trampolines instead.
2210 2009-06-04 Mark Probst <mark.probst@gmail.com>
2212 * mini-darwin.c: The exception thread must not be registered with
2215 2009-06-04 Mark Probst <mark.probst@gmail.com>
2217 * mini-gc.c: Disable the code because it makes SGen crash.
2219 2009-06-03 Zoltan Varga <vargaz@gmail.com>
2221 * aot-compiler.c (mono_compile_assembly): Handle file open errors gracefully
2222 instead of asserting.
2224 2009-05-31 Zoltan Varga <vargaz@gmail.com>
2226 * aot-compiler.c (mono_compile_assembly): Move the creation of the
2227 output file after the code has been compiled.
2229 2009-05-30 Zoltan Varga <vargaz@gmail.com>
2231 * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Fix 64 bit support.
2233 2009-05-31 Zoltan Varga <vargaz@gmail.com>
2235 * aot-compiler.c aot-runtime.c: Get rid of the shared/non-shared got
2236 entries distinction to simplify the code.
2238 * mini.h: Bump AOT file format version.
2240 2009-05-28 Zoltan Varga <vargaz@gmail.com>
2242 * objects.cs: Fix the signature of one of the tests.
2244 * mini.c (mini_create_ftnptr): New helper function, moved here from
2246 (mini_get_addr_from_ftnptr): Ditto.
2247 (mini_init): Install the new helpers.
2249 2009-05-28 Martin Baulig <martin@ximian.com>
2251 Correctly initialize the debugger when embedding Mono.
2253 * mdb-debug-info32.s, mdb-debug-info64.s: Add a global variable
2254 `MONO_DEBUGGER__using_debugger' to the `.mdb_debug_info' section;
2255 see documentation in mini_debug_running_inside_mdb().
2258 (mini_debug_running_inside_mdb): New function to check whether
2259 we're running inside mdb.
2261 * mini.c (mini_init): Call mini_debugger_init() if we're running
2262 inside the debugger.
2264 * driver.c (mono_main): Moved the call to mini_debugger_init()
2265 into mini_init() to make this work when embedding Mono.
2267 * debug-debugger.c (mini_debugger_init): Warn about duplicate
2268 calls to mini_debugger_init().
2270 * mini.h: Rename mono_debugger_init() -> mini_debugger_init(),
2271 mono_debugger_main() -> mini_debugger_main() and put them inside a
2272 `MONO_DEBUGGER_SUPPORTED' conditional.
2274 2009-05-26 Rodrigo Kumpera <rkumpera@novell.com>
2276 * mini-trampolines.c: Kill mono_find_delegate_trampoline_by_addr as
2277 this is no longer in use.
2280 2009-05-26 Zoltan Varga <vargaz@gmail.com>
2282 * mini-sparc.c (add_outarg_load): Fix the sparc build.
2284 * aot-compiler.c (emit_method_code): Always write out C style symbols for
2287 2009-05-27 Martin Baulig <martin@ximian.com>
2289 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
2291 * mini-x86.c (mono_arch_output_basic_block): Fix the precision of
2292 long_conv_to_r_un to 64 bits.
2294 * cpu-x86.md: Increase the instruction size due to the changes.
2296 * iltests.il.in: Add regression test.
2300 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
2302 * objects.cs: Move the previous test from basic.cs to here.
2304 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
2306 * basic.cs: Add regression test for #506915.
2308 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
2310 * method-to-ir.c (mono_method_to_ir): When doing the ldobj+stobj
2311 optimization we must check the bb of the first byte of stobj as
2312 it's the only one set in cil_offset_to_bb.
2316 2009-05-25 Zoltan Varga <vargaz@gmail.com>
2318 * image-writer.c: Fix pointer directive on ppc64.
2320 2009-05-24 Zoltan Varga <vargaz@gmail.com>
2322 * image-writer.c (asm_writer_emit_section_change): Avoid using
2323 .bss subsections on ppc too.
2325 2009-05-23 Zoltan Varga <vargaz@gmail.com>
2327 * image-writer.c: Fix the definition of TARGET_ASM_....
2329 * image-writer.c: Fix the emission of assembler directives in the last
2332 * mini-ppc.c (mono_arch_emit_exceptions): Increase the size of the
2333 exception throwing code to accomodate ppc64.
2335 * tramp-ppc.c (mono_arch_get_nullified_class_init_trampoline): Increase the
2336 size to work on ppc64 too.
2338 * mini-ppc.h (MonoCompileArch): Enable static rgctx trampolines on ppc64
2341 * image-writer.c: Clean up the #ifdef hell a bit by adding defines for
2342 the assembler dialect instead of using platform specific defines.
2344 2009-05-22 Geoff Norton <gnorton@novell.com>
2346 * mini-arm.c (get_call_info): If a structure is split between the stack
2347 and argument registers, we should not advance the stack pointer by the entire
2348 native size, but just by the amount that spilled.
2350 2009-05-22 Zoltan Varga <vargaz@gmail.com>
2352 * mini-arm.c (get_call_info): Handle structures with alignment requirements
2355 2009-05-21 Zoltan Varga <vargaz@gmail.com>
2357 * aot-compiler.c (emit_extra_methods): Encode direct runtime invoke
2360 * aot-compiler.c (add_extra_method): Fix up the collection of extra
2361 methods so wrapper don't get added twice.
2362 (add_generic_instances): Don't add methods of arrays.
2364 * generics.cs: Mark one test as !FULLAOT.
2366 2009-05-21 Rodrigo Kumpera <rkumpera@novell.com>
2368 * mini-x86.c (emit_move_return_value): Remove unused vars.
2370 2009-05-21 Rodrigo Kumpera <rkumpera@novell.com>
2372 * mini-x86.c (mono_arch_emit_call): The decompose code now supports
2373 decomposing 8 bytes structs into a LCALL.
2375 * mini-x86.c (emit_move_return_value): We no longer push the vtype
2376 pointer for where to store the returned regs.
2378 * decompose.c (mono_decompose_vtype_opts): Fix the comment to properly
2381 Fixes #471747, #471751 and #4734530 (in fact, it's a bunch of dups).
2383 2009-05-20 Miguel de Icaza <miguel@novell.com>
2385 * aot-runtime.c (mono_aot_init): Use g_getenv to work on systems
2388 2009-05-21 Zoltan Varga <vargaz@gmail.com>
2390 * aot-compiler.c (add_wrappers): Add StructureToPtr/PtrToStructure wrappers.
2392 * basic.cs: Move the test_2_cprop_bug () test to generics.cs as it involves
2395 2009-05-20 Rodrigo Kumpera <rkumpera@novell.com>
2397 * local-propagation.c (mono_local_cprop): Avoid local propagation
2398 across paired add/sub if the first instruction dest reg is it's
2399 source reg. For example:
2401 int_add_imm R12 <- R12 [1] clobbers: 1
2402 int_sub_imm R42 <- R12 [1] clobbers: 1
2404 The cprop pass would wrongly const prop + 1 to int_sub_imm which doesn't
2405 maintain the math identify.
2409 2009-05-20 Andreia Gaita <avidigal@novell.com>
2411 * Makefile.am: avoid going on the network just to get the revision,
2414 2009-05-19 Massimiliano Mantione <massi@ximian.com>
2416 Fixed estimate for short branches on amd64 (they were off mark, and
2417 enabling call prolog-epilog instrumentations caused assertions).
2418 * mini.h (struct MonoBasicBlock): added max_length field to hold the
2419 estimate for the maximum length of this basic block.
2421 - mono_arch_emit_prolog: compute max_length for each basic block
2422 (instead of max_offset), and inflate size estimate also for entry bb
2423 in case of code instrumentation.
2424 - mono_arch_output_basic_block: get rid of "cpos" (the current
2425 estimated "position" in the code), and always use "offset" instead,
2426 which is accurate; at the beginning of the function quickly recompute
2427 max_offset for all the remaining blocks, starting from the current
2428 cfg->code_len (which is correct, and not estimated) and using the
2429 estimated block lengths computed previously.
2431 2009-05-17 Zoltan Varga <vargaz@gmail.com>
2433 * exceptions-ppc.c: Remove the caching from the trampoline creation
2434 functions, it is already done in the caller.
2436 * mini-trampolines.c (mono_llvm_vcall_trampoline): Fix the llvm build.
2438 * mini-ppc.h mini-arm.h mini-x86.h mini-amd64.h: Add
2439 MONO_ARCH_GSHARED_SUPPORTED define.
2441 * mini.c (mini_init): Use the MONO_ARCH_GSHARED_SUPPORTED define.
2443 * mini-arm.c mini.c: Get rid of the unused mono_arch_fixup_jinfo ()
2446 2009-05-16 Zoltan Varga <vargaz@gmail.com>
2448 * jit-icalls.c (mono_helper_compile_generic_method): Get rid of the
2449 call to mono_marshal_get_rgctx_invoke ().
2451 * mini.c method-to-ir.c mini-trampolines.c: Get rid of the usage of
2452 mono_marshal_get_static_rgctx_invoke (), all platforms which support
2453 gshared use the static rgctx trampolines now.
2455 * mini.c (mini_init): Call mono_set_generic_sharing_supported () if the
2456 platform supports it.
2458 2009-05-15 Zoltan Varga <vargaz@gmail.com>
2460 * mini-arm.c (mono_arch_allocate_vars): Correctly save R5 when using AOT.
2462 * aot-compiler.c (emit_method_code): Avoid duplicate labels for methods.
2464 2009-05-15 Zoltan Varga <vargaz@gmail.com>
2466 * mini-ppc.c (mono_arch_emit_exceptions): Nullify the processed patches.
2468 * tramp-ppc.c (mono_arch_nullify_class_init_trampoline): Implement this
2471 2009-05-15 Massimiliano Mantione <massi@ximian.com>
2473 Made it possible for mono_arch_instrument_epilog to preserve
2474 argument registers, otherwise instrumenting the "epilogue" before
2475 a tail call would clobber them.
2476 * mini.h: Added "mono_arch_instrument_epilog_full" prototype, which
2477 if like mono_arch_instrument_epilog but with an additional parameter
2478 that states if argument registers must be preserved.
2479 * mini.c: implemented mono_arch_instrument_epilog as a call to
2480 mono_arch_instrument_epilog_full without asking to preserve argument
2481 registers (this makes the existing code work as usual).
2483 - mono_arch_instrument_epilog: add parameter to transform it into
2484 mono_arch_instrument_epilog_full, and preserve argument registers
2486 - mono_arch_output_basic_block, OP_TAILCALL case: call
2487 mono_arch_instrument_epilog_full.
2488 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
2489 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-x86.c:
2490 only transformed mono_arch_instrument_epilog into
2491 mono_arch_instrument_epilog_full.
2493 2009-05-15 Geoff Norton <gnorton@novell.com>
2495 * mini-darwin.c: This works on arm now.
2497 2009-05-14 Geoff Norton <gnorton@novell.com>
2499 * jit.h, driver.c: Allow full-aot to be decided programatically by the
2502 2009-05-15 Zoltan Varga <vargaz@gmail.com>
2504 * aot-compiler.c (emit_method_code): Skip a few more characters in the debug
2507 * mini-trampolines.c (mono_magic_trampoline): Handle static rgctx invoke
2508 wrappers during full aot mode correctly.
2510 * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle shared generic
2513 * aot-compiler.c (mono_aot_method_hash): Use our internal version of
2514 mono_metadata_type_hash ().
2516 2009-05-14 Massimiliano Mantione <massi@ximian.com>
2518 * mini.h, mini-codegen.c, mini-alpha.c, mini-amd64.c, mini-arm.c,
2519 mini-hppa.h, mini-hppa.c, mini-ia64.c, mini-mips.h, mini-mips.c,
2520 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-886.c:
2521 Removed MONO_INST_BRLABEL from the instruction flags, and the
2522 remaining code that used it, because we do not support branches inside
2523 basic blocks (and branch target labels) anymore.
2524 * Makefile.am: As part of the above cleanup, remove reference to
2525 BURG files which don't exist anymore.
2527 2009-05-14 Zoltan Varga <vargaz@gmail.com>
2529 * image-writer.c (asm_writer_emit_local_symbol): Make this a nop on
2532 * mini-mips.c mini-mips.h exceptions-mips.c: Transition the mips backend
2533 to use mono_arch_throw_corlib_exception.
2535 * mini-ppc.c mini-ppc.h exceptions-ppc.c: Use
2536 mono_arch_throw_corlib_exception for throwing corlib exceptions.
2538 * aot-runtime.c (decode_patch): Allocate the data for R4/R8 from the
2541 * mini.c (mono_patch_info_dup_mp): Copy the table of switch targets too.
2543 * aot-compiler.c: Emit a local symbol prefixed with the assembly name
2544 for the got to make debugging easier and to avoid confusing it with the
2547 * aot-compiler.c (emit_method_code): Emit a C style symbol for each
2548 method so a breakpoint can be set when using gdb.
2550 2009-05-13 Zoltan Varga <vargaz@gmail.com>
2552 * aot-compiler.c (mono_aot_method_hash): Implement this properly based
2553 on mono_method_get_imt_slot ().
2555 * aot-runtime.c (find_extra_method_in_amodule): Get rid of the
2556 num_decodes variables.
2558 * aot-compiler.c (mono_aot_method_hash): Revert part of the last
2559 change as it doesn't seem to work.
2561 * aot-compiler.c (mono_aot_method_hash): Improve the hashing of
2564 2009-05-12 Zoltan Varga <vargaz@gmail.com>
2566 * aot-compiler.c mini.c mini-amd64.h mini-arm.h: Kill
2567 MONO_ARCH_FULL_AOT_IMT_SUPPORTED define, both platforms now support imt.
2569 * mini.c (mini_init): Install mono_aot_get_imt_thunk as the IMT thunk
2570 builder when using full aot.
2572 * mini-amd64.c (mono_arch_build_imt_thunk): Don't handle the full-aot case
2573 here, it is already handled.
2575 * mini-arm.c (mono_arch_emit_imt_argument): Pass the dynamic imt arg
2578 * aot-compiler.c (arch_emit_imt_thunk): Implement this for ARM.
2580 * mini-arm.h: Enable IMT for full aot.
2582 * aot-compiler.c (mono_compile_assembly): Don't emit imt thunk if the
2583 arch doesn't support it.
2585 * mini.c (mini_init): Don't disable IMT for full aot if the
2586 architecture supports it.
2588 * mini.h (MonoAotTrampoline): New enum containing the different types
2589 of 'numerous' trampolines.
2590 (MONO_AOT_FILE_VERSION): Bump this.
2592 * aot-compiler.c aot-runtime.c: Unify the handling of specific and
2593 static rgctx trampolines. Add support for full-aot IMT thunks.
2595 * mini-amd64.h: Enable IMT for full aot.
2597 * TestDriver.cs: Add a CategoryAttribute class and an --exclude option
2598 to exclude tests belonging to a category.
2600 * generics.cs: Mark some tests with a !FULLAOT category.
2602 * Makefile.am (fullaotcheck): Run tests with --exclude !FULLAOT. Include
2605 2009-05-11 Zoltan Varga <vargaz@gmail.com>
2607 * aot-compiler.c (emit_and_reloc_code): Move the implementation of
2608 MONO_PATCH_INFO_GOT_OFFSET to a separate arch-specific function.
2609 (emit_plt): Fix a warning.
2611 2009-05-10 Zoltan Varga <vargaz@gmail.com>
2613 * aot-compiler.c aot-runtime.c: Fix the build by moving is_shared_got_patch
2614 back into aot-compiler.c to a place where the other functions shared by
2615 the runtime and aot compiler are.
2617 * aot-compiler.c aot-runtime.c: Emit the got addr using a separate symbol,
2618 as done previously, instead of in MonoAotFileInfo, since pointers might have
2619 alignment requirements.
2621 * mini.h: Bump AOT file format version.
2623 2009-05-10 Miguel de Icaza <miguel@novell.com>
2625 * aot-runtime.c (mono_aot_is_shared_got_patch): Move this routine
2626 that is used at runtime from the aot-compiler.c, this makes it
2627 work on setups that remove the AOT compiler from the output
2630 2009-05-09 Zoltan Varga <vargaz@gmail.com>
2632 * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Implement this for
2635 * mini-ppc.h: Enable static rgctx trampolines for ppc.
2637 * mini-<ARCH>.h: Kill the MONO_ARCH_ENABLE_EMIT_STATE_OPT define.
2639 * decompose.c (mono_decompose_long_opts): Move the ppc/sparc specific
2640 stuff to mono_arch_decompose_long_opts ().
2641 (mono_decompose_opcode): Remove some dead code.
2643 2009-05-08 Rodrigo Kumpera <rkumpera@novell.com>
2645 * method-to-ir.c (mono_method_to_ir): Fix boostrap of non amd64 builds
2646 cmethod can be null for quite a some reasons.
2648 2009-05-08 Rodrigo Kumpera <rkumpera@novell.com>
2650 * method-to-ir.c (mono_method_to_ir): Fix non amd64 builds.
2652 2009-05-08 Zoltan Varga <vargaz@gmail.com>
2654 * aot-compiler.c (arch_emit_got_access): Fix the aot-not-supported build.
2656 2009-05-08 Zoltan Varga <vargaz@gmail.com>
2658 * method-to-ir.c (mono_emit_call_args): Add a 'tail' flag argument.
2659 (mono_method_to_ir): Use MONO_ARCH_USE_OP_TAIL_CALL macro to determine
2660 whenever to make tail calls using OP_TAIL_CALL. Enable support for tail
2661 calls returning structures by addr on amd64.
2663 * mini-amd64.h (MONO_ARCH_USE_OP_TAIL_CALL): New arch-specific macro.
2665 * iltests.il.in: Restructure the tail call tests a bit.
2667 2009-05-07 Zoltan Varga <vargaz@gmail.com>
2669 * aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
2670 for virtual methods too.
2672 2009-05-06 Raja R Harinath <harinath@hurrynot.org>
2674 * method-to-ir.c (mono_method_to_ir): Revert change of 2009-05-02
2675 due to regression in verifying System.dll.
2677 2009-05-06 Zoltan Varga <vargaz@gmail.com>
2679 * debug-mini.c (mono_debugger_method_has_breakpoint): Allow breakpoints
2682 * dwarfwriter.c (emit_class_dwarf_info): Add support for generic
2685 * aot-compiler.c aot-runtime.c: Use our own hash function instead of
2686 g_str_hash () which can change.
2688 * driver.c (mini_regression): Disable optimizations not supported by
2689 the cpu. Fixes #500019.
2691 * aot-runtime.c (mono_aot_get_unwind_info): Fix the --enable-minimal=aot
2694 2009-05-06 Zoltan Varga <vargaz@gmail.com>
2696 * mini-llvm.c (mono_llvm_emit_method): Update the OP_TLS_GET implementation
2697 to the latest LLVM code.
2699 2009-05-05 Zoltan Varga <vargaz@gmail.com>
2701 * genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.
2703 2009-05-04 Zoltan Varga <vargaz@gmail.com>
2705 * mini-llvm.c (mono_llvm_emit_method): Implement TLS support on
2708 * aot-compiler.c (encode_patch_list): Simplify this considerably as we are
2709 no longer saving offsets, so just save the patch types along with the other
2711 * aot-runtime.c (load_patch_info): Update after the changes to
2712 encode_patch_list ().
2713 (decode_got_entry): Removed, merged into load_patch_info ().
2714 (is_shared_got_patch): Removed, call the same function from
2717 * mini.h: Bump aot file format version.
2719 * aot-compiler.c aot-runtime.c: Resurrect static linking support. Kill the
2720 half-finished no-dlsym code.
2722 * aot-runtime.c (load_method): Kill the old and bit-rotten use_loaded_code
2725 * mini-<ARCH>.h mini-trampolines.c aot-runtime.c: Kill the
2726 MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN define.
2728 2009-05-02 Zoltan Varga <vargaz@gmail.com>
2730 * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Increase the
2731 buffer length to work with AOT code.
2733 * method-to-ir.c (mono_method_to_ir): Handle loading errors in the
2734 ldfld/stfld opcodes.
2736 * exceptions-x86.c (mono_arch_get_throw_exception_by_name): Simplify this
2739 * mini-llvm.c mini-x86.c: Implement 32 bit and x86 support.
2741 * ssa.c (mono_ssa_compute): Don't skip I8 values when using LLVM.
2743 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Update to the latest
2746 * mini.c (mini_method_compile): Set the from_llvm flag in MonoJitInfo
2747 if needed. Don't decompose long operations when using llvm.
2749 2009-05-01 Zoltan Varga <vargaz@gmail.com>
2751 * aot-compiler.c aot-runtime.c: Use mono_pagesize () instead of the
2754 * aot-runtime.c (load_aot_module): Get rid of another mprotect call.
2756 2009-05-03 Martin Baulig <martin@ximian.com>
2758 * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
2759 mono_debugger_insert_method_breakpoint() since the class init
2760 handler we're inserting at the top of the method already gives us
2763 2009-04-30 Zoltan Varga <vargaz@gmail.com>
2765 * decompose.c (mono_decompose_long_opts): Move the implementation of LNEG
2766 to mono_arch_decompose_long_opts () for x86 and arm.
2768 2009-04-29 Zoltan Varga <vargaz@gmail.com>
2770 * mini-codegen.c (mono_regstate_alloc_int): Use __x86_64__ instead of
2773 2009-04-28 Zoltan Varga <vargaz@gmail.com>
2775 * *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in the
2778 2009-04-26 Zoltan Varga <vargaz@gmail.com>
2780 * aot-runtime.c (mono_aot_create_specific_trampoline): Add a stat for the
2781 number of trampolines used in full-aot mode.
2783 * aot-compiler.c: Add an ntrampolines option to set the number of
2784 trampolines emitted in full-aot mode.
2786 2009-04-27 Zoltan Varga <vargaz@gmail.com>
2788 * mini-llvm.c (mono_llvm_emit_method): Implement OP_CHECK_THIS using
2789 a volatile load. Get rid of get_tempname (), llvm assigns names
2792 * mini-llvm-cpp.cpp (mono_llvm_build_volatile_load): New instruction
2795 * mini-llvm.c (mono_llvm_emit_method): Don't call LLVMGetParam on
2798 * abcremoval.c (REPORT_ABC_REMOVAL): Don't output messages at verbose
2801 * mini-codegen.c (mono_local_regalloc): Prevent sreg1/dreg to be allocated
2802 to the same register as a fixed sreg2. Fixes #497271.
2804 * iltests.il.in: Add a new test.
2806 2009-04-26 Zoltan Varga <vargaz@gmail.com>
2808 * mini-amd64.c: Use moves instead of pushes for passing arguments on the
2809 stack, since pushes complicate exception handling.
2811 * exceptions-amd64.c (mono_arch_find_jit_info): Don't pop the arguments of
2812 the stack if they are passed using moves.
2814 * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
2816 * method-to-ir.c (mono_method_to_ir): Disable fast virtual generic methods
2819 * mini-llvm.c (mono_llvm_emit_method): Call jit icall wrappers, not the
2820 icalls themselves. Convert arguments of FCOMPARE. Convert the destination
2821 of FMOVE if it is an R4.
2823 2009-04-25 Zoltan Varga <vargaz@gmail.com>
2825 * mini-ops.h: Add OP_LLVM_OUTARG_VT opcode.
2827 * mini.h (LLVMCallInfo): New structure to store calling convention
2828 information for the LLVM back end similar to the CallInfo structures in
2831 * mini-amd64.c (mono_arch_get_llvm_call_info): New arch function to return
2832 call information in a format usable by LLVM.
2833 (mono_arch_emit_call): Move the LLVM handling code to mono_llvm_emit_call ().
2835 * method-to-ir.c (mono_emit_call_args): Emit calls using
2836 mono_llvm_emit_call () when compiling using LLVM.
2838 * mini-llvm.c: Implement support for passing/receiving valuetypes. Add
2839 comments to all functions. Fix memory leaks. Add a public init/cleanup
2842 * mini.c: Call the llvm init/cleanup functions in mini_init()/cleanup().
2844 * method-to-ir.c (handle_array_new): Disable llvm when calling the vararg
2845 mono_array_new_va () jit icall.
2847 Fri Apr 24 16:44:08 CEST 2009 Paolo Molaro <lupus@ximian.com>
2849 * Makefile.am, genmdesc.c, genmdesc.pl: tiny refactor to allow
2850 multiple machine description files to be specified.
2851 * mini-ops.h: fixes for cross-compilation.
2853 2009-04-22 Miguel de Icaza <miguel@novell.com>
2855 * aot-runtime.c (make_writable): Use mono_mprotect to simplify
2858 2009-04-22 Zoltan Varga <vargaz@gmail.com>
2860 * method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
2861 to prevent asserts in various passes. Fixes #497220.
2863 2009-04-21 Zoltan Varga <vargaz@gmail.com>
2865 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove
2868 * aot-compiler.c aot-runtime.c: Emit the unwind info into a separate
2869 table to avoid duplicates.
2871 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2873 * aot-compiler.c (emit_method_code): Avoid writing symbols if the nodebug
2876 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
2878 * mini.c (mini_method_verify): Fail fulltrust code if the exception
2879 is for method or field access.
2881 2009-04-20 Zoltan Varga <vargaz@gmail.com>
2883 * mini-llvm-cpp.cpp (mono_llvm_dump_value): New helper function to print
2886 * mini-llvm.c (mono_llvm_emit_method): Use it.
2888 * mini-llvm.c (type_to_llvm_type): Fix the mapping of enums.
2889 (mono_llvm_emit_method): Add support for CAS. Fix handling of CSET opcodes
2892 * mini-trampolines.c (mono_llvm_vcall_trampoline): Add support for
2893 synchronized methods.
2895 * mini.c (mini_method_compile): Disable LLVM for dynamic methods.
2897 * mini.c (mini_method_compile): Enable ABCREM when running with LLVM.
2899 * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOADI4_MEM/
2902 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add a MONO_LLVM env variable
2903 allowing some options to be set dynamically.
2905 2009-04-19 Zoltan Varga <vargaz@gmail.com>
2907 * mini-llvm.c (mono_llvm_emit_method): Handle compares followed by an
2908 unconditional branch.
2910 * mini.h (MonoTrampolineType): Add new trampoline type
2911 'MONO_TRAMPOLINE_LLVM_VCALL' which handles virtual calls made from LLVM
2914 * mini-trampolines.c (mono_llvm_vcall_trampoline): New C trampoline
2917 * mini-trampolines.c (mono_create_llvm_vcall_trampoline): New trampoline
2920 * mini.c (mini_init): Avoid using the common vtable trampoline when LLVM
2921 is enabled. Instead, use the llvm vcall trampoline.
2923 * mini-trampolines.c (mono_get_vcall_slot_addr): New helper function.
2925 * mini-trampolines.c tramp-amd64.c tramp-x86.c: Use it.
2927 * mini-<ARCH>.c: Get rid of the identical mono_arch_get_vcall_slot_addr ()
2930 * mini-<ARCH>.h mini-trampolines.c mini.c: Get rid of
2931 MONO_ARCH_COMMON_VTABLE_TRAMPOLINE, it is supported by all archs.
2933 * mini-ia64.c (mono_arch_lowering_pass): Null out the sregs of the
2934 OP_IA64_CSET opcode.
2936 * mini.c: Fix a warning.
2938 * mini-llvm.c (mono_llvm_emit_method): Convert arguments of SWITCH and
2939 THROW to the appropriate llvm type.
2941 2009-04-18 Zoltan Varga <vargaz@gmail.com>
2943 * mini.c (mini_method_compile): Add statistics for methods JITted
2946 2009-04-17 Zoltan Varga <vargaz@gmail.com>
2948 * method-to-ir.c: Fix the computation of ins_sreg_counts for ia64
2949 OP_IA64_CMP_<cond>_IMM opcodes.
2951 2009-04-17 Zoltan Varga <vargaz@gmail.com>
2953 * mini-llvm.c (emit_cond_system_exception): Implement throwing of
2956 * dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
2959 * mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
2962 2009-04-17 Atsushi Enomoto <atsushi@ximian.com>
2964 * mini-exceptions.c : add thread id to EXCEPTION trace message.
2966 2009-04-17 Zoltan Varga <vargaz@gmail.com>
2968 * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Fix AOT
2971 * tramp-x86.c (mono_arch_get_unbox_trampoline): Implement static
2972 rgctx invoke trampolines for x86.
2974 * mini-x86.c (mono_arch_output_basic_block): Add a few nops before
2975 indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
2976 (mono_arch_get_vcall_slot): Simplify this.
2978 2009-04-16 Zoltan Varga <vargaz@gmail.com>
2980 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Move the calls to
2981 mono_debug_add_delegate_trampoline () to get_delegate_invoke_impl ().
2983 2009-04-14 Zoltan Varga <vargaz@gmail.com>
2985 * aot-compiler.c tramp-arm.c mini-arm.c: Implement static rgctx
2986 trampolines for ARM. Add full-aot support for delegate invokes for ARM.
2988 * mini-trampolines.c (mono_magic_trampoline): Fix the build.
2990 * liveness.c (visit_bb): Remove a needless assert.
2992 2009-04-13 Zoltan Varga <vargaz@gmail.com>
2994 * mini-trampolines.c (mono_create_delegate_trampoline): Delegate the
2995 full aot support to the arch specific code.
2997 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Add full-aot support.
2999 * aot-compiler.c (emit_trampolines): Emit delegate invoke impl trampolines.
3001 * aot-compiler.c (emit_named_code): Rename this to 'emit_trampoline'.
3003 * mini-amd64.c (mono_arch_get_delegate_invoke_impls): New function to
3004 collect information about the delegate invoke impl trampolines.
3006 * mini.h (MonoAotTrampInfo): New structure collecting the information needed
3007 to save trampolines during full-aot mode.
3009 * mini-trampolines.c (mono_create_static_rgctx_trampoline): New trampoline
3010 creation function which returns a trampoline which sets the rgctx
3012 (mono_magic_trampoline): Use the rgctx trampoline instead of an rgctx
3013 wrapper if possible.
3014 (mono_delegate_trampoline): Ditto.
3016 * mini.c (mono_jit_runtime_invoke): Ditto.
3018 * tramp-amd64.c: Add an implemention of static rgctx trampolines for AMD64.
3020 * aot-compiler.c aot-runtime.c: Add support for static rgctx trampolines.
3022 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3024 2009-04-12 Zoltan Varga <vargaz@gmail.com>
3026 * mini-ia64.c (mono_arch_lowering_pass): Use NULLIFY_INS instead of
3027 just setting the opcode to OP_NOP.
3029 2009-04-11 Zoltan Varga <vargaz@gmail.com>
3031 * mini.c (mini_method_compile): Put the last change inside an
3032 #ifdef MONO_ARCH_HAVE_LIVERANGE_OPS.
3034 * mini.c (mini_method_compile): Disable sharing of stack slots/registers
3035 and extend live ranges to cover the whole method when using xdb.
3037 * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
3038 do it in the trampolines.
3040 * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
3043 * mini-trampolines.c (mono_delegate_trampoline): Ditto.
3045 * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
3046 call code in full-aot mode since IMT is disabled there.
3047 (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
3048 new JIT no longer has that restriction.
3050 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3052 * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
3053 a more compact format.
3054 (mono_aot_wrapper_name): New function to return a unique name for a
3055 wrapper method, also used by the AOT runtime.
3057 * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
3060 * aot-compiler.c (add_generic_class): Add the helper methods from T[]
3061 when a ICollection<T> etc is encountered.
3062 (add_generic_instances): Process method arguments/locals too.
3063 (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
3066 * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
3068 2009-04-10 Zoltan Varga <vargaz@gmail.com>
3070 * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
3072 * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
3074 * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
3075 representing the result of the decomposition. Nullify instructions
3076 instead of setting them to OP_NOP since nops can't have registers
3079 2009-04-09 Zoltan Varga <vargaz@gmail.com>
3081 * aot-compiler.c (mono_compile_assembly): Split this huge function into
3082 smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
3083 info. Strip 'mapping symbols' on ARM.
3085 * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
3087 * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
3088 this with the native genmdesc.
3090 2009-04-08 Bill Holmes <billholmes54@gmail.com>
3092 * aot-runtime.c: Fixing the MSVC build.
3094 Code is contributed under MIT/X11 license.
3096 2009-04-08 Zoltan Varga <vargaz@gmail.com>
3098 * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since
3099 JITted code depends on it.
3101 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
3103 * aot-compiler.c: Use new MonoGenericParam accessors.
3105 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
3107 Reduce memory usage and improve correctness wrt MonoGenericParam
3108 * aot-runtime.c (decode_klass_ref): Simplify generic parameter
3109 handing. Avoid allocating MonoGenericParams, but use the ones in
3110 the container itself.
3112 2009-04-07 Miguel de Icaza <miguel@novell.com>
3114 * tasklets.c: Return exceptions in the out argument.
3116 2009-04-08 Zoltan Varga <vargaz@gmail.com>
3118 * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
3119 opcode. Use pointer types in more places instead of casting them to
3122 * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
3124 (mono_llvm_optimize_method): New helper function to optimize a method.
3126 * method-to-ir.c (mono_emit_widen_call_res): Extract the call result
3127 widening code so it could be called from more places.
3128 (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
3129 code paths in the call opcodes.
3131 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
3133 * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
3135 2009-04-06 Zoltan Varga <vargaz@gmail.com>
3137 * dwarfwriter.c: Use _ to separate class name
3138 components as gdb can't handle '.'. Represent reference variables
3141 * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
3143 * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
3145 * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
3147 * gc-test.cs: New file with GC stack marking tests.
3149 * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
3150 negative numbers for vfp.
3152 * basic-float.cs: Add a test.
3154 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
3156 * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
3158 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
3160 * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
3161 part of tasklet/continuation support.
3163 2009-04-05 Zoltan Varga <vargaz@gmail.com>
3165 * mini-llvm.c (mono_llvm_emit_method): Move the handling of
3166 amd64 opcodes inside an ifdef.
3168 * dwarfwriter.c: Emit inheritance information for classes, emit fields
3171 * dwarfwriter.c (emit_type): Emit the class info for classes.
3173 2009-04-04 Zoltan Varga <vargaz@gmail.com>
3175 * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
3177 * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
3179 * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
3181 * ssa.c (mono_ssa_compute): Fix some memory leaks.
3183 2009-04-03 Zoltan Varga <vargaz@gmail.com>
3185 * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
3187 * mini-llvm.c: Update comments.
3189 * mini.h (COMPILE_LLVM): New macro.
3191 * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
3193 * ssa.c (mono_ssa_compute): Ditto.
3195 * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
3196 the unwind ops from a DWARF FDE.
3198 * mini-llvm.c: Implement generation of unwind info for LLVM compiled
3199 methods by extracting the dwarf unwind ops from the unwind info generated
3202 * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
3205 * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
3208 2009-04-02 Zoltan Varga <vargaz@gmail.com>
3210 * Makefile.am (llvm_sources): Enable this.
3212 * mini.c (mini_method_compile): Add support for compiling with LLVM,
3213 failing back to the JIT if something cannot be handled.
3215 * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
3216 compiling with LLVM.
3218 * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
3219 compiling with LLVM.
3221 * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when
3222 compiling with LLVM.
3224 * mini-ops.h: Add a few opcodes needed by LLVM.
3226 * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
3229 * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
3232 * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
3234 * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
3236 2009-04-01 Mark Probst <mark.probst@gmail.com>
3238 * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
3239 ridiculously large methods.
3241 2009-03-31 Martin Baulig <martin@ximian.com>
3243 * debug-debugger.c (debugger_remove_breakpoint): Call
3244 mono_debugger_remove_class_init_callback ().
3246 2009-03-31 Zoltan Varga <vargaz@gmail.com>
3248 * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
3249 right before emitting code, not at the start.
3251 * mini.c (mono_postprocess_patches): Extract this into a separate function
3252 from mono_codegen ().
3254 * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
3255 byref types correctly.
3257 2009-03-30 Zoltan Varga <vargaz@gmail.com>
3259 * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
3262 2009-03-29 Zoltan Varga <vargaz@gmail.com>
3264 * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before
3265 indirect calls, this avoids problems where get_vcall_slot () would get
3266 confused by the native code for the instruction preceeding the call.
3267 (mono_arch_get_vcall_slot): Simplify this.
3268 (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
3270 * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
3271 register allocator now seems to depend on them instead of the data in
3274 * mini.c (mini_method_compile): Throw the correct type of exception if
3275 mono_method_get_header () fails because of a loading error.
3277 2009-03-28 Zoltan Varga <vargaz@gmail.com>
3279 * mini.c (mini_method_compile): Clear the loader error if the method
3280 header cannot be decoded.
3282 * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual
3283 interface methods on proxies correctly.
3285 * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
3286 this argument for vtype methods. Add precise liveness info for arguments.
3288 * mini-codegen.c (mono_print_ins_index): Print the vreg of the
3289 LIVERANGE_START/END opcodes.
3291 * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
3292 for arguments and values in registers.
3294 2009-03-27 Zoltan Varga <vargaz@gmail.com>
3296 * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
3297 return a valuetype. Fixes #487518.
3299 * iltests.il: Add a test.
3301 * aot-compiler.c: Use mono_thread_create () to create helper threads.
3303 * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
3304 closed over a null reference correctly.
3306 2009-03-26 Zoltan Varga <vargaz@gmail.com>
3308 * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
3310 2009-03-25 Mark Probst <mark.probst@gmail.com>
3312 * mini-codegen.c (mono_local_regalloc): Don't let sregs get
3313 allocated to the same registers as fixed sregs.
3315 2009-03-24 Mark Probst <mark.probst@gmail.com>
3317 * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
3320 * method-to-ir.c: Handle more cases for
3321 Interlocked.CompareExchange.
3323 * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
3324 mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
3325 ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
3327 2009-03-23 Zoltan Varga <vargaz@gmail.com>
3329 * aot-runtime.c (decode_method_ref): Fix a warning.
3331 * unwind.c (mono_unwind_frame): Ditto.
3333 2009-03-22 Zoltan Varga <vargaz@gmail.com>
3335 * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
3336 (mono_compile_assembly): Enable the binary writer for full-aot as well.
3338 * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
3339 fix the handling of large values in the ALU_PC_G0_NC relocation.
3341 2009-03-22 Zoltan Varga <vargaz@gmail.com>
3343 * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
3345 2009-03-22 Mark Probst <mark.probst@gmail.com>
3347 * method-to-ir.c (mono_spill_global_vars): Support for ternary
3350 2009-03-22 Mark Probst <mark.probst@gmail.com>
3352 * method-to-ir.c: MINI_OP3 needs a comma.
3354 * method-to-ir.c, mini.h, mini.c: Remove
3355 mono_init_op_sreg_counts ().
3357 2009-03-22 Zoltan Varga <vargaz@gmail.com>
3359 * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
3362 * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
3365 * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
3367 * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
3370 2009-03-21 Mark Probst <mark.probst@gmail.com>
3372 * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
3373 liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
3374 mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
3377 2009-03-20 Zoltan Varga <vargaz@gmail.com>
3379 * driver.c: Change location of gc_wrapper.h.
3381 * method-to-ir.c (mono_find_block_region): Handle try clauses nested
3382 inside finally clauses correctly. Fixes #485721.
3384 * mini.c (mono_find_spvar_for_region): This needs to handle try regions
3385 after the change above.
3387 * exceptions.cs: Add a test.
3389 2009-03-19 Zoltan Varga <vargaz@gmail.com>
3391 * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
3393 * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
3394 into cfg->used_int_regs, it is not needed with the dwarf unwinder.
3395 (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
3397 * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
3398 the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
3400 2009-03-19 Sebastien Pouliot <sebastien@ximian.com>
3402 * method-to-ir.c: Allow CoreCLR to throw FieldAccessException.
3403 Simplify logic for ensure_method_is_allowed_to_call_method.
3404 Handle wrappers on callers.
3406 2009-03-19 Zoltan Varga <vargaz@gmail.com>
3408 * Makefile.am (fullaotcheck): Don't run the generics tests, some of
3411 * basic-simd.cs: Fix the names of some test methods.
3413 2009-03-18 Geoff Norton <gnorton@novell.com>
3415 * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
3417 2009-03-18 Zoltan Varga <vargaz@gmail.com>
3419 * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
3421 2009-03-17 Jb Evain <jbevain@novell.com>
3423 * driver.c: remove now uneeded call to mono_gc_base_init before
3426 2009-03-17 Jb Evain <jbevain@novell.com>
3428 * dwarfwriter.c (token_handler): handle more cases.
3430 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
3432 * method-to-ir.c: Remove more dead code (that was required only
3433 because of method_is_safe). Fix compiler warnings.
3435 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
3437 * method-to-ir.c: Remove unneeded/useless method_is_safe
3438 http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
3440 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
3442 * mini.c (mini_method_compile): Print the method been compiled with
3443 verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
3444 for people not familiar with the runtime.
3446 2009-03-17 Zoltan Varga <vargaz@gmail.com>
3448 * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
3449 a managed object which is later put into a GList. Return its class instead.
3451 * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
3452 stack slots when using sgen.
3454 2009-03-16 Zoltan Varga <vargaz@gmail.com>
3456 * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
3458 2009-03-14 Zoltan Varga <vargaz@gmail.com>
3460 * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
3461 > so it works on the first vreg as well.
3463 2009-03-13 Zoltan Varga <vargaz@gmail.com>
3465 * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
3468 * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
3470 * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
3473 2009-03-12 Zoltan Varga <vargaz@gmail.com>
3475 * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
3476 native->IL offset mapping.
3478 2009-03-11 Zoltan Varga <vargaz@gmail.com>
3480 * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
3482 * basic.cs: Add a test.
3484 2009-03-11 Mark Probst <mark.probst@gmail.com>
3486 * mini-x86.c (mono_arch_output_basic_block): Use different
3487 registers in case the ones we want to overwrite are used by the
3488 other operand. Fixes regression in #480807.
3490 2009-03-10 Zoltan Varga <vargaz@gmail.com>
3492 * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
3494 * dwarfwriter.c (emit_line_number_info): The line number info for
3495 IL code was off by one. Fix that.
3497 * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
3500 2009-03-09 Mark Probst <mark.probst@gmail.com>
3502 Contributed under the terms of the MIT/X11 license by Steven
3503 Munroe <munroesj@us.ibm.com>.
3505 * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
3508 2009-03-08 Zoltan Varga <vargaz@gmail.com>
3510 * dwarfwriter.c (token_handler): Decode method references in non-wrappers
3513 2009-03-06 Zoltan Varga <vargaz@gmail.com>
3515 * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
3516 the delegate ctor handling code. Fixes #482638.
3518 * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
3521 * iltests.il.in: Add a test.
3523 * mini-darwin.c (mono_chain_signal): Remove this, it is already in
3526 2009-03-05 Mark Probst <mark.probst@gmail.com>
3528 * mini-trampolines.c (mono_create_jump_trampoline): If the method
3529 is shared generic code, return the trampoline, even if the method
3530 has already been compiled. Fixes #479763.
3532 * mini.c, mini.h: New function
3533 mono_jit_find_compiled_method_with_jit_info() which is the same as
3534 mono_jit_find_compiled_method() but also returns the jit info.
3536 2009-03-05 Mark Probst <mark.probst@gmail.com>
3538 * method-to-ir.c (mono_method_to_ir): Only force the vtable var
3539 for methods which actually have one. For all other methods, make
3540 sure the this argument var is live the whole method.
3542 * mini.c (mini_method_compile): Every shared method has a
3543 this/vtable/mrgctx info. Fixes #480807.
3545 2009-03-05 Mark Probst <mark.probst@gmail.com>
3547 * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
3548 generic/imt thunks where some entries branch through the vtable,
3549 while other entries branch directly.
3551 2009-03-05 Zoltan Varga <vargaz@gmail.com>
3553 * mini-darwin.c (mono_chain_signal): Define this to fix the build.
3555 * mini-windows.c: Ditto.
3557 * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
3560 2009-03-04 Zoltan Varga <vargaz@gmail.com>
3562 * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
3565 2009-03-04 Mark Probst <mark.probst@gmail.com>
3567 * method-to-ir.c: Don't inline methods that use JMP. Fixes
3570 2009-03-04 Mark Probst <mark.probst@gmail.com>
3572 * exceptions-x86.c: Include debug-mini.h - fixes build.
3574 2009-03-04 Martin Baulig <martin@ximian.com>
3576 * debug-mini.c: Clean up the exception API and add documentation.
3577 (mono_debugger_handle_exception): New public method; this is
3578 called when throwing an exception or encountering an unhandled one.
3579 (mono_debugger_call_exception_handler): Formerly known as
3580 mono_debugger_handle_exception(); this is used to tell the
3581 debugger that we're about to invoke an exception handler.
3583 2009-03-04 Martin Baulig <martin@ximian.com>
3585 * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
3586 ../metadata/mono-debug-debugger.c; save and reset exception state.
3588 2009-03-02 Martin Baulig <martin@ximian.com>
3590 * debug-mini.c: Moved the debugger exception handling here from
3591 ../metadata/mono-debug-debugger.c.
3594 (MonoDebuggerExceptionAction): New exception typedef.
3597 (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
3599 * exceptions-amd64.c
3600 (mono_amd64_throw_exception): Use the new debugger exception
3604 (mono_handle_exception_internal): Don't call
3605 mono_debugger_unhandled_exception() here.
3607 2009-03-03 Zoltan Varga <vargaz@gmail.com>
3609 * mini.c aot-compiler.c: Update after the changes to
3610 mono_marshal_get_runtime_invoke ().
3612 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot):
3613 Virtual generic methods might not have method->slot set, work around
3616 * generics.cs: Add a test.
3618 2009-03-02 Geoff Norton <gnorton@novell.com>
3621 * driver.c: Allow signal chaining of SIGFPE as well.
3623 2009-03-02 Zoltan Varga <vargaz@gmail.com>
3625 * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
3626 this since it now receives the method not its generic context in the
3629 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
3630 generic/imt thunks where some entries branch through the vtable, while
3631 other entries branch directly.
3633 * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
3635 * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call
3636 support for interface methods as well.
3638 * mini-trampolines.c: Add support for virtual generic methods in interfaces
3639 using the normal IMT thunks.
3641 generics.cs: Add new tests.
3643 * method-to-ir.c (mono_method_to_ir): Pass the method instead of
3644 the generic inst to the generic imt thunks. This fixes AOT support,
3645 improves consistency with the normal IMT thunks, and makes it easier to
3646 add support for interface generic virtual methods later.
3648 * mini-trampolines.c (mono_magic_trampoline): Ditto.
3650 2009-02-28 Zoltan Varga <vargaz@gmail.com>
3652 * driver.c (mono_set_signal_chaining): New public API function to enable
3653 signal chaining on POSIX platforms.
3655 * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland
3656 (si@lindenlab.com) to implement signal chaining. The original patch was
3657 contributed under the MIT X/11 license:
3658 https://bugzilla.novell.com/show_bug.cgi?id=318894
3660 2009-02-27 Zoltan Varga <vargaz@gmail.com>
3662 * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
3663 too until it can be made to run on amd64.
3665 2009-02-26 Zoltan Varga <vargaz@gmail.com>
3667 * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
3668 to get_generic_context_from_code () + get_call_info () if possible.
3670 2009-02-25 Zoltan Varga <vargaz@gmail.com>
3672 * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
3673 suspend-on-sigsegv functionality.
3675 * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
3676 to suspend when a native SIGSEGV is received. This is useful for debugging
3677 crashes which don't happen under gdb, since a live process contains more
3678 information than a core file.
3680 * mini-exceptions.c (mono_print_thread_dump): Use
3681 MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
3683 * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
3685 * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
3687 * basic-float.cs: Disable the tests which currently fail on amd64.
3689 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null
3690 value to mono_arch_patch_callsite () to fix crashes.
3692 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
3694 2009-02-23 Zoltan Varga <vargaz@gmail.com>
3696 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
3697 nop code by patching the call address to point to the nullified class init
3698 trampoline, as the former does not seem to be safe on SMP machines.
3700 2009-02-23 Mark Probst <mark.probst@gmail.com>
3702 * mini-ops.h: Fix the argument types for a few x86 opcodes where
3705 2009-02-23 Zoltan Varga <vargaz@gmail.com>
3707 * basic-float.cs basic-calls.cs: Fix warnings.
3709 2009-02-22 Mark Probst <mark.probst@gmail.com>
3711 * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
3712 correct frame pointer in the LMF. Should fix #478394.
3714 2009-02-22 Zoltan Varga <vargaz@gmail.com>
3716 * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
3718 * image-writer.c: Make the binary writer less verbose.
3720 2009-02-21 Zoltan Varga <vargaz@gmail.com>
3722 * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
3723 are called from runtime invoke wrappers.
3725 2009-02-20 Zoltan Varga <vargaz@gmail.com>
3727 * cpu-ppc.md (store_memindex): Increase the size of this.
3729 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
3731 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3733 * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
3735 * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
3738 Last fix for of #467201.
3741 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
3743 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3745 * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
3746 and long_conv_to_r8_2:
3748 Fixed part of #467201.
3750 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
3752 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3754 * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
3755 conversion to 32 bits.
3757 * cpu-x86.md: Increase the size of int_conv_to_r4.
3759 * basic-float.cs: Add a test for this.
3761 Fixed part of #467201.
3763 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
3765 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3767 * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
3768 conversion to 64 bits.
3770 * basic-float.cs: Add a test for this.
3772 Fixed part of #467201.
3774 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
3776 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3778 * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
3779 This behavior is compatible with MS.
3781 * iltest.il.in: Add a test for this.
3783 Fixed part of #467201.
3785 2009-02-20 Rodrigo Kumpera <rkumpera@novell.com>
3787 Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3789 * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
3790 change the precision of the value.
3792 * cpu-x86.md: Define len for float_conv_to_r4.
3794 * basic-float.cs: Add a test for this.
3796 Fixed part of #467201.
3798 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
3800 * mini.c: Adjust locking order to the new semantics where the loader lock
3803 2009-02-18 Rodrigo Kumpera <rkumpera@novell.com>
3812 * mini-trampolines.c:
3825 * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
3827 2009-02-18 Zoltan Varga <vargaz@gmail.com>
3829 * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
3832 2009-02-17 Zoltan Varga <vargaz@gmail.com>
3834 * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
3835 for cctors if needed.
3837 2009-02-17 Mark Probst <mark.probst@gmail.com>
3839 * mini-ppc.c: Fix build on Darwin.
3841 2009-02-17 Zoltan Varga <vargaz@gmail.com>
3843 * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
3844 version instead of 3 as valgrind doesn't like version 3.
3846 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3848 * aot-compiler.c (mono_aot_method_hash): New function to return a hash
3849 usable for hashing methods.
3850 (emit_extra_methods): Use the new hash to avoid putting every method in the
3853 * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
3855 * aot-runtime.c (can_method_ref_match_method): New function to quickly check
3856 whenever a method ref could match a method.
3858 * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
3861 * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded
3864 * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
3866 * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
3867 the encoding buffer.
3869 * method-to-ir.c (mono_method_check_inlining): Avoid calling
3870 mono_method_get_header () on inflated methods as an optimization.
3872 2009-02-16 Zoltan Varga <vargaz@gmail.com>
3874 * ssa.c (fold_ins): Fix another crash if the instruction following the
3875 switch was optimized away.
3877 2009-02-16 Mark Probst <mark.probst@gmail.com>
3879 Contributed under the terms of the MIT/X11 license by Steven
3880 Munroe <munroesj@us.ibm.com>.
3882 * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
3884 2009-02-16 Zoltan Varga <vargaz@gmail.com>
3886 * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
3887 around the mono_domain_alloc calls, it is now done by the functions
3890 * aot-compiler.c (compile_method): Only add wrappers referenced by
3891 the method if compiling with full AOT.
3892 (mono_compile_assembly): Error out if --aot=full is specified on
3893 a platform where it is not supported.
3895 * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
3898 * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
3901 * aot-runtime.c (load_named_code): Handle
3902 mono_arm_throw_exception_by_token.
3904 * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
3906 * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
3909 * Makefile.am (fullaotcheck): Exit if a test fails.
3911 * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
3913 (mono_compile_assembly): Handle the assembler failing.
3915 * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
3916 accepting subsections of .bss.
3918 * ssa.c (visit_inst): Fix a crash if the instruction following a switch
3921 * aot-compiler.c: Remove some unused includes.
3923 * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
3924 now in MonoImageWriter.
3926 * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
3927 code sequence which matches a non-virtual call. Fixes #472654.
3929 2009-02-15 Zoltan Varga <vargaz@gmail.com>
3931 * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
3934 * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
3935 use the image/dwarf writers directly.
3937 * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
3940 * aot-compiler.c (MonoAotCompile): Remove fields which are now in
3943 * image-writer.h: Fix some typos.
3945 * dwarfwriter.h dwarfwriter.c: New files.
3947 * aot-compiler.c: Extract the DWARF info writing functionality into a
3950 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
3951 argument to return unwind info.
3953 * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
3955 * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
3957 * aot-runtime.c (decode_method_ref): Add a case for
3958 MONO_AOT_METHODREF_WRAPPER_NAME.
3960 * mini.h: Add constants for the magic numbers used in encode_method_ref ()
3963 * aot-compiler.c (encode_method_ref): Use the new constants.
3965 * aot-runtime.c (decode_method_ref): Ditto.
3967 * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
3968 be compiled, not the icall itself.
3970 2009-02-14 Zoltan Varga <vargaz@gmail.com>
3972 * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
3973 using decode_method_ref ().
3975 * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
3976 convert it to an in32. Fixes #475859.
3978 * arrays.cs: Add a test.
3980 2009-02-12 Zoltan Varga <vargaz@gmail.com>
3982 * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in
3985 * basic-long.cs: Add a test.
3987 2009-02-12 Mark Probst <mark.probst@gmail.com>
3989 * mini-x86.c, mini-x86.h: Very simple frame pointer removal. We
3990 remove the frame pointer in leaf methods which don't receive any
3991 arguments, don't throw exceptions and don't do dynamic stack
3994 2009-02-12 Zoltan Varga <vargaz@gmail.com>
3996 * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
3997 the fail_tramp changes. Hopefully fixes #475132.
3999 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4001 * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
4002 instead of mono_metadata_signature_dup_full.
4004 2009-02-12 Zoltan Varga <vargaz@gmail.com>
4006 * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
4007 for processing jump tables. Fixes #473787.
4009 2009-02-11 Mark Probst <mark.probst@gmail.com>
4011 * mini-generic-sharing.c: mini_method_get_context() just calls
4012 mono_method_get_context_general() now.
4014 * mini.c, mini.h: Moved get_object_generic_inst(),
4015 construct_object_context_for_method() and
4016 mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
4018 2009-02-11 Zoltan Varga <vargaz@gmail.com>
4020 * branch-opts.c (mono_if_conversion): Handle the case where the merged
4021 basic block fell through to its successor bblock without a branch. Fixes
4024 * iltests.il.in: Add a test.
4026 * aot-compiler.c (encode_method_ref): Encode methods of array types.
4027 (can_encode_patch): We can now handle arrays of generic parameters and
4030 * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
4032 * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
4033 the AOT file to avoid some #ifdefs in aot-runtime.c
4035 * mini.h: Bump AOT file format version.
4037 2009-02-10 Zoltan Varga <vargaz@gmail.com>
4039 * Makefile.am (fullaotcheck): Make this run the tests.
4041 * aot-compiler.c: Make the printing of skipped methods runtime configurable.
4043 2009-02-10 Mark Probst <mark.probst@gmail.com>
4045 * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
4046 individually. Fixes #473482.
4048 2009-02-10 Zoltan Varga <vargaz@gmail.com>
4050 * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
4052 2009-02-09 Jeffrey Stedfast <fejj@novell.com>
4054 * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
4055 (mono_compile_assembly): Hush compile warnings about
4056 uninitialized [tmp_]outfile_name variables in the !use_bin_writer
4059 2009-02-10 Zoltan Varga <vargaz@gmail.com>
4061 * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
4063 * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
4065 * aot-compiler.c: Fix arm support.
4067 * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
4068 img_writer_emit_unset_mode () function.
4070 * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
4071 (mono_unwind_get_dwarf_pc_reg): Ditto.
4073 * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
4074 Move almost all platform specific code to a set of arch_ functions,
4075 and document them to ease porting.
4077 * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
4079 * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
4081 * aot-compiler.c: Extract the image writing functionality into a separate
4082 module to reduce the size of this file.
4084 2009-02-09 Geoff Norton <gnorton@novell.com>
4086 * mini-s390.c: Fix the signature of emit_sig_cookie.
4088 2009-02-09 Zoltan Varga <vargaz@gmail.com>
4090 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
4092 * aot-runtime.c (is_shared_got_patch): Ditto.
4094 * aot-runtime.c (load_named_code): Cope with the fact that
4095 decode_got_entry () won't decode the patch fully if its corresponding got
4096 entry is already filled.
4098 * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full):
4100 (mono_arch_create_monitor_exit_trampoline_full): Ditto.
4102 * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
4103 as the moving pointer instead of 'buf' for consistency with the rest of the
4105 (mono_arch_create_monitor_exit_trampoline): Ditto.
4107 * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
4108 generic_class_init trampolines.
4109 (add_generic_class): Extract some code from add_generic_instances () into a
4110 separate function so it can be called from other places too.
4111 (compile_method): Call add_generic_class () for the classes of inflated methods
4112 referenced by the method.
4113 (can_encode_patch): Allow references to generic parameters.
4115 * aot-runtime.c: Add support the patches required by the new trampolines.
4117 * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
4120 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
4123 * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
4124 this from get_throw_pending_exception, make the signature full aot compatible.
4126 * Makefile.am (fullaotcheck): New target to run full-aot tests.
4128 * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
4130 * exceptions.cs: Add a test.
4132 2009-02-07 Zoltan Varga <vargaz@gmail.com>
4134 * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
4135 use the DWARF_DATA_ALIGN constant instead.
4137 * exception-<ARCH>.c: Update after the above change.
4139 * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
4142 * mini-arm.c: Enable the dwarf unwinder.
4144 * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
4145 instead of mono_class_setup_vtable ().
4147 2009-02-07 Zoltan Varga <vargaz@gmail.com>
4149 * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
4152 * mini-x86.h: Enable the dwarf unwinder.
4154 2009-02-06 Raja R Harinath <harinath@hurrynot.org>
4156 Fix mcs/tests/test-7.cs
4157 * mini-amd64.c (mono_arch_allocate_vars): Revert change from
4160 2009-02-06 Zoltan Varga <vargaz@gmail.com>
4162 * mini.c (print_jit_stats): Remove some unused statistics.
4164 2009-02-05 Zoltan Varga <vargaz@gmail.com>
4166 * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
4168 2009-02-05 Mark Probst <mark.probst@gmail.com>
4170 * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
4171 the method we get from mono_object_get_virtual_method() because
4172 that function does it properly, now.
4174 2009-02-05 Zoltan Varga <vargaz@gmail.com>
4176 * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
4177 opcodes. Fixes #472775.
4179 2009-02-05 Mark Probst <mark.probst@gmail.com>
4181 * mini-exceptions.c (ves_icall_get_frame_info): Account for the
4182 fact that mono_find_jit_info() sometimes returns the context
4183 corresponding to the jit info in new_ctx. Fixes #472600.
4185 2009-02-05 Zoltan Varga <vargaz@gmail.com>
4187 * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
4188 mini-s390.c: Use mono_class_enum_basetype () instead of accessing
4189 klass->enum_basetype directly.
4191 * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
4194 * unwind.c: Avoid 0 sized arrays.
4196 2009-02-04 Zoltan Varga <vargaz@gmail.com>
4198 * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
4199 size on systems with 64k pages. Fixes #471389.
4201 2009-02-04 Mark Probst <mark.probst@gmail.com>
4203 Contributed under the terms of the MIT/X11 license by Steven
4204 Munroe <munroesj@us.ibm.com>.
4206 * mini-ppc.c (mono_arch_output_basic_block): Generate better code
4207 for LOADI4_MEMBASE. Use addi instead of addic if it's not
4210 2009-02-04 Mark Probst <mark.probst@gmail.com>
4212 Contributed under the terms of the MIT/X11 license by Steven
4213 Munroe <munroesj@us.ibm.com>.
4215 * exceptions-ppc.c (mono_arch_get_restore_context): Code size
4218 * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
4219 The trampoline can be longer on PPC64.
4221 2009-02-04 Mark Probst <mark.probst@gmail.com>
4223 Contributed under the terms of the MIT/X11 license by Steven
4224 Munroe <munroesj@us.ibm.com>.
4226 * mini-ppc.c: Compiler warning fixes and trivial code
4229 2009-02-04 Zoltan Varga <vargaz@gmail.com>
4231 * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
4232 ins->dreg which could be a hardware register, not a vreg.
4234 * aot-compiler.c (emit_method_dwarf_info): Ditto.
4236 * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
4237 (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
4239 * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
4241 * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
4242 ->dreg, that is not the vreg we are looking for.
4244 * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
4246 * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
4249 * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
4252 2009-02-03 Zoltan Varga <vargaz@gmail.com>
4254 * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
4256 * aot-compiler.c (emit_line_number_info): Fix line number emission when
4259 * aot-compiler.c: Add xdebug support on x86.
4261 * unwind.c: Add x86 support.
4263 * aot-compiler.c (emit_exception_debug_info): Control the emission of
4264 unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
4266 * mini.c (mini_method_compile): Ditto.
4268 * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
4271 * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
4272 which mimic .push_section/.pop_section in GAS.
4274 * aot-compiler.c: Emit precise live range information for variables.
4276 * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
4278 * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
4279 the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
4282 * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
4283 the live ranges of variables.
4285 * mini.h (struct MonoMethodVar): Add two fields containing the live range
4286 of the variable in terms of native offsets.
4288 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
4290 * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
4292 2009-02-02 Mark Probst <mark.probst@gmail.com>
4294 Contributed under the terms of the MIT/X11 license by Steven
4295 Munroe <munroesj@us.ibm.com>.
4297 * exceptions-ppc.c (restore_regs_from_context): Correct operand
4298 order (offset then base reg) for ppc_load_multiple_regs.
4299 (emit_save_saved_regs) Correct operand order for
4300 ppc_store_multiple_regs.
4301 (mono_arch_get_call_filter): Correct operand order for
4302 ppc_load_multiple_regs.
4304 * mini-ppc.c (emit_memcpy): Fix operand order for
4305 ppc_load_reg_update and ppc_store_reg_update.
4306 (mono_arch_output_basic_block): Correct operand order for ppc_lha.
4307 (mono_arch_emit_epilog): Correct operand order for
4308 ppc_load_multiple_regs.
4310 * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
4311 order for ppc_store_multiple_regs and ppc_load_multiple_regs.
4313 2009-02-02 Mark Probst <mark.probst@gmail.com>
4315 * cpu-ppc64.md: Fixed storer4_memindex length.
4317 2009-02-02 Zoltan Varga <vargaz@gmail.com>
4319 * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
4322 * aot-compiler.c (emit_line_number_info): Optimize this.
4324 2009-02-01 Zoltan Varga <vargaz@gmail.com>
4326 * aot-compiler.c: Disassemble tokens in the IL disassembly.
4328 * aot-compiler.c: Add debug info for methods without debug info by
4329 emitting an IL file and having the line number info referencing that file.
4331 * aot-compiler.c: Optimize the size of the generated line number info.
4333 * aot-compiler.c: Emit line number info in xdebug mode.
4335 * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
4338 2009-01-31 Zoltan Varga <vargaz@gmail.com>
4340 * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
4342 * driver.c (mono_main): Enable debugging support automatically if XDEBUG
4345 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
4347 * basic-calls.cs: Test for the weird crash found on arm.
4349 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
4351 * cpu-arm.md: Increase the size of storer8_membase_reg and
4352 loadr8_membase_reg to 24 bytes to accomodate the extra add.
4354 * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
4355 OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
4356 reg to LR otherwise we'll be loading/storing from just the offset.
4358 2009-01-30 Miguel de Icaza <miguel@novell.com>
4360 Question: if we are storing gint32's inside the "*native_offset",
4361 should we change the signature to "gint32 *native_offset" to
4362 ensure that we do not have type definition problems?
4364 * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
4365 an int * as this is what the other function expects, causes
4366 problems with Freescale's compiler that defined int32_t to be a
4367 long and makes int incompatible
4369 2009-01-30 Miguel de Icaza <miguel@novell.com>
4371 * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
4372 filename conflict with bjam.
4374 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
4376 * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
4377 as it might use decomposed ops.
4379 2009-01-30 Zoltan Varga <vargaz@gmail.com>
4381 * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
4383 * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
4386 * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
4388 * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
4391 * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
4392 way registers are stored in MonoContext on arm.
4394 * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
4395 instead of locking so mono_get_cached_unwind_info () becomes signal safe.
4397 * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
4399 * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
4401 * mini.c (mini_init): Register mono_isfinite.
4403 * jit-icalls.c (mono_isfinite): New jit icall.
4405 * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
4407 * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
4408 set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
4411 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
4413 * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
4414 separate frame and stack pointers, so we must use FP to find the register
4416 The FP reg is retrieved from the MonoContext::regs array.
4418 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
4420 * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
4423 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
4425 * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
4426 return R4 and R8 when not running under softfloat.
4428 Fixes basic-calls.exe
4430 2009-01-30 Zoltan Varga <vargaz@gmail.com>
4432 * mini-arm.c: Implement some overflow opcodes.
4434 2009-01-29 Miguel de Icaza <miguel@novell.com>
4436 * ssa.c: handle another alloca.h
4438 * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
4439 PLATFORM_WIN32 for detecting if we have sigaction. Instead use
4440 MONO_ARCH_USE_SIGACTION.
4442 * aot-runtime.c, mini-exceptions.c: Replace platform define with
4445 * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
4447 * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
4448 PPC targets as sigaction does not exist on all platforms, define
4449 this on a per-platform basis.
4451 Instead of erroring out if the platform is not defined, include
4452 mini-ppc-os.h, and expect that the OS specific setting provides
4453 the required information.
4455 2009-01-30 Zoltan Varga <vargaz@gmail.com>
4457 * aot-compiler.c: Fix --enable-minimal=aot.
4459 2009-01-30 Zoltan Varga <vargaz@gmail.com>
4461 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
4464 2009-01-29 Zoltan Varga <vargaz@gmail.com>
4466 * exceptions-arm.c: Fix warnings.
4468 * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
4471 * mini-x86.c: Fix --enable-minimal=jit build.
4473 * mini.c: Really fix --enable-minimal=jit build.
4475 * mini.c (construct_object_context_for_method): Move this outside
4476 the DISABLE_JIT block to fix the --enable-minimal=jit build.
4478 "Backported" of r124984 from 2.0 branch.
4480 * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
4482 "Backport" of r124977 + r124978 from 2.0 branch.
4484 * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
4485 to avoid calling mono_exception_from_token () from the throw trampoline.
4486 (mono_arch_get_throw_exception_generic): call throw_exception_by_token
4487 for throwing corlib exceptions, this fixes full-aot support for corlib
4490 * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
4492 2009-01-29 Miguel de Icaza <miguel@novell.com>
4494 * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
4495 part of the changes to split the code in mini into operating
4496 system specific files.
4498 This patch was done by copying mini.c to the respective files to
4499 preserve SVN history.
4501 2009-01-29 Zoltan Varga <vargaz@gmail.com>
4503 * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
4505 2009-01-28 Zoltan Varga <vargaz@gmail.com>
4507 * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
4508 remoting-invoke-with-check wrappers of shared methods.
4510 * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
4512 2009-01-27 Mark Probst <mark.probst@gmail.com>
4514 * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
4515 optimization if the top of stack is the last instruction in the
4516 bblock. Otherwise it might have been used after its definition.
4519 2009-01-27 Zoltan Varga <vargaz@gmail.com>
4521 * mini-trampolines.c (mono_magic_trampoline): Print out the caller
4522 method as well when get_vcall_slot () fails to match a code sequence.
4524 * mini-arm.c: Fix the android build, which doesn't have
4527 2009-01-26 Zoltan Varga <vargaz@gmail.com>
4529 * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
4532 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
4534 * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
4536 2009-01-26 Zoltan Varga <vargaz@gmail.com>
4538 * mini.c (mini_method_compile): Save the unwind info generated by the JIT
4539 and put its id into jinfo->used_regs. This is only used on amd64,
4540 which is currently the only platform generating unwind info.
4542 * exceptions-amd64.c: Instead of unwinding based on a register mask, use
4543 the dwarf unwinder. This is required to correctly handle async exceptions
4544 like thread abort and stack overflows, which can happen while a method
4545 is in the middle of its prolog or epilog.
4547 * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
4548 the unwind info belonging to an AOTed method.
4550 * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
4551 into cfg->unwind_ops.
4553 * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
4555 * mini.c (mini_init): Call mono_unwind_init ().
4556 (mini_cleanup): Call mono_unwind_cleanup ().
4558 * unwind.c: Add functions for managing a set of unwind info entries, allowing
4559 unwind info to be shared between methods.
4561 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
4564 * exceptions-amd64.c (mono_arch_exceptions_init): Call
4565 get_throw_pending_exception () to avoid initialization races.
4567 * mini-exceptions.c (mono_exceptions_init): Call an arch specific
4568 mono_arch_exceptions_init () function.
4570 * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
4572 2009-01-25 Zoltan Varga <vargaz@gmail.com>
4574 * mini.c (mono_get_domain_intrinsic): New helper function.
4575 (mono_get_thread_intrinsic): Ditto.
4577 * mini-arm.c mini-ia64.c: Use the new helper functions.
4579 * method-to-ir.c (mono_method_to_ir): Fix the comment for
4580 the last constrained_call change, since it is needed in the non-AOT
4583 * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
4585 * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of
4586 mono_get_lmf_addr () on arm eabi linux.
4588 2009-01-24 Zoltan Varga <vargaz@gmail.com>
4590 * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
4591 code sequence which matches a non-virtual call.
4593 2009-01-23 Mark Probst <mark.probst@gmail.com>
4595 * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
4598 2009-01-23 Zoltan Varga <vargaz@gmail.com>
4600 * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
4601 runtime-invoke wrappers, since they are also shared based on signature.
4603 2009-01-22 Mark Probst <mark.probst@gmail.com>
4605 * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
4606 info from the (correct) context.
4608 2009-01-22 Zoltan Varga <vargaz@gmail.com>
4610 * unwind.c (mono_unwind_frame): Remove a stray g_free ().
4612 * unwind.c (mono_unwind_frame): New function to unwind through a frame
4613 using dwarf unwinding info. Not yet used.
4615 * mini.c (mini_init): When using xdebug, disable freeing of domains.
4617 2009-01-21 Mark Probst <mark.probst@gmail.com>
4619 * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
4622 * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
4623 special case and handle mono_arch_delegate_invoke_impl() returning
4624 function descriptors.
4626 * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
4627 trampolines return function descriptors, too.
4629 2009-01-21 Zoltan Varga <vargaz@gmail.com>
4631 * method-to-ir.c (handle_alloc): Avoid generic instances in the
4632 out_of_line optimization.
4634 2009-01-21 Martin Baulig <martin@ximian.com>
4637 (MonoCompile): Added `disable_deadce_vars' to disable removing
4641 (mini_method_compile): Set `cfg->disable_deadce_vars' when running
4642 inside the debugger.
4644 * liveness.c (mono_analyze_liveness): Don't remove any unused
4645 variables if `cfg->disable_deadce_vars' is set.
4647 2009-01-21 Mark Probst <mark.probst@gmail.com>
4649 * method-to-ir.c: Only apply exception constructor optimization if
4650 the the method actually belongs to an exception class. Fixes
4653 2009-01-21 Zoltan Varga <vargaz@gmail.com>
4655 * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
4656 change inside a #ifdef __mono_ppc64__.
4658 * aot-compiler.c (compile_method): Remove the previous limitation.
4660 * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
4661 on type variables in AOTed code.
4663 * aot-compiler.c (compile_method): Skip generic methods having type
4664 constraints on their generic parameters.
4666 * aot-compiler.c (compile_method): Check for methods which cannot be
4667 encoded inside RGCTX_FETCH patches as well.
4669 * mini-exceptions.c (mono_print_thread_dump): Fix the windows
4672 2009-01-20 Mark Probst <mark.probst@gmail.com>
4674 * method-to-ir.c: Force the vtable variable in shared generic code
4675 for the case that they might show up on a stack trace where they
4678 * mini-exceptions.c: Save and use generic sharing info as well as
4679 IP in stack traces to resolve shared generic instantiations.
4681 2009-01-20 Zoltan Varga <vargaz@gmail.com>
4683 * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
4684 added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
4686 2009-01-20 Mark Probst <mark.probst@gmail.com>
4688 * method-to-ir.c: Do generic sharing for array constructors.
4690 2009-01-20 Rodrigo Kumpera <rkumpera@novell.com>
4692 * mini-exceptions.c (mono_print_thread_dump): Add information
4693 about the thread state using wapi_current_thread_desc.
4695 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
4697 * basic-simd.cs: Tests for the new constructors.
4699 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
4701 * mini-ops.h: Added OP_EXPAND_*
4705 * mini-x86.c (mono_arch_output_basic_block): Same.
4707 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
4709 2009-01-19 Zoltan Varga <vargaz@gmail.com>
4711 * iltests.il.in: Add a test for #467385.
4713 2009-01-18 Rodrigo Kumpera <rkumpera@novell.com>
4715 * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
4716 thread been cleaned up is not the same currently in execution.
4718 Fixes appdomain-unload crashes on windows, osx and linux variants
4719 without the __thread keyword.
4721 2009-01-18 Zoltan Varga <vargaz@gmail.com>
4723 * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
4724 (koush@koushikdutta.com). Implement this for android.
4726 * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
4727 begins with a digit.
4729 * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
4730 mono_marshal_get_write_barrier ().
4732 2009-01-17 Rodrigo Kumpera <rkumpera@novell.com>
4734 * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
4735 of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
4736 that pass them on a register pair.
4738 This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
4739 test was crashing due to that.
4741 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
4743 * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
4744 trampoline code. Include ucontext.h only if available.
4746 2009-01-15 Mark Probst <mark.probst@gmail.com>
4748 * mini.c: mono_domain_lookup_shared_generic() takes an open method
4749 and doesn't check whether it's sharable, like it was before
4750 removing the shared generics hash. This brings IronPython
4751 performance back to what it was before that change.
4753 2009-01-14 Mark Probst <mark.probst@gmail.com>
4755 * method-to-ir.c: Handle delegate invocation optimization earlier,
4756 otherwise it would be handled (much more slowly) by the
4757 final/sealed optimization.
4759 2009-01-13 Zoltan Varga <vargaz@gmail.com>
4761 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
4762 domain is not set. Fixes #465864.
4764 2009-01-12 Mark Probst <mark.probst@gmail.com>
4766 * method-to-ir.c: Don't stop sharing of generic methods with catch
4767 clauses - we already handle those.
4769 2009-01-12 Mark Probst <mark.probst@gmail.com>
4771 * mini.c, mini.h: lookup_generic_method() is now
4772 mono_domain_lookup_shared_generic() and uses the jit_code_hash,
4773 making the shared_generics_hash obsolete.
4775 2009-01-12 Mark Probst <mark.probst@gmail.com>
4777 * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
4778 use the red zone. Make room on the stack first and then use it,
4779 not the other way around.
4781 2009-01-12 Zoltan Varga <vargaz@gmail.com>
4783 * mini.c (mini_init): Call mono_xdebug_init ().
4785 * aot-compiler.c (mono_xdebug_init): Make this non-static.
4787 2009-01-11 Zoltan Varga <vargaz@gmail.com>
4789 * TestDriver.cs: Add an --iter argument to run tests multiple times.
4791 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
4794 * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
4795 debug+unwind info for trampolines.
4797 * mini.c (mono_create_unwind_op): New helper function.
4799 * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
4801 2009-01-10 Zoltan Varga <vargaz@gmail.com>
4803 * aot-compiler.c: Fix the build.
4805 2009-01-09 Zoltan Varga <vargaz@gmail.com>
4807 * Makefile.am: Update dtrace-prelink.sh location.
4809 2009-01-08 Zoltan Varga <vargaz@gmail.com>
4811 * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr
4812 optimization. Fixes #464520.
4814 2009-01-07 Bill Holmes <billholmes54@gmail.com>
4816 * mini-amd64.c : Adding code to save/restore non-volatile registers
4819 * exceptions-amd64.c : Adding code to save/restore non-volatile
4820 registers on Winx64.
4822 Contributed under MIT/X11 license.
4824 2009-01-07 Zoltan Varga <vargaz@gmail.com>
4826 * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
4827 __GNUC_MINOR__ which can break when the major version changes.
4829 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
4831 * basic-simd.cs: Add tests for usage of the sizeof opcode.
4833 2009-01-07 Geoff Norton <gnorton@novell.com>
4835 * helpers.c: Allow mono -v -v -v to work on darwin.
4837 2009-01-05 Bill Holmes <billholmes54@gmail.com>
4839 * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
4842 Contributed under MIT/X11 license.
4844 2009-01-05 Zoltan Varga <vargaz@gmail.com>
4846 * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
4847 instead of directly accessing type->data.klass. Fixes #462016.
4848 (mono_allocate_stack_slots_full): Ditto.
4850 * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio
4851 <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
4853 * aot-compiler.c (emit_plt): Fix ARM build.
4855 2009-01-04 Zoltan Varga <vargaz@gmail.com>
4857 * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
4859 * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
4862 * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
4863 instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
4866 * iltests.il.in: Add a regression test.
4868 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
4870 * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
4872 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
4874 * basic-simd.cs: Add a regression test for #462457.
4876 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
4878 * mini-ops.h: Add a definition of XPHI.
4880 * mini.h (MONO_IS_PHI): Make is aware of simd instrincs.
4882 * ssa.c (op_phi_to_move): Handle XPHI.
4884 * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
4888 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
4890 * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
4892 2008-12-31 Geoff Norton <gnorton@novell.com>
4894 * mini-ppc.c: The prolog size allocated can be too small for darwin
4895 ppc32 under certain circumstances. Also fix a small logic bug.
4897 2008-12-29 Zoltan Varga <vargaz@gmail.com>
4899 * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
4900 while loading AOT methods.
4902 * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
4903 since only the former is nulled out after a successful cast. This prevents
4904 crashes with rethrown exceptions when using --debug=casts.
4906 2008-12-24 Mark Probst <mark.probst@gmail.com>
4908 * mini.h: New macro for checking whether a method is final,
4909 i.e. whether the method or its class is marked final.
4911 * method-to-ir.c: Use the new macro for all final-checks
4912 consistently. Fixes the crash in the System.ServiceModel tests.
4914 2008-12-23 Mark Probst <mark.probst@gmail.com>
4916 * mini-exceptions.c (get_exception_catch_class): Corrected another
4917 overly strict assertion.
4919 2008-12-23 Mark Probst <mark.probst@gmail.com>
4921 * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
4922 Clobbering it is not allowed because the caller might use it as
4923 the vtable register in the interface call.
4925 2008-12-19 Mark Probst <mark.probst@gmail.com>
4927 * mini-exceptions.c (get_exception_catch_class): Corrected an
4928 overly strict assertion.
4930 2008-12-18 Mark Mason <mmason@upwardaccess.com>
4932 * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
4934 * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
4936 * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
4938 * cpu-mips.md: correct lengths for certain long_ opcodes.
4940 * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
4942 * 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().
4944 2008-12-17 Mark Mason <mmason@upwardaccess.com>
4946 * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
4948 2008-12-17 Mark Mason <mmason@upwardaccess.com>
4950 * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
4952 2008-12-16 Rodrigo Kumpera <rkumpera@novell.com>
4954 * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
4957 2008-12-16 Mark Mason <mmason@upwardaccess.com>
4959 * 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
4961 * 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)
4963 2008-12-15 Mark Mason <mmason@upwardaccess.com>
4965 * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
4967 2008-12-14 Zoltan Varga <vargaz@gmail.com>
4969 * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
4970 gshared code. Fixes #458947.
4972 * generics.cs: Add a test.
4974 2008-12-12 Mark Mason <mmason@upwardaccess.com>
4976 * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4978 * mini-mips.c: first pass n32 code generation.
4980 * mini-mips.h: datatypes and defines for n32 support.
4982 * exceptions-mips.c: first pass n32 code generation.
4984 * tramp-mips.c: first pass n32 code generation.
4986 * cpu-mips.md: add long_ opcodes.
4988 2008-12-12 Mark Mason <mmason@upwardaccess.com>
4990 * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4992 * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4994 * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4996 * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4998 * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
5000 * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
5002 * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
5004 * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
5006 * helpers.c: for mips/n32, don't pass -mips32 to objdump
5008 2008-12-12 Zoltan Varga <vargaz@gmail.com>
5010 * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
5012 2008-12-12 Andres G. Aragoneses <aaragoneses@novell.com>
5014 * driver.c: Sync --help-trace with man page (EXPR,EXPR).
5016 2008-12-12 Mark Probst <mark.probst@gmail.com>
5018 * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
5019 descriptors for helper functions directly in front of the code.
5021 2008-12-11 Mark Probst <mark.probst@gmail.com>
5023 * method-to-ir.c: Removed an unnecessary assertion.
5025 2008-12-10 Zoltan Varga <vargaz@gmail.com>
5027 * method-to-ir.c: Merge SGEN changes from the old JIT.
5029 2008-12-10 Zoltan Varga <vargaz@gmail.com>
5031 * driver.c (compile_all_methods_thread_main): Handle failure of
5034 2008-12-10 Mark Probst <mark.probst@gmail.com>
5036 * mini-ppc.c: Merged with mini-ppc64.c.
5038 * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
5040 * Makefile.am: Use the same sources for PPC and PPC64.
5042 * mini-ppc64.c: Removed.
5044 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
5046 * branch-opts.c (remove_block_if_useless): Extract fall through detection
5047 code to mono_bb_is_fall_through.
5049 * branch-opts.c (mono_remove_critical_edges): Same.
5051 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
5053 * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
5054 expect that an OP_BR_REG will be there.
5056 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
5058 * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
5059 for the many branch ops. The original check miss OP_BR_REG.
5063 2008-12-09 Mark Mason <mmason@upwardaccess.com>
5065 * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
5067 2008-12-09 Zoltan Varga <vargaz@gmail.com>
5069 * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
5070 while holding the aot lock.
5072 2008-12-09 Mark Mason <mmason@upwardaccess.com>
5074 * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
5076 2008-12-09 Bill Holmes <billholmes54@gmail.com>
5078 * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws
5079 to release all runtime callable wrappers held by the runtime.
5081 Contributed under MIT/X11 license.
5083 2008-12-09 Bill Holmes <billholmes54@gmail.com>
5085 * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
5088 Contributed under MIT/X11 license.
5090 2008-12-09 Zoltan Varga <vargaz@gmail.com>
5092 * aot-runtime.c (decode_exception_debug_info): Acquire the domain
5093 lock when calling mono_domain_alloc (). Hopefully fixes #415608.
5095 2008-12-09 Mark Mason <mmason@upwardaccess.com>
5097 * cpu-mips.md: fix ckfinite length
5099 * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
5100 (mono_arch_lowering_pass): cleanup, rearrange for clarity
5101 (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
5103 2008-12-08 Mark Mason <mmason@upwardaccess.com>
5105 * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
5107 2008-12-08 Geoff Norton <gnorton@novell.com>
5109 * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
5110 size by 8 bytes as well.
5112 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
5114 * basic-simd.cs: Fix method names for Vector16b.
5116 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
5118 * basic-simd.cs: Fix method names for Vector16sb.
5120 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
5122 * basic-simd.cs: Fix method names for Vector8us.
5124 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
5126 * basic-simd.cs: Fix method names for Vector8s.
5128 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
5130 * basic-simd.cs: Fix method names for Vector4ui.
5132 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
5134 * basic-simd.cs: Fix method names for Vector2l.
5136 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
5138 * basic-simd.cs: Fix method names for Vector2d.
5140 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
5142 * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
5143 that are extension methods.
5145 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
5147 * basic-simd.cs: Fix method names for Vector4f.
5149 2008-12-08 Zoltan Varga <vargaz@gmail.com>
5151 * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
5152 as such. Fixes #456669.
5154 2008-12-07 Mark Mason <mmason@upwardaccess.com>
5156 * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
5158 2008-12-07 Mark Mason <mmason@upwardaccess.com>
5160 * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
5161 (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
5162 (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
5163 (mips_adjust_stackframe): handle FP spills
5165 * mini-ops.h: add mips_mtc1_s2
5167 * cpu-mips.md: add mips_mtc1_s2
5169 2008-12-07 Zoltan Varga <vargaz@gmail.com>
5171 * unwind.c: New file, move the unwind info encoding functions here from
5172 aot-compiler.c, so they could be used at runtime too.
5174 2008-12-05 Mark Mason <mmason@upwardaccess.com>
5176 * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
5177 (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
5179 2008-12-05 Mark Mason <mmason@upwardaccess.com>
5181 * mini-mips.c: cleanup warnings
5182 (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
5183 (mips_adjust_stackframe): handle case of taking the address of stack locals
5185 2008-12-05 Zoltan Varga <vargaz@gmail.com>
5187 * aot-compiler.c: Implement a few functions missing from the asm writer.
5188 (emit_method_code): Only write symbols for methods when using the bin
5189 writer, since the assembler can't deal with the characters in our method
5192 * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
5194 * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
5197 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
5198 a bit to also restore %rax.
5200 2008-12-05 Mark Probst <mark.probst@gmail.com>
5202 * mini-ppc.c: Some simple merges from mini-ppc64.c.
5204 2008-12-05 Zoltan Varga <vargaz@gmail.com>
5206 * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
5209 2008-12-05 Mark Probst <mark.probst@gmail.com>
5211 * exceptions-ppc.c: Merged with exceptions-ppc64.c.
5213 * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
5214 MONO_ARCH_FRAME_ALIGNMENT. Struct for PPC64 function descriptors.
5216 * exceptions-ppc64.c: Removed.
5218 * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
5220 2008-12-05 Mark Probst <mark.probst@gmail.com>
5222 * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
5225 * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
5227 * tramp-ppc64.c: Removed.
5229 2008-12-05 Zoltan Varga <vargaz@gmail.com>
5231 * aot-compiler.c (add_generic_instances): Skip non-generic classes in
5234 2008-12-05 Mark Probst <mark.probst@gmail.com>
5236 * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
5238 * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
5239 mini-ppc.h instead of mini-ppc64.h.
5241 * mini-ppc64.h: Removed.
5243 2008-12-04 Mark Mason <mmason@upwardaccess.com>
5245 * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
5247 * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
5249 2008-12-05 Mark Probst <mark.probst@gmail.com>
5251 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
5252 Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
5255 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
5257 * basic-simd.cs: Tests for operator == and != on Vector8us and Vector16b.
5259 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
5261 * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
5263 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
5265 * basic-simd.cs: Tests for operator == and != on Vector4f.
5267 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
5269 * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
5271 * simd-intrinsics.c: Kill useless enum.
5273 2008-12-04 Mark Mason <mmason@upwardaccess.com>
5275 * cpu-mips.md: add long_conv_to_ovf_i4_2
5276 * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
5278 2008-12-04 Mark Mason <mmason@upwardaccess.com>
5280 * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
5282 * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
5284 2008-12-04 Mark Mason <mmason@upwardaccess.com>
5286 * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
5288 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
5290 * basic-simd.cs: Add tests for new methods.
5292 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
5294 * simd-intrinsics.c: Add support for operator == and !=
5297 * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
5299 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
5301 * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
5303 2008-12-04 Zoltan Varga <vargaz@gmail.com>
5305 * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
5307 * mini.c (mono_resolve_patch_target): Allow pinvoke methods in
5308 MONO_PATCH_INFO_ICALL_ADDR.
5310 * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
5312 * aot-compiler.c: Resurrect full-aot support.
5314 2008-12-04 Mark Mason <mmason@upwardaccess.com>
5316 * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
5318 2008-12-04 Mark Mason <mmason@upwardaccess.com>
5320 * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
5322 2008-12-03 Rodrigo Kumpera <rkumpera@novell.com>
5324 * basic-simd.cs: Fix tests to work under ppc.
5325 Remove tests for methods that will be removed.
5327 2008-12-03 Mark Probst <mark.probst@gmail.com>
5329 * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
5330 generic type (via a typedef or typeref) correctly.
5332 2008-12-03 Zoltan Varga <vargaz@gmail.com>
5334 * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
5335 diagnose an assertion failure.
5337 2008-12-02 Mark Probst <mark.probst@gmail.com>
5339 * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
5340 Fix trampoline size.
5342 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
5343 conversion opcodes are implemented natively instead via emulation.
5345 2008-12-01 Mark Mason <mmason@upwardaccess.com>
5347 * cpu-mips.md: remove mips_xori
5349 * mini-ops.h: remove mips_xori
5351 * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
5353 * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
5355 * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
5357 2008-12-01 Mark Mason <mmason@upwardaccess.com>
5359 * cpu-mips.md: fix instruction lengths.
5361 * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
5363 * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
5365 * mini-ops.h: fix slti / sltiu op profiles.
5367 2008-12-02 Martin Baulig <martin@ximian.com>
5369 * method-to-ir.c (mono_method_to_ir): Disable debugging
5370 information for the init locals block to make the debugger stop
5371 after all locals have been initalized.
5373 2008-12-02 Martin Baulig <martin@ximian.com>
5375 * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
5376 running inside the debugger.
5378 2008-12-01 Zoltan Varga <vargaz@gmail.com>
5380 * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
5383 * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the
5384 alu->alu imm optimization which only shows if deadce is disabled.
5386 * aot-compiler.c: Rename the function names for the binary and asm writers
5387 so they can coexist in the same process. Rework the xdebug code to use the
5388 asm writer. This avoids the need to call into the runtime to dump the
5389 debugging info. Add more debugging info for types.
5391 * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
5393 * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
5394 cpu description tables, they can't occur in cpu-<ARCH>.md.
5396 * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
5397 the stack in CEE_LDFLDA. Fixes #450542.
5399 * generics.cs: Add a new test.
5401 2008-12-01 Mark Mason <mmason@upwardaccess.com>
5403 * mini-ops.h: updated MIPS opcodes
5404 * mini-mips.c: decompose long opts
5405 * mini-mips.h: decompose long opts
5407 2008-11-29 Mark Mason <mmason@upwardaccess.com>
5409 * cpu-mips.md: fix length on int_rem_un
5410 * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
5412 2008-11-29 Zoltan Varga <vargaz@gmail.com>
5414 * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
5416 * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
5418 2008-11-29 Martin Baulig <martin@ximian.com>
5420 * mini-exceptions.c (mono_handle_native_sigsegv): Check
5421 mono_debug_using_mono_debugger() in addition to the
5422 `no_gdb_backtrace' flag in the `MonoDebugOptions'.
5424 2008-11-28 Mark Mason <mmason@upwardaccess.com>
5426 * mini-ops.h: updated more MIPS opcodes
5427 * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
5428 * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
5430 2008-11-28 Mark Probst <mark.probst@gmail.com>
5432 * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
5434 2008-11-28 Mark Mason <mmason@upwardaccess.com>
5436 * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
5437 * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
5438 * mini-ops.h: correct selected mips opcode entries
5440 2008-11-28 Mark Probst <mark.probst@gmail.com>
5442 * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
5445 2008-11-28 Mark Probst <mark.probst@gmail.com>
5447 * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
5449 2008-11-28 Mark Mason <mmason@upwardaccess.com>
5451 * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
5452 * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
5453 * mini-mips.h: disable IMT
5454 * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
5456 2008-11-28 Mark Probst <mark.probst@gmail.com>
5458 * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
5460 2008-11-28 Mark Probst <mark.probst@gmail.com>
5462 * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
5464 2008-11-28 Zoltan Varga <vargaz@gmail.com>
5466 * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
5469 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
5471 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
5472 for Set/GetVector aligned versions.
5474 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
5476 * basic-simd.cs: Add tests for Get/SetVector.
5478 2008-11-27 Mark Probst <mark.probst@gmail.com>
5480 * mini.c: Removed g_slist_append_mempool(). Now in
5483 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
5485 * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
5486 size properly and make the bounds check optional.
5488 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
5489 for SetVector and IsAligned.
5491 2008-11-27 Zoltan Varga <vargaz@gmail.com>
5493 * mini.c: Remove unused mono_normalize_opcodes () function.
5495 2008-11-26 Mark Probst <mark.probst@gmail.com>
5497 * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
5498 using the new atomic add ops now.
5500 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
5503 2008-11-26 Mark Probst <mark.probst@gmail.com>
5505 * mini-ppc64.c: Several fixes.
5507 2008-11-25 Mark Mason <mmason@upwardaccess.com>
5509 * cpu-mips.md: added jump_table
5510 * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.
5512 2008-11-25 Mark Mason <mmason@upwardaccess.com>
5514 * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
5516 2008-11-25 Mark Mason <mmason@upwardaccess.com>
5518 * mini-ops.h: corrected a handful of MIPS opcodes.
5520 2008-11-25 Mark Mason <mmason@upwardaccess.com>
5522 * aot-compiler.c: MIPS to use ELF writer
5524 2008-11-25 Mark Mason <mmason@upwardaccess.com>
5526 * mini-codegen.c: remove MIPS specific assert.
5528 2008-11-25 Mark Probst <mark.probst@gmail.com>
5530 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
5531 fixes. PPC64 now passes most of the runtime regressions.
5533 2008-11-24 Zoltan Varga <vargaz@gmail.com>
5535 * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
5536 volatile intervals a bit.
5538 2008-11-24 Mark Probst <mark.probst@gmail.com>
5540 * basic-long.cs: New test case.
5542 2008-11-23 Zoltan Varga <vargaz@gmail.com>
5544 * mini.c (mini_method_compile): Disable globalra for large methods for
5547 * regalloc2.c (order_moves): Add fp support.
5549 * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
5550 source bblock ends with an OP_BR_REG.
5552 * ratests.cs: Add a new test.
5554 2008-11-23 Mark Probst <mark.probst@gmail.com>
5556 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
5557 sharing. PPC64 now passes generics.exe.
5559 2008-11-23 Mark Probst <mark.probst@gmail.com>
5561 * mini-ppc64.c: Several fixes. PPC64 now runs iltests.exe.
5563 2008-11-23 Zoltan Varga <vargaz@gmail.com>
5565 * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
5566 memory when mono_jit_info_table_find () can't find the method in the
5569 * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
5572 * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
5575 2008-11-23 Mark Probst <mark.probst@gmail.com>
5577 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
5578 Several fixes. PPC64 now runs exceptions.exe and
5579 devirtualization.exe.
5581 2008-11-22 Mark Probst <mark.probst@gmail.com>
5583 * mini-ppc64.c, tramp-ppc64.c: Small fixes. PPC64 now runs
5584 arrays.exe and basic-math.exe.
5586 2008-11-22 Mark Probst <mark.probst@gmail.com>
5588 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
5589 cpu-ppc64.md: Several fixes. PPC64 now runs objects.exe.
5591 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
5593 * simd-intrinsics.c: Add support ArrayExtension intrinsics.
5595 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
5597 * method-to-ir.c: Move bounds checking macros to ir-emit.h
5599 * ir-emit.h: Move macros from method-to-ir.c to here.
5601 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
5603 * mini-ops.h: Correct the long simd ops to use LREG.
5605 2008-11-21 Zoltan Varga <vargaz@gmail.com>
5607 * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
5609 * mini-ops.h: Correct the dreg type of a few long opcodes.
5611 * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
5614 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
5616 * mini-ppc.c: remove negative stack references in epilog
5617 for platforms that don't support the red zone.
5619 2008-11-21 Mark Probst <mark.probst@gmail.com>
5621 * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
5622 point regs. Now PPC64 passes basic-calls.exe.
5624 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
5626 * basic-simd.cs: Add tests for accessors of Vector2l.
5628 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
5630 * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
5632 * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
5634 * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
5636 2008-11-21 Mark Probst <mark.probst@gmail.com>
5638 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes. Now
5639 PPC64 passes basic-long.exe.
5641 2008-11-20 Mark Probst <mark.probst@gmail.com>
5643 * decompose.c: Decompose carry and overflow add on PPC64 like on
5644 other 64 bit archs. Don't decompose sub at all on PPC64.
5646 * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
5647 Several fixes and new opcodes. Now PPC64 runs (but doesn't pass)
5650 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
5652 * basic-simd.cs: Add tests for accessors of Vector2d.
5654 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
5656 * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
5660 * mini-x86.c (mono_arch_output_basic_block): Same.
5662 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
5664 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
5666 * basic-simd.cs: Add tests for accessors of Vector4f.
5668 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
5670 * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
5674 * mini-x86.c (mono_arch_output_basic_block): Same.
5676 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
5678 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
5680 * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
5682 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
5684 * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
5688 * mini-x86.c (mono_arch_output_basic_block): Same.
5690 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
5692 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
5694 * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
5696 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
5698 * simd-intrinsics.c: Enable setters for Vector16sb.
5700 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
5702 * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
5706 * mini-x86.c (mono_arch_output_basic_block): Same.
5708 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
5710 2008-11-19 Rodrigo Kumpera <rkumpera@novell.com>
5712 * simd-intrinsics.c: Implement setter for Vector8us.
5714 2008-11-19 Zoltan Varga <vargaz@gmail.com>
5716 * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
5719 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
5721 * mini-ppc.c: remove references to the red zone in the prolog
5722 (for systems that don't support it).
5724 2008-11-19 Mark Probst <mark.probst@gmail.com>
5726 * cpu-ppc64.md: Fixed a few instruction lengths.
5728 * mini-ppc64.c: Don't emit SETLRET. PPC64 passes basic-float.exe,
5731 2008-11-19 Mark Probst <mark.probst@gmail.com>
5733 * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes. PPC64 passes
5736 2008-11-19 Zoltan Varga <vargaz@gmail.com>
5738 * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
5740 2008-11-18 Rodrigo Kumpera <rkumpera@novell.com>
5742 * mini-ops.h: Added OP_INSERT_I2.
5746 * mini-x86.c (mono_arch_output_basic_block): Same.
5748 * simd-intrinsics.c: Implement setter for Vector8s.
5750 * simd-methods.h: Add the names of get setters of Vector8s.
5752 2008-11-18 Zoltan Varga <vargaz@gmail.com>
5754 * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
5756 * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
5759 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
5761 2008-11-18 Mark Probst <mark.probst@gmail.com>
5763 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
5764 for PPC64. An empty program runs now.
5766 2008-11-18 Zoltan Varga <vargaz@gmail.com>
5768 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
5770 * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
5771 a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
5772 info for JITted code is emitted into a shared library, loadable into gdb.
5774 2008-11-18 Mark Probst <mark.probst@gmail.com>
5776 * Makefile.am: Changes to build PPC64.
5778 * mini-arch.h: Include mini-ppc64.h on PPC64.
5780 2008-11-18 Mark Probst <mark.probst@gmail.com>
5782 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
5783 in PPC code up to r119147.
5785 2008-11-18 Mark Probst <mark.probst@gmail.com>
5787 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
5788 cpu-ppc64.md: Changes for PPC64.
5790 Based on code submitted by andreas.faerber@web.de at
5791 https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
5794 2008-11-18 Mark Probst <mark.probst@gmail.com>
5796 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
5797 cpu-ppc64.md: Copied from the corresponding PPC files from
5800 2008-11-18 Scott Peterson <lunchtimemama@novell.com>
5802 * mini-ops.h: Added OP_ROUND.
5804 * cpu-x86.md: Added round.
5806 * mini-x86.c: Added support for intrinsicing Math.Round (double).
5808 * basic-math.cs: Added test_0_round to test rounding.
5810 Contributed under MIT/X11 license.
5812 2008-11-17 Bill Holmes <billholmes54@gmail.com>
5814 * aot-compiler.c : Fix the Winx64 build.
5816 Contributed under MIT/X11 license.
5818 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
5820 * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
5821 in OP_EXTRACT_R8 to avoid possible stack corruption.
5823 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
5825 * mini-ops.h: Added OP_EXTRACT_R8/I8.
5827 * cpu-x86.md: Added extract_r8.
5829 * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
5831 * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
5832 a couple of OP_EXTRACT_I4.
5834 * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
5836 * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
5838 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
5840 * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
5843 2008-11-17 Zoltan Varga <vargaz@gmail.com>
5845 * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
5846 trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
5848 * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
5849 are not needed any more.
5851 * mini.h: Remove the unused INS_LIST macros.
5853 * mini.c (mini_method_compile): Remove a disable globalra case which is no
5856 * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
5859 * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
5860 mono_alloc_ireg () instead.
5862 * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
5865 * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
5868 * aot-runtime.c (load_aot_module): Disable AOT when running under
5871 * mini-amd64.h: Change the monitor fastpath defines to check for
5872 !PLATFORM_WIN32 so they work on *bsd too.
5874 * mini.h mini.c mini-hhpa.c: Remove more unused code.
5876 * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
5878 * mini.h (MonoCompile): Remove new_ir flag.
5880 * regalloc.h regalloc.c: Remove unused code.
5882 * cpu-*.md: Remove more unused opcodes.
5884 * simple-cee-ops.h simple-mini-ops.h: Removed.
5886 * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
5888 2008-11-17 Zoltan Varga <vargaz@gmail.com>
5890 * aliasing.h: Removed.
5892 * *.c: Remove references to aliasing.h and inssel.h.
5894 * mini.c: Remove additional unused functions.
5896 * mini-ops.h cpu-*.md: Remove unused opcodes.
5898 2008-11-16 Zoltan Varga <vargaz@gmail.com>
5900 Remove the old JIT code.
5902 * inssel*.brg: Removed.
5904 * ssa.c abcremoval.c aliasing.c: Removed.
5906 * ssa2.c: Renamed to ssa.c.
5908 * abcremoval2.c: Renamed to abcremoval.c.
5910 * *.c: Removed all !cfg->new_ir code.
5912 * mini-<ARCH>.c: Removed mono_arch_call_opcode (),
5913 mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
5915 * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
5917 2008-11-16 Zoltan Varga <vargaz@gmail.com>
5919 * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
5920 to simplify the code and cut back on the number of global symbols in the AOT
5923 * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
5925 2008-11-15 Zoltan Varga <vargaz@gmail.com>
5927 * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
5928 with the got/got_info tables.
5930 * mini.h: Bump AOT file format version.
5932 * unwind.h: New file, contains definitions for stack unwinding.
5934 * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
5937 * aot-compiler.c: Generalize the emitting of unwind information to use the
5938 information in cfg->unwind_ops.
5940 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
5942 * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
5943 AOT method frames. Enable writing symbols for methods by default.
5945 2008-11-14 Rodrigo Kumpera <rkumpera@novell.com>
5947 * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
5948 and make it work with vectors of element sizes 1, 2 and 4.
5950 * simd-intrinsics.c: Enable getter for all vectors with element size
5953 * simd-methods.h: Add the names of other getters.
5955 * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
5961 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
5963 * mini-ppc.h: portability fix.
5965 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
5967 * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
5968 buggy and will overwrite it.
5970 2008-11-14 Zoltan Varga <vargaz@gmail.com>
5972 * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
5973 Use it to emit local symbols for all methods so AOTed methods show up with
5974 their full name in gdb/valgrind output.
5976 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
5978 * mini-ppc.c: portability fixes.
5980 2008-11-14 Zoltan Varga <vargaz@gmail.com>
5982 * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
5983 entries out of the if (!generic_shared...) code so it is always done.
5984 (mono_class_init_trampoline): Do the patching when running under valgrind
5985 too, newer versions of valgrind have no problems with it.
5987 2008-11-13 Zoltan Varga <vargaz@gmail.com>
5989 * aot-compiler.c (emit_writeout): Rework this to make it easier to add
5992 2008-11-13 Mark Probst <mark.probst@gmail.com>
5994 * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
5997 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
5999 * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui.
6001 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
6003 * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
6009 * simd-intrinsics.c: Same.
6011 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
6013 * simd-intrinsics.c: Enable constructor intrinsics for all types.
6015 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
6017 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
6018 to work with more Vector types.
6020 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
6022 * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
6023 store the elemens directly instead of using and intermediate.
6025 2008-11-13 Zoltan Varga <vargaz@gmail.com>
6027 * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
6029 * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
6030 to preserve %eax for aot plt trampolines.
6032 * aot-compiler.c (compile_method): Don't skip synchronized methods.
6033 (encode_method_ref): Flag synchronized methods so they won't go through
6036 * aot-compiler.c: Additional work to support AOTing synchronized methods/
6039 * cpu-ia64.md (jmp): Increase max length.
6041 2008-11-12 Zoltan Varga <vargaz@gmail.com>
6043 * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
6044 open generic classes.
6046 * aot-compiler.c: Enable the ELF writer on ELF platforms.
6048 * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
6049 box+brtrue optimization since it causes test failures on x86.
6051 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
6053 * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
6059 * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
6060 for simd ctor values.
6062 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
6063 instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
6065 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
6067 * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
6070 * simd-instrincs.c: Same.
6072 * basic-simd.cs: Same.
6074 2008-11-12 Zoltan Varga <vargaz@gmail.com>
6076 * ratests.cs: Add more tests.
6078 * regalloc2.c (add_spill_code): Handle more corner cases.
6080 2008-11-11 Zoltan Varga <vargaz@gmail.com>
6082 * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
6083 (update_liveness): Avoid holes in the liveness ranges of hregs if they are
6084 both the source an destination of an instruction.
6086 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
6088 * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
6089 wapihandles.c: more portability changes.
6091 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
6093 * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
6094 * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
6095 safe to execute in a signal handler and the kernel provides better
6096 the info in /proc/self/smaps. Avoid the assert on sigaction during
6099 2008-11-11 Zoltan Varga <vargaz@gmail.com>
6101 * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
6102 do the bblock linking hack if it is actually needed.
6104 * Makefile.am (patch-libtool): New helper target to patch libtool to speed
6107 * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
6108 crash problem is fixed.
6110 * branch-opts.c (mono_remove_critical_edges): Link up newly added
6113 * mini.c (mini_method_compile): Compute unreachable bblocks properly even
6115 (mini_method_compile): Set the starting value of next_vreg to
6116 MAX_IREGS + MAX_FREGS when using globalra.
6118 * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
6119 filter clauses with BB_EXCEPTION_HANDLER.
6121 * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
6123 2008-11-10 Mark Probst <mark.probst@gmail.com>
6125 * mini-x86.c (mono_arch_get_argument_info): Don't align argument
6126 space for stdcall. Fixes regressions on Win32.
6128 2008-11-10 Zoltan Varga <vargaz@gmail.com>
6130 * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
6132 (linear_scan): Remove an assert which doesn't seem to be needed.
6134 * local-propagation.c (mono_local_deadce): Avoid a call to
6135 MONO_DELETE_INS which would screw up the instruction linking.
6137 * mini.c (mono_decompose_op_imm): Make this work with globalra.
6139 * regalloc2.c: Upgrade to work the current JIT code.
6141 2008-11-09 Zoltan Varga <vargaz@gmail.com>
6143 * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
6146 * aot-runtime.c: Remove some dead code.
6148 * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
6150 (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
6152 * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
6153 trampolines using sscanf since atoi doesn't work on large unsigned values.
6155 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full):
6156 Initialize code_size.
6158 2008-11-08 Mark Probst <mark.probst@gmail.com>
6160 * method-to-ir.c (mini_emit_inst_for_method): Make
6161 Interlocked.CompareExchange work for Int arguments on 32 bit
6164 2008-11-07 Mark Probst <mark.probst@gmail.com>
6166 * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
6168 2008-11-06 Bill Holmes <billholmes54@gmail.com>
6170 * main.c Fix MSVC build.
6172 Contributed under MIT/X11 license.
6174 2008-11-06 Mark Probst <mark.probst@gmail.com>
6176 * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
6177 alignment larger than 8 bytes are aligned correctly, too.
6179 * mini.c: Honor the min_align field of MonoClass when laying out
6182 2008-11-06 Zoltan Varga <vargaz@gmail.com>
6184 * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
6186 * aot-compiler.c (emit_plt): Fix a warning.
6188 * aot-compiler.c: Implement ARM support in the binary writer.
6190 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
6192 * basic-simd.cs: Add test for getter with byref arg.
6193 Fix the naming of a few tests.
6194 Add missing checks to a test.
6196 2008-11-05 Zoltan Varga <vargaz@gmail.com>
6198 * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
6200 * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
6201 most of the full-aot support for monitor enter/exit trampolines.
6203 * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
6204 enter/exit trampoline creation functions.
6206 * Makefile.am: Fix the generation of buildver.h so it is not invoked during
6209 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
6211 * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
6212 incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
6213 implement the needed functionality without adding crap to the runtime.
6215 2008-11-05 Zoltan Varga <vargaz@gmail.com>
6217 * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
6220 * mini.c (mono_build_date): New global version holding the build date in
6223 * Makefile.am (buildver.c): Generate a file containing the build date.
6225 * main.c: Set the build date from the generated file.
6227 * mini.c (mono_get_runtime_build_info): New helper function returning build
6228 information in a string format.
6230 * driver.c (mono_main): Print the build date in --version.
6232 * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
6233 file when the bind-to-runtime-version option is used.
6235 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
6237 * simd-intrinsics.c: Fix bug when using getters and byref args.
6239 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
6241 * simd-methods.h: Rename prefetch methods.
6243 * simd-intrinsics.c: Same.
6245 2008-11-05 Mark Probst <mark.probst@gmail.com>
6247 * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
6250 2008-11-04 Zoltan Varga <vargaz@gmail.com>
6252 * aot-compiler.c: Use the bundled elf header files instead of depending on
6255 * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
6258 * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
6261 2008-11-04 Rodrigo Kumpera <rkumpera@novell.com>
6263 * cpu-x86.md: Add store nta ops.
6269 * mini.h: Add an enum for simd prefetch modes.
6271 * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
6272 of store. Use the changed code to support store nta.
6274 * simd-intrinsics.c: Add prefetch ops for all vector types.
6276 2008-11-04 Zoltan Varga <vargaz@gmail.com>
6278 * aot-compiler.c: Add an option for JIT compiling the methods by multiple
6281 * aot-compiler.c: Use statically allocated buffers for constructing symbol
6284 * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
6287 2008-11-04 Mark Probst <mark.probst@gmail.com>
6289 * mini-x86.c: Fixed commit.
6291 2008-11-04 Zoltan Varga <vargaz@gmail.com>
6293 * aot-compiler.c (emit_plt): Align the plt section only on x86.
6295 2008-11-04 Mark Probst <mark.probst@gmail.com>
6297 * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
6298 and MONITOR_EXIT, for the ASM fastpaths.
6300 * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
6303 * mini.c, patch-info.h: Signature and patch infos for
6304 Monitor.Enter/Exit trampolines.
6306 * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
6308 * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
6309 Monitor.Enter/Exit ASM fastpath for Linux.
6311 2008-11-04 Zoltan Varga <vargaz@gmail.com>
6313 * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
6315 * objects.cs: Add a new test.
6317 * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
6319 * aot-runtime.c (load_method): Run class initialization in the PLT case even
6320 if MONO_LOG_LEVEL is set.
6322 * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
6324 * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
6326 * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
6328 * aot-compiler.c: Change the relocation code to use virtual addresses instead
6329 of file offsets. Align the sections belonging to the data segment to
6332 2008-11-03 Zoltan Varga <vargaz@gmail.com>
6334 * aot-compiler.c: Simplify the elf writer by depending on the definitions in
6335 elf.h. Port it to amd64.
6337 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
6339 * driver.c: Enable SIMD by default.
6341 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
6343 * cpu-x86.md: Add prefetch op.
6349 * mini.h: Add an enum for simd prefetch modes.
6351 * simd-methods.h: Add prefetch function names.
6353 * simd-intrinsics.c: Add prefetch ops for all vector types.
6355 2008-11-03 Zoltan Varga <vargaz@gmail.com>
6357 * aot-compiler.c (emit_bytes): Speed this up a little.
6359 2008-11-02 Zoltan Varga <vargaz@gmail.com>
6361 * aot-compiler.c: Add JIT time etc. statistics.
6363 * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
6365 * mini.h (MonoCompile): Add 'got_offset' field.
6367 * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
6368 method_got_offsets array.
6370 * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
6373 * aot-compiler.c (compile_method): Add generic method instances referenced
6374 by the method to the list of methods to be compiled, this is required so if
6375 A<T> references B<T>, and another assembly references A<int>, then it will
6376 also get a copy of B<int>.
6378 * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
6379 when checking for monitor enter/exit.
6381 2008-10-30 Mark Probst <mark.probst@gmail.com>
6383 * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
6384 for Monitor.Enter and Monitor.Exit if enabled.
6386 * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
6389 2008-10-30 Zoltan Varga <vargaz@gmail.com>
6391 * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
6392 of an OP_MOVE. Fixes #440046.
6394 * basic-long.cs: Add a new test.
6396 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
6398 * mini.h: Add synchronization note for the managed counter-part.
6400 * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
6401 returns the simd caps of the current cpu.
6403 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
6405 * basic-simd.cs: Remove Console.WriteLine.
6407 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
6409 * basic-simd.cs: New tests for Vector2ul.
6411 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
6413 * simd-intrinsics.c: Add new vector type Vector2ul.
6415 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
6417 * basic-simd.cs: New tests for Vector2l.
6419 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
6421 * cpu-x86.md: Add long version of most packed int ops.
6427 * simd-intrinsics.c: Add new vector type Vector2l.
6429 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
6431 * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
6433 * simd-methods.h: Remove SN_op_BitwiseXor.
6435 2008-10-28 Zoltan Varga <vargaz@gmail.com>
6437 * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
6440 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
6442 * basic-simd.cs: Test for Vector2d.
6444 * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
6447 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
6449 * cpu-x86.md: Add double version of all packed float ops.
6455 * simd-intrinsics.c: Add new vector type Vector2d.
6457 * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
6459 * simd-methods.h: Add Duplicate.
6461 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
6463 * basic-simd.cs: Test for packing with signed saturation.
6465 2008-10-28 Zoltan Varga <vargaz@gmail.com>
6467 * aot-compiler.c (add_generic_instances): Add all methods of generic instances
6468 found in the TYPESPEC table.
6470 2008-10-26 Zoltan Varga <vargaz@gmail.com>
6472 * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
6475 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
6477 * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
6478 instead of the RVA, since the RVA can be changed by tools like the cil
6481 * method-to-ir.c (mono_method_to_ir2): Ditto.
6483 * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
6484 (deserialize_variable): Ditto.
6486 2008-10-25 Martin Baulig <martin@ximian.com>
6488 * debug-mini.c (write_variable): Use
6489 `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
6491 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
6493 * cpu-x86.md: Add unsigned variants of packd and packw.
6497 * mini-x86.h: Emit the right instruction for packd and packw.
6498 Add unsigned variants of packd and packw.
6500 * simd-intrinsics.c: Packd and packw were used in place of their
6501 unsigned variants. Change that.
6502 Add intrinsics for (Signed)PackWithSignedSaturation.
6504 * simd-methods.h: Add (Signed)PackWithSignedSaturation.
6506 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
6508 * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
6510 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
6512 * mini-ops.h: Remove dword packed add/sub with saturation ops.
6514 * cpu-x86.md: Remove dword packed add/sub with saturation ops.
6516 * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
6519 * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
6521 2008-10-24 Mark Probst <mark.probst@gmail.com>
6523 * method-to-ir.c, mini.c: Special casing for the synchronized
6524 wrapper for the ldtoken+GetTypeFromHandle case.
6526 2008-10-24 Zoltan Varga <vargaz@gmail.com>
6528 * mini.c (mono_replace_ins): Move this to branch-opts.c.
6530 * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
6531 created/split bblocks.
6533 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
6535 * mini-ops.h: Add packed signed mul high.
6539 * mini-x86.c (mono_arch_output_basic_block): Same.
6541 * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
6543 * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
6545 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
6547 * basic-simd.cs: Tests for Vector16sb.
6549 2008-10-24 Zoltan Varga <vargaz@gmail.com>
6551 * inssel.brg (stmt): Fix OP_HARD_NOP rule.
6553 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
6555 * mini-ops.h: Add packed signed min, max and compare greater.
6559 * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
6562 * simd-methods.h: Add CompareGreaterThan.
6564 * simd-methods.h: Remove CompareEquals.
6566 * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
6568 * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
6570 * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
6573 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
6575 * basic-simd.cs: Fix tests due to change in the API.
6577 2008-10-21 Zoltan Varga <vargaz@gmail.com>
6579 * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
6581 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
6583 * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
6585 * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
6586 inst_offset as this has invalid values for LDADDR.
6588 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
6590 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
6592 * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
6594 2008-10-21 Zoltan Varga <vargaz@gmail.com>
6596 * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
6597 for accessing field->data.
6599 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
6601 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
6603 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
6605 * simd-methods.h: Add SignedPackWithUnsignedSaturation.
6607 * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
6609 2008-10-21 Zoltan Varga <vargaz@gmail.com>
6611 * dominators.c (mono_compute_natural_loops): Allocate GList enties
6612 from the cfg mempool.
6614 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
6616 * basic-simd.cs: Tests for new methods in Vector8us.
6618 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
6620 * mini-ops.h: Add multiply and store high.
6624 * mini-x86.c (mono_arch_output_basic_block): Same.
6626 * simd-methods.h: Same.
6628 * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
6631 2008-10-19 Zoltan Varga <vargaz@gmail.com>
6633 * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
6634 mono_class_setup_vtable ().
6636 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
6637 mono_class_get_vtable_entry () for accessing klass->vtable.
6639 * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
6641 * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
6644 * method-to-ir.c (mono_save_token_info): Don't save references made from
6647 * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
6648 of generic instances.
6650 * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
6652 2008-10-19 Mark Probst <mark.probst@gmail.com>
6654 * cpu-ppc.md, mini-ppc.c: The length of the code generated for
6655 OP_JMP depends on the method signature. Calculate it properly.
6657 2008-10-19 Zoltan Varga <vargaz@gmail.com>
6659 * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
6662 * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
6664 (emit_extra_methods): Add another table mapping method indexes to
6665 offsets in the extra_method_info table.
6667 * mini.h: Bump AOT file format version.
6669 * aot-runtime.c: Merge most of the code from mono_aot_get_method
6670 and mono_aot_get_method_from_token () into one function.
6672 2008-10-19 Mark Probst <mark.probst@gmail.com>
6674 * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
6677 2008-10-18 Zoltan Varga <vargaz@gmail.com>
6679 * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
6682 * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
6685 * mini.c (mono_patch_info_equal): Compare the generic context as well.
6687 * mini.h: Bump aot file format version.
6689 * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
6690 AOT file can contain native code for methods which are not in the METHOD
6691 table. Generate code for non-sharable generic instances of generic methods
6692 found in the METHODSPEC table.
6694 * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
6695 encoding generic type handles.
6697 * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
6698 (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
6700 * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
6701 macros + MONO_ADD_INS.
6703 * mini.c (mono_jump_info_token_new2): New function which takes a generic
6706 * mini.h (MonoJumpInfoToken): Include fields for a generic context.
6708 * mini.h: Bump aot file format version.
6710 * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
6712 2008-10-17 Mark Probst <mark.probst@gmail.com>
6714 * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
6715 platforms, with definable stack alignment value. Set to 16 now
6718 * mini.c, mini.h, driver.c: Command line option for disabling
6721 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
6723 * basic-simd.cs: Tests for new methods in Vector4ui.
6725 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
6727 * mini-ops.h: Add packed int shuffle.
6731 * mini-x86.c (mono_arch_output_basic_block): Same.
6733 * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
6734 extract mask, max, min, shuffle.
6736 * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
6738 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
6740 * basic-simd.cs: Tests for new methods in Vector8us.
6742 2008-10-17 Mark Probst <mark.probst@gmail.com>
6744 * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
6745 RuntimeTypeHandle, not a TypedReference.
6747 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
6749 * simd-intrinsics.c: remove relocations.
6751 2008-10-17 Zoltan Varga <vargaz@gmail.com>
6753 * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM
6754 optimizations from the x86 backend.
6756 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
6758 * simd-methods.h, simd-intrinsics.c: debloat method names and
6759 prepare for no relocations.
6761 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
6763 * mini-ops.h: Add packed min/equal and sum of absolute differences.
6767 * mini-x86.c (mono_arch_output_basic_block): Same.
6769 * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
6770 extract mask, max, min and sum of absolute differences.
6772 * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
6775 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
6777 * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
6778 Renamed one test for consistency.
6780 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
6782 * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
6783 fix to the code that deal with other blocks.
6785 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
6787 * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
6789 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
6791 * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
6792 that deals with vreg interference. Explicitly check for OP_LDADDR to be
6793 able to process the source reg.
6795 2008-10-16 Martin Baulig <martin@ximian.com>
6797 * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
6799 * inssel.brg: Add `OP_HARD_NOP'.
6801 * mini.h (MonoCompile): Added `keep_cil_nops' flag.
6803 * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
6804 `OP_HARD_NOP' instruction when running inside the debugger.
6806 * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
6807 `OP_HARD_NOP' instruction when running inside the debugger.
6809 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
6811 * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
6812 now works. The issue with the regalloc tripping up no longer
6815 * simd-intrinsics.c (load_simd_vreg): Same.
6817 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
6819 * basic-simd.cs: Tests for new Vector8ui methods.
6821 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
6823 * simd-intrinsics.c (get_simd_vreg): Simplify code and test
6824 only for type. This fixes crashes where MonoInst::klass is checked
6825 for ops of type != VTYPE or OBJ.
6827 * simd-intrinsics.c (load_simd_vreg): Same.
6829 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
6831 * mini-ops.h: Add ops for packed shuffle/max/avg and
6836 * mini-x86.c (mono_arch_output_basic_block): Same.
6838 * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
6841 * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
6842 to emit extract mask op.
6844 * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
6845 to emit word shuffles.
6847 2008-10-15 Mark Probst <mark.probst@gmail.com>
6849 * mini.c (mono_allocate_stack_slots_full): Align stack frame to
6850 the largest alignment needed by a variable, but at least
6853 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
6855 * basic-simd.cs: Tests for the fixes in the last commit.
6857 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
6859 * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
6860 no longer handles STACK_PTR input.
6862 * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
6864 * simd-intrinsics.c (load_simd_vreg): New function that works like
6865 get_simd_vreg but handles STACK_PTR input.
6867 * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
6868 as the input can be an arbitrary pointer.
6870 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
6871 LDADDR local optimization directly otherwise use a store op.
6873 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
6875 * basic-simd.cs: Tests for dup low and dup high.
6877 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
6879 * mini-ops.h: Add dup low and dup high ops.
6883 * mini-x86.c (mono_arch_output_basic_block): Same.
6885 * simd-intrinsics.c (vector4f_intrinsics): Same.
6887 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
6889 * basic-simd.cs: Tests for recently added functionality.
6891 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
6893 * mini-ops.h: Add remaining sse1 fp ops.
6895 * cpu-x86.md: Add remaining sse1 fp ops.
6897 * mini-x86.c (mono_arch_output_basic_block): Same.
6899 * mini.h: Add enum for simd FP compare conditions.
6901 * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
6903 * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
6904 so the backed can generate the appropriate op.
6906 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
6907 This patch squeese one more byte from the SimdIntrinsc struct.
6909 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
6910 a a shift amount intead of simply or'ing it.
6912 * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
6914 * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
6915 byte so we can have an aditional flags field without increasing struct size.
6917 * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
6918 against the simd_supported_versions bitmask.
6920 * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
6922 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
6924 * mini.c: remove rawbuffer code (the only use here is unsafe because
6925 it takes locks during signal handling and the kernel now provides much
6926 better info in proc/pid/smaps these days).
6928 2008-10-13 Zoltan Varga <vargaz@gmail.com>
6930 * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
6931 OP_X86_PUSH_OBJ. Fixes #434620.
6933 * objects.cs: Add a test.
6935 2008-10-12 Rodrigo Kumpera <rkumpera@novell.com>
6937 * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
6938 that the packuswb/packusdw don't work with unsigned numbers for what
6939 would be negative numbers in signed format.
6941 * cpu-x86.md: Add doubleword forms of many ops and packing ones.
6942 Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
6944 * mini-ops.h: Add doubleword forms of many ops and packing ones.
6946 * mini-x86.c: Emit doubleword forms of many ops and packing ones.
6948 * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
6950 * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
6952 * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
6955 * simd-intrinsics.c (simd_version_name): New function, returns the name of the
6956 version as the enum in mini.h.
6958 * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
6959 for sse3 ops, check the simd_version field if present. This way the code
6960 works with all versions of sse.
6962 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6964 * simd-intrinsics.c: Fixed intrinsic name typo.
6966 * mini.h: Added missing simd exported function.
6968 * basic-simd.cs: Added tests for Vector4ui.
6969 Fixed broken test for Vector16b.
6971 2008-10-10 Zoltan Varga <vargaz@gmail.com>
6973 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
6974 the max length to 64.
6976 2008-10-10 Mark Probst <mark.probst@gmail.com>
6978 * method-to-ir.c: Only do the fast virtual generic method call for
6979 non-wrapper methods.
6981 * mini.h, mini-trampolines.c: The new generic virtual remoting
6982 trampoline handles virtual method calls via the vtable (as done by
6983 the fast virtual generic method calls) to remoting proxies.
6985 * mini.c (mono_jit_create_remoting_trampoline): For generic
6986 methods reate a generic virtual remoting trampoline.
6988 * mini-amd64.h: Enable fast virtual generic method calls again.
6990 2008-10-10 Mark Probst <mark.probst@gmail.com>
6992 * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
6993 restore registers when doing tail calls.
6995 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6997 * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
7000 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
7002 * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
7004 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
7006 * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
7008 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
7010 * basic-simd.cs: Retrofit for API changes.
7012 2008-10-10 Mark Probst <mark.probst@gmail.com>
7014 * mini-ppc.c: Handle integer stack arguments for tail calls.
7016 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
7018 * optflags-def.h: Removed sse3 optimization.
7022 * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
7025 * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
7027 * mini.h: Added enumeration with simd versions.
7029 * simd-intrinsics.c (emit_intrinsics): Use the new static var
7032 * simd-intrinsics.c: Added mono_simd_intrinsics_init.
7034 * mini.c (mini_init): Call mono_simd_intrinsics_init.
7036 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
7038 * basic-simd.cs: Added tests for Vector8u and Vector16u.
7040 * basic-simd.cs: Fixed test naming.
7042 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
7044 * mini-ops.h: Added ops for packed and saturated math, shifts
7045 and packing/unpacking.
7047 * cpu-x86.md: Added descriptors for the above ops.
7049 * mini-x86.c: Added code to emmit the above ops.
7051 * simd-intrinsics.c: Added support for Vector16u and Vector8u.
7053 2008-10-08 Zoltan Varga <vargaz@gmail.com>
7055 * aot-compiler.c (compile_method): Enable AOT for generic code.
7057 * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
7059 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
7061 * mini.c: add a workaround for a common screwup that ends up blamed
7062 to mono (other processes blocking signal delivery).
7064 2008-10-07 Zoltan Varga <vargaz@gmail.com>
7066 * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
7067 in the LDFLD/STFLD opcodes. Fixes #432673.
7069 * iltests.il.in: Add a new test.
7071 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
7073 * mini-arm.c: attach the thread in unmanaged->managed transitions
7074 using delegates (bug #433148).
7076 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
7078 * basic-simd.cs: Use new ShuffleSel constants.
7080 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
7082 * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
7084 * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
7085 only disable simd intrinsics if no sse2 is detected.
7087 * optflags-def.h: Added sse3.
7089 * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
7092 2008-10-07 Zoltan Varga <vargaz@gmail.com>
7094 * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
7095 when adding delegate-invoke wrappers.
7097 2008-10-07 Zoltan Varga <vargaz@gmail.com>
7099 * Makefile.am: Reenable the simd tests.
7101 2008-10-07 Bill Holmes <billholmes54@gmail.com>
7103 * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
7104 add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
7105 other vreg is allocated to that hreg.
7107 Contributed under MIT/X11 license.
7109 2008-10-07 Zoltan Varga <vargaz@gmail.com>
7111 * Makefile.am: Disable the simd tests for now as Mono.Simd is not
7114 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
7116 * basic-simd.cs: New test suite for SIMD intrinsics.
7118 * Makefile.am: Added new tests.
7120 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
7122 * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
7126 * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
7128 * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
7129 using SSE2 aware opcodes.
7131 * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
7132 is enabled, this code path is only reachable if conversion ops are emmited after
7135 * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
7137 This optimization saves 6 bytes per conversion against the old version.
7139 2008-10-06 Zoltan Varga <vargaz@gmail.com>
7141 * aot-compiler.c (compile_method): Don't skip methods referencing
7142 generic methods without a corresponding entry in token_info_hash, since
7143 encode_method_ref () can handle all generic methods now.
7145 * method-to-ir.c (mono_save_token_info): Don't save the token info if a
7146 generic context is set.
7148 * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
7149 generic sharing of LDTOKEN.
7151 2008-10-06 Mark Probst <mark.probst@gmail.com>
7153 * mini-amd64.h: Temporarily disabled fast virtual generic method
7154 calls because it breaks the System.Runtime.Remoting tests.
7156 2008-10-06 Zoltan Varga <vargaz@gmail.com>
7158 * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
7160 * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
7161 so inlining actually works.
7162 (check_inline_caller_method_name_limit): Ditto.
7164 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
7166 * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
7167 64 bit safety (from Olaf Hering and Andreas Farber).
7169 2008-10-06 Zoltan Varga <vargaz@gmail.com>
7171 * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
7172 mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
7173 unused virtual call support code.
7175 * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
7177 * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
7178 which can't use aot trampolines.
7179 (decode_patch): Don't create aot trampolines for methods which can't use
7182 * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
7183 use aot trampolines.
7185 * mini.h: Bump AOT image format version.
7187 2008-10-05 Zoltan Varga <vargaz@gmail.com>
7189 * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
7190 to save_token_info () since cmethod is inflated for constrained calls.
7192 * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
7194 2008-10-04 Andreas Farber <andreas.faerber@web.de>
7196 * Makefile.am: Add build rules for ppc64.
7197 This avoids the build failing at pedump with unresolved symbols
7198 due to lack of arch_sources. Instead it will now fail earlier
7199 due to lack of cpu-ppc64.md.
7201 Contributed under MIT/X11 license.
7203 2008-10-04 Mark Probst <mark.probst@gmail.com>
7205 * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
7208 * iltests.il.in: Add test case for tail call with many arguments.
7210 2008-10-03 Zoltan Varga <vargaz@gmail.com>
7212 * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
7213 to the fast virtual generic method code until the aot case is fixed.
7215 2008-10-03 Mark Probst <mark.probst@gmail.com>
7217 * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
7219 2008-10-03 Mark Probst <mark.probst@gmail.com>
7221 * mini-amd64.c, mini-amd64.h: Implement generic virtual method
7224 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
7226 * simd-intrinsics.c: Forgot to add this one.
7228 * mini-codegen.c: Fix macro in case SIMD is not supported.
7230 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
7232 This patch land initial JIT support for simd intrinsics.
7234 * mini-x86.h: Added new define to make --enable_minimal work on x86.
7236 * Makefile.am: Added simd-intrinsics.c
7238 * simd-intrinsics.c: New file with simd instrinsic related
7241 * cfold.c (mono_constant_fold_ins2): Fold XZERO.
7243 * cpu-x86.md: Add simd related instructions.
7245 * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
7247 * driver.c: Added two new --regression variants.
7249 * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
7251 * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
7253 * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
7254 extract some complicated logic to helper functions.
7256 * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
7258 * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
7260 * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
7261 the specialized simplification pass.
7263 * method-to-ir.c (mono_spill_global_vars): Use new macro.
7265 * mini-codegen.c: Added SIMD constants to all regbanks arrays.
7267 * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
7270 * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
7271 if MONO_ARCH_NEED_SIMD_BANK is defined.
7273 * mini-ops.h: Added the new simd ops.
7275 * mini-x86.c: Added mono_arch_xregname.
7277 * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
7279 * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
7281 * mini-x86.h: Define simd related MONO_ARCH macros.
7283 * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
7285 * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
7287 * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
7288 MONO_CLASS_IS_SIMD to deal with simd related IR.
7290 * mini.h (MonoInst): Added spill_var to the backend union.
7292 * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
7294 * mini.h: Added forward declarations of the new simd fuctions.
7296 * optflags-def.h: Added new optimization names SIMD.
7298 * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
7300 * regalloc.h: Added support for working with 3 register banks.
7302 * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
7304 * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
7306 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
7308 * mini-exceptions.c: remove 64 bit related ifdef clutter.
7310 2008-10-03 Zoltan Varga <vargaz@gmail.com>
7312 * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
7313 instead of one on 64 bit systems.
7315 * method-to-ir.c: Remove unused includes.
7317 2008-10-02 Zoltan Varga <vargaz@gmail.com>
7319 * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
7320 cfg->used_int_regs, since the two are different on arm.
7322 2008-10-02 Mark Probst <mark.probst@gmail.com>
7324 * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
7325 mono_method_get_vtable_index() to get the vtable index.
7327 2008-10-02 Mark Probst <mark.probst@gmail.com>
7329 * method-to-ir.c (mono_method_to_ir2): Don't create native
7330 wrappers for array methods, because they're never called (and if
7331 they were called they wouldn't work).
7333 2008-10-02 Mark Probst <mark.probst@gmail.com>
7335 * method-to-ir.c (mono_method_to_ir2): Array methods are
7336 special-cased and must not be invoked indirectly via the (M)RGCTX
7337 when generic sharing is turned on. Fixes #431413.
7339 2008-10-01 Mark Probst <mark.probst@gmail.com>
7341 * method-to-ir.c: When generic sharing is active, call
7342 non-interface virtual generic methods via the standard trampoline.
7344 * mini-trampolines.c: Handle virtual generic shared methods.
7346 * mini.h, mini-x86.c, mini-x86.h: New argument for
7347 mono_arch_build_imt_thunk() which is non-NULL for virtual generic
7348 method thunks and which is the trampoline to call if the lookup
7349 fails. Enable the virtual generic method thunk for x86.
7351 * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
7352 mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
7353 argument but assert that it's NULL, because these archs don't yet
7354 implement the virtual generic method thunk. Changes in the IMT
7355 thunk data structures.
7357 2008-10-01 Zoltan Varga <vargaz@gmail.com>
7359 * aot-compiler.c (emit_globals): Avoid invalid characters in
7360 the static linking symbol.
7362 * objects.cs: Add a test for the range check optimization. Fix warnings.
7364 * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
7365 optimization from the current JIT.
7367 * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
7368 later in decompose_array_access_opts () to allow more optimizations.
7370 * method-to-ir.c (mono_handle_soft_float): Rename this to
7371 mono_decompose_soft_float () for consistency.
7373 * mini-ops.h: Fix arguments of OP_STRLEN.
7375 * method-to-ir.c (save_cast_details): Extract the cast details saving code
7376 into a separate function.
7377 (reset_cast_details): Ditto.
7378 (handle_unbox): Save cast details. Fixes #431254.
7380 * method-to-ir.c: Remove some obsolete FIXMEs.
7382 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
7384 * ir-emit.h (alloc_dreg): Write a warning before crashing.
7386 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
7388 * mini-codegen.c: More work on macros to make them
7389 ready for multiple regbanks.
7391 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
7393 * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
7395 * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
7397 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
7399 * mini-codegen.c (mono_spillvar_offset): Proper support for
7402 2008-09-30 Zoltan Varga <vargaz@gmail.com>
7404 * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
7405 the stack overflow changes.
7407 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
7409 * mini-codegen.c: Make all bank macros depend on reg_bank.
7411 * mini-codegen.c (mono_local_regalloc): Make free mask
7412 initialization regbank aware.
7414 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
7416 * mini-codegen.c (mono_local_regalloc): Extract callee
7417 mask selection to a function and make it regbank aware.
7419 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
7421 * mini-codegen.c (mono_local_regalloc): Changed the cloberring
7422 code to deal with many regbanks.
7424 2008-09-30 Zoltan Varga <vargaz@gmail.com>
7426 * mini-codegen.c: More fp->regbank changes.
7428 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
7430 * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
7431 of a hardcoded constant.
7433 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
7435 * method-to-ir.c (type_from_stack_type): Fix typo.
7437 2008-09-29 Zoltan Varga <vargaz@gmail.com>
7439 * mini-ia64.c (emit_move_return_value): Convert float return values to
7442 * objects.cs: Add a new test.
7444 * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
7445 VARARG methods to fix an assert later.
7447 * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
7448 end so it at least compiles.
7450 2008-09-28 Zoltan Varga <vargaz@gmail.com>
7452 * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
7454 2008-09-28 Rodrigo Kumpera <rkumpera@novell.com>
7456 * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
7457 optimization to a new function (emit_optimized_ldloca_ir) and enable
7458 it for both ldloca and ldloca_s.
7460 2008-09-28 Zoltan Varga <vargaz@gmail.com>
7462 * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
7463 gshared CASTCLASS code.
7465 * driver.c (mono_main): Add a workaround for shutdown crashes seen on
7466 amd64, where the libc stack unwinder encounters stack frames referring to
7467 native code in unmapped memory.
7469 * method-to-ir.c (mini_emit_check_array_type): Add support for generic
7472 * generics.cs: Add new test.
7474 2008-09-27 Zoltan Varga <vargaz@gmail.com>
7476 * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
7477 add a check that one of the ARM_FPU_ constants is defined.
7479 * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
7481 * mini-exceptions.c: Fix build on non-altstack platforms.
7483 * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
7486 * ir-emit.h: Add a comment to NEW_PCONST.
7488 * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
7490 * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
7492 * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
7493 after the changes to MonoJitDomainInfo.
7495 2008-09-27 Mark Probst <mark.probst@gmail.com>
7497 * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
7499 2008-09-27 Mark Probst <mark.probst@gmail.com>
7501 * mini-ppc.c: Compiler warning fixes.
7503 2008-09-27 Mark Probst <mark.probst@gmail.com>
7505 * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
7508 2008-09-27 Mark Probst <mark.probst@gmail.com>
7510 * exceptions-ppc.c, mini-ppc.h: Compile
7511 mono_arch_handle_altstack_exception() on Darwin, too.
7513 2008-09-27 Mark Probst <mark.probst@gmail.com>
7515 * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
7516 work on archs which don't have generic sharing implemented, only
7517 without the vtable_arg.
7519 2008-09-26 Mark Probst <mark.probst@gmail.com>
7521 * mini.c: Added comment explaining why delegate ctor icall
7522 wrappers are compiled.
7524 2008-09-26 Mark Probst <mark.probst@gmail.com>
7526 * mini.c: Don't produce trampolines to delegate ctor icall
7527 wrappers but compile them upfront.
7529 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
7531 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
7532 runtime-set function when going back to managed code. Currently this
7533 is used to set back the protection on the soft ovf pages and/or to
7534 throw the stack overflow exception that happened in unmanaged code.
7536 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
7538 * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
7539 runtime-set function when going back to managed code. Currently this
7540 is used to set back the protection on the soft ovf pages and/or to
7541 throw the stack overflow exception that happened in unmanaged code.
7543 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
7545 * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
7546 the support code for restoring stack protection after stack overflows
7547 that happen in unmanaged code. Don't set the exec permission on the
7550 2008-09-26 Zoltan Varga <vargaz@gmail.com>
7552 * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
7553 delegate->method_ptr is set. Fixes #428054.
7555 2008-09-25 Zoltan Varga <vargaz@gmail.com>
7557 * tests.cs: Rename to ratests.cs.
7559 * method-to-ir.c: Merge the emit_get_rgctx () calls into the
7560 emit_get_rgctx_... functions.
7562 2008-09-25 Mark Probst <mark.probst@gmail.com>
7564 * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
7566 2008-09-25 Mark Probst <mark.probst@gmail.com>
7568 * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
7569 before asserting that method is sharable.
7571 2008-09-25 Mark Probst <mark.probst@gmail.com>
7573 * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
7574 whether method needs a static RGCTX wrapper used instead of
7577 * generic-sharing.c, mini.h: A few functions moved to
7578 metadata/generic-sharing.c.
7580 2008-09-25 Mark Probst <mark.probst@gmail.com>
7582 * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
7583 Generic code sharing for value types, which essentially means
7584 treating value type methods like static methods. The RGCTX is
7585 passed in the same way.
7587 2008-09-25 Zoltan Varga <vargaz@gmail.com>
7589 * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
7590 opcode when creating multi-dimensional arrays of open types.
7592 * generic-sharing.c (mono_method_check_context_used): Handle arrays of
7595 * generics.cs: Add a test.
7597 * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
7599 2008-09-24 Zoltan Varga <vargaz@gmail.com>
7601 * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
7603 * mini.c (mini_method_compile): Set it when running under the debugger.
7605 * method-to-ir.c (mono_handle_global_vregs): Disable global->local
7606 vreg optimization if the flag is set.
7608 * driver.c (mono_main): Add --attach= option to pass options to
7611 * mini.c (sigquit_signal_handler): Start the attach agent.
7613 * ssapre.c: Disable this to save space since it is not yet ported to
7616 * regalloc2.c: Disable this to save space.
7618 * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
7620 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
7622 * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
7623 the -v option useful again.
7625 2008-09-24 Zoltan Varga <vargaz@gmail.com>
7627 * mini-amd64.c (mono_arch_output_basic_block): Add support for
7630 * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
7631 arrays of arrays. Fixes #428406.
7633 * method-to-ir.c (mini_emit_castclass): Ditto.
7635 * objects.cs: Add new test.
7637 2008-09-23 Rodrigo Kumpera <rkumpera@novell.com>
7639 * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
7640 was wrong at it choked against target_type_is_incompatible for byref types.
7642 2008-09-23 Zoltan Varga <vargaz@gmail.com>
7644 * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most
7647 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
7649 * mini-exceptions.c: update a few more exceptions-related counters.
7651 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
7653 * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
7654 new functions to allocate from persistent mempools.
7656 2008-09-23 Zoltan Varga <vargaz@gmail.com>
7658 * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow
7659 multiple register banks in the future.
7661 * mini-codegen.c (mono_local_regalloc): Fix a warning.
7663 2008-09-22 Rodrigo Kumpera <rkumpera@novell.com>
7665 * mini.c (type_to_eval_stack_type): Remove duplicated function.
7667 * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
7669 * mini.h: Export type_to_eval_stack_type.
7671 This function was nearly duplicated in method-to-ir.c and mini.c. The difference
7672 is only ins->klass of byref types.
7674 2008-09-22 Zoltan Varga <vargaz@gmail.com>
7676 * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
7677 (mini_emit_memcpy2): Ditto.
7679 * mini-amd64.c: Fix a warning.
7681 2008-09-21 Mark Probst <mark.probst@gmail.com>
7683 * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
7686 2008-09-19 Rodrigo Kumpera <rkumpera@novell.com>
7688 * method-to-ir.c: Extract stloc micro-optimization to a
7689 function and apply it to all cases.
7691 2008-09-19 Mark Probst <mark.probst@gmail.com>
7693 * method-to-ir.c: Don't fail generic code sharing in cases we
7696 2008-09-18 Mark Probst <mark.probst@gmail.com>
7698 * mini-ppc.c: Handle structs in tailcalls on Darwin.
7700 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
7702 * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
7705 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
7707 * trace.c: make tracing more useful and correct, with per-thread
7710 2008-09-15 Mark Probst <mark.probst@gmail.com>
7712 * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
7713 doing a method call and the argument is an R4.
7715 2008-09-14 Zoltan Varga <vargaz@gmail.com>
7717 * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
7720 2008-09-13 Mark Probst <mark.probst@gmail.com>
7722 * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
7724 2008-09-12 Zoltan Varga <vargaz@gmail.com>
7726 * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
7727 (MONO_JUMP_TABLE_FROM_INS): Ditto.
7729 2008-09-11 Zoltan Varga <vargaz@gmail.com>
7731 * driver.c: Add a --agent argument (not supported yet) to load managed
7732 agent assemblies before loading the main assembly, similarly to how the
7733 Java VM handles agents.
7735 2008-09-11 Mark Probst <mark.probst@gmail.com>
7737 * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
7738 function to do stack layout of local variables.
7740 2008-09-11 Mark Probst <mark.probst@gmail.com>
7742 * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
7745 2008-09-11 Zoltan Varga <vargaz@gmail.com>
7747 * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
7748 abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
7749 JIT if DISABLE_JIT is defined.
7751 * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
7754 2008-09-10 Mark Probst <mark.probst@gmail.com>
7756 * iltests.il.in: Disable the fconv test on PPC (the result is
7757 undefined according to ECMA).
7759 2008-09-10 Mark Probst <mark.probst@gmail.com>
7761 * iltests.il.in: Enable tail call tests for PPC.
7763 * mini.h: Add variable for storing incoming valuetype argument
7764 addresses for tail calls.
7766 * mini-ppc.c: Implement valuetype arguments and return values for
7769 2008-09-09 Mark Probst <mark.probst@gmail.com>
7771 * mini-ppc.c: Partially implement tail calls (struct arguments and
7772 return values not supported).
7774 * method-to-ir.c: Enable tail calls on PPC.
7776 2008-09-08 Zoltan Varga <vargaz@gmail.com>
7778 * aot-compiler.c (emit_wrapper_info): Omit the klass name from
7779 runtime-invoke wrappers to work around the problem of them getting
7780 assigned to a random class.
7782 * aot-runtime.c (mono_aot_get_method): Ditto.
7784 2008-09-07 Zoltan Varga <vargaz@gmail.com>
7786 * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
7787 the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
7789 2008-09-07 Mark Probst <mark.probst@gmail.com>
7791 * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
7792 until they're implemented properly.
7794 * exceptions-ppc.c: Use arch-independent exception-handling code
7795 instead of custom one.
7797 * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
7800 * tramp-ppc.c, mini-ppc.c: Fixed warnings.
7802 * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
7803 applies when __powerpc__ is defined.
7805 2008-09-06 Zoltan Varga <vargaz@gmail.com>
7807 * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
7808 methods to their code to avoid computing the full name of wrappers and
7809 doing a lookup in a string hash table.
7811 2008-09-05 Zoltan Varga <vargaz@gmail.com>
7813 * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
7814 we identify bblocks before method_to_ir () is ran.
7816 * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
7817 Also avoid optimizing branches pointing to themselves.
7819 * mini.c (mini_method_compile): Ditto. Fixes #422947.
7821 2008-09-05 Rodrigo Kumpera <rkumpera@novell.com>
7823 * driver.c (mono_main): Enable the new verifier under core-clr and cas.
7825 2008-09-05 Zoltan Varga <vargaz@gmail.com>
7827 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
7828 (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
7829 (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
7832 * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all
7833 jumped to the same entry in plt_jump_table.
7835 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
7837 * method-to-ir.c (initialize_array_data): Handle field with RVA from
7840 2008-08-31 Zoltan Varga <vargaz@gmail.com>
7842 * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
7843 other assignment can be if converted. Saves 1.5% on corlib size and fixes
7846 2008-08-29 Geoff Norton <gnorton@novell.com>
7848 * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
7849 segment, and doesn't properly handle .space as .text. Fixes
7852 2008-08-29 Geoff Norton <gnorton@novell.com>
7854 * mini.c: Disable the mach exception handler when running on
7857 2008-08-29 Geoff Norton <gnorton@novell.com>
7859 * aot-compiler.c: Patch from Renaldas Zioma to properly register
7860 globals on Darwin/ARM
7862 2008-08-28 Zoltan Varga <vargaz@gmail.com>
7864 * mini.c: Avoid not initializing the runtime when doing AOT compilation,
7865 since too many things depend on it. Instead, call
7866 mono_runtime_set_no_exec ().
7868 * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
7871 * aot-compiler.c: Add an 'asm-only' AOT option.
7873 * mini.c: Avoid initializing the runtime when doing AOT compilation.
7875 * aot-compiler.c (compile_method): Disable gshared support for now as it
7878 2008-08-27 Bill Holmes <billholmes54@gmail.com>
7880 * mini-amd64.h : Fix a compiler warning.
7882 * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
7883 Changed to use a callback function to retrieve the unwind info.
7884 This avoids problems observed when code blocks were removed by
7885 unloading an app domain.
7887 * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole
7888 and branch excludes for Winx64. The fix in exceptions-amd64.c allows them
7891 Contributed under MIT/X11 license.
7893 2008-08-27 Bill Holmes <billholmes54@gmail.com>
7895 * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
7896 case to keep the stack aligned to 8.
7898 Contributed under MIT/X11 license.
7900 2008-08-26 Zoltan Varga <vargaz@gmail.com>
7902 * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
7903 avoid repeated linear searches.
7905 2008-08-25 Zoltan Varga <vargaz@gmail.com>
7907 * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
7908 methods it can't handle.
7910 * aot-compiler.c (add_method): Avoid adding a method twice.
7911 (add_wrappers): Add runtime invoke wrappers for all methods.
7913 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
7914 function to create an aot-compatible version of this trampoline.
7916 * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
7918 2008-08-24 Zoltan Varga <vargaz@gmail.com>
7920 * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
7922 * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
7923 with a generic sharing failure.
7925 * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
7927 * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
7928 CEE_RETHROW. Fixes #419634.
7930 * mini.c (mono_method_to_ir): Ditto.
7932 * exceptions.cs: Add a new test.
7934 * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
7935 to mono_type_stack_size_internal () since some callers might not pass in
7938 * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
7939 instrument_prolog. Fixes #419878.
7941 * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
7942 doubles in soft float mode volatile.
7944 2008-08-23 Zoltan Varga <vargaz@gmail.com>
7946 * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
7948 * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
7949 to handle soft float correctly.
7951 * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
7954 * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
7956 * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
7957 to sp, since the generics catch code requires it.
7959 * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
7962 * method-to-ir.c (emit_imt_argument): Pass imt_arg to
7963 mono_arch_emit_imt_argument ().
7965 * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
7967 * mini-arm.c tramp-arm.c: Generic sharing updates.
7969 2008-08-22 Zoltan Varga <vargaz@gmail.com>
7971 * mini-arm.c: Fix the arm build.
7973 * generic-sharing.c (mini_type_get_underlying_type): New helper function
7974 handling enums, generic instances and generic sharing.
7975 (mini_type_stack_size_full): Ditto.
7977 * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
7979 * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
7981 * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
7983 * tramp-arm.c: Implement the rgctx fetch and the generic class init
7986 * mini-arm.c: Various small generic sharing changes.
7988 * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
7990 (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
7993 * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
7994 helper function to return a generic class init trampoline.
7996 * method-to-ir.c mini.c: Use it.
7998 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
7999 arch-specfic function to return a generic class init trampoline.
8001 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
8002 the GENERIC_CLASS_INIT custom code.
8004 * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
8005 a fatal error, not a sharing failure.
8007 * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
8010 * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
8011 trampoline argument from MONO_ARCH_VTABLE_REG.
8013 * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
8014 order of the arguments to the C trampoline: pass 'slot' as the trampoline
8015 argument, and pass the vtable in VTABLE_REG.
8017 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
8018 order of the arguments to the C trampoline: pass 'slot' as the trampoline
8019 argument, and pass the vtable in VTABLE_REG.
8020 (mono_arch_create_trampoline_code_full): Remove some special casing for
8021 the rgctx fetch trampoline.
8023 * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
8026 * iltests.il: Add a test for it.
8028 2008-08-21 Zoltan Varga <vargaz@gmail.com>
8030 * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
8032 * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
8035 * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
8036 use mono_jit_info_table_find () to avoid recursion.
8037 (mono_delegate_trampoline): Add a sync wrapper here.
8039 * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
8042 * mini.c (mono_method_to_ir): Ditto.
8044 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
8045 add_sync_wrapper argument. Don't add a sync wrapper here.
8046 (mono_create_jump_trampoline): Don't add a sync wrapper here.
8048 * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
8050 2008-08-20 Bill Holmes <billholmes54@gmail.com>
8052 * exceptions-amd64.c (seh_handler): For Winx64 adding missing copy
8053 of nonvolatile registers back from MonoContext to CONTEXT.
8055 Contributed under MIT/X11 license.
8057 2008-08-20 Bill Holmes <billholmes54@gmail.com>
8059 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): When shifting the
8060 arguments on Winx64 there are only 4 argument registers. For this
8061 logic to work the last argument must be pulled from the stack.
8063 Contributed under MIT/X11 license.
8065 2008-08-20 Zoltan Varga <vargaz@gmail.com>
8067 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
8069 * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
8070 MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
8071 encode/decode_method_ref ().
8073 * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
8075 * aot-runtime.c (decode_patch): Ditto.
8077 * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
8078 MONO_PATCH_INFO_METHOD.
8080 * aot-runtime.c (decode_exception_debug_info): Decode the contents of
8083 * aot-compiler.c (emit_exception_debug_info): Emit the contents of
8086 * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
8088 * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
8089 one from the caller.
8091 * aot-runtime.c (decode_generic_inst): New function to decode and
8092 return a interned generic inst.
8093 (decode_klass_ref): Use it.
8094 (decode_method_ref): Ditto.
8096 * aot-compiler.c (emit_exception_debug_info): Save
8097 jinfo->has_generic_jit_info too.
8099 2008-08-19 Zoltan Varga <vargaz@gmail.com>
8101 * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
8103 * iltests.il.in: Add a test for fconv_to_i.
8105 * liveness.c: Disable the liveness2 pass for now to save space.
8107 * regalloc2.c: Include mempool-internals.h to fix warnings.
8109 * aot-compiler.c (encode_method_ref): Encode the context of generic
8112 * aot-runtime.c (decode_method_ref): Inflate generic methods using
8113 the context saved in the aot file.
8115 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
8117 * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
8119 * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
8120 volatile so they won't be optimized away.
8122 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
8128 * dominators.c: Remove duplicated functions that now are in
8129 mempool-internals.h.
8131 2008-08-19 Zoltan Varga <vargaz@gmail.com>
8133 * aot-compiler.c: Fix warnings.
8135 * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
8137 * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
8139 * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
8142 * mini.c (mono_resolve_patch_target): Ditto.
8144 * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
8145 (encode_klass_ref): Add support for encoding VARs/MVARs.
8147 * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
8149 * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
8150 the handling of the got entries into a separate 'decode_got_entry' function.
8151 Add support for RGCTX_FETCH.
8153 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
8154 clobbered by the trampoline code.
8156 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
8157 not clobbered by the indirect calling code.
8159 2008-08-18 Zoltan Varga <vargaz@gmail.com>
8161 * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
8164 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
8166 * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
8167 signature using the compilation mempool otherwise we would leak it.
8169 2008-08-18 Zoltan Varga <vargaz@gmail.com>
8171 * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
8172 mono_emit_abs_call ().
8174 * patch-info.h: Add GENERIC_CLASS_INIT.
8176 * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
8178 * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
8179 as their target as a near call.
8181 * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
8183 (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
8185 * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
8186 call to a runtime function described by a patch.
8188 * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
8189 mono_emit_abs_call, this has the advantage that the ABS handling code in
8190 mono_codegen () can handle them both, and can handle other stuff in the
8191 future without additional code.
8193 * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
8195 (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
8198 * mini.h: Add missing bblock related prototypes.
8200 * mini.h (MonoCompile): Remove unused reverse_inst_list and
8201 reverse_inst_list_len fields.
8203 * mini.c: Refactor this file a bit by moving branch optimizations to
8206 * method-to-ir.c: Merge generic sharing changes missed earlier.
8208 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
8210 * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
8211 shared patches. Process METHODCONST as a shared patch.
8213 * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
8214 as it crashes on the 2.0 mscorlib.
8216 * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
8219 * aot-compiler.c: Use is_plt_patch () in a few additional places.
8220 (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
8223 * aot-compiler.c: Reorganize the got handling code to be a bit more
8226 2008-08-17 Zoltan Varga <vargaz@gmail.com>
8228 * aot-compiler.c: Make the patch_to_plt_offset hash table use
8229 mono_patch_info_equals/hash, and use it to massively simplify
8232 * mini.c (mono_patch_info_hash): Simplify this and add support for
8235 * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
8237 * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
8238 handling code, since an offset is not enough to identify a trampoline.
8240 * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
8242 2008-08-17 Mark Probst <mark.probst@gmail.com>
8244 * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
8246 * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
8248 * mini-ops.h: Argument and result types for OVF_CARRY ops.
8250 * decompose.c: PPC decompositions for various ops.
8252 * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
8254 2008-08-17 Zoltan Varga <vargaz@gmail.com>
8256 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
8257 call the generic trampoline code using a call, instead of a jump, to
8258 remove some special casing from the generic trampoline code.
8260 * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
8261 (mono_codegen): Ditto.
8263 * aot-compiler.c aot-runtime.c: Ditto.
8265 * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
8267 * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
8268 helper function to find the offset corresponding to a lazy fetch trampoline.
8270 * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
8271 when doing generic sharing.
8273 * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
8276 * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
8277 mini-trampolines.c to be with the other trampoline creation functions.
8279 * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
8280 as it is equal to method->signature in most cases, add a
8281 mono_emit_method_call_full variant which takes a signature and an imt
8284 2008-08-16 Zoltan Varga <vargaz@gmail.com>
8286 * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
8287 to this function, since it could be computed easily from the method
8289 (mono_helper_compile_generic_method_wo_context): Removed, not needed any
8292 * method-to-ir.c mini.c: Remove references to
8293 compile_generic_method_wo_context.
8295 * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
8296 generic method calls.
8298 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
8299 dimensional non-szarrays.
8301 * mini.c (mini_init): Register mono_array_new_1.
8303 * jit-icalls.c (mono_array_new_1): New jit icall.
8305 * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
8306 pointing to the method.
8308 * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
8309 method addresses belonging to METHOD_JUMP patches in the
8310 jump_target_got_slot_hash.
8311 (mono_aot_load_method): Ditto.
8313 * aot-compiler.c (compile_method): Allow AOT compilation of methods with
8314 METHOD_JUMP patches.
8316 * mini.c (mini_create_jit_domain_info): New helper function which
8317 initializes/frees domain->runtime_info.
8318 (mini_free_jit_domain_info): Ditto.
8319 (mini_init): Install the domain hook functions with the runtime.
8321 * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
8322 information maintained by the JIT.
8324 * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
8325 insertion into jump_table_hash into mono_codegen (), also implement proper
8328 * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
8329 tail calls, it is already done by the aot code.
8331 * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
8334 * iltests.il.in: Make the jmp test a bit more complex.
8336 * aot-compiler.c (encode_method_ref): Handle references to normal methods of
8337 generic instances which doesn't have a token.
8339 * aot-runtime.c (decode_method_ref): Ditto.
8341 * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
8342 can handle this case now.
8343 (handle_box): Ditto.
8345 2008-08-15 Geoff Norton <gnorton@novell.com>
8347 * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
8350 2008-08-15 Zoltan Varga <vargaz@gmail.com>
8352 * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
8353 calling generic methods.
8355 * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
8357 * aot-runtime.c (decode_patch_info): Ditto.
8359 * mini.c (mono_resolve_patch_target): Ditto.
8361 * patch-info.h: Add METHOD_RGCTX.
8363 * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
8365 2008-08-14 Zoltan Varga <vargaz@gmail.com>
8367 * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
8368 arguments in registers.
8370 * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
8371 OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
8373 * mini.c (mini_method_compile): Abort aot compilation for generic
8374 methods if generic sharing is disabled.
8376 * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
8379 * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls
8380 requiring an mrgctx.
8382 * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
8383 store instructions when converting a vcall to a normal call.
8385 * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
8386 mono_arch_find_jit_info.
8388 2008-08-13 Zoltan Varga <vargaz@gmail.com>
8390 * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
8391 avoid calling mono_method_full_name () for every method even if the
8393 (check_inline_caller_method_name_limit): Ditto.
8395 2008-08-12 Zoltan Varga <vargaz@gmail.com>
8397 * driver.c (main_thread_handler): Allow AOT compilation of multiple
8398 assemblies in one run.
8400 * aot-compiler.c (mono_compile_assembly): Only print out a count of
8401 skipped methods if it is not 0.
8403 * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
8405 2008-08-12 Bill Holmes <billholmes54@gmail.com>
8407 * mini.c (mono_codegen): Changing a preprocessor check from WIN64 to
8408 MONO_ARCH_HAVE_UNWIND_TABLE.
8410 Contributed under MIT/X11 license.
8412 2008-08-12 Bill Holmes <billholmes54@gmail.com>
8414 * mini-amd64.c (mono_arch_cpu_optimizazions): Remove peephole and branch
8415 from default optimizaton list on Winx64.
8417 * mini-amd64.c (emit_tls_get): Added Winx64 specific implementation for GetTLS.
8419 * mini-amd64.c (mono_arch_emit_prolog): Adding an offset on Winx64 to get
8420 the LMF from the MonoJitTlsData structure.
8422 * mini-amd64.c (mono_arch_setup_jit_tls_data): Added Winx64 implementation.
8424 Contributed under MIT/X11 license.
8426 2008-08-12 Zoltan Varga <vargaz@gmail.com>
8428 * mini.c (sigsegv_signal_handler): Fix the build.
8430 * mini-amd64.c (emit_call_body): Use image->aot_module instead of
8431 assembly->aot_module.
8433 * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
8434 hash table. This simplifies and speeds up a lot of code, and fixes support
8437 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
8440 * mini-exceptions.c: Ditto.
8442 * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
8443 'native_offset' argument, since these are computed in the
8444 mono_find_jit_info () function.
8446 * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
8447 is used by exceptions-ppc.c.
8449 * exceptions-ppc.c: Call mono_find_jit_info () instead of
8450 mono_arch_find_jit_info ().
8452 * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
8453 mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
8454 generic code in mini-exceptions.c.
8456 2008-08-11 Zoltan Varga <vargaz@gmail.com>
8458 * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
8460 * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
8462 * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
8463 the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
8464 called while holding the loader lock. Fixes #415608.
8465 (mono_aot_get_method_from_token_inner): Ditto.
8467 2008-08-09 Zoltan Varga <vargaz@gmail.com>
8469 * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
8470 to reduce differences between this and the generic implementation in
8472 (ves_icall_get_frame_info): Ditto.
8474 * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
8476 * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
8479 * exceptions-ppc.c (arch_get_call_filter): Rename this to
8480 mono_arch_get_call_filter () and make it non-static, for consistency with the
8481 other architectures.
8483 2008-08-09 Rodrigo Kumpera <rkumpera@novell.com>
8486 * local-propagation.c:
8487 * mini-x86.c: Correct the name of arch defines.
8489 2008-08-09 Zoltan Varga <vargaz@gmail.com>
8491 * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
8492 NO_EMULATE_LONG_SHIFT_OPS define.
8494 2008-08-08 Zoltan Varga <vargaz@gmail.com>
8496 * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
8497 now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
8499 * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
8500 MACH fixes. Merged from the 2.0 branch.
8502 * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
8504 * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
8505 (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
8507 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
8509 * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
8510 mono_marshal_get_native_wrapper () signature changes.
8512 2008-08-07 Rodrigo Kumpera <rkumpera@novell.com>
8514 * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
8515 conversion bug under arm.
8517 2008-08-06 Rodrigo Kumpera <rkumpera@novell.com>
8519 * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
8521 * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
8522 with overflow checking.
8524 2008-08-05 Marek Habersack <mhabersack@novell.com>
8526 * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
8527 to the genmdesc.pl file
8529 2008-08-05 Zoltan Varga <vargaz@gmail.com>
8531 * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
8532 arg_array in the soft-float versions of the LOAD/STORE macros.
8534 * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
8537 * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
8539 2008-08-02 Zoltan Varga <vargaz@gmail.com>
8541 * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
8542 a float HFA. Fixes #413621.
8544 2008-08-02 Gert Driesen <drieseng@users.sourceforge.net>
8546 * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
8547 frame_size to args_size. Fixes build.
8549 2008-08-02 Zoltan Varga <vargaz@gmail.com>
8551 * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
8552 and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
8554 * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
8555 the stack are not unaligned. Fixes #413247.
8557 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
8559 * mini.c: update jitted methods performance counters.
8561 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
8563 * mini-exceptions.c: increase the exceptions thrown performance
8564 counter in mono_handle_exception ().
8566 2008-07-29 Zoltan Varga <vargaz@gmail.com>
8568 * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
8569 can work with netmodules.
8571 2008-07-28 Geoff Norton <gnorton@novell.com>
8573 * mini-x86.h: Correct the frame alignment on OSX. Fixes the jit
8576 2008-07-28 Zoltan Varga <vargaz@gmail.com>
8578 * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
8581 2008-07-28 Bill Holmes <billholmes54@gmail.com>
8583 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
8584 The float param registers and other param registers must be the
8585 same index on Windows x64.
8587 * mini-amd64.c (mono_arch_allocate_vars) : Implementing the
8588 ArgValuetypeAddrInIReg argument case. Setting the argument
8589 op to OP_VTARG_ADDR (OP_REGOFFSET)).
8591 * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix. Use the size
8592 variable computed above as the copy length for arguments of storage
8593 type ArgValuetypeAddrInIReg.
8595 * mini-amd64.c (mono_arch_emit_call) : Implementing the
8596 ArgValuetypeAddrInIReg argument case. This case will rely on
8597 mono_arch_emit_outarg_vt to emit the correct code later in the process.
8599 * mini-amd64.c (mono_arch_emit_call) : On Winx64 there always needs to be
8600 a 32 byte stack allocation for all calls. We will omit the adjustment for
8601 jump and tail call instructoins as they do not follow the typical call behavior.
8603 * mini-amd64.c (mono_arch_emit_outarg_vt) : Implementing the case for
8604 ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
8605 local variable and pass the local variable by reference to the called method.
8607 * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
8608 Implementing the ArgValuetypeAddrInIReg argument case. When the address
8609 of a struct is passed in a register it must be saved with the other
8610 volatile argument on the stack.
8612 * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix. When omitting the
8613 frame pointer the stack adjustment value must be saved to the unwind
8616 Contributed under MIT/X11 license.
8618 2008-07-28 Zoltan Varga <vargaz@gmail.com>
8620 * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
8621 which got lost in the merge.
8623 2008-07-27 Zoltan Varga <vargaz@gmail.com>
8625 * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
8628 * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
8630 * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
8631 icalls, since they won't be patched.
8633 * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
8634 different code sequence when running under valgrind to prevent some valgrind
8637 * iltests.il.in: Add new regression test.
8639 * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
8642 * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
8643 accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
8645 * iltests.il.in: Add new test.
8647 * aot-compiler.c: Fix some warnings.
8649 * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
8652 2008-07-27 Zoltan Varga <vargaz@gmail.com>
8654 * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
8655 (mini_usage_jitdeveloper): Add a missing --wapi option.
8657 2008-07-25 Zoltan Varga <vargaz@gmail.com>
8659 * mini-codegen.c: Simplify the is_fp macros.
8660 (free_up_ireg): Remove, use free_up_reg instead.
8661 (free_up_reg): Fix the fp case.
8663 2008-07-26 Zoltan Varga <vargaz@gmail.com>
8665 * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
8668 * exceptions-x86.c: Merge some changes which seemed to have got lost
8669 in the linear-ir merge.
8671 * liveness.c: Disable the liveness2 pass on 32 bit platforms.
8673 * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
8674 long vreg volatile even if the variable was already created.
8676 * liveness.c (update_liveness2): Avoid eliminating dead definitions of
8679 2008-07-26 Zoltan Varga <vargaz@gmail.com>
8681 * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
8683 * mini.c (mono_jit_compile_method_inner): Add support for
8684 MONO_EXCEPTION_BAD_IMAGE.
8686 * method-to-ir.c (mono_method_to_ir2): Avoid a crash if
8687 mini_method_get_context () returns NULL. Fixes #356531.
8689 * mini.c (mono_method_to_ir): Ditto.
8691 * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
8692 accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
8694 2008-07-25 Zoltan Varga <vargaz@gmail.com>
8696 * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
8697 in the LDFTN implementation.
8699 2008-07-25 Mark Probst <mark.probst@gmail.com>
8701 * mini-trampolines.c (mono_magic_trampoline): When sharing generic
8702 code, patch calls to icalls, too, even if they're not in the
8703 shared generic code hash. Fixes #411962.
8705 2008-07-25 Zoltan Varga <vargaz@gmail.com>
8707 * cpu-x86.md: Increase the length of the fcall opcodes.
8709 * mini-x86.c (emit_move_return_value): Avoid some precision issues for
8710 calls returning floats.
8712 * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
8715 * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
8718 * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
8719 into the domain->method_code_hash.
8721 * aot-compiler.c: Fix win32 build.
8723 * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
8725 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
8726 gshared NEWARR implementation.
8728 * cpu-sparc.md: Remove duplicate localloc_imm opcode.
8730 * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
8731 can be used outside of method_to_ir.
8733 * mini.h (MonoCompile): Add arg_types field.
8735 * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
8737 * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
8738 the values of the local arg_array and param_types array.
8740 2008-07-24 Zoltan Varga <vargaz@gmail.com>
8742 * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
8743 got accesses might only get generated later when NEWOBJ is decomposed.
8745 * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
8746 looking up the native code of the target method when a delegate is called
8749 * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
8752 * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
8754 * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
8755 AOT work on platforms without a working dlsym implementation.
8757 * mini.h: Bump AOT image format version.
8759 2008-07-24 Mark Probst <mark.probst@gmail.com>
8761 * mini-exceptions.c: Free a MonoType with
8762 mono_metadata_free_type() instead of g_free().
8764 * aot-runtime.c: Free a MonoType.
8766 2008-07-24 Zoltan Varga <vargaz@gmail.com>
8768 * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
8771 * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
8774 2008-07-23 Massimiliano Mantione <massi@ximian.com>
8775 * mini.c (sigprof_signal_handler): call the new "runtime initialized"
8778 2008-07-23 Zoltan Varga <vargaz@gmail.com>
8780 * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
8781 NEWOBJ calls on valuetypes.
8783 * iltests.il.in: Add new test.
8785 * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
8787 2008-07-22 Zoltan Varga <vargaz@gmail.com>
8789 * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
8790 is no longer needed.
8792 * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
8793 non register sized integer arguments.
8794 (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
8795 (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to
8798 * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
8801 * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
8802 two a binop with different sized arguments is emitted.
8804 * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
8805 instruction in the ins==NULL case.
8807 2008-07-23 Zoltan Varga <vargaz@gmail.com>
8809 * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
8811 * mini-x86.c: Fix osx build.
8813 * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
8816 * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
8817 instruction for non int sized variables.
8819 * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
8822 2008-07-23 Robert Jordan <robertj@gmx.net>
8824 * method-to-ir.c: Fix MSVC build.
8826 2008-07-22 Zoltan Varga <vargaz@gmail.com>
8828 * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
8829 a non int sized type, widen it to an int since newer versions of gcc seem to
8830 generate code which needs this.
8832 * ssa2.c abcremoval2.c: Fix warnings.
8834 * *: Merge the Linear IR branch.
8836 The original branch is at trunk/branches/vargaz/mini-linear-il, and
8837 the ChangeLog file there describes all the changes done over the years.
8838 Further documentation can be found at www.mono-project.com/Linear_IL.
8840 2008-07-21 Bill Holmes <billholmes54@gmail.com>
8842 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
8843 The float param registers and other param registers must be the
8844 same index on Windows x64.
8846 Contributed under MIT/X11 license.
8848 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
8850 * mini.c: Make the previous fix GC safe.
8852 2008-07-21 Raja R Harinath <harinath@hurrynot.org>
8854 * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
8856 2008-07-21 Bill Holmes <billholmes54@gmail.com>
8858 * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
8859 on Winx64. This type will not be passed on the stack (ArgOnStack), but
8860 ArgValuetypeAddrInIReg instead.
8862 Contributed under MIT/X11 license.
8864 2008-07-21 Zoltan Varga <vargaz@gmail.com>
8866 * mini-codegen.c (get_register_spilling): Fix a warning.
8868 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
8870 * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
8871 for types which the initialization fails. Raises the provided exception
8872 at the right stop after cleanup.
8874 2008-07-16 Zoltan Varga <vargaz@gmail.com>
8876 * aot-compiler.c: Free most of the memory allocated during compilation.
8878 * mini.c (mini_parse_debug_options): Fix a leak.
8880 * mini.c (mini_method_compile): Don't add the method to the jit info tables
8881 during aot compilation.
8883 2008-07-14 Zoltan Varga <vargaz@gmail.com>
8885 * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as
8886 it has too much register pressure.
8888 2008-07-13 Zoltan Varga <vargaz@gmail.com>
8890 * inssel.brg (CEE_CASTCLASS): Remove some dead code.
8892 2008-07-12 Zoltan Varga <vargaz@gmail.com>
8894 * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
8897 * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
8898 on amd64 similar to the way it is done on arm.
8900 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8902 * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for
8903 consistency, normalize error messages, avoid loading aot-only modules in
8906 * driver.c (mono_main): Rename --aot-only command line option to --full-aot
8909 * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
8911 2008-07-11 Martin Baulig <martin@ximian.com>
8914 (MonoDebuggerInfo): Add `interruption_request'.
8916 2008-07-12 Zoltan Varga <vargaz@gmail.com>
8918 * aot-compiler.c (emit_plt): Remove some dead code.
8920 * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
8922 * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
8923 return the plt info offset belonging to a given plt entry.
8925 * mini-trampolines.c (mono_aot_plt_trampoline): Use
8926 mono_aot_get_plt_info_offset.
8928 * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
8929 similar to the amd64 code by makeing jumps through a separate jump table
8930 instead of embedding the jump addresses into the code.
8932 2008-07-11 Zoltan Varga <vargaz@gmail.com>
8934 * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
8937 2008-07-10 Martin Baulig <martin@ximian.com>
8939 * mini.c (mini_method_compile): Disable generics sharing when
8940 running in the debugger.
8942 2008-07-10 Zoltan Varga <vargaz@gmail.com>
8944 * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
8946 * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
8947 the local register allocator from running out of registers on x86 when
8950 2008-07-10 Bill Holmes <billholmes54@gmail.com>
8952 * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when
8953 expressing IntMin for the VS Compiler. See Compiler Warning (level 2)
8956 Contributed under MIT/X11 license.
8958 2008-07-10 Zoltan Varga <vargaz@gmail.com>
8960 * aot-compiler.c: Get rid of whitespace in the generated assembly file to
8961 speed up the assembler.
8963 2008-07-09 Zoltan Varga <vargaz@gmail.com>
8965 * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
8968 * mini.c: Move the soft float handling macros a bit earlier, add
8969 NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
8972 * mini.h: Add prototype for mono_arch_fixup_jinfo.
8974 * mini.c (mini_init): In aot-only mode, set the root domain code manager to
8975 read-only to help catch code allocation requests.
8977 * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
8978 and turn it off when using --aot-only or when compiling with --aot=full.
8980 * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
8981 jump table for switches from the normal domain mempool, not the code
8984 * mini-trampolines.c (get_unbox_trampoline): New function to return an
8985 unbox trampoline which handles aot-only mode too.
8987 * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
8988 an AOTed unbox trampoline.
8990 * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
8992 2008-07-09 Bill Holmes <billholmes54@gmail.com>
8994 * wapihandles.c: Fixing MSVC builds. Include statement changed from <> to
8997 Contributed under MIT/X11 license.
8999 2008-07-09 Bill Holmes <billholmes54@gmail.com>
9001 * mini.c (mono_codegen): Allocate space at the end of the code block and store
9002 the unwind information for the method at the end of the allocated block.
9004 * mini-amd64.h: Added declarations for the unwind routines and adding field to
9005 MonoCompileArch to hold the unwind info for SEH on Winx64
9007 * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
9008 frame pointer info for the method being compiled.
9010 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
9011 the call to mono_exception_from_token.
9013 * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations. This code is responsible
9014 storing the method prolog information in a format that the Winx64 SEH can understand. This
9015 information is stored a the end of the method block because it is all 32-bit offset based.
9017 Contributed under MIT/X11 license.
9019 2008-07-09 Zoltan Varga <vargaz@gmail.com>
9021 * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
9023 * wapihandles.c: Fix warnings.
9025 * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
9028 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling
9029 mono_jit_compile_method in aot-only mode since that calls the type
9032 * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
9033 get_delegate_invoke_impl in aot-only mode.
9035 * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
9037 2008-07-08 Zoltan Varga <vargaz@gmail.com>
9039 * trace.c (mono_trace_enter_method): Fix printing of Type instances.
9041 * aot-compiler.c (compile_method): Disable the check for GSHARED since it
9044 * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
9046 * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
9047 init trampoline from the AOT file as well.
9049 * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
9050 mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
9053 * mini.c (mini_init): Move the call to mono_exceptions_init () after
9056 * exceptions-amd64.c: Add _full variants for the remaining exception code
9057 creation functions as well, allow emission of relocatable code, remove
9058 caching since that is now done by the caller.
9060 * mini-exceptions.c: Add _full variants for the remaining exception code
9061 creation functions as well, add aot-only support.
9063 * aot-compiler.c (compile_method): Allow calls to methods of constructed types
9064 if we can determine a proper token for them.
9065 (add_wrappers): Add a few more wrappers.
9066 (emit_method_code): Remove some dead code.
9067 (emit_trampolines): Emit exception code too.
9069 * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
9071 * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
9072 mono_array_new_va which avoids varargs.
9074 * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
9076 * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
9077 mono_arch_create_specific_trampoline () in all places.
9079 * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
9080 a bit so it can be used for other things as well.
9082 * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
9085 * exceptions-amd64.c: Rename the caching from the exception code creation
9086 functions, it is done by the caller instead.
9088 * exceptions-amd64.c: Change the signature of the exception code creation
9089 functions to allow the creation of relocatable code later.
9091 * mini-exceptions.c: Add a set of functions to query the various
9092 runtime-generated exception functions.
9094 * mini.c mini-exceptions.c: Use the newly added functions instead of the
9095 mono_arch_.. () functions.
9097 2008-07-07 Zoltan Varga <vargaz@gmail.com>
9099 * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
9101 * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
9103 * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
9104 (mini_get_vtable_trampoline): Ditto.
9106 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
9107 code in the AOT case by returning the code size and a list of relocations to
9110 * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
9112 2008-07-07 Bill Holmes <billholmes54@gmail.com>
9114 * mini-amd64.c: On Winx64 the calling convention always requires the caller to
9117 Contributed under MIT/X11 license.
9119 2008-07-07 Zoltan Varga <vargaz@gmail.com>
9121 * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
9122 so the buffer size can be computed correctly. Fixes #404735.
9124 * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
9125 normally as cfg->debug_info is already freed.
9127 2008-07-06 Zoltan Varga <vargaz@gmail.com>
9129 * mini-amd64.c: For calls returning vtypes in registers, don't store
9130 the return address on the stack, instead allocate a separate local for
9133 2008-07-05 Mark Probst <mark.probst@gmail.com>
9135 * mini-trampolines.c, mini.h: Add an argument to
9136 mono_create_jit_trampoline_in_domain() for turning off the adding
9137 of the sync wrapper.
9139 * mini.c: Use the JIT trampoline without sync instead of
9140 ldftn_nosync in static RGCTX invoke wrappers so that the call can
9143 2008-07-04 Mark Probst <mark.probst@gmail.com>
9145 * driver.c: Turn on GSHARED optimization by default.
9147 2008-07-04 Zoltan Varga <vargaz@gmail.com>
9149 * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
9150 to MONO_TRAMPOLINE_JIT since it better reflects what it does.
9152 * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
9153 create a variant of the generic trampoline code callable from AOTed trampolines.
9155 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
9156 trampoline code callable from AOTed trampolines.
9158 * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
9160 2008-07-04 Mark Probst <mark.probst@gmail.com>
9162 * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
9163 pass-through manner.
9165 * mini.c: Generic method sharing. Pass MRGCTX to generic methods
9166 and don't fail sharing for them anymore.
9168 * mini-exceptions.c: Handle exceptions in shared generic methods.
9170 * generic-sharing.c: When checking the context of a generic
9171 method, also check its class's context. Don't treat wrappers as
9174 * mini-trampolines.c: Some code factored out to
9175 metadata/generic-sharing.c. Handle the MRGCTX case.
9177 * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
9178 we must deal with the method being of another instantiation of the
9179 class. Add static rgctx invoke wrappers to generic methods.
9181 2008-07-04 Mark Probst <mark.probst@gmail.com>
9183 * mini.c: Provide all jit infos of generic shared methods with a
9186 * mini-exceptions.c: Handle the new situation that a generic info
9187 might be available, but not info about the this/vtable/mrgctx
9190 2008-07-03 Mark Probst <mark.probst@gmail.com>
9192 * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
9195 2008-07-03 Zoltan Varga <vargaz@gmail.com>
9197 * dominators.c (check_dominance_frontier): Fix a warning.
9199 * mini.h: Add some missing prototypes.
9201 * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
9203 * driver.c (mono_jit_init_version): Correct the comments since the first
9204 argument should be the name of the root domain, not a filename.
9206 * aot-runtime.c (make_writable): Error out if this is called while running
9208 (load_aot_module): Ditto.
9210 * aot-compiler.c: Really fix the computation of method indexes.
9212 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous
9213 optimizations as this is no longer called frequently.
9215 * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
9216 method and the invoke impl code and pass it to the delegate trampoline instead of
9217 just the delegate class.
9219 2008-07-02 Zoltan Varga <vargaz@gmail.com>
9221 * aot-compiler.c: Fixup the computation of method indexes.
9222 (add_wrappers): Create the base methods of the runtime invoke wrappers using
9223 the method builder infrastructure.
9225 * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
9228 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
9229 mode, load the method right away instead of creating a trampoline.
9231 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
9233 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
9236 2008-07-01 Zoltan Varga <vargaz@gmail.com>
9238 * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
9239 (mono_aot_load_method): Use method_index instead of method->token.
9241 * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
9242 can handle icalls etc. properly.
9244 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
9246 * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
9248 * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
9249 (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
9250 JIT_ICALL_ADDR patch type.
9252 * patch-info.h: Add JIT_ICALL_ADDR patch type.
9254 * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
9256 (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
9258 * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
9260 2008-06-30 Zoltan Varga <vargaz@gmail.com>
9262 * mini.c: Use domain->jit_code_hash_lock for controlling access to
9263 domain->jit_code_hash.
9265 2008-06-29 Zoltan Varga <vargaz@gmail.com>
9267 * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
9269 2008-06-27 Zoltan Varga <vargaz@gmail.com>
9271 * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
9272 get_this_arg_from_call, let it compute it when needed.
9274 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
9275 gsctx from code only when needed.
9277 * mini-trampolines.c (get_generic_context): Rename this to
9278 mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
9279 it can be called by the arch backends.
9281 * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
9283 2008-06-26 Zoltan Varga <vargaz@gmail.com>
9285 * driver.c (mono_main): Add experimental --aot-only command line option.
9287 * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
9290 2008-06-26 Kornel Pal <kornelpal@gmail.com>
9292 * driver.c (DllMain): Remove mono_module_handle.
9294 Contributed under MIT/X11 license.
9296 2008-06-25 Zoltan Varga <vargaz@gmail.com>
9298 * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
9299 for emitting methods which are not in the source assembly. Detect and report
9300 failure of assembling+linking.
9302 * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
9304 * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
9306 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
9308 * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
9310 2008-06-24 Zoltan Varga <vargaz@gmail.com>
9312 * mini.h: Remove some obsolete prototypes.
9314 * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
9316 2008-06-24 Mark Probst <mark.probst@gmail.com>
9318 * mini.c (get_object_generic_inst): Variable-sized arrays are not
9319 supported by Visual Studio, so use alloca().
9321 2008-06-23 Zoltan Varga <vargaz@gmail.com>
9323 * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
9326 2008-06-23 Mark Probst <mark.probst@gmail.com>
9328 * mini.c: Fail sharing of a generic method if it contains an open
9329 catch clause (because we don't pass MRGCTXs yet).
9331 2008-06-23 Mark Probst <mark.probst@gmail.com>
9333 * mini.c: When compiling a method with generic sharing, insert the
9334 method instantiated with an all-Object generic context into the
9335 jit info table, instead of the context of the first instantiation
9336 of the method we happen to compile.
9338 2008-06-18 Martin Baulig <martin@ximian.com>
9340 * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
9341 `major_version' and `minor_version'.
9343 2008-06-17 Mark Probst <mark.probst@gmail.com>
9345 * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
9346 mono_method_is_generic_sharable_impl() takes an additional
9347 argument specifying whether to treat type variables as reference
9350 2008-06-17 Mark Probst <mark.probst@gmail.com>
9352 * mini.h: Removed obsolete prototypes.
9354 2008-06-17 Mark Probst <mark.probst@gmail.com>
9356 * mini.c: Don't fail generic sharing for initobj and sizeof - we
9357 already handle them.
9359 2008-06-17 Mark Probst <mark.probst@gmail.com>
9361 * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
9362 tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
9363 tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
9364 tramp-x86.c: Added a MonoGenericContext* argument to
9365 mono_arch_get_unbox_trampoline() so that it can call other
9366 functions which require it.
9368 2008-06-17 Mark Probst <mark.probst@gmail.com>
9370 * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
9371 mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
9372 mono_arch_get_this_arg_from_call() takes a
9373 MonoGenericSharingContext* as well.
9375 2008-06-17 Mark Probst <mark.probst@gmail.com>
9377 * mini.c: Factor out code for emitting unbox into emit_unbox() and
9378 implement generic sharing of unbox.
9380 2008-06-17 Mark Probst <mark.probst@gmail.com>
9382 * mini.c: Don't compute the vtable to determine whether a field is
9383 special static, because it might not work for open types.
9385 2008-06-17 Mark Probst <mark.probst@gmail.com>
9387 * mini.c: Removed the unused token_type and token_source arguments
9388 from get_runtime_generic_context_ptr().
9390 2008-06-17 Marek Habersack <mhabersack@novell.com>
9392 * mini.c (ADD_BINOP): fix the build
9394 2008-06-16 Zoltan Varga <vargaz@gmail.com>
9396 * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
9399 2008-06-16 Mark Probst <mark.probst@gmail.com>
9401 * mini.h: Removed class relations enum that's not used anymore.
9403 2008-06-16 Mark Probst <mark.probst@gmail.com>
9405 * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
9407 * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
9408 the lazy fetch trampoline access code.
9410 2008-06-15 Zoltan Varga <vargaz@gmail.com>
9412 * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
9414 2008-06-14 Zoltan Varga <vargaz@gmail.com>
9416 * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
9418 * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
9420 * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
9422 2008-06-13 Zoltan Varga <vargaz@gmail.com>
9424 * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
9427 * mini-ops.h: Add MIN/MAX_UN opcodes.
9429 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
9432 * basic-math.cs: Add more min/max tests.
9434 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
9436 2008-06-13 Mark Probst <mark.probst@gmail.com>
9438 * mini.c: Small fix in the prologue of emit_castclass.
9440 2008-06-13 Zoltan Varga <vargaz@gmail.com>
9442 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
9444 * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
9445 do not work even for unsigned types. Fixes #400014.
9447 * basic-math.cs: Add regression tests for unsigned Min/Max.
9449 2008-06-13 Mark Probst <mark.probst@gmail.com>
9451 * mini.c: Added additional context_used argument to several
9452 functions, which will be needed for sharing generic methods. Use
9453 GET_RGCTX macro wherever appropriate. Declare only one
9454 context_used in mono_method_to_ir().
9456 2008-06-13 Mark Probst <mark.probst@gmail.com>
9458 * mini.c, generic-sharing.c: Removed generic class relations.
9460 * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
9461 functions due to MRGCTX changes.
9463 2008-06-13 Mark Probst <mark.probst@gmail.com>
9465 * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
9466 graph.c, local-propagation.c, aliasing.c: New opcodes for calls
9467 with calculated IMT.
9469 * mini.c: Generic sharing of calls via generic interfaces.
9471 * jit-icalls.c, jit-icalls.h: Helper function for compiling a
9472 generic method with non-constant MonoGenericContext*. Instead,
9473 the context is taken out of the method itself.
9475 2008-06-13 Mark Probst <mark.probst@gmail.com>
9477 * mini.c: Generic sharing of ldvirtftn.
9479 2008-06-13 Mark Probst <mark.probst@gmail.com>
9481 * mini.c: Generic sharing of ldftn.
9483 2008-06-13 Mark Probst <mark.probst@gmail.com>
9485 * mini.c: Do pass VTable/RGCTX argument to static generic methods.
9487 2008-06-13 Mark Probst <mark.probst@gmail.com>
9489 * mini.c: Generic sharing of the special case of ldtoken followed
9490 by a call to GetTypeFromHandle.
9492 2008-06-13 Mark Probst <mark.probst@gmail.com>
9494 * mini.c: Generic sharing of box for nullable types.
9496 2008-06-13 Zoltan Varga <vargaz@gmail.com>
9498 * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
9499 are passed on the stack. Fixes #324807.
9501 2008-06-12 Bill Holmes <billholmes54@gmail.com>
9503 * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
9504 for the ArgValuetypeAddrInIReg case.
9506 * mini-amd64.c:mono_arch_allocate_vars: Adding a case for
9507 ArgValuetypeAddrInIReg to avoid asserts. Code needs to be added here.
9509 * mini-amd64.c: mono_arch_call_opcode: Adding Winx64 code for an ArgInfo of
9510 type ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
9511 local variable and pass the local variable by reference to the called method.
9513 * mini-amd64.c: mono_arch_emit_prolog: Adjust the stack for calls to
9514 mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
9516 Contributed under MIT/X11 license.
9518 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
9520 * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
9522 * debug-mini.c (mono_debug_print_vars): Release memory after printing
9525 2008-06-10 Martin Baulig <martin@ximian.com>
9528 (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
9530 2008-06-09 Kornel Pal <kornelpal@gmail.com>
9532 * main.c: Add and set argv [argc] to NULL to match C specification that fixes
9533 possible error when no arguments are passed.
9535 Contributed under MIT/X11 license.
9537 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
9539 * mini-exceptions.c (ves_icall_get_trace): Skip source locations
9540 where the file name is NULL.
9542 2008-06-09 Zoltan Varga <vargaz@gmail.com>
9544 * mini.c: Fix s390 build.
9546 2008-06-08 Zoltan Varga <vargaz@gmail.com>
9548 * trace.c (mono_trace_parse_options): Fix warnings.
9550 * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
9552 2008-06-07 Zoltan Varga <vargaz@gmail.com>
9554 * mini.c (remove_block_if_useless): Avoid printing the method name.
9556 * mini.c: Remove needless setting of ins->cil_code which is now done by
9559 * mini-amd64.c: Add some code to avoid saving callee saved registers in the
9562 * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
9563 translated code after it has been patched.
9565 2008-06-06 Zoltan Varga <vargaz@gmail.com>
9567 * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
9568 avoid problems during code patching on SMP systems.
9569 (emit_call): Avoid adding a patch info which is already added by
9571 (mono_arch_emit_exceptions): Ditto.
9573 2008-06-05 Zoltan Varga <vargaz@gmail.com>
9575 * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
9576 MONO_TYPE_ISSTRUCT already checks for it.
9578 2008-06-05 Bill Holmes <billholmes54@gmail.com>
9580 * mini-amd64.c:merge_argument_class_from_type: When marshaling
9581 structs with floats on Winx64 the float registers are not used.
9582 The integer registers are always used..
9583 * mini-amd64.c:add_valuetype: When marshaling structs on Winx64
9584 only one register will be used and only if the size of the struct
9585 is 1,2,4, or 8 bytes.
9587 * tramp-amd64.c : Adjusting size used for mono_global_codeman_reserve
9590 Contributed under MIT/X11 license.
9592 2008-06-05 Martin Baulig <martin@ximian.com>
9594 * debug-debugger.c (debugger_lookup_class): Also call
9595 mono_class_setup_methods() here; we're only called from RTI.
9597 2008-06-05 Andreas Farber <andreas.faerber@web.de>
9599 * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
9600 (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
9601 * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
9602 Post-process object files and add dtrace-generated object, if necessary.
9604 Contributed under MIT/X11 license.
9606 2008-06-04 Mark Probst <mark.probst@gmail.com>
9608 * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
9611 * mini.c: Generic sharing for unbox.any and castclass.
9613 2008-06-04 Mark Probst <mark.probst@gmail.com>
9615 * mini.c: Ignore tailcall prefix in shared generic code and when
9616 doing calls which require a vtable/rgctx argument.
9618 2008-06-04 Mark Probst <mark.probst@gmail.com>
9620 * mini.c: Don't free the JIT info.
9622 * driver.c: Changes in the JIT info table testing code.
9624 2008-06-03 Zoltan Varga <vargaz@gmail.com>
9626 * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread
9627 interruption. Fix some warnings.
9629 * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
9630 interruption_checkpoint.
9632 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
9634 * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
9635 from embedding applications.
9637 2008-06-02 William Holmes <billholmes54@gmail.com>
9639 * mini-amd64.c : Correcting some of the issues for Winx64 dealing with
9640 reserving 32 bytes on the stack when making calls.
9642 Contributed under MIT/X11 license.
9644 2008-06-01 Zoltan Varga <vargaz@gmail.com>
9646 * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
9647 the linear IL branch.
9649 * driver.c: Print out more information for --version on arm.
9651 2008-05-30 Zoltan Varga <vargaz@gmail.com>
9653 * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
9654 bb_exit instead, since out of line bblocks might not actually be emitted
9657 * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
9658 maximum epilog size for out of line bblocks if tracing is enabled.
9660 * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
9662 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
9664 * arrays.cs: Regression tests for allocating arrays with negative sizes.
9666 2008-05-28 Zoltan Varga <vargaz@gmail.com>
9668 * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
9669 CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE
9672 2008-05-27 Zoltan Varga <vargaz@gmail.com>
9674 * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
9675 the 'value' to store is a constant.
9677 * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
9679 * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
9680 of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
9682 2008-05-26 Zoltan Varga <vargaz@gmail.com>
9684 * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
9685 for accessing method->generic_container.
9687 2008-05-24 Zoltan Varga <vargaz@gmail.com>
9689 * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
9691 * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
9693 * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
9695 * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
9698 2008-05-23 Zoltan Varga <vargaz@gmail.com>
9700 * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
9702 * mini.c: Handle the case when mono_class_vtable () fails.
9704 2008-05-23 Massimiliano Mantione <massi@ximian.com>
9705 * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
9708 2008-05-22 Mark Probst <mark.probst@gmail.com>
9710 * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
9711 together with domain sharing.
9713 2008-05-22 Mark Probst <mark.probst@gmail.com>
9715 * mini.c: Treat callvirts to final methods like non-virtual calls
9716 when doing generic sharing, i.e. look them up in the runtime
9719 2008-05-22 Mark Probst <mark.probst@gmail.com>
9721 * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
9722 with computed types (for generic sharing).
9724 * mini.c: Generic sharing for mkrefany and refanyval.
9726 2008-05-22 Zoltan Varga <vargaz@gmail.com>
9728 * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
9731 * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
9732 the generic sharing code.
9734 * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
9737 2008-05-21 Zoltan Varga <vargaz@gmail.com>
9739 * mini.h: Remove the declaration of mono_aot_init_vtable ().
9741 2008-05-21 C.J. Adams-collier <cjac@colliertech.org>
9743 * driver.c: updated copyright date
9745 2008-05-21 Zoltan Varga <vargaz@gmail.com>
9747 * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
9750 2008-05-19 Martin Baulig <martin@ximian.com>
9752 * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
9753 pointing to the new `_mono_debug_using_mono_debugger' variable.
9756 (mono_main): Check mono_debug_using_mono_debugger() rather than
9757 the `MONO_INSIDE_MDB' environment variable to check whether we're
9758 inside the debugger.
9760 2008-05-19 Zoltan Varga <vargaz@gmail.com>
9762 * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
9765 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
9767 * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
9769 * mini.c: Added mini_assembly_can_skip_verification. This
9770 function checks if the assembly requested to skip verification.
9771 Fixes part of #387274.
9773 2008-05-07 Zoltan Varga <vargaz@gmail.com>
9775 * mini.c (mini_get_method): Disable the check for open generic classes when
9776 using generic sharing.
9778 * generics.cs: Add a test for #387034.
9780 * mini.c (mini_get_method): Check whenever the method class is an open generic
9781 type, and return NULL in that case, causing a verification error. Fixes
9784 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
9786 * driver.c (mono_main): Revert r102623. The right
9787 thing to do is to enable the verifier under verifiable
9788 unless a --security flag was passed.
9790 We need this non-trivial behavior for --verify-all otherwise
9791 mcs-compileall won't be able to use it. As it needs everything to
9792 be verified under validil.
9794 2008-05-06 Martin Baulig <martin@ximian.com>
9798 * debug-mini.c (mono_debugger_thread_created): Add proper locking.
9799 (mono_debugger_thread_cleanup): Likewise.
9800 (mono_debugger_extended_notification): Likewise.
9802 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
9804 * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
9805 against both inflated and non-inflated methods. We need to check against the
9806 generic definition for cases where the instantiated method is not visible.
9807 We need to check against the inflated types for cases where the instantiation
9808 changes any super type. This fixes #382986.
9810 Note that this doesn't need to be applied to other parts of mono_method_to_ir
9811 that check for visibiliy as generic params only appears as the type subject
9812 of tokens on call opcodes. Field manipulation and ldftn must always
9813 target an exact type.
9815 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
9817 * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
9818 if no related --security flag is passed.
9820 2008-05-05 Andreas Farber <andreas.faerber@web.de>
9822 * mini-arch.h: Prepare support for ppc64.
9824 Contributed under MIT/X11 license.
9826 2008-05-05 Andreas Farber <andreas.faerber@web.de>
9828 * aot-runtime.c: Prepare support for ppc64.
9830 Contributed under MIT/X11 license.
9832 2008-05-05 Andreas Farber <andreas.faerber@web.de>
9834 * mini-ops.h: Prepare support for ppc64.
9836 Contributed under MIT/X11 license.
9838 2008-05-04 Andreas Farber <andreas.faerber@web.de>
9840 * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
9842 Contributed under MIT/X11 license.
9844 2008-05-03 Zoltan Varga <vargaz@gmail.com>
9846 * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
9847 assemblies, since aot_name is not a full path, causing us to load MS.NET
9848 assemblies on windows.
9850 ?2008-04-28 Kornel Pal <kornelpal@gmail.com>
9852 * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
9853 for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
9854 * main.c: Use UTF-8 encoded command line instead of Windows default code
9855 page on Windows to support Unicode.
9856 * driver.c (DllMain): New function for mixed-mode assembly support.
9857 * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
9858 export __stdcall functions without decoration.
9860 Contributed under MIT/X11 license.
9862 2008-04-28 Mark Probst <mark.probst@gmail.com>
9864 * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
9865 saving it very early.
9867 2008-04-28 Mark Probst <mark.probst@gmail.com>
9869 * mini.h, mini.c: Lots of code for accessing the old RGCTX
9870 deleted. The only way to access the new RGCTX is via the
9873 * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
9874 vtable instead of the RGCTX to static methods.
9876 * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
9877 accessing the new RGCTX.
9879 * generic-sharing.c: There is no separation between self, type
9880 arguments and other types in the RGCTX anymore.
9882 2008-04-25 Jonathan Chambers <joncham@gmail.com>
9884 * mini-amd64.c (add_general): Remove previous stack adjustment.
9885 (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
9886 adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
9887 for 32 bytes of stack space reserved for all calls.
9889 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
9890 (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack
9893 Code contributed under MIT/X11 license.
9895 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
9897 * mini.c (mini_method_verify): Only verify non-inflated methods, check
9898 against the root definition, peeling out method and type instantiations.
9899 Cache verify success results, code that fails verification is still
9900 checked multiple times.
9902 2008-04-23 Zoltan Varga <vargaz@gmail.com>
9904 * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
9906 2008-04-23 Jonathan Chambers <joncham@gmail.com>
9908 * mini-amd64.c (add_general): Always increment stack on Win64.
9909 (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
9912 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for
9913 stack based argument handling on Win64.
9915 Code contributed under MIT/X11 license.
9917 2008-04-23 Raja R Harinath <harinath@hurrynot.org>
9919 * Makefile.am (version.h): Add support for git-svn.
9921 2008-04-22 Zoltan Varga <vargaz@gmail.com>
9923 * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
9924 so instead of calling g_spawn_command_line_sync, we do everything by hand,
9925 avoiding allocations and libc functions which might deadlock.
9927 * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
9928 'no-gdb-backtrace' option is set.
9930 * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
9932 * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
9934 2008-04-21 Martin Baulig <martin@ximian.com>
9936 * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
9937 and `get_lmf_addr'; `notification_address' is no longer a pointer.
9939 2008-04-21 Martin Baulig <martin@ximian.com>
9941 * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
9942 `thread_vtable', `event_handler_ptr' and `event_handler'.
9944 2008-04-21 Martin Baulig <martin@ximian.com>
9946 * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
9947 allows delayed initialization of the `executable_code_buffer' when
9950 2008-04-21 Martin Baulig <martin@ximian.com>
9952 * mini.h (mono_debugger_create_notification_function): Removed.
9953 * tramp-*.c (mono_debugger_create_notification_function): Removed.
9955 * mdb-debug-info64.s
9956 (MONO_DEBUGGER__notification_function): Added this in the .text section.
9958 * mdb-debug-info32.s
9959 (MONO_DEBUGGER__notification_function): Added this in the .text section.
9961 * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
9962 currently only works on x86 and x86_64, so don't create it on ppc.
9964 2008-04-21 Martin Baulig <martin@ximian.com>
9966 * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
9969 (mini_method_compile): In the fp elimination check, check
9970 `debug_options.mdb_optimizations' in addition to
9971 mono_debug_using_mono_debugger().
9973 * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
9974 disable some JIT optimizations which are only disabled when
9975 running inside the debugger.
9976 Added `--help-debug' option to describe the debugging options.
9977 (parse_debug_options): New static function to parse the `--debug'
9978 options, so we can easily add more stuff in future.
9980 2008-04-20 Zoltan Varga <vargaz@gmail.com>
9982 * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
9983 the method has no body.
9985 2008-04-19 Jonathan Chambers <joncham@gmail.com>
9987 * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
9988 assembly is not allowed in MSVC 64-bit compiler.
9989 (mono_arch_cpu_init): Don't set floating point precision on MSVC build
9990 as we get floating point exceptions everywhere.
9992 * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
9993 correctly align arguments for call to throw_exception.
9994 (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
9996 Code contributed under MIT/X11 license.
9998 2008-04-19 Zoltan Varga <vargaz@gmail.com>
10000 * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
10002 2008-04-17 Zoltan Varga <vargaz@gmail.com>
10004 * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
10006 * mini-amd64.c (NEW_INS): Set cil_code.
10008 * mini.c (mini_method_compile): Move the disabling of fp elimination to here
10009 from mini-amd64.c so all debugger related logic is in one place.
10011 * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
10012 later won't have a random ip assigned to them.
10014 2008-04-16 Zoltan Varga <vargaz@gmail.com>
10016 * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
10017 the arch specific function initializes code_size.
10018 (mono_create_delegate_trampoline): Ditto.
10020 * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
10021 tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
10024 * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if
10025 running under the debugger.
10027 * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
10030 * mini.c (mini_method_compile): Set a few flags in cfg if running under the
10031 debugger. Also move the disabling of optimizations here from driver.c.
10032 (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
10035 * mini.h (MonoCompile): Add a few new flags.
10037 2008-04-15 Zoltan Varga <vargaz@gmail.com>
10039 * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
10040 so the cil_code field of created MonoInst's is properly set.
10041 (mini_select_instructions): Ditto.
10043 * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
10044 (MONO_INST_NEW_CALL): Ditto.
10046 * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
10047 in many places so the ins->cil_code field is properly initialized.
10049 * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
10052 2008-04-14 Zoltan Varga <vargaz@gmail.com>
10054 * mini.c (mini_method_compile): Print a different message when compiling a
10057 * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
10060 2008-04-11 Zoltan Varga <vargaz@gmail.com>
10062 * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
10065 * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
10067 2008-04-11 Zoltan Varga <vargaz@gmail.com>
10069 * mini.c (handle_stack_args): Make this return void since its return value was
10070 never used. Also set cfg->unverifiable for invalid IL instead of calling
10073 2008-04-10 Mark Probst <mark.probst@gmail.com>
10075 * mini.c: Make sure "this" is live in catch clauses with type
10076 variables in shared generic code.
10078 2008-04-08 Mark Probst <mark.probst@gmail.com>
10080 * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
10081 generic_class_is_reference_type() to ensure the proper behaviour
10082 when sharing generic code and the type in question is a type
10085 2008-04-08 Zoltan Varga <vargaz@gmail.com>
10087 * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
10088 race conditions when printing thread dumps. Fixes #377738.
10090 2008-04-08 Massimiliano Mantione <massi@ximian.com>
10092 aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
10093 shows up when both MonoInst arguments can cause aliasig.
10094 There is likely no way in the current JIT to trigger this problem, but
10095 it showed up in the development of generics sharing, when in a new
10096 opcode both args of an OP_GROUP can be aliases (addresses of a local).
10097 When the generics sharing code will be committed, its tests will be
10098 valid also for this bug.
10100 2008-04-08 Zoltan Varga <vargaz@gmail.com>
10102 * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
10105 * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
10108 2008-04-07 Zoltan Varga <vargaz@gmail.com>
10110 * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
10111 use a more detailed exception message for InvalidCastException.
10113 * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
10115 * driver.c (mono_main): Add --debug=casts option to turn on better
10116 InvalidCastException message details.
10118 * mini.c (mini_get_debug_options): New helper function to return the address of
10119 the debug_options variable.
10121 * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
10122 the jit_tls TLS variable.
10124 * mini.c (mono_jit_tls): New TLS variable.
10126 * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
10129 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
10131 * mini.h: Removed verifer related stuff. This code was moved to verify.c
10133 * mini.c: Removed verifer related stuff, code moved to verify.c.
10135 * driver.c: Using code from verify.c instead of mini.c.
10137 2008-04-05 Zoltan Varga <vargaz@gmail.com>
10139 * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
10142 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
10144 * mini.c (check_for_method_verify): Enabling verification of
10145 corlib if mono_verify_all is set. Bugs in the verifier preventing that
10148 2008-04-04 Zoltan Varga <vargaz@gmail.com>
10150 * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
10151 caller saved registers as well.
10153 * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
10154 saved registers as well.
10156 2008-03-30 Zoltan Varga <vargaz@gmail.com>
10158 * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
10160 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
10163 2008-03-27 Zoltan Varga <vargaz@gmail.com>
10165 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
10167 (get_call_info): Take a gsctx argument instead of 'cfg'.
10169 2008-03-26 Zoltan Varga <vargaz@gmail.com>
10171 * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
10172 mono_verify_all is set.
10174 * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
10176 * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
10178 2008-03-25 Zoltan Varga <vargaz@gmail.com>
10180 * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
10183 * driver.c mini.c mini.h: Add a --verify-all development option to test the
10184 verifier and the code generated by the compiler.
10186 2008-03-25 Mark Probst <mark.probst@gmail.com>
10188 * mini.c: Generic sharing of the non-nullable case of the box
10191 2008-03-24 Zoltan Varga <vargaz@gmail.com>
10193 * inssel.brg: Fix the build.
10195 * iltests.il.in: Add a test for lconv.ovf.u8.un.
10197 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
10199 * mini.c (mono_method_to_ir): Implement readonly for ldelema and
10200 Array:Address. Fixes #372410.
10202 * iltests.il.in: New tests for readonly prefix.
10204 2008-03-23 Zoltan Varga <vargaz@gmail.com>
10206 * mini.h mini.c mini-trampolines.c: Move trampoline related code to
10207 mini-trampolines.c.
10209 * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to
10212 * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
10214 * mini.c (mono_decompose_op_imm): New helper function.
10216 * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
10217 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
10220 * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
10221 mono_arch_output_basic_block. Fix warnings.
10223 * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
10226 2008-03-22 Zoltan Varga <vargaz@gmail.com>
10228 * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
10229 since the extra frame is now detected automatically inside the loop.
10231 * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole
10232 opts which are now in mono_peephole_ins ().
10234 * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
10236 * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
10237 frames and skip duplicate managed-to-native frames. Fixes #367665.
10239 * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
10240 opts which are now in mono_peephole_ins ().
10241 (mono_arch_peephole_pass_2): Ditto.
10243 * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
10245 * mini-codegen.c (mono_peephole_ins): New helper function containing the
10246 arch independent peephole optimizations.
10248 * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
10249 opts which are now in mono_peephole_ins ().
10251 * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
10253 * mini-s390.c (mono_arch_output_basic_block): Fix build.
10255 * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
10258 * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
10259 CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
10262 2008-03-21 Zoltan Varga <vargaz@gmail.com>
10264 * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
10265 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
10268 * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
10269 mono_arch_output_basic_block. Fix warnings.
10271 2008-03-20 Zoltan Varga <vargaz@gmail.com>
10273 * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
10276 2008-03-20 Zoltan Varga <vargaz@gmail.com>
10278 * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
10281 * iltests.il: Add new tests.
10283 2008-03-20 Kornel Pal <kornelpal@gmail.com>
10285 * mini.c: Removed Windows version macros.
10287 2008-03-20 Mark Probst <mark.probst@gmail.com>
10289 * generic-sharing.c: Put reflection types in the extensible part
10290 of the runtime generic context.
10292 * mini.c: Generic sharing of the GetTypeHandle special case of the
10293 ldtoken instruction.
10295 2008-03-20 Zoltan Varga <vargaz@gmail.com>
10297 * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
10299 * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
10301 * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for
10302 consistency with the other version on the linear IR branch.
10304 * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
10306 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
10308 * iltests.il.in: Add new tests.
10310 2008-03-19 Zoltan Varga <vargaz@gmail.com>
10312 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
10314 * iltests.il.in: Add new tests.
10316 2008-03-19 Mark Probst <mark.probst@gmail.com>
10318 * mini.c: Two variables with the same name were declared in
10319 nesting contexts and one wasn't initialized. Fixed.
10321 2008-03-19 Mark Probst <mark.probst@gmail.com>
10323 * mini.c: Generic sharing of the initobj instruction.
10325 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
10327 * mini.c: make the test to optimize ldtoken from typeof() more
10330 2008-03-18 Mark Probst <mark.probst@gmail.com>
10332 * mini.c: Generic sharing of the initobj instruction for reference
10335 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
10337 * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
10338 the mono_breakpoint_clean_code() code to perform bound checks.
10340 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
10342 * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
10343 mono_arch_patch_callsite() to include the start of the managed method
10344 to be able to perform bound checks.
10346 2008-03-17 Mark Probst <mark.probst@gmail.com>
10348 * mini.c: Generic sharing for the isinst instruction.
10350 2008-03-17 Mark Probst <mark.probst@gmail.com>
10352 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
10353 inssel-long32-mips.brg: Added opcodes for doing indirect calls
10354 with the runtime generic context argument.
10356 * mini.c: Share calls to several types of unsharable methods by
10357 putting the address of the method code in the runtime generic
10358 context and doing an indirect call.
10360 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
10363 2008-03-16 Mark Probst <mark.probst@gmail.com>
10365 * generic-sharing.c: Change due to a change in the runtime genric
10368 2008-03-15 Martin Baulig <martin@ximian.com>
10371 (mono_arch_nullify_class_init_trampoline): Add call to
10372 mono_breakpoint_clean_code() to make things work when running
10373 inside the debugger.
10376 (mono_arch_nullify_class_init_trampoline): Add call to
10377 mono_breakpoint_clean_code() to make things work when running
10378 inside the debugger.
10380 2008-03-14 Zoltan Varga <vargaz@gmail.com>
10382 * inssel-long.brg (reg): Fix 64 bit build.
10384 2008-03-14 Mark Probst <mark.probst@gmail.com>
10386 * mini.c, mini.h: Share static generic code by passing it an
10387 implicit argument pointing to the runtime generic context.
10389 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
10390 inssel-long32-mips.brg: New opcodes for calling shared static,
10391 which need to be passed the runtime generic context.
10393 * mini-amd64.c, mini-x86.c: Save the runtime generic context
10394 argument on the stack in the prologue if needed. New function for
10395 finding the runtime generic context argument from the registers
10396 saved by the trampoline.
10398 * mini-amd64.h, mini-x86.h: Specify which register to use for the
10399 runtime generic context argument.
10401 * tramp-amd64.c: Also restore the register used for the runtime
10402 generic context argument.
10404 * mini-trampoline.c: Resolve shared static calls by consulting the
10405 runtime generic context via the new argument.
10407 * generic-sharing.c: Add an argument to sharability-checking
10408 functions that specifies whether type variables should be treated
10409 as sharable type arguments.
10411 * inssel-x86.brg: Removed a superfluous, buggy rule.
10413 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
10416 2008-03-14 Martin Baulig <martin@ximian.com>
10418 * debug-debugger.c (main_thread_handler): Call
10419 mono_runtime_run_main() without sending any notifications.
10421 * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
10423 2008-03-14 Zoltan Varga <vargaz@gmail.com>
10425 * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
10427 2008-03-14 Mark Probst <mark.probst@gmail.com>
10429 * tramp-x86.c: Fixed register restore offsets in the trampoline
10430 code for ECX and EDX.
10432 2008-03-12 Geoff Norton <gnorton@novell.com>
10434 * mini-arm.h: Add some #defines for locating sp, pc, r4 with
10435 different ucontext_t implementations.
10436 * exceptions-arm.c: Use the above defines to get exceptions working on
10437 iPhone (based on a patch by Luke Howard lukeh@padl.com)
10438 * mini-arm.c: Implement iPhone icache support (based on a patch by
10439 Luke Howard lukeh@padl.com)
10441 2008-03-12 Mark Probst <mark.probst@gmail.com>
10443 * mini.c: Enable generic sharing of calls to non-static
10444 non-interface non-generic non-value-type methods.
10446 * mini-trampolines.c: Resolve calls from shared generic code.
10448 2008-03-11 Zoltan Varga <vargaz@gmail.com>
10450 * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
10452 * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
10454 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
10456 * mini.c: some fixes for the AOT compiler.
10458 2008-03-07 Zoltan Varga <vargaz@gmail.com>
10460 * cpu-amd64.md: Add clob:1 to some float opcodes.
10462 2008-03-07 Rodrigo Kumpera <rkumpera@novell.com>
10464 * mini.h: Added MiniVerifierMode enumeration.
10466 * mini.c: Added mini_verifier_set_mode to control
10467 the usage of the new verifier.
10469 * mini.c (mono_method): Integrated the new verifier.
10471 * driver.c: Extended --security option with validil and
10472 verifiable options to activate the new verifier.
10474 2008-03-07 Zoltan Varga <vargaz@gmail.com>
10476 * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation
10477 optimization to ctors taking 0 or 2 arguments too.
10479 * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
10482 * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
10484 * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
10486 2008-03-06 Zoltan Varga <vargaz@gmail.com>
10488 * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
10489 non-aot case as well.
10491 * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
10493 * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
10496 * aot-compiler.c (encode_patch): Ditto.
10498 * mini.h (G_MININT32): Fix the definition of this.
10500 2008-03-05 Zoltan Varga <vargaz@gmail.com>
10502 * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
10504 * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
10506 2008-03-04 Zoltan Varga <vargaz@gmail.com>
10508 * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for
10509 methods returning vtypes in registers.
10510 (mono_arch_allocate_vars): Ditto.
10512 * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
10514 * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().
10516 * generics.cs: Add a test from the linear IR branch.
10518 * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
10520 * mini.c (inline_method): Cache failed inline attempts.
10522 2008-03-04 Mark Probst <mark.probst@gmail.com>
10524 * mini.c: For shared methods of generic classes put the location
10525 of "this" into the MonoGenericJitInfo.
10527 * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
10528 register out of a MonoContext by register number. Add the generic
10529 sharing context as an argument to mono_arch_find_this_argument().
10531 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
10532 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
10533 for new arch function.
10535 * mini-exception.c: Handle open exception clauses in shared
10538 * mini-trampolines.c: Supply additional argument to
10539 mono_arch_find_this_argument().
10541 2008-03-04 Zoltan Varga <vargaz@gmail.com>
10543 * Makefile.am (regtests): Run the bench.exe tests last.
10545 2008-03-03 Zoltan Varga <vargaz@gmail.com>
10547 * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
10550 2008-03-02 Zoltan Varga <vargaz@gmail.com>
10552 * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
10555 * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
10557 * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
10559 * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
10560 whose class has no cctor.
10562 * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
10564 2008-03-01 Zoltan Varga <vargaz@gmail.com>
10566 * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
10569 2008-02-29 Zoltan Varga <vargaz@gmail.com>
10571 * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
10572 to be in sync with the code on the linear IR branch.
10574 * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
10576 * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
10578 2008-02-27 Zoltan Varga <vargaz@gmail.com>
10580 * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
10582 * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
10584 * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
10586 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
10588 * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
10590 * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
10593 2007-11-14 Yoichi NAKAYAMA <nakayama@pixela.co.jp>
10595 * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
10596 OP_LOADR4_MEMBASE emission.
10598 * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
10599 (mono_spillvar_offset_float): Ditto.
10601 * mini-mips.c (mono_arch_emit_prolog): Ditto.
10603 * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
10606 * basic-long.cs: Add regression tests for them.
10608 * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
10610 (mono_arch_allocate_vars): Fix representation of single-precision float
10612 (mono_arch_output_basic_block): Ditto.
10614 * inssel-mips.brg: Ditto, remove duplicate items.
10616 * mini-mips.c (emit_load_volatile_arguments): New function to handle
10617 arguments of tail calls as on other platforms.
10618 (mono_arch_output_basic_block): Handle tail calls.
10620 * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
10623 * objects.cs (test_5_pass_static_struct): Add test for it.
10625 Contributed under MIT/X11 license.
10627 2008-02-26 Zoltan Varga <vargaz@gmail.com>
10629 * Makefile.am: Use gmcs for compiling the regression tests.
10631 * *.2.cs *.2.il: Rename to *.cs and *.il.
10633 2008-02-24 Zoltan Varga <vargaz@gmail.com>
10635 * regalloc.h: Make the vassign array smaller.
10637 * mini.c (mini_method_compile): Remove an unused field in cfg.
10639 * mini-codegen.c: Add a bunch of micro optimizations.
10641 2008-02-23 Zoltan Varga <vargaz@gmail.com>
10643 * regalloc.h: Remove some unused fields.
10645 2008-02-22 Zoltan Varga <vargaz@gmail.com>
10647 * mini-amd64.c (mono_arch_patch_code): Fix a warning.
10649 * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
10651 2008-02-22 Mark Probst <mark.probst@gmail.com>
10653 * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
10655 * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
10656 trampoline: Fetch an entry from the runtime generic context. If
10657 it's NULL, jump to the actual trampoline to fill the runtime
10658 generic context. Otherwise, return it.
10660 * mini.c: Call the lazy fetch trampoline to get entries out of the
10661 runtime generic context.
10663 * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
10664 tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
10665 tramp-sparc.c: Stubs for the lazy fetch trampoline.
10667 2008-02-21 Mark Probst <mark.probst@gmail.com>
10669 * mini.c: Fetch data out of the extensible part of the runtime
10670 generic context instead of calling a helper function.
10672 * generic-sharing.c: Some functions moved into
10673 metadata/generic-sharing.c. Helper function for fetching other
10674 types now checks and asserts against extensible rgctx (just for
10675 debugging purposes - the helper function isn't called anymore
10676 unless for debugging).
10678 2008-02-21 Zoltan Varga <vargaz@gmail.com>
10680 * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
10681 for tail calls up to the point that the tests in iltests.exe run. Also add a
10682 dummy CKFINITE implementation.
10683 (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
10684 needed for trampoline LMF frames.
10686 * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for
10687 trampoline LMF frames.
10689 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
10691 * mini.c (inline_method): clean any pending loader error when inlining fail.
10692 Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
10694 2008-02-21 Zoltan Varga <vargaz@gmail.com>
10696 * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
10698 * aot-runtime.c (decode_patch_info): Ditto.
10700 * mini.c (mono_resolve_patch_target): Ditto.
10702 * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
10705 * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
10707 * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
10708 if it references an icall address.
10710 2008-02-20 Zoltan Varga <vargaz@gmail.com>
10712 * cpu-s390x.md: Remove some more unused opcodes.
10714 * cpu-s390x.md: Remove some unused opcodes.
10716 * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
10717 mono_op_imm_to_op ().
10719 * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
10720 instead of a switch statement.
10722 * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
10723 the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
10725 * mini-codegen.c: Eliminate rassign macro which is no longer needed.
10727 * mini-codegen.c: Remove unused mono_regstate2_... functions.
10729 * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
10732 2008-02-19 Zoltan Varga <vargaz@gmail.com>
10734 * driver.c (mono_main): Improve error reporting when an assembly cannot be
10735 opened. Fixes #362607.
10737 * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
10739 * iltests.il.in: Add a test for static methods in interfaces.
10741 2008-02-18 Zoltan Varga <vargaz@gmail.com>
10743 * genmdesc.c (build_table): Fix a crash on older glib versions.
10745 * cpu-sparc.md: Remove some unused opcodes.
10747 * genmdesc.c: Error out if the .md contains CEE_ opcodes if
10748 MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
10750 * cpu-amd64.md: Remove some unused opcodes.
10752 * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
10753 like the other opcodes.
10755 2008-02-17 Zoltan Varga <vargaz@gmail.com>
10757 * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
10759 * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
10761 * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
10762 variables 'cfg' instead of 'm' for consistency.
10764 * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
10766 * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
10767 argument holding the vtype return address, to avoid the ambigious use of
10768 cfg->ret for this purpose.
10770 * mini.c (NEW_RETLOADA): Use vret_addr if set.
10772 * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
10774 * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
10775 new mono_print_ins () function which only takes one argument.
10777 2008-02-15 Zoltan Varga <vargaz@gmail.com>
10779 * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
10782 2008-02-14 Zoltan Varga <vargaz@gmail.com>
10784 * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
10786 * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
10788 * mini-x86.c: Sync with the version on the linear IR branch by adding new
10789 opcodes and other small changes.
10791 * mini-ops.h: Add some new opcodes from the linear IR branch.
10793 * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
10795 * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
10796 opcodes, use the REG_MEMBASE opcodes instead.
10798 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
10799 opcodes, use the REG_MEMBASE opcodes instead.
10801 * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
10804 * mini.c (mono_op_imm_to_op): New helper function.
10806 * mini-ops.h: Add some opcodes from linear IR branch.
10808 2008-02-13 Zoltan Varga <vargaz@gmail.com>
10810 * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov
10813 2008-02-12 Zoltan Varga <vargaz@gmail.com>
10815 * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to
10818 * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
10820 2008-02-09 Zoltan Varga <vargaz@gmail.com>
10822 * aot-compiler.c (emit_method_code): Add an assert.
10824 * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
10825 the IMT code so it is AOT friendly. Enable AOT for methods which call interface
10828 2008-02-08 Zoltan Varga <vargaz@gmail.com>
10830 * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for
10831 some load/store opcodes so they are consistent.
10832 (mono_arch_emit_prolog): Simplify some code.
10834 * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
10836 * objects.cs: Add tests for large argument offsets on ARM.
10838 * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large
10839 stack offsets. Fixes #359651.
10841 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
10843 * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
10845 * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
10847 * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
10849 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
10851 * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
10852 rid of CEE_CONV_R_UN.
10854 * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
10856 2008-02-07 Zoltan Varga <vargaz@gmail.com>
10858 * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
10860 * mini.c (mono_normalize_opcodes): Add some more opcodes.
10862 * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
10864 * cpu-amd64.md: Remove some unused opcodes.
10866 * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
10868 * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
10870 * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make
10871 arch specific functions for its parts. Call the peephole pass after local
10872 regalloc so the prolog can compute a more accurate max_offset.
10874 * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
10875 the corresponding OP_I/OP_L opcodes.
10877 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
10879 * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
10881 2008-02-06 Zoltan Varga <vargaz@gmail.com>
10883 * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
10884 as they are handled in mini.c.
10886 * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
10888 * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
10889 case since it is handled in mini.c.
10891 * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
10893 * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
10895 * *.c: Use the new opcodes in the IR and back end code.
10897 * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
10899 * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
10901 2008-02-06 Mark Probst <mark.probst@gmail.com>
10903 * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
10904 an assert because it has a race condition.
10906 2008-02-06 Zoltan Varga <vargaz@gmail.com>
10908 * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
10910 * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
10912 * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
10914 * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
10915 use OP_MOVE/OP_FMOVE/OP_ICONST instead.
10917 2008-02-05 Zoltan Varga <vargaz@gmail.com>
10919 * cpu-amd64.md (move): Correct the maximum size of move.
10921 2008-02-05 Mark Probst <mark.probst@gmail.com>
10923 * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
10924 the generic class init trampoline to return quickly if the class
10927 2008-02-04 Zoltan Varga <vargaz@gmail.com>
10929 * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
10930 issues where an 32 bit callsite cannot be patched by a 64 bit address.
10932 2008-02-03 Zoltan Varga <vargaz@gmail.com>
10934 * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
10937 2008-01-31 Zoltan Varga <vargaz@gmail.com>
10939 * objects.cs: Add some soft-float tests.
10941 * mini.c: Fix a couple more soft-float issues.
10943 * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
10945 * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
10946 avoid a REX prefix.
10948 2008-01-30 Zoltan Varga <vargaz@gmail.com>
10950 * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
10951 exception happens while compiling a virtual method.
10953 2008-01-29 Zoltan Varga <vargaz@gmail.com>
10955 * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
10957 * mini-sparc.c: Fix build.
10959 * mini-sparc.c (get_call_info): Add support for generic sharing.
10961 * mini-exceptions.c: Add a FIXME.
10963 2008-01-27 Zoltan Varga <vargaz@gmail.com>
10965 * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
10966 altstack handling code.
10968 * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
10970 * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
10972 * mini-s390.c: Add support for generic sharing.
10974 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
10976 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
10978 * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
10980 * mini-s390x.c: Add support for generic sharing.
10982 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
10984 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
10986 * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
10987 can be used since it takes a 16 bit signed immediate.
10989 * inssel-s390x.brg: Fix OP_SETRET.
10991 * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
10993 * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
10995 * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
10997 * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
10999 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
11002 * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
11005 * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
11006 of the unused mono_arch_patch_delegate_trampoline stuff.
11008 2008-01-26 Zoltan Varga <vargaz@gmail.com>
11010 * basic-long.cs: Move the fp related tests to basic-float.cs.
11012 * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
11014 * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
11016 * basic-calls.cs: Add a test for proper float argument passing.
11018 * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
11019 if the context corresponds to an exception received through a signal.
11021 * exceptions.cs: Add a test for nullref handling at the start of a try
11024 * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
11026 * jit-icalls.c (mono_break): New JIT icall.
11028 * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
11030 * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
11032 2008-01-25 Zoltan Varga <vargaz@gmail.com>
11034 * cpu-*.md: Get rid of unused opcodes.
11036 * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
11038 * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
11041 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
11044 * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
11045 the arch independent trampoline code in mini-trampolines.c.
11047 * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
11049 * mini.c (get_runtime_generic_context_ptr): Fix a warning.
11051 * mini-s390.h: Remove an unused define.
11053 * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
11054 the arch independent trampoline code in mini-trampolines.c.
11056 * mini-arm.c (mono_arch_emit_prolog): Fix build.
11058 2008-01-24 Zoltan Varga <vargaz@gmail.com>
11060 * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
11062 * mini-s390.c (mono_arch_emit_prolog): Fix build.
11064 * mini-s390x.c (mono_arch_emit_prolog): Fix build.
11066 * mini-ppc.c (mono_arch_emit_prolog): Fix build.
11068 * cpu-amd64.md: Use smaller sizes for int opcodes.
11070 * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
11072 * *.cs: Add some tests from the linear-ir branch. Move structs tests to
11075 * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
11078 * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
11079 instead of though a pointer to save an indirection when accessing elements of
11082 * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
11084 (NOT_IMPLEMENTED): New helper macro.
11085 (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
11088 * *.c: Use the new helper macro.
11090 2008-01-21 Zoltan Varga <vargaz@gmail.com>
11092 * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
11094 2008-01-20 Zoltan Varga <vargaz@gmail.com>
11096 * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
11099 2008-01-18 Zoltan Varga <vargaz@gmail.com>
11101 * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
11102 profiling is enabled.
11104 * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
11106 (mono_arch_emit_prolog): Add more first bblock optimizations.
11108 * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
11109 in order if possible.
11110 (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
11111 bblock, since the arguments are still in their original registers.
11113 * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
11115 2008-01-17 Zoltan Varga <vargaz@gmail.com>
11117 * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
11120 * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
11123 * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
11125 * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
11126 process async exceptions received while in unmanaged code.
11128 * mini.c (mini_init): Install a callback with the runtime which will be called
11129 when a thread receives an async exception while in unmanaged code.
11131 * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
11133 * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
11135 2008-01-16 Wade Berrier <wberrier@novell.com>
11142 2008-01-16 Zoltan Varga <vargaz@gmail.com>
11144 * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
11145 compilation with sun cc.
11147 * cpu-*.md: Fix the build.
11149 * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
11151 * mini-amd64.h: Add some comments to the MonoLMF structure.
11153 * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
11155 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
11156 in the LMF structure if possible. This saves two instructions in the
11157 managed->native wrappers.
11159 * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
11161 2008-01-16 Mark Probst <mark.probst@gmail.com>
11163 * generic-sharing.c: New type argument lookup code which uses the
11164 runtime generic context template.
11166 2008-01-15 Zoltan Varga <vargaz@gmail.com>
11168 * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
11170 * mini-arm.c (add_general): Fix arm eabi parameter passing.
11171 (mono_arch_output_basic_block): Fix localloc implementation.
11173 * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
11175 * mini-ia64.c (peephole_pass): Fix ia64 build.
11177 * mini-amd64.c (peephole_pass): Fix a warning.
11179 * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
11180 at a constant offset from sp/fp.
11182 * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
11183 instead of obtaining it from *lmf in the managed method case.
11185 2008-01-14 Zoltan Varga <vargaz@gmail.com>
11187 * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
11189 Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
11191 * mini.h (MonoInstList): New type.
11192 (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
11193 __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
11194 MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
11195 __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
11196 MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
11197 MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
11198 MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
11199 MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
11200 MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
11201 MONO_INST_LIST_FOR_EACH_PREV_SAFE,
11202 MONO_INST_LIST_FOR_EACH_ENTRY,
11203 MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
11204 MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
11205 mono_inst_list_first, mono_inst_list_last,
11206 mono_inst_list_next, mono_inst_list_prev): New instruction
11207 list handling interfaces.
11208 (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
11209 list head 'ins_list'.
11210 (MonoInst): Replace next pointer with list head 'node'.
11211 (MonoCallInst): Make 'out_args' a MonoInstList.
11212 (MONO_INST_NEW_CALL): Explicitly init ->out_args.
11213 (MonoCompile): Delete reverse_inst_list and
11214 reverse_inst_list_len.
11215 * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
11216 mono_arch_lowering_pass, mono_arch_local_regalloc,
11217 mono_arch_output_basic_block, mono_arch_emit_prolog):
11218 Convert to new instruction lists.
11219 (insert_after_ins): Delete.
11220 * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
11222 * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
11223 * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
11224 split_bblock, mono_add_ins_to_end, mono_emit_call_args,
11225 mono_emulate_opcode, mono_emit_load_got_addr,
11226 inline_method, mono_method_to_ir, mono_print_bb_code,
11227 print_dfn, decompose_pass, nullify_basic_block,
11228 replace_out_block_in_code, remove_block_if_useless,
11229 merge_basic_blocks, move_basic_block_to_end,
11230 try_unsigned_compare, optimize_branches, mono_print_code,
11231 mini_select_instructions, remove_critical_edges): Likewise.
11232 * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
11233 peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
11234 mono_arch_output_basic_block, mono_arch_emit_prolog):
11236 * mini-mips.c (mono_arch_call_opcode, peephole_pass,
11237 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
11238 mono_arch_output_basic_block): Likewise.
11239 (inst_list_prepend, insert_after_ins): Delete.
11240 * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
11241 MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
11243 * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
11244 peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
11245 mono_arch_emit_prolog): Likewise.
11246 * cfold.c (mono_constant_fold): Likewise.
11247 * liveness.c (visit_bb, mono_analyze_liveness,
11248 optimize_initlocals): Likewise.
11249 * ssapre.c (dump_code, process_bb, code_motion): Likewise.
11250 * graph.c (mono_draw_code_cfg): Likewise.
11251 * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
11252 mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
11253 mono_ssa_cprop): Likewise.
11254 * abcremoval (get_relations_from_previous_bb, process_block):
11256 * local-propagation (mono_cprop_invalidate_values,
11257 mono_local_cprop_bb): Likewise.
11258 * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
11259 peephole_pass, mono_arch_output_basic_block,
11260 mono_arch_emit_prolog): Likewise.
11261 * mini-arm.c (mono_arch_call_opcode, peephole_pass,
11262 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
11263 mono_arch_emit_prolog): Likewise.
11264 (insert_after_ins): Delete.
11265 * aliasing.c (print_code_with_aliasing_information,
11266 mono_build_aliasing_information, mono_aliasing_deadce):
11267 Convert to new instruction lists.
11268 * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
11269 peephole_pass, NEW_INS, mono_arch_lowering_pass,
11270 mono_arch_local_regalloc, mono_arch_output_basic_block):
11272 (insert_after_ins): Delete.
11273 * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
11274 peephole_pass, mono_arch_output_basic_block): Convert to
11275 new instruction lists.
11276 * mini-codegen (InstList, inst_list_prepend,
11277 insert_after_ins): Delete.
11278 (insert_before_ins, get_register_force_spilling,
11279 get_register_spilling, free_up_ireg, free_up_reg,
11280 create_copy_ins, create_spilled_store, alloc_int_reg,
11281 alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
11282 to new instruction lists.
11283 * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
11284 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
11285 mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
11286 (insert_after_ins): Delete.
11287 * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
11288 mono_arch_local_regalloc, mono_arch_output_basic_block,
11289 mono_arch_call_opcode): Convert to new instruction lists.
11290 (insert_after_ins): Delete.
11291 * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
11292 peephole_pass, mono_arch_output_basic_block,
11293 mono_arch_emit_prolog): Convert to new instruction lists.
11295 2008-01-11 Zoltan Varga <vargaz@gmail.com>
11297 * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
11299 * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
11302 * Makefile.am (version.h): Make this work with non-bash shells.
11304 2008-01-10 Zoltan Varga <vargaz@gmail.com>
11306 * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
11308 2008-01-08 Zoltan Varga <vargaz@gmail.com>
11310 * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
11311 the InitializeArray optimization.
11313 2008-01-06 Zoltan Varga <vargaz@gmail.com>
11315 * mini.c driver.c: Don't include os/gc_wrapper.h.
11317 2008-01-05 Zoltan Varga <vargaz@gmail.com>
11319 * mini.c (print_jit_stats): Print GC statistics if available.
11321 2008-01-04 Zoltan Varga <vargaz@gmail.com>
11323 * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
11325 2007-12-29 Zoltan Varga <vargaz@gmail.com>
11327 * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
11329 2007-12-26 Zoltan Varga <vargaz@gmail.com>
11331 * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
11333 * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
11335 * driver.c (mono_main): Ditto.
11337 2007-12-23 Zoltan Varga <vargaz@gmail.com>
11339 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
11341 * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
11342 in the vtable can't be encoded.
11343 (compile_method): Ditto.
11345 2007-12-21 Zoltan Varga <vargaz@gmail.com>
11347 * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
11350 * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
11353 * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
11354 the top LMF entry belongs to the current method.
11356 * mini.c: Update after renaming of mono_thread_get_pending_exception ().
11358 2007-12-20 Zoltan Varga <vargaz@gmail.com>
11360 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
11362 * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
11364 * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
11366 * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
11368 * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
11370 * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
11373 * basic-float.cs: Add an ulong->double cast test.
11375 2007-12-15 Zoltan Varga <vargaz@gmail.com>
11377 * mini.c (mono_method_to_ir): Fix a warning.
11379 2007-12-14 Zoltan Varga <vargaz@gmail.com>
11381 * mini-ops.h: Add OP_SWITCH.
11383 * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
11384 CEE_SWITCH in back-end code, use OP_SWITCH instead.
11386 2007-12-11 Geoff Norton <gnorton@novell.com>
11388 * mini-s390x.c: Minor change to the MAX() define to allow
11389 it to compile with other gcc versions.
11391 2007-12-11 Geoff Norton <gnorton@novell.com>
11394 * mini-s390x.c: Implement sext_i4 to fix the build on s390x
11396 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
11398 exceptions-arm.c (mono_arch_get_restore_context): Restore
11401 exceptions-arm.c (throw_exception): Save the frame pointer.
11402 This is a partial fix for #323747. Only the client side is
11405 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
11407 * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
11408 was using an unrelated variable to log the class which
11409 needed the cctor to be called. This was crashing on arm.
11411 2007-12-09 Robert Jordan <robertj@gmx.net>
11413 * mini-x86.c (mono_arch_emit_epilog):
11414 Consider all kinds of 64-bit types. Fixes #323114.
11416 2007-12-08 Zoltan Varga <vargaz@gmail.com>
11418 * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
11420 2007-12-07 Zoltan Varga <vargaz@gmail.com>
11422 * mini-amd64.c (peephole_pass): Add a missing instruction check.
11424 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
11426 * mini.c: run type ctor before allocating an object, not only
11427 when running it's constructor method (fixes at least part of bug #342507).
11429 2007-12-07 Zoltan Varga <vargaz@gmail.com>
11431 * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
11433 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
11434 * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
11437 * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
11438 mono_generic_class_init_trampoline () the same as it is done with the other
11441 * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
11442 aot-runtime.c aot-compiler.c: Implement AOT support.
11444 2007-12-07 Mark Probst <mark.probst@gmail.com>
11446 * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
11447 build for archs which don't have the vtable trampoline defined
11450 2007-12-07 Zoltan Varga <vargaz@gmail.com>
11452 * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
11454 * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
11456 * mini-trampolines.c (mono_get_trampoline_func): New helper function.
11458 * tramp-<ARCH>.c: Use the new helper function.
11460 2007-12-07 Mark Probst <mark.probst@gmail.com>
11462 * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
11463 trampoline call, which takes a vtable argument.
11465 * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
11466 OP_TRAMPCALL_VTABLEs like other calls.
11468 * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
11469 register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
11470 call. Implemented a support function which fetches the vtable
11471 from a register set.
11473 * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
11474 Implemented a generic class init trampoline, using the
11475 OP_TRAMPCALL_VTABLE opcode.
11477 * mini.c: Implemented static field access when sharing generic
11478 code. This implies initing the class using the new
11479 OP_TRAMPCALL_VTABLE call.
11481 2007-12-07 Mark Probst <mark.probst@gmail.com>
11483 * mini.c: Don't compile methods with sharing enabled if their
11484 classes are disabled for sharing.
11486 2007-12-06 Zoltan Varga <vargaz@gmail.com>
11488 * inssel.brg: Add a missing sign extension to the GETCHR and array access
11489 opcodes. Fixes #346563.
11491 * objects.cs: Add a new test.
11493 * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
11495 * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
11496 HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
11498 2007-12-06 Zoltan Varga <vargaz@gmail.com>
11500 * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
11502 2007-12-03 Zoltan Varga <vargaz@gmail.com>
11504 * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
11507 2007-12-02 Zoltan Varga <vargaz@gmail.com>
11509 * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
11511 * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
11512 optimization in the AOT case.
11514 2007-11-30 Zoltan Varga <vargaz@gmail.com>
11516 * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
11518 * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
11520 * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
11522 * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
11524 * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
11525 is created by the inlined delegate ctor.
11527 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
11529 * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
11531 2007-11-29 Zoltan Varga <vargaz@gmail.com>
11533 * cpu-x86.md: Fix the length of ckfinite.
11535 2007-11-28 Zoltan Varga <vargaz@gmail.com>
11537 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
11539 * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
11540 (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
11542 * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
11544 * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
11545 OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
11547 2007-11-28 Martin Baulig <martin@ximian.com>
11550 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
11551 after creating the trampoline.
11553 2007-11-27 Zoltan Varga <vargaz@gmail.com>
11555 * aot-runtime.c (load_aot_module): Check runtime version if needed.
11557 * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
11560 * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
11561 instead of the calling method to help AOT.
11563 * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
11565 2007-11-26 Zoltan Varga <vargaz@gmail.com>
11567 * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
11570 2007-11-23 Zoltan Varga <vargaz@gmail.com>
11572 * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
11574 * aot-compiler.c (compile_method): Correct check for generic method definitions.
11575 (encode_method_ref): No need to handle generic method definitions specially.
11577 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
11579 * aot-runtime.c (decode_klass_ref): Clean this up and rename from
11582 * aot-compiler.c (encode_klass_ref): Clean this up and rename from
11584 (compile_method): Enable generic sharing.
11586 2007-11-22 Zoltan Varga <vargaz@gmail.com>
11588 * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
11589 (mini_method_compile): Add preliminary support for AOTing shared generic code.
11591 * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
11594 * mini-trampolines.c: Fix a warning.
11596 * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
11598 (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
11599 (generic_class_is_reference_type): Remove unused function.
11601 * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
11602 in the generic vtable trampoline case.
11604 * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
11606 * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
11607 return an AOT method based on a vtable slot.
11609 * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
11611 * mini.c (mini_get_vtable_trampoline): Export this.
11613 2007-11-22 Martin Baulig <martin@ximian.com>
11616 (MonoDebuggerInfo): Move `debugger_version' up.
11618 2007-11-22 Martin Baulig <martin@ximian.com>
11621 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
11623 * mini-trampolines.c
11624 (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
11625 after compiling the method.
11627 2007-11-20 Martin Baulig <martin@ximian.com>
11630 (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
11631 (mono_debugger_remove_breakpoint): Likewise.
11632 (mono_debugger_check_breakpoints): Likewise.
11634 * debug-debugger.c: Implement the new breakpoint interface here.
11636 2007-11-18 Zoltan Varga <vargaz@gmail.com>
11638 * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
11639 CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
11641 * mini-x86.c (mono_arch_output_basic_block): Ditto.
11643 2007-11-17 Zoltan Varga <vargaz@gmail.com>
11645 * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
11647 * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
11650 * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
11653 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
11654 returning a vtype in a register.
11656 * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
11657 here from the arch specific code.
11659 * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
11662 * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
11663 (mono_arch_emit_prolog): Increment maximum prolog size.
11665 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
11666 START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
11668 * mini-x86.c (get_call_info): Receive a MonoCompile instead of a
11669 MonoGenericSharingContext.
11671 * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
11672 MonoGenericSharingContext. Allocate memory from the cfg mempool.
11674 2007-11-15 Mark Probst <mark.probst@gmail.com>
11676 * mini.c, mini.h, generic-sharing.c: Functions for producing code
11677 which extract fields out of the runtime generic context. Full
11678 sharing of the NEWARR opcode.
11680 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
11682 * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
11683 --enable-minimal=ssa.
11685 2007-11-13 Zoltan Varga <vargaz@gmail.com>
11687 * mini-trampolines.c (mono_delegate_trampoline): Update after
11688 mono_marshal_get_delegate_invoke () signature change.
11690 2007-11-13 Mark Probst <mark.probst@gmail.com>
11692 * mini.c: Removed the shared context in favor of the generic
11693 sharing context. Allocate the MonoJitInfo structure with room for
11694 the generic sharing context if it's needed.
11696 * mini.h: Remove MonoGenericSharingContext declaration. It's in
11697 domain-internals.h now.
11699 * mini-x86.c: Pass the generic sharing context to get_call_info ().
11701 * generic-sharing.c: Several changes for working without a shared
11702 context and instead operating on open types instead.
11704 2007-11-12 David S. Miller <davem@davemloft.net>
11706 * inssel-sparc.brg: Fix double instruction emit.
11708 2007-11-12 Zoltan Varga <vargaz@gmail.com>
11710 * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
11711 Get/Set/Address methods.
11713 * mini.c debug-debugger.c mini-trampolines.c: Update after
11714 mono_marshal_get_delegate_invoke signature change.
11716 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
11718 * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
11719 This can happens with dynamic methods. Fixes the other bug in #322722.
11721 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
11723 * tramp-arm.c (mono_arch_patch_callsite): Support patching
11726 * mini-arm.c (arm_patch): Implement patching of BX call
11727 sequence. Fixes one of the bugs in #322722.
11729 2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
11731 * mini-sparc.c (mono_arch_flush_icache): Make more efficient
11732 under Linux. We only need to flush every 32-byte cache line.
11734 2007-11-07 Massimiliano Mantione <massi@ximian.com>
11737 move_basic_block_to_end: Add branches when needed, eventually creating
11739 optimize_branches: added a parameter that tells if it's ok to create
11740 new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
11741 and avoid calling move_basic_block_to_end when it's not ok.
11744 2007-11-07 Mark Probst <mark.probst@gmail.com>
11746 * mini.c: Abort inlining call to InitializeArray if something
11747 looks wrong. Let the icall handle it, which now has proper safety
11750 2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
11752 * mini.c (mono_spill_call): add support for soft-float.
11754 * mini.c (mono_method_to_ir): add support for soft-float
11755 to inlined functions that return float.
11757 * mini.c (mono_method_to_ir): add support for soft-float
11758 to cee_stsfld opcode on float fields.
11760 2007-11-05 Geoff Norton <gnorton@novell.com>
11762 * mini-x86.h: Fix the structure access for X86 Leopard.
11765 2007-11-05 Martin Baulig <martin@ximian.com>
11767 * mini-trampolines.c
11768 (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
11769 after compiling the method to notify the debugger.
11771 2007-11-05 Martin Baulig <martin@ximian.com>
11773 * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
11775 2007-11-02 Zoltan Varga <vargaz@gmail.com>
11777 * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
11778 David Miller <davem@davemloft.net>. Allow larger offsets in branches.
11780 2007-11-01 Zoltan Varga <vargaz@gmail.com>
11782 * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
11783 native-to-managed wrappers.
11785 2007-11-01 Geoff Norton <gnorton@novell.com>
11787 * mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
11790 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
11792 * mini.c, mini-x86.c: when getting back from unmanaged code
11793 to managed via a marshaled delegate we also need to set the
11796 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
11798 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
11801 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
11803 * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
11804 let the debugger or other external agents to tell the JIT when
11805 a sw breakpoint has been inserted in the code that the JIT needs
11806 to be able to inspect.
11808 2007-10-31 Martin Baulig <martin@ximian.com>
11811 (MonoDebuggerInfo): Remove `runtime_class_init'.
11813 2007-10-30 Martin Baulig <martin@ximian.com>
11816 (mono_debugger_thread_created): Added `MonoThread *' argument.
11817 (mono_debugger_extended_notification): New public method.
11818 (mono_debugger_trampoline_compiled): New public method.
11821 (MonoDebuggerThreadInfo): Added `thread' and
11822 `extended_notifications' fields.
11825 (debugger_executable_code_buffer): New static variable.
11828 (MonoDebuggerInfo): Added `executable_code_buffer',
11829 `executable_code_buffer_size', `breakpoint_info_area',
11830 `breakpoint_table' and `breakpoint_table_size'.
11832 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
11834 * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
11835 that IP either is an unused value or the vtable pointer. IMT
11836 calls use vtable + offset now. Reduced by almost half the size
11839 2007-10-26 Jonathan Chambers <joncham@gmail.com>
11841 * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
11842 defines to access param registers. Replace long usage with
11843 gsize as sizeof(long) != sizeof(void*) on Win64.
11845 * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
11846 on Win64. Fix intrinsic, use _AddressOfReturnAddress
11847 instead of non-existant _GetAddressOfReturnAddress.
11849 * tramp-amd64.c: Use AMD64_ARG_REG# defines to access
11850 param registers. Save/restore %rdi and %rsi in MonoLMF.
11852 * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
11853 param registers. Modify (throw_exception) signature to take
11854 %rdi and %rsi on Win64.
11856 Code is contributed under MIT/X11 license.
11858 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11860 * helpers.c: unlink debugging output files.
11862 2007-10-25 Zoltan Varga <vargaz@gmail.com>
11864 * mini.c: Move mono_create_ftnptr () to object.c.
11866 2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
11868 * helpers.c (mono_disassemble_code): MonoCompile parameter is now
11869 optional. This function can now be used to disassemble code generated
11870 outside the JIT such as trampolines and IMT thunks.
11872 * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
11874 * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
11875 vtable pointer from a ldr instruction.
11877 * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
11878 new IMT call sequence.
11880 * mini-arm.c (mono_arch_output_basic_block): emit the IMT
11881 call sequence for interface invocations.
11883 * mini-arm.c (mono_arch_emit_imt_argument): added, required
11884 for imt support. This function is empty since IMT on ARM requires no
11885 special handling on the IR side.
11887 * mini-arm.c (mono_arch_find_imt_method): added, required for
11890 * mini-arm.c (mono_arch_find_this_argument): added, required
11893 * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
11894 a ldr instruction to load a value stored in the code stream.
11896 * mini-arm.c (mono_arch_build_imt_thunk):added, required
11900 2007-10-23 Zoltan Varga <vargaz@gmail.com>
11902 * mini.c (mini_init): Install the jump trampoline callback.
11904 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11906 * mini-trampolines.c: handle synchronized methods with the common
11907 vtable trampoline (bug #335601).
11909 2007-10-17 Zoltan Varga <vargaz@gmail.com>
11911 * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
11913 * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
11916 * mini-ia64.h mini-ia64.c: Add support for IMT.
11918 * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
11919 prolog. Fixes #331958.
11921 2007-10-15 Zoltan Varga <vargaz@gmail.com>
11923 * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
11925 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11927 * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
11930 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11932 * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
11935 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
11937 * mini-x86.c, mini-x86.h: x86 support for the common vtable
11940 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
11942 * mini-trampolines.c: changed the magic rampoline to understand
11943 the common vtable trampoline method: the method to invoke is
11944 determined by the vtable displacement of the call.
11946 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11948 * mini.c, mini.h: register the common vtable trampoline if the
11949 architecture supports it.
11951 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11953 * cpu-amd64.md: use the correct max length for tls_get.
11955 2007-10-14 Zoltan Varga <vargaz@gmail.com>
11957 * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
11958 CEE_STELEM_ANY. Fixes #333696.
11960 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
11962 * exceptions-x86.c: provide more graceful handling of the case where
11963 we followed a bogus function pointer from managed code (bug #332866).
11965 2007-10-11 Mark Probst <mark.probst@gmail.com>
11967 * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
11968 replaces the generic_shared flag and will carry more information
11971 * generic-sharing.c: Added mini_type_stack_size() which allows
11972 allows open types if given a generic sharing context.
11973 mini_get_basic_type_from_generic() takes a
11974 MonoGenericSharingContext* instead of a MonoCompile* now.
11976 * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
11977 mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
11978 mini-sparc.c, mini-x86.c: Trivial changes required by the two
11979 changes above. Just passing arguments through to the right
11982 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11984 * mini-arm.c: unify the call emission to emit_code_seq().
11986 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
11988 * tramp-arm.c: reduced the trampoline size.
11990 2007-10-10 Mark Probst <mark.probst@gmail.com>
11992 * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
11993 variable handling out of arch-specific code.
11995 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
11997 * mini-arm.c: implemented fast delegate dispatch.
11999 2007-10-09 Zoltan Varga <vargaz@gmail.com>
12001 * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
12002 that fp elimination is turned off if the space required by locals is too
12003 big. Fixes #331958.
12005 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
12007 * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
12008 ARM to the new style trampoline.
12010 2007-10-09 Zoltan Varga <vargaz@gmail.com>
12012 * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
12014 * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
12016 2007-10-09 Martin Baulig <martin@ximian.com>
12019 (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
12020 `field_info_offset_offset'.
12022 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
12024 * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
12025 removed more internal usage of the r11 register and made it available
12026 to the register allocator.
12028 2007-10-08 Mark Probst <mark.probst@gmail.com>
12030 * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
12031 when sharing generics and treat type variables as references.
12033 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
12035 * mini-ppc.c: started removing the internal uses of register r11
12036 to eventually allow the register allocator to manage it as an
12037 additional available register.
12039 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
12041 * tramp-amd64.c: fixed memory corruption in the trampoline generation.
12043 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
12045 * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
12046 specific trampolines as they are not performance critical as a jump
12047 target (maybe align as before only for AOT code?). This saves about
12048 200 KB of native code on x86 for monodevelop startup.
12050 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
12052 * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
12053 monodevelop startup.
12055 2007-10-06 Zoltan Varga <vargaz@gmail.com>
12057 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
12059 * mini-sparc.h mini-sparc.c: Implement IMT support.
12061 * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
12062 its smaller and doesn't clobber sparc_g1.
12064 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
12066 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
12068 * mini-ppc.c: optimized the size of the IMT thunks a bit.
12070 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
12072 * mini-ppc.c: implemented fast delegate invocation.
12074 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
12076 * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
12078 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
12080 * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
12081 code to the new style trampoline in preparation for IMT support.
12083 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
12085 * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
12086 systems already. This also reduces the specific trampiline sizes and
12087 prepares for the use of r12 as the IMT identifier register.
12089 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
12091 * mini-mips.h: endianess fix (simplified from a patch by
12092 Thomas Kunze <thommy@tabao.de>, bug #323737).
12094 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
12096 * exceptions-ppc.c, mini-ppc.h: refactor to use macros
12097 to access ucontext fields and enable netbsd support
12098 (partially from Magnus Henoch <mange@freemail.hu>).
12100 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
12102 * genmdesc.pl: patch from Henryk Plotz <henryk@openmoko.org> to
12103 use the preprocessor from the CPP env var if it is set.
12105 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
12107 * mini-trampolines.c: fixed an assertion and moved it earlier in the
12108 code, before interface_offset gets used.
12110 2007-10-02 Zoltan Varga <vargaz@gmail.com>
12112 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
12113 mono_class_setup_vtable () before accessing klass->vtable.
12115 2007-10-01 Zoltan Varga <vargaz@gmail.com>
12117 * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
12120 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
12122 * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
12123 IMT slots (this saves hundreds of KB of memory in programs like
12124 IronPython and Monodevelop).
12126 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
12128 * mini.c: print the delegate counter.
12130 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
12132 * mini-x86.c: make it easier to enable the debugging code for IMT
12135 2007-09-28 Martin Baulig <martin@ximian.com>
12138 (MonoDebuggerMetadataInfo): Add `klass_image_offset',
12139 `mono_method_klass_offset' and `mono_method_token_offset'.
12141 2007-09-20 Mark Probst <mark.probst@gmail.com>
12143 * mini.c: First generics sharing implementation. Can only share
12144 in very simple cases. If sharing doesn't work it falls back to
12145 dedicated compilation.
12147 * mini.h: Flag in MonoCompile to specify whether generic
12148 compilation is shared. Flags enum for marking which generic inst
12149 of a context is used. Prototypes for helper functions.
12151 * generic-sharing.c: Helper functions for generic method sharing.
12153 * optflags-def.h: Optimization flag (gshared) for enabling generic
12154 method sharing added.
12156 * Makefile.am: generic-sharing.c added.
12158 2007-09-19 Daniel Nauck <dna@mono-project.de>
12160 * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
12162 2007-09-19 Massimiliano Mantione <massi@ximian.com>
12163 * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
12166 2007-09-19 Martin Baulig <martin@ximian.com>
12168 * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
12169 mono_debug_cleanup() is now part of mono_cleanup().
12171 2007-09-18 Zoltan Varga <vargaz@gmail.com>
12173 * driver.c (mono_main): Fix a warning.
12175 2007-09-17 Zoltan Varga <vargaz@gmail.com>
12177 * aot-compiler.c: Optimize various parts when processing large assemblies.
12180 * mini.c (mono_patch_info_hash): Improve hash function.
12182 2007-09-14 Jonathan Chambers <joncham@gmail.com>
12184 * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
12186 Code is contributed under MIT/X11 license.
12188 2007-09-14 Zoltan Varga <vargaz@gmail.com>
12190 * mini.c (mini_init): Fix a leak.
12192 * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
12194 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
12196 * mini.c: redirect string.InternalAllocStr() to the managed allocator.
12198 2007-09-14 Zoltan Varga <vargaz@gmail.com>
12200 * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
12202 2007-09-13 Zoltan Varga <vargaz@gmail.com>
12204 * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
12207 * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
12209 * mini.c (handle_alloc): Enable managed allocators in AOT code.
12211 * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
12213 * aot-runtime.c (decode_patch_info): Ditto.
12215 2007-09-12 Jonathan Chambers <joncham@gmail.com>
12217 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
12218 static case. Cache delegates in architecture specific code,
12219 based on number of parameters.
12221 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
12222 in architecture specific code, based on number of parameters.
12224 * mini-trampolines.c (mono_delegate_trampoline): Architecture specific
12225 caching happen in architecture specific code now.
12227 Code is contributed under MIT/X11 license.
12229 2007-09-12 Jonathan Chambers <joncham@gmail.com>
12231 * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
12232 mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
12233 mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
12235 Code is contributed under MIT/X11 license.
12237 2007-05-15 Massimiliano Mantione <massi@ximian.com>
12238 * mini.c: (mono_thread_abort) Fixed bug #82416.
12240 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
12242 * mini.: hook the new managed GC allocation feature into the JIT.
12244 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
12246 * mini.c: implementation for the new runtime tls opcode.
12248 2007-09-11 Martin Baulig <martin@ximian.com>
12251 (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
12252 `mono_method_inflated_offset'.
12254 2007-09-07 Zoltan Varga <vargaz@gmail.com>
12256 * driver.c mini.h mini.c: Add a new devel command line option for injecting
12257 async exceptions into a method.
12259 * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
12260 purpose of testing whenever the unwinder works at every instruction.
12262 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
12264 * mini.c: check accessibility of method used in ldftn (fixes
12267 2007-09-04 Zoltan Varga <vargaz@gmail.com>
12269 * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
12271 * inssel.brg: Fix a warning.
12273 2007-09-03 Martin Baulig <martin@ximian.com>
12275 * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
12276 now takes the `main_method' as argument.
12278 2007-09-02 Zoltan Varga <vargaz@gmail.com>
12280 * cpu-sparc.md (endfilter): Add missing src1:i argument.
12282 2007-08-30 Jonathan Chambers <joncham@gmail.com>
12284 * driver.c: include the cil-coff.h header on Windows.
12286 Code is contributed under MIT/X11 license.
12288 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
12290 * mini.c, driver.c: don't include the cil-coff.h header.
12292 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
12294 * mini.c: flag places that needs fixes fo soft-float support.
12296 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
12298 * mini.h, inssel-float.brg: fix soft-float constant loads on big
12299 endian systems (partially from Dean Jenkins, bug #81924).
12301 2007-08-28 Mark Probst <mark.probst@gmail.com>
12303 * mini.c (check_linkdemand): Remove embedded reference object in
12304 call to LinkDemandSecurityException.
12305 (mono_jit_compile_method_inner): Call LinkDemandSecurityException
12306 with an IntPtr instead of a reference object.
12308 2007-08-28 Zoltan Varga <vargaz@gmail.com>
12310 * mini.c (handle_initobj): Handle alignment properly.
12312 * inssel.brg (mini_emit_memset): Ditto.
12314 * inssel.brg (mini_emit_memcpy): Ditto.
12316 * inssel-sparc.brg: Ditto.
12318 * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
12320 2007-08-26 Zoltan Varga <vargaz@gmail.com>
12322 * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
12323 exceptions raised in unmanaged code. Fixes part of #82594.
12325 2007-08-24 Mark Probst <mark.probst@gmail.com>
12327 * mini.c (mono_method_to_ir), declsec.c
12328 (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
12330 2007-08-22 Martin Baulig <martin@ximian.com>
12333 (MonoDebuggerThreadInfo): New typedef.
12334 (mono_debugger_thread_table): New global variable.
12335 (mono_debugger_thread_created): New public function.
12336 (mono_debugger_thread_cleanup): New public function.
12339 (MonoDebuggerInfo):
12340 - removed `get_current_thread' and `lookup_assembly'.
12341 - removed `data_table'.
12342 - added `thread_table'.
12345 (mono_thread_start_cb): Call mono_debugger_thread_created().
12346 (mono_thread_attach_cb): Likewise.
12347 (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
12348 (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
12351 * driver.c (mono_main): Move mono_debug_init() up, before calling
12352 mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
12354 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
12356 * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
12357 together when passing several arguments of type double (gives a small
12358 speedup and saves a few bytes of generated code).
12360 2007-08-20 Jb Evain <jbevain@novell.com>
12362 * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
12364 2007-08-20 Jb Evain <jbevain@novell.com>
12366 * mini.c (mono_method_to_ir): throw MethodAccessException
12367 and FieldAccessException instead of InvalidProgramException.
12369 2007-08-20 Mark Probst <mark.probst@gmail.com>
12371 * mini.c: CoreCLR security checks.
12373 * mini.h: Removed MonoSecurityMode (moved to
12374 metadata/security-manager.h) and mono_security_mode global var
12375 (replaced by set/get functions in security-manager.h).
12377 * driver.c: Added "core-clr-test" security mode for testing. Used
12378 set-function for setting security mode.
12380 2007-08-17 Mark Probst <mark.probst@gmail.com>
12382 * mini.c: MonoJitInfo's are freed hazardously now. Statistics for
12383 the new jit_info_table.
12385 * driver.c: Test code for the new jit_info_table (enabled by the
12386 define MONO_JIT_INFO_TABLE_TEST).
12388 2007-08-14 Zoltan Varga <vargaz@gmail.com>
12390 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
12391 detection of call <REG> instruction sequence. Fixes build on freebsd.
12393 2007-08-13 Zoltan Varga <vargaz@gmail.com>
12395 * mini-exceptions.c: Fix a warning.
12397 2007-08-11 Zoltan Varga <vargaz@gmail.com>
12399 * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
12400 stack overflow handling code on amd64 too.
12402 * mini-exceptions.c (mono_setup_altstack): Make this use
12403 mono_thread_get_stack_bounds ().
12405 * mini-x86.h: Disable sigaltstack on solaris x86.
12407 2007-08-10 Zoltan Varga <vargaz@gmail.com>
12409 * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
12411 2007-08-10 Geoff Norton <gnorton@customerdna.com>
12413 * tramp-x86.c: Remove some unneeded alignment changes on Apple. Fixes #82387.
12415 2007-08-08 Zoltan Varga <vargaz@gmail.com>
12417 * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
12419 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
12421 2007-08-03 Neale Ferguson <neale@sinenomine.net>
12423 * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
12426 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
12428 * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
12429 to be emitted (bug #82281).
12431 2007-08-01 Martin Baulig <martin@ximian.com>
12433 Merged the `debugger-dublin' branch.
12435 * debug-debugger.h (MonoDebuggerInfo):
12436 Removed the `old_*' compatibility entries.
12437 Added `debugger_version' and `data_table'.
12438 Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
12439 Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
12442 (MiniDebugMethodBreakpointInfo): Add `address_list'.
12443 (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
12444 instead of a `gconstpointer'.
12445 (mono_debugger_insert_method_breakpoint): Return a
12446 `MonoDebugMethodAddressList *'.
12448 2007-06-28 Martin Baulig <martin@ximian.com>
12450 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
12452 2007-08-01 Zoltan Varga <vargaz@gmail.com>
12454 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using
12455 __builtin_frame_address () since it is broken on older gcc versions.
12457 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
12459 * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
12460 on the stack overflow handling and made the managed stack overflows
12461 catchable in most cases using soft guard pages.
12462 * exceptions-x86.c: added code to restore the protection in the soft
12463 guard pages at the end of exception handling.
12465 2007-07-31 Zoltan Varga <vargaz@gmail.com>
12467 * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
12469 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
12471 * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
12472 exception handling.
12474 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
12476 * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
12477 signal handling support until it has been ported to the new mechanism.
12478 * mini.c: fixed stack overflow detection and use the new
12479 architecture code to handle signals on the altstack.
12481 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
12483 * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
12484 stack overflows on the alt stack.
12486 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
12488 * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
12489 stack overflows on the alt stack.
12491 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
12493 * exceptions-ppc.c: cleanup preparing for altstack support.
12495 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
12497 * exceptions-arm.c: cleanup preparing for altstack support.
12499 2007-07-27 Mark Probst <mark.probst@gmail.com>
12501 * mini.c (print_jit_stats): Output hazard pointer stats.
12503 2007-07-26 Mark Probst <mark.probst@gmail.com>
12505 * driver.c, mini.c: Replaced security mode flags with a single
12508 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
12510 * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
12512 2007-07-25 Mark Probst <mark.probst@gmail.com>
12514 * mini.c, mini.h, driver.c (mono_main): Added command-line flag
12515 (which doesn't do anything yet) for activating Core CLR
12516 (Silverlight) security.
12518 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
12520 * mini-codegen.c: work around a possible gcc bug on arm.
12522 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
12524 * driver.c, mini-x86.h, mini-amd64.h: print a nice error
12525 message for platforms that don't support AOT compilation.
12527 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
12529 * mini.h, mini.c, driver.c: temporary smcs hack.
12531 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
12533 * mini-arm.h, mini-arm.c: arm EABI fixes.
12535 2007-07-22 Zoltan Varga <vargaz@gmail.com>
12537 * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
12540 * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
12541 trampolines taking a method argument.
12543 * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
12545 * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
12546 * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
12548 * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
12549 JIT compilation throws an exception. Fixes #82050.
12551 2007-07-19 Mark Probst <mark.probst@gmail.com>
12553 * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
12554 with the MONO_EXCEPTION_ defines.
12556 2007-07-17 Zoltan Varga <vargaz@gmail.com>
12558 * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
12561 * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
12562 the cause of an assertion.
12564 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
12566 * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
12569 2007-07-15 Zoltan Varga <vargaz@gmail.com>
12571 * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
12572 assert. Should fix #82103.
12574 2007-07-14 Zoltan Varga <vargaz@gmail.com>
12576 * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
12577 here too. Fixes #82095.
12579 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
12582 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
12584 * mini-amd64.h: Enable IMT for amd64.
12586 * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
12588 2007-07-12 Zoltan Varga <vargaz@gmail.com>
12590 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
12592 2007-07-12 Mark Probst <mark.probst@gmail.com>
12594 * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
12595 as soon as check_linkdemand sets an exception_type.
12597 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
12599 * mini-x86.c: fixed offsets for IMT call sequence.
12600 * mini-x86.h: enable IMT again.
12602 2007-07-11 Zoltan Varga <vargaz@gmail.com>
12604 * trace.c (mono_trace_enter_method): Decode MonoType too.
12606 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
12608 * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
12610 * mini-amd64.c: Add preliminary IMT implementation.
12612 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
12614 * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
12615 understand the new IMT-base interface invocation (thanks to
12616 Daniel Nauck for the report and the remote debugging session).
12618 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
12620 * mini-x86.c: size and speed optimizations for the IMT bsearch.
12622 2007-07-11 Zoltan Varga <vargaz@gmail.com>
12624 * Makefile.am (aotcheck): Make this actually use the AOTed code.
12626 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
12628 * mini-trampolines.c: implement AOT IMT support.
12629 * mini-x86.h: enable IMT support for wider testing.
12631 2007-07-10 Zoltan Varga <vargaz@gmail.com>
12633 * inssel.brg (emit_imt_argument): Add aot support here.
12635 * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
12637 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
12639 * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
12640 of the IMT implementation, partially from massi, with my
12641 implementation of the bsearch sequence. Disabled by default until
12642 the AOT code is implemented.
12644 2007-07-10 Zoltan Varga <vargaz@gmail.com>
12646 * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
12648 * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
12650 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
12652 * inssel.brg, mini.c, mini.h, mini-trampolines.c:
12653 arch-independent IMT JIT code from Massimiliano
12654 Mantione (massi@ximian.com) with small cleanups from me.
12656 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
12658 * Makefile.am: fix svn invocation to get the svn revision to be
12659 independent of the local language (build fix).
12661 2007-07-09 Mark Probst <mark.probst@gmail.com>
12663 * mini.c (inline_method): Reset cfg->exception_type if the
12664 inlining is aborted. Fixes: 82049.
12666 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
12668 * mini.c: remove assert from exception handling code when exception_ptr
12671 2007-07-05 Zoltan Varga <vargaz@gmail.com>
12673 * mini.c (mono_codegen): Add an assert.
12675 * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method
12676 enter and leave code.
12677 * mini-amd64.c (mono_arch_emit_prolog): Likewise.
12679 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
12681 * mini-ppc.c: fixed memory corruption for localloc(0)
12684 2007-07-05 Zoltan Varga <vargaz@gmail.com>
12686 * mini.c: Fix warnings.
12688 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
12690 * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
12691 to emit better double->int conversions.
12693 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
12695 * mini.c: the provided Min/Max optimizations are valid for unisgned
12698 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
12700 * 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
12702 2007-06-28 Miguel de Icaza <miguel@novell.com>
12704 * mini.c (mono_running_on_valgrind): Add support for reporting the
12705 method and its boundaries to valgrind.
12707 2007-06-28 Martin Baulig <martin@ximian.com>
12709 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
12711 2007-06-25 Zoltan Varga <vargaz@gmail.com>
12713 * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
12715 * generic.2.cs: Add new test case.
12717 2007-06-25 Martin Baulig <martin@ximian.com>
12719 Merged the `debugger-dublin' branch.
12722 (mono_debugger_insert_method_breakpoint): New public method.
12723 (mono_debugger_remove_method_breakpoint): Likewise.
12724 (mono_debugger_check_breakpoints): New static method.
12725 (mono_debug_close_method): Call mono_debugger_check_breakpoints().
12727 * debug-debugger.h (MonoDebuggerInfo):
12728 Renamed (to keep backward compatibility in the vtable):
12729 `insert_breakpoint' -> `old_insert_breakpoint'.
12730 `remove_breakpoint' -> `old_remove_breakpoint'.
12731 `create_string' -> `old_create_string'.
12732 `lookup_class' -> `old_lookup_class'.
12733 `lookup_type' -> removed; changed into a dummy field.
12734 `lookup_assembly' -> `old_lookup_assembly'.
12735 Added (same functionality, but different signature):
12736 `create_string', `lookup_class', `lookup_assembly'
12738 `get_method_addr_or_bpt', `remove_method_breakpoint',
12739 `runtime_class_init'.
12741 * debug-debugger.c: Merged the `debugger-dublin' branch.
12743 2007-06-23 Zoltan Varga <vargaz@gmail.com>
12745 * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
12747 (peephole_pass): Likewise.
12749 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
12751 * driver.c: hopefully make setaffinity work also for ancient
12754 2007-06-22 Atsushi Enomoto <atsushi@ximian.com>
12756 * driver.c : win32 build fix.
12758 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
12760 * driver.c: check for the MONO_NO_SMP env var and bind to a single
12761 processor if it is set.
12763 2007-06-21 Martin Baulig <martin@ximian.com>
12765 * debug-mini.h: New file.
12768 (mono_debugger_insert_breakpoint_full): Moved here from
12769 ../metadata/mono-debug-debugger.c.
12770 (mono_debugger_remove_breakpoint): Likewise.
12771 (mono_debugger_breakpoint_callback): Likewise.
12773 2007-06-15 Raja R Harinath <rharinath@novell.com>
12775 * jit-icalls.c (mono_helper_compile_generic_method): Update to
12776 changes in MonoGenericClass.
12778 2007-06-14 Zoltan Varga <vargaz@gmail.com>
12780 * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
12782 2007-06-14 Raja R Harinath <rharinath@novell.com>
12784 * jit-icalls.c (mono_helper_compile_generic_method): Update to
12785 removal of MonoGenericMethod.
12787 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
12789 * mini-exceptions.c: hooks for the exception events profiling API.
12791 2007-06-14 Randolph Chung <tausq@debian.org>
12793 * Makefile.ma: Add hppa target.
12794 * mini-arch.h: Include mini-hppa.h
12795 * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
12796 mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
12797 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
12799 2007-06-14 Randolph Chung <tausq@debian.org>
12801 * inssel.brg: Add rules for "chained" compare-branch operations so that
12802 a single compare op can affect multiple branches. Adjust cost for
12803 OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
12804 * inssel-long32.brg: Update rules to use compare-branch macros. Adjust
12805 cost for some rules so that they can more easily be overridden by
12806 per-arch rules (with fixes from lupus).
12807 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
12809 2007-06-13 Randolph Chung <tausq@debian.org>
12811 * mini-ops.h: Reorder branch ops so that they match the order of the
12812 corresponding CEE_* ops. The code expects them this way.
12813 Add new ops for HPPA target.
12814 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
12816 2007-06-13 Randolph Chung <tausq@debian.org>
12818 * mini-exceptions.c: Handle cases where the stack grows towards
12820 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
12822 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
12824 * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
12826 * driver.c: explain where a non-matching corlib is found.
12828 2007-06-13 Mark Probst <mark.probst@gmail.com>
12830 * mini.c (print_jit_stats): Output dynamic code allocation stats.
12832 2007-06-10 Sanghyeon Seo <sanxiyn@gmail.com>
12834 * mini-exceptions.c: Generate a method profile leave event during
12835 an exception to ensure that the profiler gets notified.
12837 2007-06-07 Zoltan Varga <vargaz@gmail.com>
12839 * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir
12842 * cpu-amd64.md: Add long_and/or/xor opcodes.
12844 2007-06-06 Wade Berrier <wberrier@novell.com>
12846 * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
12847 (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction
12848 length of instruction shr_imm (expected 8, got 10)
12850 2007-06-06 Zoltan Varga <vargaz@gmail.com>
12852 * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
12854 2007-06-06 Mark Probst <mark.probst@gmail.com>
12856 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
12857 MonoInternalHashTable again (fixed bug in the internal hash table
12860 2007-06-06 Mark Probst <mark.probst@gmail.com>
12862 * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
12863 Have to figure out what makes it crash the SWF regression.
12865 2007-06-05 Zoltan Varga <vargaz@gmail.com>
12867 * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
12869 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
12871 * mini.c: optimize out the type check when storing null in a
12874 2007-06-04 Mark Probst <mark.probst@gmail.com>
12876 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
12877 MonoInternalHashTable.
12879 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
12881 * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
12882 signed integer methods.
12884 2007-06-02 Zoltan Varga <vargaz@gmail.com>
12886 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case
12887 permanently since the current approach doesn't work.
12889 2007-06-02 Zoltan Varga <vargaz@gmail.com>
12891 * inssel.brg (stmt): Only call delegate->invoke_impl if
12892 MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
12894 2007-06-01 Zoltan Varga <vargaz@gmail.com>
12896 * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
12897 the sreg2==rdx case.
12899 * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
12900 account if it contains a rex prefix.
12901 (peephole_pass): Handle OP_FMOVE as well.
12903 2007-06-01 Zoltan Varga <vargaz@gmail.com>
12905 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
12906 as it causes regressions.
12908 2007-05-31 Zoltan Varga <vargaz@gmail.com>
12910 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
12911 static case as well.
12913 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
12915 * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
12916 (mono_arch_get_this_arg_from_call): Ditto.
12918 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
12920 * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
12923 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
12924 (mono_arch_get_this_arg_from_call): Ditto.
12926 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
12928 * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
12929 try to create optimized invoke code and use that for further invocations.
12930 Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
12932 * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
12934 2007-05-29 Rodrigo Kumpera <kumpera@gmail.com>
12936 * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
12937 sealed classes or methods.
12938 *devirtualization.cs: tests for the new optimization
12940 2007-05-29 Zoltan Varga <vargaz@gmail.com>
12942 * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
12943 by the update_volatile () function.
12945 2007-05-27 Zoltan Varga <vargaz@gmail.com>
12947 * driver.c (mono_main): Call g_thread_init () early since newer glib versions
12950 * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
12952 2007-05-24 Jonathan Chambers <joncham@gmail.com>
12954 * mini.c: Add configure checks for header files.
12955 * mini-x86.c: Add configure checks for header files.
12956 * trace.c: Add configure checks for header files.
12957 * aot-runtime.c: Add configure checks for header files.
12958 * aot-compiler.c: Add configure checks for header files.
12959 * driver.c: Add configure checks for header files.
12960 * mini-codegen.c: Add configure checks for header files.
12962 Code is contributed under MIT/X11 license.
12964 2007-05-22 Zoltan Varga <vargaz@gmail.com>
12966 * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
12967 icompare_imm -128 + op_iclt. Fixes #81703.
12969 2007-05-19 Zoltan Varga <vargaz@gmail.com>
12971 * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
12973 2007-05-15 Massimiliano Mantione <massi@ximian.com>
12975 * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
12976 inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
12977 so that all isinst checks now use "interface_bitmap".
12979 2007-05-15 Zoltan Varga <vargaz@gmail.com>
12981 * cpu-amd64.md (jmp): Fix a warning.
12983 * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
12985 * basic.cs: Add new regression test.
12987 * basic.cs: Remove test which is now in basic-long.cs.
12989 * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
12991 * basic-long.cs: Add new test.
12993 2007-05-13 Zoltan Varga <vargaz@gmail.com>
12995 * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
12997 2007-05-12 Zoltan Varga <vargaz@gmail.com>
12999 * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
13001 * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
13004 * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception
13005 throwing code a bit.
13007 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of
13008 the exception throwing code a bit.
13010 * mini-x86.c (get_call_info): Allocate result from a mempool.
13012 2007-05-11 Zoltan Varga <vargaz@gmail.com>
13014 * aot-compiler.c (find_typespec_for_class): Fix the assert.
13016 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
13018 * mini.h (MonoCompile): Add 'token_info_hash' field.
13020 * mini.c: Save token->method associations during compilation so the AOT
13021 compiler can use it.
13023 * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
13024 which reference generic classes and methods.
13026 2007-05-10 Zoltan Varga <vargaz@gmail.com>
13028 * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
13030 * aot-compiler.c (compile_method): Fix a typo in a comment.
13032 * aot-runtime.c (decode_cached_class_info): Skip generic types.
13034 * aot-compiler.c: Add minimal support for AOTing generic code by skipping
13035 everything generic.
13037 * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
13039 2007-05-09 Zoltan Varga <vargaz@gmail.com>
13041 * mini.h (MonoCompile): Add 'args' field.
13043 * mini.c (mono_compile_create_vars): Store variables representing the arguments
13046 * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
13048 2007-05-08 Zoltan Varga <vargaz@gmail.com>
13050 * mini.c (mono_compile_get_interface_var): Remove this unused function.
13052 * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
13054 * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
13055 opcodes for some opcodes.
13057 * mini.h *.brg *.c: Use the new opcodes.
13059 2007-05-08 Massimiliano Mantione <massi@ximian.com>
13061 * mini.h: Bumped aot revision.
13063 * inssel.brg: modified code generation of type checks for interfaces
13064 to use the new "MonoClass.interface_bitmap" instead of the old
13065 "MonoClass.interface_offsets".
13067 2007-04-30 Zoltan Varga <vargaz@gmail.com>
13069 * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
13071 2007-04-29 Zoltan Varga <vargaz@gmail.com>
13073 * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
13076 2007-04-27 Neale Ferguson <neale@sinenomine.net>
13078 * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
13080 2007-04-27 Wade Berrier <wberrier@novell.com>
13082 * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in
13083 mini.h) to fix build.
13085 2007-04-26 Zoltan Varga <vargaz@gmail.com>
13087 * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
13089 * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
13090 causes the corlib unit tests to fail.
13092 2007-04-25 Zoltan Varga <vargaz@gmail.com>
13094 * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
13096 * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
13098 * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional
13099 opcodes to the comparison relations.
13101 * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional
13102 opcodes to their types.
13104 * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
13106 * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache
13107 it in cfg->arch.cinfo.
13109 * local-propagation.c (mono_local_cprop_bb): Fix a warning.
13111 * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in
13112 cfg->cil_offset_to_bb.
13114 2007-04-24 Zoltan Varga <vargaz@gmail.com>
13116 * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
13117 created becase of initlocals.
13119 2007-04-23 Zoltan Varga <vargaz@gmail.com>
13121 * mini-alpha.c cpu-alpha.md: More alpha port work from
13122 Sergey Tikhonov <tsv@solvo.ru>.
13124 2007-04-21 Andreas Faerber <andreas.faerber@web.de>
13126 * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
13128 2007-04-19 Zoltan Varga <vargaz@gmail.com>
13130 * cpu-s390.md (break): Correct the length of break instruction.
13132 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
13134 * mini.c: fix a couple of soft-float issues and comments.
13136 2007-04-15 Miguel de Icaza <miguel@novell.com>
13138 * trace.c (is_filenamechar): - is also a filename char.
13140 2007-04-15 Neale Ferguson <neale@sinenomine.net>
13142 * mini-s390.c: Correct checking for enum type in return value processing.
13144 2007-04-14 Raja R Harinath <rharinath@novell.com>
13146 * Makefile.am (BUILT_SOURCES): Add 'version.h'.
13147 (version.h): Makefile is in the build directory.
13149 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
13151 * mini-amd64.h: fix for assertion failure on Solaris/amd64
13153 2007-04-11 Martin Baulig <martin@ximian.com>
13155 * mini.c (can_access_member): Fix handling of generic classes;
13158 2007-04-10 Zoltan Varga <vargaz@gmail.com>
13160 * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
13162 2007-04-05 Zoltan Varga <vargaz@gmail.com>
13164 * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
13166 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
13168 * mini-codegen.c: make sure the right spill amount is
13169 used for fp or integer registers (fixes the float_sub_spill() on ppc).
13171 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
13173 * mini-ppc.c: fixes for the fp_branch_nan test.
13175 2007-03-23 Zoltan Varga <vargaz@gmail.com>
13177 * basic.cs: Comment out new test which still fails on ia64.
13179 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13181 * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
13183 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
13185 * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
13187 2007-03-22 Zoltan Varga <vargaz@gmail.com>
13189 * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
13190 on 64 bit machines. Fixes part of #80738.
13192 * basic.cs: Add regression test.
13194 2007-03-17 Zoltan Varga <vargaz@gmail.com>
13196 * inssel.brg basic.cs: Revert previous change to fix build.
13198 * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
13201 * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
13203 * basic.cs: Add new regression test.
13205 2007-03-17 Zoltan Varga <vargaz@gmail.com>
13207 * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
13210 2007-03-16 Neale Ferguson <neale@sinenomine.net>
13212 * cpu-s390x.md: Correct length of break instruction.
13214 2007-03-16 Neale Ferguson <neale@sinenomine.net>
13216 * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
13217 * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
13219 2007-03-15 Jonathan Chambers <joncham@gmail.com>
13221 * *.c: Begin WIN64 port.
13222 * mini.c: Use correct register in profiler.
13223 * mini-amd64.c: No inline assembly on Win64.
13224 * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
13225 Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
13226 * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
13227 is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
13228 mono_arch_ip_from_context for Win64.
13230 Contributed under MIT/X11 license.
13232 2007-03-15 Zoltan Varga <vargaz@gmail.com>
13234 * exceptions-amd64.c (seh_handler): Ditto.
13236 * exceptions-x86.c (seh_handler): Fix a memory leak.
13238 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
13240 * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
13241 mini-s390x.c: fixed peephole optimizations to deal
13242 correctly with 1 and 2 byte reload avoidance.
13244 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
13246 * cpu-s390.md, cpu-s390x.md: update localloc length.
13248 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
13250 * cpu-g4.md: added missing descriptions.
13252 2007-03-14 Miguel de Icaza <miguel@novell.com>
13254 * Makefile.am: Add support so the tail tests are not executed on
13255 PowerPC as that is a known limitation of the PowerPC port.
13257 2007-03-13 Jonathan Chambers <joncham@gmail.com>
13259 * runmdesc.bat: Move to msvc directory.
13261 2007-03-13 Jonathan Chambers <joncham@gmail.com>
13263 * runmdesc.bat: Run executable that was produced by the current
13264 target and sent via an argument.
13266 2007-03-11 Zoltan Varga <vargaz@gmail.com>
13268 * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
13271 * generics.2.cs: Add regression test.
13273 2007-03-09 Wade berrier <wberrier@novell.com>
13275 * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
13277 2007-03-09 Zoltan Varga <vargaz@gmail.com>
13279 * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
13280 AOT code depends on this.
13282 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
13284 * mini.c: more precise tracking of types in the eval stack
13285 (part of fix for bug #81044).
13287 2007-03-07 Zoltan Varga <vargaz@gmail.com>
13289 * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
13291 * aot-compiler.c (encode_patch): Remove an obsolete comment.
13293 2007-03-06 Zoltan Varga <vargaz@gmail.com>
13295 * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
13297 * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
13299 2007-02-22 Zoltan Varga <vargaz@gmail.com>
13301 * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
13302 a pointer on 64 bit systems. Fixes #80190.
13304 * iltests.il: Add new regression test.
13306 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
13308 * mini.c: inline a constant for Environment.IsRunningOnWindows.
13310 2007-02-19 Geoff Norton <gnorton@customerdna.com>
13312 * trace.c: Remove an erroneous alignemnt check when tracing.
13313 Fixes --trace on OSX86.
13315 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
13317 * mini-$(arch).h: initialize SP in context for all the archs.
13319 2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
13321 * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
13322 regressions in the thread tests.
13324 2007-02-14 Zoltan Varga <vargaz@gmail.com>
13326 * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
13327 - fixed implementation of LOCALLOC opcode
13328 - implemented non-un compare for floats
13330 - implementation of FDIV and CKFINITE opcodes
13331 - fixes for latest mono updates
13332 - additional arch opcodes
13334 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
13336 * Makefile.am: simplify and merge rules for cross-compilation.
13338 2007-02-07 Massimiliano Mantione <massi@ximian.com>
13340 * local-propagation.c: Actually *apply* the fix for bug 80591...
13342 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
13344 * mini-exceptions.c: backuot part of the last change
13345 (fixes cas tests on amd64 related to GetExecutingAssembly ()).
13347 2007-02-06 Massimiliano Mantione <massi@ximian.com>
13348 * inssel.brg: Fix bug 59286.
13351 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
13353 * mini-exceptions.c: patch from Zoltan to correctly check for
13354 stack boundaries (using the stack register, not the frame register),
13355 fixes bugs #80724, #79717.
13357 2007-02-03 Zoltan Varga <vargaz@gmail.com>
13359 * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
13360 OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
13362 * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
13363 presence of frame pointer elimination.
13365 2007-02-01 Geoff Norton <gnorton@customerdna.com>
13367 * mini-x86.h: NetBSD UCONTEX_REG defines.
13369 2007-02-01 Zoltan Varga <vargaz@gmail.com>
13371 * inssel-amd64.brg: Fix amd64 build.
13373 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
13375 * mini.h: remove extern to workaround what looks likes gcc bug 26905
13378 2007-01-31 Zoltan Varga <vargaz@gmail.com>
13380 * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
13383 * mini-<ARCH>.c: Use mono_is_regsize_var ().
13385 2007-01-30 Mark Mason <mason@broadcom.com>
13387 * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
13388 * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
13389 * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
13390 beginning support for CEE_JMP [not quite working yet]
13391 * tramp-mips.c: LMF handling now works
13393 2007-01-30 Zoltan Varga <vargaz@gmail.com>
13395 * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
13397 * mini.h (NULLIFY_INS): New macro.
13399 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
13401 * mini.c: statistical profiler fix for windows, patch
13402 from Tor Lillqvist (tml@novell.com).
13404 2007-01-30 Massimiliano Mantione <massi@ximian.com>
13405 * local-propagation.c: Fix bug 80591.
13407 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
13409 * Makefile.am: put back the --export-dynamic option as with
13410 the previous gmodule flags (thanks to Robert Jordan).
13412 2007-01-28 Zoltan Varga <vargaz@gmail.com>
13414 * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
13416 mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
13417 simplify and speed up the local register allocator. Also rename some fields
13418 like iassign->vassign.
13420 * regalloc.c: Remove some functions which are no longer used since their
13421 inlined version is in mini-codegen.c.
13423 * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
13425 * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
13427 2007-01-27 Zoltan Varga <vargaz@gmail.com>
13429 * mini-amd64.c (peephole_pass): Remove optimizations which omit a
13430 narrowing. Fixes #80622.
13432 * iltests.il: Add new regresssion test.
13434 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
13436 * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
13437 debug-debugger.c, debug-debugger.h: warning fixes.
13438 * driver.c: updated copyright year and made it fit in one line.
13440 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
13442 * aot-runtime.c: updated to use mono-dl instead of gmodule.
13444 2007-01-25 Zoltan Varga <vargaz@gmail.com>
13446 * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
13448 * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
13450 * iltests.il: Add new test for bug #80507.
13452 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
13454 * mini-arm.h: use soft-float also on vfp for now.
13456 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
13458 * mini.c: fix some more soft-float issues.
13460 2007-01-24 Zoltan Varga <vargaz@gmail.com>
13462 * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
13464 2007-01-24 Massimiliano Mantione <massi@ximian.com>
13465 * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
13466 mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
13467 MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
13469 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
13471 * mini-arm.c: typo fix.
13473 2007-01-23 Neale Ferguson <neale@sinenomine.net>
13475 * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
13477 2007-01-21 Zoltan Varga <vargaz@gmail.com>
13479 * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
13480 Share stack slots for scalar types. Avoid expensive g_list_free () calls.
13482 * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
13484 * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto.
13486 * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
13488 * inssel.brg: Fix a warning.
13490 * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
13492 * abcremoval.c ssa.c ssapre.c: Update after this change.
13494 * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
13496 * dominators.c (df_set): Use mono_bitset_union_fast.
13498 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
13500 * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
13501 mini-codegen.c: reduce relocations and memory usage for the cpu
13504 2007-01-20 Zoltan Varga <vargaz@gmail.com>
13506 * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
13508 * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
13509 to reduce their size.
13511 2007-01-19 Mark Mason <mason@broadcom.com>
13513 * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
13514 * mini-mips.c: more configuration macros, support long conditional branches, additional
13515 asserts, fix epilog instrumentation.
13516 * mini-mips.h: use standard stack walk
13517 * cpu-mips.md: increase size of div, rem and conditional branches
13519 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
13521 * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
13524 2007-01-19 Zoltan Varga <vargaz@gmail.com>
13526 * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
13527 (compile_method): Ditto.
13529 * aot-runtime.c (decode_klass_info): Ditto.
13531 * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
13532 needed by the code generated by inssel.brg. Also fix a warning.
13534 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
13536 * mini.c: deal with enums that become genericinsts by
13537 being nested in a generic class (bug #79956).
13539 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
13541 * mini.c: match the generic definition to check for
13542 private access with generic types (bug #78431).
13544 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
13546 * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
13547 to make life easier for people cross-compiling that insist on not
13550 2007-01-17 Mark Mason <mason@broadcom.com>
13552 * inssel-long.brg: patch to deal with mips missing flags
13553 * inssel-long32-mips.brg: implement overflow checks
13554 * insset-mips.brg: implement overflow checks
13555 * mini-mips.h: implement conditional exception handling
13556 * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
13557 Remove unused code, minor cleanups.
13558 * exceptions-mips.c: minor cleanups
13559 * mini-ops.h: add mips conditional exception ops
13560 * cpu-mips.md: add mips conditional exception ops
13563 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
13565 * inssel.brg: patch from Mark Mason <mason@broadcom.com>
13566 to deal with mips missing of flags.
13568 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
13570 * exceptions-ppc.c: execute fault handlers.
13572 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
13574 * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
13576 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
13578 * mini.c: handle also floating point values in initialize_array.
13580 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
13582 * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
13583 array initialization and make it conditional on the intrins option.
13585 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
13587 * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
13588 relocations and put the patch info names close to the enum definition.
13590 2007-01-15 Mark Mason <mason@broadcom.com>
13592 * basic.cs, exceptions.cs: break up large tests to increase debugability.
13594 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
13596 * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
13598 2007-01-12 Raja R Harinath <rharinath@novell.com>
13600 * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
13602 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
13604 * Makefile.am: distribute the mips sources.
13606 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
13608 * mini-codegen.h: handle bug #80489 here, by excluding ecx
13611 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
13613 * cpu-x86.md: back out for now as this triggers other regressions.
13615 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
13617 * cpu-x86.md: force src1 and dest regpair for long shift instructions
13618 to eax:edx, so ecx can't get allocated to them (bug #80489).
13620 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
13622 * mini.c, mini-exceptions.c: enabled running fault handlers
13625 2007-01-03 Miguel de Icaza <miguel@novell.com>
13627 * driver.c: If nothing fail, do not use the string "failed",
13628 because it makes it very annoying to view test result logs on the
13631 2006-12-30 Miguel de Icaza <miguel@novell.com>
13633 * debug-debugger.c (mono_debugger_main): Rename "main" to
13634 "main_method" to prevent a warning.
13636 Remove a warning for unused field.
13638 2006-12-28 Martin Baulig <martin@ximian.com>
13641 (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
13643 2006-12-22 Martin Baulig <martin@ximian.com>
13645 * mdb-debug-info32.s, mdb-debug-info64.s: New files.
13646 Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
13647 seperate `.mdb_debug_info' section, so we can access it from the
13648 debugger even if the binary is stripped.
13650 * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
13651 from the `.mdb_debug_info' here to prevent the linker from
13652 removing that section.
13654 * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
13655 mdb-debug-info64.s.
13657 2006-12-19 Robert Jordan <robertj@gmx.net>
13659 * mini-x86: enable the code to return small structures in
13660 registers for FreeBSD as well. Fixes bug #80278.
13661 * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
13663 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
13665 * mini-x86.c: align the stack when calling the profiler
13666 function instrumenting the prolog (on OSX).
13668 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
13670 * mini.c: emit a break opcode where Debugger.Break () is called.
13672 2006-12-13 Miguel de Icaza <miguel@novell.com>
13674 * mini.c (mono_method_to_ir): Provide useful information on this
13675 assert, to prevent others from debugging like I did.
13677 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
13679 * mini.c: enable code which was incorrectly commented
13682 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
13684 * mini-x86.c: enable on OSX, too, the code to return small
13685 structures in registers.
13687 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
13689 * mini-x86.c: remove the use of the dynamic code manager here, too.
13691 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
13693 * mini.h, debug-debugger.c, tramp-*.c: fixed
13694 mono_debugger_create_notification_function() to use
13695 mono_global_codeman_reserve () instead of a dynamic code manager.
13697 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
13699 * mini.c, jit-icalls.h, jit-icalls.c: remove the
13700 ves_array_element_address() jit icall and use a generated
13701 managed method instead (which is about 4 times faster for a rank 3
13704 2006-11-29 Mark Mason <mason@broadcom.com>
13706 * basic-calls.cs: additional tests for passing
13707 structures as function arguments.
13709 2006-11-29 Mark Mason <mason@broadcom.com>
13711 * mini-mips.h: disable custom exception handling
13712 * mini-mips.c: throw/rethrow should use jalr to call
13713 exception stubs. Fixed bug with passing structures
13714 by value. More support for tracing floating point
13717 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
13719 * mini.c: fixed typo in the soft-float ldind.r4 handling
13722 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
13724 * mini.c, mini.h, driver.c: added --runtime command line
13725 option to select a different runtime than the autodetected one.
13726 * jit.h: added API for embedders to initialize with a specific
13729 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
13731 * mini.c: handle also boxing of r4 values (bug #80024).
13733 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
13735 * mini-ppc.c: force indirect calls until we reserve
13736 enough address space for all the generated code.
13738 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
13740 * exceptions-arm.c: workaround bugs in the libc definition
13741 of struct ucontext.
13743 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
13745 * inssel.brg: fixes from me and Mark Mason.
13747 2006-11-23 Dick Porter <dick@ximian.com>
13749 * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
13750 semaphore display now we've fixed the initial value
13752 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13754 * inssel.brg: partially revert the last change to fix the build.
13756 2006-11-21 Mark Mason <mason@broadcom.com>
13758 * inssel.brg: Add and use compare-and-branch macros to support
13759 architectures that do not have condition code registers (ie. MIPS).
13760 * *-mips.{c,brg,md}: Fix copyright statements
13762 2006-11-20 Mark Mason <mason@broadcom.com>
13764 * Makefile.am: remove mini-codegen.c from list of MIPS sources
13765 * mini.c: Allow GET_CONTEXT to be specified by the arch port
13766 * mini.h: Added declaration for mono_print_ins()
13767 * mini-codegen.c: added ins_spec initializer for MIPS
13768 * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
13769 vreg to be virtual and hreg to be non-virtual.
13770 * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
13771 is not yet working/implemented correctly.
13772 * mini-codegen.c (print_ins): rename to mono_print_ins(), make
13773 non-static, fixup calls to print_ins() from other parts in the file.
13775 2006-11-20 Mark Mason <mason@broadcom.com>
13777 * basic-calls.cs: added tests for passing structures as arguments
13780 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
13782 * inssel-long32.brg: optimize signed division by power of two.
13784 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
13786 * mini-arm.c: added support for interworking with thumb code
13787 (mono must be still be built using the ARM instruction encoding).
13789 2006-11-19 Miguel de Icaza <miguel@novell.com>
13791 * mini.c (type_from_op): Separate the conditions for OP_EQ as the
13792 verifier has different rules for it. Fixes a few verifier issues
13795 * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
13796 at the end, so people know what happened.
13798 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
13800 * brach-opts.c: in optimize_exception_target() make sure we
13801 are in a catch clause (fixes bug #79871).
13803 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
13805 * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
13806 more soft-float support fixes.
13808 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
13810 * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
13811 that are passed half on the stack and half in registers.
13813 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
13815 * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
13816 more mips integration work from Mark E Mason
13817 <mark.e.mason@broadcom.com>.
13819 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
13821 * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
13822 cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
13823 tramp-mips.c: added sources for the mips port, not
13824 integrated in the build yet. Contributed by
13825 Mark E Mason <mark.e.mason@broadcom.com>.
13827 2006-11-14 Neale Ferguson <neale@sinenomine.net>
13829 * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
13831 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13833 * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
13834 put the soft-float rules in its own file since it seems to
13835 break s390 compilation.
13837 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
13839 * mini-arm.c: fixed wrnings.
13841 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
13843 * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
13844 inssel-arm.brg: ARM support for soft-float.
13846 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
13848 * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
13849 loads and stores of 32 bit fp values.
13851 2006-11-10 Zoltan Varga <vargaz@gmail.com>
13853 * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
13855 * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
13856 works. Fixes #79852 and #79463.
13858 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
13860 * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
13861 more soft-float support WIP and fixes.
13863 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
13865 * mini-arm.c: some VFP updates.
13867 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
13869 * mini-exceptions.c: 0 is a valid local var offset in some
13870 architectures, don't assert (bug #78508).
13872 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
13874 * exceptions-arm.c: fixed off by one error in stack walk code.
13876 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
13878 * mini.h, mini.c: more precise tracking of type load exceptions.
13880 2006-11-03 Robert Jordan <robertj@gmx.net>
13882 * Makefile.am: [WIN32] Add monow.exe target.
13883 * driver.c: [WIN32] Don't detach the console when debugging.
13886 2006-10-30 Miguel de Icaza <miguel@novell.com>
13888 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
13890 2006-10-23 Zoltan Varga <vargaz@gmail.com>
13892 * aot-compiler.c (emit_method_info): Add a case missed earlier.
13894 * driver.c (mini_regression): Fix --regression with AOT.
13896 * aot-compiler.c (emit_method_info): Fix AOT on amd64.
13898 2006-10-17 Zoltan Varga <vargaz@gmail.com>
13900 * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
13902 * mini-sparc.h: Don't use sigaction on sparc/linux.
13904 * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
13906 * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
13908 * mini-exceptions.c: Add proper include files for getpid ().
13910 2006-10-16 Zoltan Varga <vargaz@gmail.com>
13912 * aot-runtime.c (mono_aot_get_method): Change this to return the native code
13913 address instead of a MonoJitInfo* to avoid decoding the exception info for the
13916 * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
13917 name cache to reduce its size.
13919 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
13921 2006-10-15 Zoltan Varga <vargaz@gmail.com>
13923 * mini-x86.c: Save/restore the current LMF structure more efficiently using
13924 the mono_lmf TLS variable.
13926 * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in
13927 trampoline lmf frames.
13929 * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
13931 2006-10-14 Zoltan Varga <vargaz@gmail.com>
13933 * mini-amd64.c: Save/restore the current LMF structure more efficiently using
13934 the mono_lmf TLS variable.
13936 * mini-exceptions.c: Access the LMF structure through accessors.
13938 * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS
13939 variable instead of in jit_tls->lmf.
13941 * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
13943 * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in
13944 trampoline lmf frames.
13946 * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
13948 2006-10-12 Zoltan Varga <vargaz@gmail.com>
13950 * mini.c trace.c mini-x86.c: Revert these too.
13952 * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
13955 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
13957 * genmdesc.c: removed now dead code.
13959 2006-10-09 Robert Jordan <robertj@gmx.net>
13961 * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
13963 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
13965 * mini.h: do not leave gaps in the opcode values.
13967 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
13969 * jit-icalls.h: flag functions as internal here, too.
13971 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
13973 * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
13974 functions with the internal attribute.
13976 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
13978 * aot-compiler.c: fclose the file descriptor in the profile read loop.
13980 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
13982 * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
13985 2006-10-05 Zoltan Varga <vargaz@gmail.com>
13987 * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
13988 tail calls as on other platforms.
13990 * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
13992 * iltests.il: Add a few tailcall tests.
13994 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
13996 * driver.c: fix loop for old compilers (bug #79521).
13998 2006-10-02 Zoltan Varga <vargaz@gmail.com>
14000 * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
14002 * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
14004 * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
14005 metadata without any code.
14007 * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
14008 more precise debugging information using gdb.
14010 2006-09-30 Zoltan Varga <vargaz@gmail.com>
14012 * inssel-ia64.brg: Make the helper methods static.
14014 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
14016 * inssel-x86.brg: make the helper methods static.
14018 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
14020 * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
14022 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
14024 * mini.c: updates for monoburg changes.
14025 * inssel.brg: make a few helper functions static as they should.
14027 2006-09-27 Zoltan Varga <vargaz@gmail.com>
14029 * Makefile.am: Move mini-codegen.c to common_sources.
14031 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
14033 * mini.h: instroduce inst_call in MonoInst for use in OUTARG
14035 * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
14036 mini-ppc.h: port to use the common local register allocator.
14038 2006-09-26 Zoltan Varga <vargaz@gmail.com>
14040 * mini.h: Remove the comment too then.
14042 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
14044 * mini.h: put back backend.data which is to be used shortly and
14045 doesn't increase the size of MonoInst. If any 64 bit arch aligned
14046 pointers on 4 byte boundaries it'd have much bigger issues running
14047 and you can ifdef it out anyway.
14049 2006-09-26 Zoltan Varga <vargaz@gmail.com>
14051 * mini.h (MonoInst): Remove backend.data field since it is unused and increases
14052 MonoInst size by 4 bytes on 64 bit machines.
14054 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
14056 * *.{c,h,brg}: long due removal of the unused field in MonoInst and
14057 replacement with more meaningful field names. Arch maintainers, please
14058 check the assigned names are good enough for your arch.
14060 2006-09-26 Zoltan Varga <vargaz@gmail.com>
14062 * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the
14063 OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
14065 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
14067 * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
14068 relocations and memory requirements, put the optimization flags
14069 definitions in their own file.
14071 2006-09-24 Zoltan Varga <vargaz@gmail.com>
14073 * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
14075 * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
14077 2006-09-22 Zoltan Varga <vargaz@gmail.com>
14079 * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
14081 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
14083 * inssel.brg: use the correct function to get the size of an item
14084 in an array, given an element class.
14085 * aot-compiler.c: do not access class->class_size directly.
14087 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
14089 * mini.h, debug-mini.c: added a debugging function to print
14090 info about local variables and arguments in a jitted method.
14092 2006-09-20 Zoltan Varga <vargaz@gmail.com>
14094 * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
14096 * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
14098 2006-09-19 Zoltan Varga <vargaz@gmail.com>
14100 * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
14101 inner and outer loops when passing vtypes.
14103 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
14105 * mini-ppc.c: take into account the cpu errata for cache flushing
14106 which caused some random errors (bug #79381).
14108 2006-09-19 Zoltan Varga <vargaz@gmail.com>
14110 * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to
14111 mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
14113 2006-09-17 Zoltan Varga <vargaz@gmail.com>
14115 * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
14118 * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
14119 freebsd ports tree.
14121 * mini-amd64.c (emit_call): Avoid near calls on freebsd.
14122 (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
14124 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
14127 2006-09-13 Zoltan Varga <vargaz@gmail.com>
14129 * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
14131 2006-09-12 Zoltan Varga <vargaz@gmail.com>
14133 * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this
14134 macro does not have to be changed during debugging.
14136 * 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>.
14138 * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
14140 * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
14142 * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if
14143 MONO_ARCH_NO_EMULATE_MUL is defined.
14145 * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
14147 * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
14149 * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
14151 * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
14153 2006-09-11 Zoltan Varga <vargaz@gmail.com>
14155 * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
14156 stuff to mini-exceptions.c where it is used.
14158 * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
14159 setup code, the real one is in mini-exceptions.c.
14161 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
14162 layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
14163 some changes from the freebsd ports tree.
14165 * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
14168 * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
14170 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
14172 * mini.c: on Linux, check for /proc to be mounted
14173 (bug# 79351, novell bug#201204).
14175 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
14177 * mini.c: handle cases where pthread_attr_getstack() behaves
14178 incorrectly (bug #78096).
14180 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
14182 * mini-arm.c: support larger stack frames (bug #79272).
14184 2006-09-08 Zoltan Varga <vargaz@gmail.com>
14186 * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
14188 * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef
14191 * aot-runtime.c (mono_aot_get_class_from_name): New function used by
14192 mono_class_from_name () to find a class from its name.
14194 * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
14196 2006-09-07 Zoltan Varga <vargaz@gmail.com>
14198 * mini-amd64.c (emit_call): Avoid strstr () call if possible.
14200 2006-09-05 Kornel Pal <kornelpal@gmail.com>
14202 * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
14204 2006-09-04 Zoltan Varga <vargaz@gmail.com>
14206 * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
14207 callinfo->trampoline.
14209 * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
14211 (mono_arch_patch_code): Add some debug code to help track down similar failures in the
14214 2006-09-03 Zoltan Varga <vargaz@gmail.com>
14216 * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
14218 2006-09-02 Zoltan Varga <vargaz@gmail.com>
14220 * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
14221 stats.method_trampolines, it is already done by the generic trampoline code.
14223 * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
14225 2006-09-01 Zoltan Varga <vargaz@gmail.com>
14227 * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
14229 * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
14231 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
14233 * mini.c (print_jit_stats): Print mscorlib mempool size too.
14235 * mini.c (print_jit_stats): Print new stats.
14237 * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
14239 2006-08-31 Zoltan Varga <vargaz@gmail.com>
14241 * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
14242 Address on two dimensional arrays. Fixes #78729.
14244 * mini.h (MonoCompile): Add a 'skip_visibility' field.
14246 * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
14249 * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
14251 * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
14254 * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
14256 (mini_get_ldelema_ins): Ditto.
14258 2006-08-30 Zoltan Varga <vargaz@gmail.com>
14260 * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
14261 (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation.
14264 2006-08-29 Neale Ferguson <neale@sinenomine.net>
14266 * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
14267 mono_arch_get_patch_offset as a dummy entry point to allow successful link.
14269 * exceptions-s390x.c: Cosmetic change.
14271 * tramp-s390.c: Fix warning.
14273 * cpu-s390.md: Correct length of mul_imm.
14275 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
14277 * aot-compiler.c: added binary writer with ELF backend
14278 implementation (only on Linux/x86 for now).
14280 2006-08-18 Zoltan Varga <vargaz@gmail.com>
14282 * Makefile.am: Don't run net 2.0 AOT tests.
14284 * aot-compiler.c (compile_method): Skip methods with tail calls as well.
14285 (mono_compile_assembly): Skip net 2.0 assemblies as well.
14287 * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
14289 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
14291 * aot-compiler.c: simplified and refactored the asm-writing code
14292 to allow different backends.
14294 2006-08-18 Zoltan Varga <vargaz@gmail.com>
14296 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
14298 * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a
14299 little. Share patches of type TYPE_FROM_HANDLE as well.
14301 * mini.c (mono_patch_info_equal): New helper function.
14302 (mono_patch_info_hash): Ditto.
14304 * aot-compiler.c (emit_method_code): Fix s390 build.
14306 * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
14307 is not handled because it is stored as a flag and not as a type ctor. Fixes
14310 2006-08-17 Zoltan Varga <vargaz@gmail.com>
14312 * aot-compiler.c: Fix computation of GOT slot statistics.
14314 * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
14315 Also remove support for not PIC AOT.
14317 * mini.h: Bump AOT file format version.
14319 * objects.cs: Add a test for #78990.
14321 * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
14322 (peter.dettman@iinet.net.au). Fixes #79087.
14324 * basic-long.cs: Add a test for the above.
14326 2006-08-16 Zoltan Varga <vargaz@gmail.com>
14328 * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
14330 * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
14333 2006-08-15 Zoltan Varga <vargaz@gmail.com>
14335 * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
14338 2006-08-10 Jonathan Chambers <joncham@gmail.com>
14340 * mini.c: Don't verify COM proxy invoke calls
14343 2006-08-10 Dick Porter <dick@ximian.com>
14345 * wapihandles.c (mini_wapi_seminfo): More info, to help track down
14346 which process is holding semaphores locked.
14348 2006-08-08 Zoltan Varga <vargaz@gmail.com>
14350 * mini-ia64.c mini-amd64.c: Fix #79027.
14352 * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
14354 * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
14356 * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
14357 implicit arguments in a vararg call. Fixes #79027.
14359 2006-08-07 Zoltan Varga <vargaz@freemail.hu>
14361 * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
14362 (mono_get_array_new_va_signature): Ditto.
14364 2006-08-05 Zoltan Varga <vargaz@gmail.com>
14366 * aot-runtime.c: Call init_plt lazily.
14368 * inssel-long.brg: Fix unsigned long->int conversion.
14370 * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
14372 * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
14373 that most data is now in the .rss/.data section.
14375 2006-08-04 Zoltan Varga <vargaz@gmail.com>
14377 * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.
14379 * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
14381 * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
14383 * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
14385 * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
14386 virtual call. Fixes #79010.
14388 * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method
14389 and use the result as the this argument in the real call.
14391 * generics.2.cs: Add a new test for #79010.
14393 2006-08-03 Zoltan Varga <vargaz@gmail.com>
14395 * mini-x86.c: Fix a warning.
14397 * aot-compiler.c: Add a bunch of statistics.
14399 * mini.c (inline_method): Disable inlining in out-of-line bblocks.
14401 2006-08-02 Zoltan Varga <vargaz@gmail.com>
14403 * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
14405 2006-08-01 Zoltan Varga <vargaz@gmail.com>
14407 * 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>.
14409 2006-07-13 Miguel de Icaza <miguel@novell.com>
14411 * mini.c (mono_method_to_ir): Obtain the original method in the
14412 CIL stream and use this to perform validation.
14416 2006-07-19 Zoltan Varga <vargaz@gmail.com>
14418 * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
14419 (mono_arch_call_opcode): Ditto.
14421 * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
14424 * mini.c (mono_patch_info_dup_mp): New helper function.
14426 * aot-compiler.c (compile_method): Fix some of the memory allocated during
14427 compilation. Fixes #78827.
14429 2006-07-18 Kornel Pal <kornelpal@gmail.com>
14431 * declsec.c: Use original security informations for
14432 MONO_WRAPPER_MANAGED_TO_MANAGED.
14434 2006-07-15 Jonathan Chambers <joncham@gmail.com>
14436 * mini.c: Allow Com Interop methods/classes and
14437 don't verify COM wrapper calls
14440 2006-07-13 Zoltan Varga <vargaz@gmail.com>
14442 * inssel-long32.brg: Fix long->i4 checked conversion.
14444 * exceptions.cs: Add a test for the above.
14446 2006-07-08 Zoltan Varga <vargaz@gmail.com>
14448 * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
14450 * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown
14453 * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
14456 2006-07-03 Zoltan Varga <vargaz@gmail.com>
14458 * mini.c: Fix solaris/x86 exception handling.
14460 * Makefile.am: Get rid of $(ICU_LIBS).
14462 2006-07-02 Zoltan Varga <vargaz@gmail.com>
14464 * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
14465 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
14466 (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
14468 * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
14470 * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
14471 this function causes a SIGSEGV.
14473 2006-06-22 Zoltan Varga <vargaz@gmail.com>
14475 * mini.c: Remove unused solaris/x86 includes.
14477 2006-06-21 Zoltan Varga <vargaz@gmail.com>
14479 * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
14481 2006-06-20 Jb Evain <jbevain@gmail.com>
14483 * cpu-g4.md: fix max length of start_handler instruction.
14485 2006-06-20 Massimiliano Mantione <massi@ximian.com>
14486 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
14488 2006-06-16 Massimiliano Mantione <massi@ximian.com>
14489 * ssa.c: Fixed bug 78653 for SSA based deadce.
14490 * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
14491 MonoInst.flags, used in SSA based deadce.
14492 * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
14493 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
14495 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
14497 * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
14498 it can end up using non executable memory on ppc64 systems
14499 running ppc32 userspace (fix from Johannes Berg).
14501 2006-06-14 Dick Porter <dick@ximian.com>
14503 * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
14506 2006-06-13 Massimiliano Mantione <massi@ximian.com>
14507 * mini.c: Made so that inline is locally disabled if it would
14508 trigger a .cctor, because too many apps depend on this behavior
14509 (which seems to be also the one of the MS CLR).
14511 2006-06-13 Zoltan Varga <vargaz@gmail.com>
14513 * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
14514 No idea why this worked before.
14516 * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
14517 which branch to outer exception clauses since they could skip the
14518 inner finally clauses. Fixes #78633.
14520 * exceptions.cs: Add a test for the above.
14522 * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
14525 * iltests.il: Add a test for the above.
14527 2006-06-12 Zoltan Varga <vargaz@gmail.com>
14529 * mini.c (remove_block_if_useless): Do not remove the bblock immediately
14530 after the end of a try bblock, to prevent asserts in mini_method_compile ().
14532 * iltests.il: Add a test for the above.
14534 2006-06-10 Zoltan Varga <vargaz@gmail.com>
14536 * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
14538 * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
14539 methods as instrinsics.
14541 2006-06-09 Wade Berrier <wberrier@novell.com>
14543 * Makefile.am: Fix sources list for svn rename so that make dist succeeds
14544 (simple-cee-ops.h ssapre-mini-ops.h)
14546 2006-06-09 Neale Ferguson <neale@sinenomine.net>
14548 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
14549 * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
14551 * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
14552 * cpu-s390x.md: Fix max. length values for a couple of instructions.
14554 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
14556 * mini-exceptions.c: Minor fix for building mono in Visual Studio.
14558 2006-06-08 Massimiliano Mantione <massi@ximian.com>
14560 * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
14561 * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
14562 * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
14563 * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
14564 * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
14565 of opcodes, so that bug 78549 should not happen again.
14566 * ssapre.c: Updated to use the renamed files.
14568 2006-06-08 Zoltan Varga <vargaz@gmail.com>
14570 * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move
14571 in OP_ATOMIC_EXCHANGE_I4.
14573 2006-06-07 Wade Berrier <wberrier@novell.com>
14575 * tramp-s390.c: Fix s390 build (add missing pointer declarations
14576 in mono_debugger_create_notification_function)
14578 2006-06-06 Zoltan Varga <vargaz@gmail.com>
14580 * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
14582 * mini.c (type_from_stack_type): Disable some changes which do not
14585 * driver.c: Reenable opts.
14587 * mini.h (MonoStackSlot): New structure to keep track of the verification state
14588 of the evaluation stack.
14590 * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
14591 evaluation stack trace at entry to the bblock.
14593 * mini.c (merge_stacks): New function to perform verification of stack merges.
14594 Turned off by default.
14596 * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
14599 2006-06-06 Massimiliano Mantione <massi@ximian.com>
14601 * local-propagation.c: Fixed bug 78549.
14603 2006-06-04 Zoltan Varga <vargaz@gmail.com>
14605 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
14607 2006-06-02 Miguel de Icaza <miguel@novell.com>
14609 * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
14610 tramp-arm.c, tramp-ia64.c
14611 (mono_debugger_create_notification_function): Update signature to
14612 new signature and use new protocol for creating the notification
14615 Should fix the build.
14617 2006-06-02 Geoff Norton <gnorton@customerdna.com>
14619 * exceptions-ppc.c (mono_jit_walk_stack)
14620 (ves_icall_get_frame_info): Fix the build
14622 2006-06-02 Zoltan Varga <vargaz@gmail.com>
14624 * mini.c (mono_set_defaults): Fix the handling of -O=-all.
14626 2006-05-31 Raja R Harinath <rharinath@novell.com>
14628 * il2tests.2.il: New file for generics CIL tests. Add test for
14630 * Makefile.am: Update.
14633 * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
14636 2006-05-30 Massimiliano Mantione <massi@ximian.com>
14638 * aliasing.c: Fixed bug 78311.
14640 2006-05-29 Martin Baulig <martin@ximian.com>
14642 * mini-exceptions.c (mono_find_jit_info): When computing the
14643 native offset, check whether we're actually inside the method's
14644 code; call mono_debug_print_stack_frame() to format the frame.
14645 (ves_icall_System_Exception_get_trace): Call
14646 mono_debug_print_stack_frame() to format the stack frame.
14647 (ves_icall_get_trace): Update to the new debugging API.
14648 (mono_jit_walk_stack_from_ctx): Likewise.
14649 (ves_icall_get_frame_info): Likewise.
14651 * mini.c (get_method_from_ip): Use the new debugging API.
14652 (mono_print_method_from_ip): Likewise.
14655 (mono_jit_walk_stack): Use the new debugging API.
14656 (ves_icall_get_frame_info): Likewise.
14658 2006-05-27 Zoltan Varga <vargaz@gmail.com>
14660 * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
14662 2006-05-25 Massimiliano Mantione <massi@ximian.com>
14664 * mini.c: Added "limitator" to inline for debugging.
14666 2006-05-24 Martin Baulig <martin@ximian.com>
14668 * debug-debugger.c (mono_debugger_init): Create a private,
14669 malloc()-based code manager for the notification function and
14670 intentionally leak it on exit. This fixes the crash-on-exit race
14674 (mono_debugger_create_notification_function): Added
14675 `MonoCodeManager *' argument.
14678 (mono_debugger_create_notification_function): Added
14679 `MonoCodeManager *' argument.
14681 2006-05-23 Massimiliano Mantione <massi@ximian.com>
14683 * aliasing.c: Fixed 64 bit issue.
14684 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
14685 default since all known bugs are fixed (one more time!).
14687 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
14689 * mini.c: write barrier support.
14691 2006-05-23 Martin Baulig <martin@ximian.com>
14693 * debug-debugger.c: Revert Paolo's change. Add comment and #error
14694 check at the top of the file.
14696 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
14698 * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
14699 reverting changes without reason and without changelog entries.
14701 2006-05-18 Zoltan Varga <vargaz@gmail.com>
14703 * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
14704 to a few opcodes. Fixes #78439.
14706 * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
14707 consistency with other archs.
14709 * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
14711 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
14713 * debug-debugger.c: fix the build.
14715 2006-05-17 Martin Baulig <martin@ximian.com>
14718 (debugger_thread_vtable): Moved here from ../metadata/threads.c.
14719 (debugger_init_threads): Formerly known as mono_debugger_init_threads().
14720 (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
14721 (debugger_attach): Call GC_mono_debugger_add_all_threads().
14723 2006-05-11 Zoltan Varga <vargaz@gmail.com>
14725 * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
14727 2006-05-10 Zoltan Varga <vargaz@gmail.com>
14729 * mini-x86.c (mono_arch_instrument_epilog): Fix handling of
14730 MONO_TYPE_GENERICINST.
14732 * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of
14733 MONO_TYPE_GENERICINST.
14735 2006-05-09 Zoltan Varga <vargaz@gmail.com>
14737 * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
14740 2006-05-08 Zoltan Varga <vargaz@gmail.com>
14742 * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
14744 (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
14746 2006-05-06 Zoltan Varga <vargaz@gmail.com>
14748 * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
14749 mono_trace_cleanup ().
14751 * iltests.il: Fix problem with the newly added test.
14753 * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
14754 due to register constraints, free up the previous hreg. Fixes #78314.
14756 * iltests.il: Add new test for #78314.
14758 * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
14759 Interlocked.Add. Fixes #78312.
14761 * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
14763 2006-05-05 Zoltan Varga <vargaz@gmail.com>
14765 * inssel.brg (mini_emit_virtual_call): Fix a warning.
14767 2006-05-05 Martin Baulig <martin@ximian.com>
14769 * debug-mini.c (mono_debug_open_block): New method.
14772 (mono_arch_output_basic_block): Call mono_debug_open_block() at
14773 the beginning of each basic block.
14776 (mono_arch_output_basic_block): Call mono_debug_open_block() at
14777 the beginning of each basic block.
14779 2006-05-04 Massimiliano Mantione <massi@ximian.com>
14781 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
14782 default until I understand why they break the build on amd64.
14784 2006-05-04 Zoltan Varga <vargaz@gmail.com>
14786 * mini.c (mini_cleanup): Call mono_cleanup ().
14788 * mini.c (UNVERIFIED): New macro to make it easier to track down verification
14791 2006-05-04 Massimiliano Mantione <massi@ximian.com>
14793 * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
14794 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
14795 default since all known bugs are fixed, and I cannot reproduce bug
14796 77944... I'm asking Matt Hargett to test again after this commit.
14798 2006-04-28 Massimiliano Mantione <massi@ximian.com>
14800 * mini-codegen.c: Fixed typo that thrashed inline.
14802 2006-04-28 Zoltan Varga <vargaz@gmail.com>
14804 * dominators.c (compute_dominators): Avoid using a worklist since
14805 it is not correct in some cases. Instead, iterate over all bblocks as
14806 in the original paper. Fixes --compile-all -O=all System.Xml.dll.
14808 2006-04-28 Miguel de Icaza <miguel@novell.com>
14810 * mini.c (mono_jit_compile_method_inner): Use
14811 mono_prepare_exception_from_error that resets the value
14814 2006-04-27 Miguel de Icaza <miguel@novell.com>
14816 * mini.c: Move the mini_loader_error_to_exception to metadata.
14818 2006-04-27 Massimiliano Mantione <massi@ximian.com>
14820 * aliasing.c: Fixed bug 78210.
14822 2006-04-27 Massimiliano Mantione <massi@ximian.com>
14824 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
14825 default until all their problems (or the ones they trigger) are fixed.
14827 2006-04-26 Zoltan Varga <vargaz@gmail.com>
14829 * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
14831 * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
14832 as loaded only after resolving patches since that could invoke the same method.
14834 * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
14836 * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
14839 * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
14842 * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
14845 * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
14846 made from AOT code through the PLT table.
14848 * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
14849 holding the plt offset when a call is made to the aot plt trampoline.
14851 2006-04-25 Zoltan Varga <vargaz@gmail.com>
14853 * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the
14856 * Makefile.am (common_sources): Fix build breakage.
14858 * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
14859 calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
14860 intra-assembly calls if possible.
14862 * tramp-*.c: Add new functions for patching/nullifying PLT entries.
14864 * mini-trampolines.c: Handle PLT entries.
14866 * mini.c: Avoid creating a GOT var for calls.
14868 * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
14869 from mscorlib code.
14871 * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
14872 from mscorlib code.
14874 * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
14877 * mini.h: Bump AOT file format version.
14879 * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
14882 2006-04-25 Martin Baulig <martin@ximian.com>
14884 * driver.c: Disable copyprop, consprop and inline when running
14885 inside the debugger.
14887 2006-04-25 Martin Baulig <martin@ximian.com>
14889 * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
14890 with `get_current_thread' and added `detach'.
14891 (MonoDebuggerMetadataInfo): Added `thread_size',
14892 `thread_tid_offset', `thread_stack_ptr_offset' and
14893 `thread_end_stack_offset'.
14895 2006-04-25 Zoltan Varga <vargaz@gmail.com>
14897 * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and
14900 * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
14901 ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
14903 * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
14905 * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
14907 * aot.c: Add support for ADJUSTED_IID.
14909 2006-04-24 Zoltan Varga <vargaz@gmail.com>
14911 * aot.c (emit_method_order): Don't align method_order_end.
14913 * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
14914 the interface ID changes.
14916 2006-04-21 Dick Porter <dick@ximian.com>
14918 * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
14919 cleaning up a thread. Fixes the new part of bug 77470.
14921 2006-04-20 Geoff Norton <gnorton@customerdna.com>
14923 * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
14924 to managed wrapper.
14926 2006-04-19 Zoltan Varga <vargaz@gmail.com>
14928 * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
14930 * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
14931 SIGSEGV. Fixes #78072.
14933 * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
14934 unregister our SIGABRT handler.
14936 2006-04-19 Massimiliano Mantione <massi@ximian.com>
14938 * mini.c: Disabled inline where it can alter the call stack in a
14939 way visible from managed code.
14940 * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
14943 2006-04-16 Zoltan Varga <vargaz@gmail.com>
14945 * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
14946 on other platforms. Fixes #78089.
14948 2006-04-13 Martin Baulig <martin@ximian.com>
14950 * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
14951 determine whether we're inside the debugger.
14954 (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
14956 2006-04-12 Zoltan Varga <vargaz@gmail.com>
14958 * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
14959 handler clauses. Fixes #78024.
14961 * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
14962 in the CALL_MEMBASE opcodes. Fixes #78088.
14963 (mono_arch_get_vcall_slot_addr): Ditto.
14965 2006-04-10 Martin Baulig <martin@ximian.com>
14967 * debug-debugger.c: The thread handling code has now been moved
14968 into ../metadata/threads.c.
14970 2006-04-10 Zoltan Varga <vargaz@gmail.com>
14972 * driver.c (mono_main): Fix --with-gc=none build.
14974 * mini-codegen.c (mono_spillvar_offset): Improve alignment.
14975 (mono_spillvar_offset_float): Ditto.
14976 (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
14977 hreg, not when its !global, since on ia64, there is a third category: stacked
14980 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
14982 * mini.c: set MonoInst->klass for load field address and a few other
14985 2006-04-10 Zoltan Varga <vargaz@gmail.com>
14987 * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
14989 2006-04-07 Zoltan Varga <vargaz@gmail.com>
14991 * dominators.c (compute_dominators): Fix yet another bug which surfaced after
14992 the branch opt changes.
14994 2006-04-06 Dick Porter <dick@ximian.com>
14996 * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
14998 * wapihandles.c (mini_wapi_seminfo):
14999 * driver.c (mono_main): Add semaphore info option
15001 2006-04-05 Zoltan Varga <vargaz@gmail.com>
15003 * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
15004 branch optimization changes. Fixes #78009.
15006 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
15008 * mini.c: ignore accessibility of methods in managed->native wrappers.
15010 2006-04-04 Zoltan Varga <vargaz@gmail.com>
15012 * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
15014 * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
15016 2006-04-03 Zoltan Varga <vargaz@gmail.com>
15018 * mini.c: Modify the branch optimizations to preserve the invariant that
15019 the entries inside the in_bb and out_bb arrays are unique.
15020 (mono_unlink_bblock): Avoid creation of new arrays.
15022 2006-04-02 Zoltan Varga <vargaz@gmail.com>
15024 * mini.c (mono_unlink_bblock): Fix regression caused by previous
15027 2006-04-01 Zoltan Varga <vargaz@gmail.com>
15029 * mini.c (optimize_branches): Remove the "optimizations" in
15030 the cbranch1/cbranch2 -> branch cases which were causing several
15031 problems in the past. Fixes #77986.
15033 2006-03-31 Chris Toshok <toshok@ximian.com>
15035 * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
15036 default optimizations :(
15038 2006-03-31 Zoltan Varga <vargaz@gmail.com>
15040 * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
15043 2006-03-31 Massimiliano Mantione <massi@ximian.com>
15045 * local-propagation.c: Added comments to structs and removed
15046 "Mono" prefixes from local tree mover types.
15048 2006-03-30 Zoltan Varga <vargaz@gmail.com>
15050 * Makefile.am (arch_sources): Define this for each architecture so
15051 libmono_la_SOURCES is defined in one place.
15053 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
15055 * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
15058 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
15060 * driver.c: print the GC name supplied by configure.
15062 2006-03-29 Massimiliano Mantione <massi@ximian.com>
15064 * local-propagation.c: Added tree mover, and moved here all the
15065 local propagation code from mini.c
15066 * mini.c: Added support for treeprop, and moved all the local
15067 propagation code to local-propagation.c
15068 * mini.h: Added support for treeprop
15069 * driver.c: Added support for treeprop, enabled consprop, copyprop,
15070 treeprop, inline and deadce by default
15071 * Makefile.am: Added local-propagation.c
15073 2006-03-25 Zoltan Varga <vargaz@gmail.com>
15075 * exceptions-sparc.c: Applied patch from David S. Miller <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
15077 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
15079 * debug-debugger.c: make it compile without the Boehm GC.
15081 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
15083 * mini.c: fixed issue with mismatch when an icall is registered
15084 with multiple names but same address.
15086 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
15088 * declsec.c, mini-exceptions.c: use write barrier to set reference
15089 fields of managed objects.
15091 2006-03-19 Zoltan Varga <vargaz@gmail.com>
15093 * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
15094 (can_access_internals): Fix a warning.
15096 * mini.c (print_method_from_ip): Rename this to
15097 mono_print_method_from_ip so it gets exported.
15099 * trace.c: Deal with strings inside StringBuilder's containing garbage
15100 and fix memory leaks. Fixes #77848.
15102 2006-03-19 Zoltan Varga <vargaz@gmail.com>
15104 * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
15107 2006-03-16 Neale Ferguson <neale@sinenomine.net>
15109 * mini-s390.c: Remove OP_X86_TEST_NULL.
15111 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
15113 * mini.c: use the correct GetHashCode() for the moving collector.
15115 2006-03-16 Massimiliano Mantione <massi@ximian.com>
15117 * liveness.c: Regalloc spill cost tuning.
15119 2006-03-15 Neale Ferguson <neale@sinenomine.net>
15121 * mini-s390x.h: Correct S390_LONG macro.
15123 * mini-s390x.c: Cleanup unused code.
15125 2006-03-15 Zoltan Varga <vargaz@gmail.com>
15127 * jit-icalls.h: New file.
15129 * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
15130 icalls and include that instead of including jit-icalls.c.
15132 * mini-ppc.c (mono_arch_output_basic_block): Remove references to
15135 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
15137 * mini.c: when checking for member accessibility, also check for
15138 friend assemblies and for explicit interface implementations.
15140 2006-03-14 Zoltan Varga <vargaz@gmail.com>
15142 * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
15144 * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
15146 * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
15147 common cases are done first.
15149 * mini-ops.h: Only define platform specific opcodes on the given platform.
15151 * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
15154 2006-03-14 Martin Baulig <martin@ximian.com>
15156 Revert Paolo's change from r57348:
15158 * mini.h: don't use gboolean for bitfields.
15159 * mini.c: verifier changes for fields and methods accessibility.
15161 2006-03-13 Neale Ferguson <neale@sinenomine.net>
15163 * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
15165 * mini-s390x.c: Fix conv_r_un.
15167 * cpu-s390, cpu-s390x.md: Fix lengths.
15169 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
15171 * mini.c: nested types have access to all the nesting
15172 levels, not just the enclosing types.
15174 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
15176 * mini.c: added a few more verification checks.
15178 2006-03-12 Zoltan Varga <vargaz@gmail.com>
15180 * liveness.c: Merge optimizations from the linear-il branch.
15182 2006-03-11 Zoltan Varga <vargaz@gmail.com>
15184 * mini-ia64.c (emit_call): Add a comment.
15186 * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
15188 * tramp-ia64.c: Fix some warnings.
15190 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
15192 * mini.h: don't use gboolean for bitfields.
15193 * mini.c: verifier changes for fields and methods accessibility.
15195 2006-03-11 Zoltan Varga <vargaz@gmail.com>
15197 * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
15198 lazy icall wrapper changes.
15200 * dominators.c: Replace all the dominator algorithms with faster
15201 ones from the linear-il branch.
15203 * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
15206 * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
15207 common cases are done first.
15209 * mini-amd64.c: Fix some warnings.
15211 * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
15214 * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
15217 * mini.h: Add a missing prototype.
15219 2006-03-10 Zoltan Varga <vargaz@gmail.com>
15221 * mini.c: Compile icall wrappers lazily.
15223 * mini-codegen.c: Use printf instead of g_print since its much faster.
15225 * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
15228 * mini.c (optimize_branches): Cache the negative result from
15229 remove_block_if_useless ().
15231 * mini.c (optimize_branches): Avoid restarting the iteration after each change.
15232 Also fix some bblock linking issues.
15234 * helpers.c (mono_disassemble_code): Reduce the size of the temporary
15237 * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
15239 * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
15240 accessed fields first, for better cache behavior.
15242 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
15244 * mini.c: speedup IList<T> array accesses.
15246 2006-03-09 Zoltan Varga <vargaz@gmail.com>
15248 * mini.c (mono_method_to_ir): Handle large methods overflowing the
15249 inline_costs counter. Fixes #77190.
15251 2006-03-06 Zoltan Varga <vargaz@gmail.com>
15253 * mini-exceptions.c: Call mono_trace_is_enabled () before printing
15254 trace messages. Fixes #77706.
15256 2006-03-04 Martin Baulig <martin@ximian.com>
15258 * tramp-amd64.c, tramp-x86.c
15259 (mono_debugger_create_notification_function): Use
15260 mono_global_codeman_reserve() to allocate a buffer at runtime and
15263 * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
15265 * debug-debugger.c (mono_debugger_init): Dynamically allocate the
15266 notification function at runtime and then call `initialize' in the
15267 `MONO_DEBUGGER__debugger_info' vtable.
15269 2006-03-04 Zoltan Varga <vargaz@gmail.com>
15271 * iltests.il: Fix a visibility problem.
15273 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
15275 * driver.c, mini.c: add hooks for the counters API.
15277 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
15279 * driver.c: show disabled options.
15281 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
15283 * linear-scan.c: always use cost-driven selection.
15285 2006-02-28 Raja R Harinath <rharinath@novell.com>
15287 * jit-icalls.c (helper_compile_generic_method): Revert change from
15290 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
15292 * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
15294 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
15296 * inssel.brg: style fixes, mostly to force the updated monoburg
15297 to run for people using svn.
15299 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
15301 * mini.c: match monoburg changes.
15303 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
15305 * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
15306 ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
15307 declaration in the header file.
15309 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
15311 * helpers.c: reduce relocations and mem usage.
15313 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
15315 * mini.h, mini-codegen.c: disable logging features if
15316 requested by configure.
15318 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
15320 * mini.c: tiny verifier changes.
15322 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
15324 * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
15325 cpu-pentium.md: stack alignment changes for osx/x86,
15326 partially from Geoff Norton <gnorton@customerdna.com>.
15328 2006-02-24 Raja R Harinath <harinath@gmail.com>
15330 * jit-icalls.c (helper_compile_generic_method): Update to changes
15331 in metadata/class.c.
15333 2006-02-24 Zoltan Varga <vargaz@gmail.com>
15335 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
15337 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
15338 interface calls with large offsets.
15340 2006-02-23 Raja R Harinath <rharinath@novell.com>
15342 * jit-icalls.c (helper_compile_generic_method): Document the
15343 special-case we depend on so that we can inflate the method twice
15344 with the same context with no bad side-effects.
15346 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
15348 * mini-x86.c, mini-amd64.c: fix for case when xen support
15351 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
15353 * mini-x86.c, mini-amd64.c: generate code to access tls items
15354 in a faster way for Xen systems.
15356 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
15358 * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
15359 updates and compilation fixes for the OSX/x86 port, mostly from
15360 Geoff Norton <gnorton@customerdna.com>.
15362 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
15364 * inssel.brg: faster interface call implementation
15365 to sync with the interface_offsets MonoVTable changes.
15367 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
15369 * mini.c: more verification checks.
15371 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
15373 * mini.c: added a few more verification checks.
15375 2006-02-17 Neale Ferguson <neale@sinenomine.net>
15377 * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
15378 facility on the processor and use it if available.
15380 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
15382 * driver.c, aot.c, mini.c: throw exception if the IL code is
15383 invalid or unverifiable.
15385 2006-02-17 Raja R Harinath <rharinath@novell.com>
15387 * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
15390 2006-02-16 Zoltan Varga <vargaz@gmail.com>
15392 * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
15394 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
15396 * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
15397 mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
15398 handling of instantiated generic valuetypes.
15400 2006-02-11 Zoltan Varga <vargaz@gmail.com>
15402 * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of
15403 MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
15406 * generics.2.cs: Revert the nullable reftypes tests.
15408 2006-02-10 Zoltan Varga <vargaz@gmail.com>
15410 * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
15411 using __builtin_frame_address (1) as it doesn't work in the presence
15412 of optimizations. Hopefully fixes #77273.
15414 * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
15415 -> generics.cs change as it doesn't work with some automake versions.
15417 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
15419 * mini.c: handle systems that sue a different way to
15420 retrieve the stack address of the current thread.
15422 2006-02-09 Zoltan Varga <vargaz@gmail.com>
15424 * Makefile.am generics.2.cs: Rename this to generics.cs and handle
15425 it specially in the makefile.
15427 * generics.2.cs: Add tests for nullable reference types.
15429 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
15431 * mini.c: always handle the case when mono_jit_init()
15432 is called in a thread different from the main thread,
15433 confusing libgc (bug #77309).
15435 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
15437 * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
15439 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
15441 * mini.c: change optimize_branches () to use a single loop
15442 and introduce a new optimization to simplify some range checks.
15444 2006-02-03 Martin Baulig <martin@ximian.com>
15446 * debug-debugger.c (debugger_thread_manager_thread_created): Removed
15447 and merged with debugger_thread_manager_add_thread().
15448 (mono_debugger_main): Call debugger_thread_manager_add_thread() to
15449 inform the debugger about the main thread.
15451 2006-02-03 Zoltan Varga <vargaz@gmail.com>
15453 * basic.cs: Add test for div.un/rem.un constant folding.
15455 2006-02-03 Neale Ferguson <neale@sinenomine.net>
15457 * cpu-s390x.md: correct int_xor_imm length
15459 2006-02-03 Zoltan Varga <vargaz@gmail.com>
15461 * generics.2.cs: New test for #77442.
15463 * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
15466 2006-02-02 Martin Baulig <martin@ximian.com>
15468 * tramp-x86.c, tramp-amd64.c: It's now safe to #include
15469 <mono/metadata/mono-debug-debugger.h>
15471 * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
15473 2006-02-02 Martin Baulig <martin@ximian.com>
15475 * debug-debugger.h: New header file for debug-debugger.c.
15477 * debug-debugger.c: Big API cleanup; don't run the managed Main()
15478 function is a separate thread anymore; add support for attaching.
15480 2006-02-01 Zoltan Varga <vargaz@gmail.com>
15482 * tramp-x86.c: Fix a warning.
15484 2006-01-31 Zoltan Varga <vargaz@gmail.com>
15486 * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
15487 on very large methods.
15489 * aot.c (load_patch_info): Fix a warning.
15491 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
15493 * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
15494 mini-ops.h: alu membase optimizations.
15496 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
15498 * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
15499 to speedup StringBuilder.
15501 2006-01-27 Zoltan Varga <vargaz@gmail.com>
15503 * dominators.c (mono_compute_natural_loops): Fix detection of
15504 loop body start blocks.
15506 * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
15508 2006-01-26 Zoltan Varga <vargaz@gmail.com>
15510 * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
15513 2006-01-25 Massimiliano Mantione <massi@ximian.com>
15515 * aliasing.c: Fixed aliasing issue on 64 bit archs.
15517 2006-01-25 Martin Baulig <martin@ximian.com>
15519 * debug-debugger.c: Moved the `MonoDebuggerManager' and
15520 `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
15521 started to cleanup this file a little bit.
15523 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
15525 * mini.c: optimize a codepath frequently happening in generics code.
15527 2006-01-23 Martin Baulig <martin@ximian.com>
15529 * Makefile.am: Only compile debug-debugger.c on supported platforms.
15531 * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
15532 functions directly.
15534 * driver.c: debug-debugger.c is only available if
15535 `MONO_DEBUGGER_SUPPORTED' is defined.
15537 2006-01-23 Martin Baulig <martin@ximian.com>
15539 * debug-debugger.c: Only enable this on platforms where the Mono
15540 Debugger is working (x86 and x86_64).
15542 2006-01-21 Martin Baulig <martin@ximian.com>
15544 The Mono Debugger is now using the normal `mono' instead of the
15545 `mono-debugger-mini-wrapper' when executing managed code.
15547 * debug-debugger.c: New file; previously known as
15548 debugger/wrapper/wrapper.c.
15550 * debug-mini.c (mono_init_debugger): Removed.
15552 * driver.c (mono_main): Added new `--inside-mdb' command line
15553 argument which is used when running inside the debugger.
15555 2006-01-20 Zoltan Varga <vargaz@gmail.com>
15557 * liveness.c (mono_analyze_liveness): Remove some unused data
15560 2006-01-17 Zoltan Varga <vargaz@gmail.com>
15562 * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
15564 2006-01-16 Zoltan Varga <vargaz@gmail.com>
15566 * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
15567 depends on implementation details of monobitset.
15569 * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
15572 2006-01-15 Zoltan Varga <vargaz@gmail.com>
15574 * liveness.c: Update after monobitset changes.
15576 2006-01-14 Zoltan Varga <vargaz@gmail.com>
15578 * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
15580 2006-01-11 Neale Ferguson <neale@sinenomine.net>
15582 * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
15584 * mini-s390x.c: Remove warning messages.
15586 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
15588 * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
15590 2006-01-10 Zoltan Varga <vargaz@gmail.com>
15592 * generics.2.cs: Add ldelem/stelem_any test.
15594 2006-01-10 Neale Ferguson <neale@sinenomine.net>
15596 * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
15598 2006-01-07 Zoltan Varga <vargaz@gmail.com>
15600 * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
15602 2006-01-06 Zoltan Varga <vargaz@gmail.com>
15604 * generics.2.cs: Reenable vtype tests.
15606 * inssel-x86.brg: Remove an icorrect valuetype rule.
15608 2006-01-06 Neale Ferguson <neale@sinenomine.net>
15610 * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
15611 initial support for OP_ABS.
15613 2006-01-05 Neale Ferguson <neale@sinenomine.net>
15615 * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
15617 2006-01-05 Neale Ferguson <neale@sinenomine.net>
15619 * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int
15620 conversion and implement LADD/LSUB.
15622 * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
15625 2006-01-05 Neale Ferguson <neale@sinenomine.net>
15627 * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
15629 * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
15632 2006-01-05 Neale Ferguson <neale@sinenomine.net>
15634 * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when
15635 localloc is encountered. Fixes crash in test-183.cs when using gmcs
15636 (stack walk problem).
15638 2006-01-04 Zoltan Varga <vargaz@gmail.com>
15640 * aot.c (mono_aot_load_method): Fix a warning.
15642 2006-01-03 Neale Ferguson <neale@sinenomine.net>
15644 * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
15646 2006-01-03 Zoltan Varga <vargaz@gmail.com>
15648 * iltests.il: Add test for #77148.
15650 * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
15653 2006-01-03 Neale Ferguson <neale@sinenomine.net>
15655 * mini-s390x.c, inssel-s390x.brg: Remove debug statements
15657 2006-01-03 Neale Ferguson <neale@sinenomine.net>
15659 * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
15660 cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
15662 * basic-long.cs: Add lconv-to-r4/r8 tests.
15664 2006-01-03 Zoltan Varga <vargaz@gmail.com>
15666 * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
15668 * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
15669 here as on other archs.
15671 2005-12-29 Neale Ferguson <neale@sinenomine.net>
15673 * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
15675 2005-12-29 Neale Ferguson <neale@sinenomine.net>
15677 * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
15679 * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
15681 * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
15682 instrument_prolog; Add memory_barrier instruction.
15684 2005-12-26 Zoltan Varga <vargaz@gmail.com>
15686 * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
15688 2005-12-23 Zoltan Varga <vargaz@gmail.com>
15690 * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
15692 * aliasing.c inssel.brg: Fix warnings.
15694 * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
15695 could skip initialization of some parts of memory.
15697 * mini.c mini-ia64.c: Fix warnings.
15699 * inssel-sparc.brg: Add an implementation of lneg which actually works.
15701 2005-12-22 Zoltan Varga <vargaz@gmail.com>
15703 * aliasing.c (mono_build_aliasing_information): Add a workaround for
15704 a crash seen on sparc.
15706 * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
15708 * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
15710 2005-12-21 Neale Ferguson <neale@sinenomine.net>
15712 * mini-ops.h: Add s390_backchain instruction
15714 * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
15716 * cpu-s390.md: Add s390_backchain instruction
15718 * mini-s390.c: Significant ABI changes
15720 * mini-s390.h: Cater for zero length structures
15722 2005-12-20 Neale Ferguson <neale@sinenomine.net>
15724 * mini-s390.c: ABI fixes
15726 * inssel-s390.brg: Remove debug statements
15728 * cpu-s390.md: Fix length of ATOMIC_xx operations
15730 2005-12-19 Zoltan Varga <vargaz@gmail.com>
15732 * basic-float.cs: Add float<->long conversion tests.
15734 2005-12-16 Neale Ferguson <neale@sinenomine.net>
15736 * mini-s390.c: Fix LOCALLOC processing.
15738 * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
15740 2005-12-15 Zoltan Varga <vargaz@gmail.com>
15742 * iltests.il: Add tests for some opcodes not covered by the other
15745 2005-12-15 Neale Ferguson <neale@sinenomine.net>
15747 * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct
15748 register loading for Tail processing; Correct trace output.
15750 * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
15752 * cpu-s390.md: Correct size of jmp instruction.
15754 2005-12-13 Neale Ferguson <neale@sinenomine.net>
15756 * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
15758 2005-12-13 Neale Ferguson <neale@sinenomine.net>
15760 * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
15761 Bring s390 up to current level.
15763 2005-12-12 Zltan Varga <vargaz@gmail.com>
15765 * generics.2.cs: Disable the newly added tests as they do not work yet.
15767 * generics.2.cs: Add valuetype tests.
15769 2005-12-09 Zoltan Varga <vargaz@gmail.com>
15771 * basic-long.cs: Add i4->u8 test.
15773 * objects.cs: Add tests for JIT intrinsic.
15775 * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
15776 optimizations lost by a mistake.
15778 2005-12-07 Zoltan Varga <vargaz@gmail.com>
15780 * basic-long.cs: Remove a test moved to objects.cs.
15782 * arrays.cs: Add more array tests.
15784 2005-12-06 Zoltan Varga <vargaz@gmail.com>
15786 * arrays.cs: Add new tests for multi-dimensional arrays.
15788 2005-12-06 Raja R Harinath <rharinath@novell.com>
15790 * Makefile.am (test_sources2): Add generics.2.cs.
15791 (EXTRA_DIST): Add test_sources2.
15793 2005-12-05 Ben Maurer <bmaurer@ximian.com>
15795 Support for boxing and unboxing nullable types as well as the
15796 isinst operation on nullables, per the CLI ammendment.
15798 * inssel.brg (CEE_ISINST): Special case for nullable
15800 * mini.c (handle_unbox_nullable): new method
15801 (handle_box): Special case for nullable types
15802 (mono_method_to_ir): Call handle_unbox_nullable in correct
15805 * generics.2.cs: New test suite
15807 * Makefile.am: Support for regression tests with generics.
15809 2005-12-03 Zoltan Varga <vargaz@gmail.com>
15811 * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
15812 allocated to registers. Fixes #76800.
15814 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
15816 * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
15818 2005-11-30 Zoltan Varga <vargaz@gmail.com>
15820 * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot
15823 2005-11-29 Zoltan Varga <vargaz@gmail.com>
15825 * objects.cs basic-calls.cs: Move a test depending on valuetypes to
15828 * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
15830 * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
15831 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
15833 * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
15834 single precision before storing to a single precision location.
15836 2005-11-28 Raja R Harinath <rharinath@novell.com>
15838 * Makefile.am (ILASM): Use profile-dependent location of ilasm.
15840 2005-11-27 Zoltan Varga <vargaz@gmail.com>
15842 * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
15845 * basic.cs: Remove test_0_byte_compares test which was moved to
15846 objects.cs a long time ago.
15848 2005-11-22 Massimiliano Mantione <massi@ximian.com>
15850 * aliasing.c: Fixed aliasing issue on 64 bit archs.
15852 2005-11-20 Zoltan Varga <vargaz@gmail.com>
15854 * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
15855 handlers are called.
15857 * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
15860 * mini-ia64.c: Add support for the throw->branch exception
15863 * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
15865 2005-11-18 Massimiliano Mantione <massi@ximian.com>
15867 * mini.c: Enabled "fastpath" deadce :-)
15869 2005-11-18 Massimiliano Mantione <massi@ximian.com>
15871 * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
15872 alias analysis pass to support it.
15873 * mini.h: Likewise.
15875 * liveness.c: Likewise (liveness computation can use aliasing
15876 information to be more accurate).
15877 * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
15878 moreover made so that "--compile-all" uses the given optimization
15879 flags and not the default ones.
15880 * aliasing.c: Alias analysis (new file).
15881 * aliasing.h: Likewise.
15882 * Makefile.am: added "aliasing.c" and "aliasing.h".
15884 2005-11-17 Zoltan Varga <vargaz@gmail.com>
15886 * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
15889 2005-11-13 Zoltan Varga <vargaz@gmail.com>
15891 * mini-exceptions.c (mono_handle_exception_internal): Remove the
15892 fp >= end_of_stack exit condition, as it is not needed, and it might
15893 become true for fp eliminated frames.
15895 2005-11-11 Zoltan Varga <vargaz@gmail.com>
15897 * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
15900 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
15902 * mini-arm.c: fixed alignment of doubles/longs to match
15903 the C ABI (bug #76635).
15905 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
15907 * aot.c: fix compilation with --enable-minimal=aot.
15909 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
15911 * mini-arm.c: fixed compatibility with the new
15912 floating point emulator package for compares.
15914 2005-11-03 Atsushi Enomoto <atsushi@ximian.com?
15916 * mini.c : reverted sig->pinvoke changes (r51396-51397).
15918 2005-11-01 Zoltan Varga <vargaz@freemail.hu>
15920 * mini-exceptions.c (print_stack_frame): Output to stderr.
15921 (mono_handle_native_sigsegv): Ditto.
15923 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
15925 * mini-amd64.c (mono_arch_output_basic_block): Remove unused
15926 OP_LCONV_TO_OVF_I implementation.
15928 * mini-amd64.c: Add support for the throw->branch exception
15931 * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
15932 when the catch clause catches a more general exception, i.e. Object.
15934 2005-10-30 Zoltan Varga <vargaz@gmail.com>
15936 * cpu-ia64.md: Remove unused opcodes.
15938 * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
15939 specific defines for architectures defining USE_SIGACTION.
15941 * mini-ia64.c: Fix some warnings.
15943 * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
15944 version seemed to skip a frame.
15946 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
15948 * mini.c: Clean up the usage of sig->pinvoke flag. Now
15949 only calls which are made to native code use this flag.
15951 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
15953 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
15954 varargs methods as well.
15956 * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
15957 which have save_lmf set. Reorganize methods prologs a bit.
15959 * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
15960 debugger to the proper place.
15962 2005-10-29 Martin Baulig <martin@ximian.com>
15964 * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
15965 when running inside the debugger until the debugger has support
15968 2005-10-26 Zoltan Varga <vargaz@gmail.com>
15970 * mini.h: Fix a warning.
15972 2005-10-24 Miguel de Icaza <miguel@novell.com>
15974 * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
15975 we expose publicly, this returns the string.
15977 2005-10-22 Zoltan Varga <vargaz@freemail.hu>
15979 * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
15980 with fp elimination.
15982 2005-10-21 Zoltan Varga <vargaz@gmail.com>
15984 * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
15985 native stacktrace using the glibc 'backtrace' function if available.
15987 2005-10-20 Zoltan Varga <vargaz@gmail.com>
15989 * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
15991 * mini-exceptions.c (mono_handle_native_sigsegv): New function to
15992 handle SIGSEGVs received while in native code.
15994 * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
15995 code, call mono_handle_native_sigsegv which will abort the runtime
15996 after printing some diagnostics, instead of converting it into a
15997 confusing NullReferenceException.
15999 2005-10-18 Zoltan Varga <vargaz@gmail.com>
16001 * cpu-pentium.md: Remove unused opcodes.
16003 2005-10-18 Zoltan Varga <vargaz@freemail.hu>
16005 * mini-amd64.h (MonoLMF): Add rsp field.
16007 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
16010 2005-10-17 Zoltan Varga <vargaz@gmail.com>
16012 * mini-codegen.c (get_register_spilling): Fix some warnings.
16014 2005-10-16 Zoltan Varga <vargaz@freemail.hu>
16016 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
16017 elimination during exception handling. Enable fp elimination by
16020 * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
16023 2005-10-16 Martin Baulig <martin@ximian.com>
16025 * mini-exceptions.c
16026 (mono_debugger_run_finally): New public method for the debugger.
16028 2005-10-10 Zoltan Varga <vargaz@gmail.com>
16030 * debug-mini.c (mono_debug_init_method): Fix warning.
16032 * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
16033 the 'exname' parameter const to fix some warnings.
16035 2005-10-09 Zoltan Varga <vargaz@freemail.hu>
16037 * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
16038 introduced by the previous patch.
16040 2005-10-08 Zoltan Varga <vargaz@gmail.com>
16042 * basic-float.cs: Add test for precision of float arithmetic.
16044 * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
16045 when loading/storing single values from/to memory.
16047 * mini.c (mono_jit_compile_method_with_opt): Create the function
16048 pointers in the correct domain.
16050 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
16052 * mini-exceptions.c (mono_handle_exception_internal): Fix bug
16053 introduced by previous patch.
16055 * mini-exceptions.c (mono_handle_exception_internal): Handle the case
16056 when out_filter_idx is NULL.
16058 * mini-exceptions.c: Don't run filter clauses twice during exception
16059 handling. Fixes #75755.
16061 2005-10-07 Zoltan Varga <vargaz@gmail.com>
16063 * aot.c: Add support for ldflda wrappers.
16065 * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
16068 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
16070 * mini.c, mini.h: do not consider exception handlers blocks when
16071 setting up interface variables.
16073 2005-10-04 Zoltan Varga <vargaz@freemail.hu>
16075 * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
16077 2005-10-03 Zoltan Varga <vargaz@gmail.com>
16079 * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
16080 causes a regression.
16082 * mini.c (mini_thread_cleanup): Fix reading of freed memory.
16084 2005-10-02 Zoltan Varga <vargaz@freemail.hu>
16086 * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
16087 of the OP_P definitions.
16089 * TODO: Add a proposal for dealing with the CEE/OP mess.
16091 * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm
16092 optimizations from the x86 port.
16094 * cpu-amd64.md: Ditto.
16096 * basic.cs basic-long.cs: Add tests.
16098 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
16100 * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
16101 Patrik Torstensson's implementation of my exception-handling
16102 optimization idea, when the exception object is not used
16105 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
16107 * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
16108 of the mul_imm optimizations from the old jit.
16110 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
16112 * mini.c, liveness.c: patch by Patrik Torstensson and
16113 Zoltan Varga to improve performance in methods with
16116 2005-09-30 Zoltan Varga <vargaz@gmail.com>
16118 * driver.c: Remove 'Globalization' entry from --version.
16120 2005-09-28 Zoltan Varga <vargaz@gmail.com>
16122 * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
16123 there is a profiler interested in JIT events.
16125 * aot.c: Load profile files produced by the AOT profiling module, and
16126 reorder methods based on the profiling info. Add a 'method_order' table
16127 to the AOT file to make mono_aot_find_jit_info work with the reordered
16130 * mini.h: Bump AOT file version info.
16132 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
16134 * mini-arm.h: work around what looks like a gcc bug when optimizations
16137 2005-09-28 Raja R Harinath <rharinath@novell.com>
16139 * Makefile.am (AM_CFLAGS): Don't use += to append inside
16140 conditionals. Use ...
16141 (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
16143 2005-09-27 Zoltan Varga <vargaz@freemail.hu>
16145 * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
16146 to determine the amount of memory to copy when passing valuetypes.
16148 * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
16149 4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
16151 2005-09-27 Zoltan Varga <vargaz@gmail.com>
16153 * mini.h mini.c aot.c: Add infrastructure to collect pagefault
16154 information about aot.
16156 2005-09-27 Ben Maurer <bmaurer@ximian.com>
16158 * *.c: Replace the use of {Enter,Leave}CriticalSection with
16159 macros. This will allow a deadlock debugger to easily be plugged
16162 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
16164 * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
16166 2005-09-27 Raja R Harinath <rharinath@novell.com>
16168 * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
16169 (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
16170 (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
16171 ($(arch_built)) [CROSS_COMPILING]: Error out.
16173 2005-09-26 Zoltan Varga <vargaz@gmail.com>
16175 * aot.c: Add support for the no_special_static flag for classes.
16177 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
16179 * Reapply reverted patches.
16181 * *: Revert r50174 as well.
16183 * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
16185 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
16187 * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
16189 2005-09-23 Miguel de Icaza <miguel@novell.com>
16191 * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
16192 part of the SIG_HANDLER_SIGNATURE.
16194 2005-09-23 Zoltan Varga <vargaz@gmail.com>
16196 * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
16199 * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention
16200 introduced by previous patch.
16202 2005-09-21 Zoltan Varga <vargaz@gmail.com>
16204 * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
16205 saved registers too.
16207 * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based
16208 upon the information returned by get_call_info ().
16210 * mini-x86.c (add_float): Fix stack size calculation.
16211 (mono_arch_call_opcode): Rewrite this so it works based up the
16212 information returned by get_call_info ().
16213 (mono_arch_get_this_vret_args): Ditto.
16215 2005-09-21 Zoltan Varga <vargaz@freemail.hu>
16217 * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
16218 in cinfo to determine the registers which need to be used.
16220 2005-09-20 Miguel de Icaza <miguel@novell.com>
16222 * driver.c (mono_main): Add --server and --desktop flags.
16224 2005-09-16 Zoltan Varga <vargaz@gmail.com>
16226 * mini-ia64.h: Make register masks 64 bit. Don't treat argument
16227 registers as global registers.
16229 * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no
16230 longer needed with the new register allocator.
16232 * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
16234 * cpu-ia64.md: Remove unused opcodes.
16236 * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
16238 2005-09-16 Zoltan Varga <vargaz@freemail.hu>
16240 * cpu-amd64.md: Remove unused opcodes.
16242 * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
16243 needed with the new register allocator.
16245 * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
16248 2005-09-16 Raja R Harinath <rharinath@novell.com>
16250 * Makefile.am (check-local): Don't invoke semdel-wrapper.
16252 2005-09-16 Martin Baulig <martin@ximian.com>
16254 * exceptions-amd64.c
16255 (throw_exception): Don't call mono_debugger_throw_exception() if
16256 we're a rethrow - see the FIXME in the code.
16258 2005-09-15 Geoff Norton <gnorton@customerdna.com>
16260 * mini.c (mono_init_exceptions): This only works on some architectures.
16262 2005-09-15 Zoltan Varga <vargaz@gmail.com>
16264 * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
16267 * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
16269 * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
16270 now in mini-exceptions.c.
16272 2005-09-15 Zoltan Varga <vargaz@freemail.hu>
16274 * mini-amd64.h mini-am64.c: Remove the altstack support code which is
16275 now in mini-exceptions.c.
16277 2005-09-15 Zoltan Varga <vargaz@gmail.com>
16279 * exceptions-x86.c: Applied patch from Patrik Torstensson
16280 <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
16282 * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
16283 code into mini-exceptions.c. Add some assertions to it.
16285 2005-09-12 Zoltan Varga <vargaz@gmail.com>
16287 * aot.c (emit_section_change): Applied patch from "The Software Team"
16288 (<software@solmersa.com>). Fix as errors on windows.
16290 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
16292 * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
16293 method info into the LMF.
16295 2005-09-11 Zoltan Varga <vargaz@gmail.com>
16297 * mini-ia64.c: Add proper unwind info for method epilogs.
16299 * exceptions-ia64.c: Add some code to help debugging.
16301 * mini-ia64.c mini-ia64.h: Add sigaltstack support.
16303 * mini-exceptions.c: Fix warning.
16305 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
16307 * mini.c: Really fix build.
16309 * mini-x86.c mini-amd64.c: Fix build.
16311 2005-09-11 Zoltan Varga <vargaz@gmail.com>
16313 * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
16315 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
16316 some Interlocked methods as intrinsics.
16318 * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
16319 for Thread methods as well.
16321 * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
16323 * inssel.brg: Add rule for OP_MEMORY_BARRIER.
16325 * mini-ia64.c mini-x86.c mini-amd64.c
16326 cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of
16329 * mini.c (mono_init_exceptions): Fix build breakage.
16331 2005-09-10 Zoltan Varga <vargaz@gmail.com>
16333 * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
16334 of instructions. Use the new ia64_unw_op macros for emitting unwind
16337 * mini.c (mono_init_exceptions): Initialize exception handling
16338 related trampolines at startup.
16340 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
16342 * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
16344 2005-09-09 Zoltan Varga <vargaz@gmail.com>
16346 * mini.c: Handle type loading errors gracefully during compilation and
16347 throw the appropriate exception.
16349 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
16351 * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
16352 for the mono binary.
16354 2005-09-09 Martin Baulig <martin@ximian.com>
16356 * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
16359 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
16361 * mini-arm.h: use emulation for conv.r.un for the release.
16363 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
16365 * mini-arm.c, objects.cs: more fixes and tests for them.
16367 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
16369 * mini-arm.c: align structures to at least 4 bytes to be able
16370 to keep our current optimized memcpy.
16372 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
16374 * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
16376 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16378 * mini.c: ignore SIGPIPE.
16380 2005-09-04 Zoltan Varga <vargaz@gmail.com>
16382 * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
16384 * mini-ia64.h mini-ia64.c: Add some minor optimizations.
16386 2005-09-02 Zoltan Varga <vargaz@gmail.com>
16388 * mini.h: Add prototype for mono_allocate_stack_slots_full.
16390 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
16392 * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
16393 exception handling support.
16394 * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
16395 patch by Brian Koropoff <briank@marakicorp.com>).
16397 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
16399 * mini.c: revert another 'optimization' which breaks when
16400 items on the eval stack need to be saved at a basic block end
16403 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
16405 * jit-icalls.c: for arrays, ensure we always provide
16408 2005-08-30 Zoltan Varga <vargaz@gmail.com>
16410 * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
16412 * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
16414 2005-08-29 Zoltan Varga <vargaz@gmail.com>
16416 * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
16417 arguments in their original register.
16419 2005-08-28 Zoltan Varga <vargaz@gmail.com>
16421 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
16424 * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
16425 when ssapre is enabled.
16427 * inssel-long.brg: Fix bug in previous patch.
16429 * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize
16430 multiplication by a constant.
16432 2005-08-27 Zoltan Varga <vargaz@gmail.com>
16434 * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
16437 * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
16440 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
16442 * inssel-arm.brg: apply changes tested by Brian Koropoff
16443 <briank@marakicorp.com>.
16445 2005-08-25 Zoltan Varga <vargaz@gmail.com>
16447 * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
16449 2005-08-24 Zoltan Varga <vargaz@gmail.com>
16451 * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
16452 to the same register if dreg is just a base register.
16453 (print_ins): Improve printing of membase opcodes.
16455 * inssel-x86.brg: Add optimized ldind(reg) rules.
16457 * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
16459 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
16461 * mini.c: when running under valgrind, set the stack bottom for
16462 the GC at the actual approximate stack for the app (fixes running
16463 mono with valgrind).
16465 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
16467 * mini.c: do no break at the first valuetype to init found
16468 (fixes bug #75791).
16470 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
16472 * cpu-arm.md, mini-arm.c: more fixes and LMF support.
16474 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
16476 * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
16478 2005-08-23 Zoltan Varga <vargaz@freemail.hu>
16480 * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
16482 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
16484 * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
16486 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
16489 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
16492 * mini.c (optimize_branches): Don't quit after 1000 iterations on large
16495 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
16497 * tramp-arm.c: allocate less memory for the trampoline and fix typo.
16499 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
16501 * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
16502 in the tail recursion optimization.
16504 * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as
16505 debug info into the assembly file.
16507 * iltests.il: Add test for filter regions.
16509 * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
16510 initial stack of filter regions. Fixes #75755.
16512 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
16514 * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
16515 stack requirements.
16517 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
16519 * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
16520 the check for an already compiled method on non-ia64 platforms.
16521 (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
16524 * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
16526 * inssel-x86.brg: Add some optimized call rules.
16528 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
16530 * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
16533 * mini.h mini-trampolines.c: Pass the trampoline argument to
16534 mono_arch_patch_delegate_trampoline.
16536 * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
16538 * mini-trampolines.c: Fix build.
16540 * mini-amd64.h: Add delegate trampolines.
16542 * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
16544 * inssel-amd64.brg: Add optimized call rules.
16546 * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
16548 * inssel-ia64.brg: Add optimized ldind(reg) rules.
16550 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
16552 * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
16555 * mini-ia64.c: Remove LMF fixmes.
16557 * mini-ia64.h: Remove most fields from LMF.
16559 * inssel-ia64.brg (stmt): Fix unaligned access errors.
16561 * mini-trampolines.c: Add support for IA64 function descriptors.
16563 * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
16564 for IA64 function descriptors.
16566 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
16568 * tramp-arm.c: patch the vtable for virtual calls. Added
16569 support code to register/unregister the LMF.
16570 * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
16573 2005-08-19 Dick Porter <dick@ximian.com>
16575 * mini.c: Use a gsize to store the thread ID, so it can hold a 64
16576 bit value if needed.
16578 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
16580 * mini.c (mini_get_method): Move handling of wrapper data here.
16582 * mini.c (mono_method_to_ir): Add support for dynamic methods.
16584 * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
16587 * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so
16588 bblock->code does not remain empty.
16590 2005-08-17 Zoltan Varga <vargaz@freemail.hu>
16592 * arrays.cs: Add regression test for #75832.
16594 * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
16595 rules. Fixes #75832.
16597 * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
16598 instruction scheduling.
16600 2005-08-12 Zoltan Varga <vargaz@freemail.hu>
16602 * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
16604 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
16606 * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
16608 * mini-codegen.c: Fix VC build.
16610 * cpu-pentium.md: Increase length of atomic_exhange_i4.
16612 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16614 * mini.h: fix signature for mono_register_opcode_emulation.
16616 2005-08-09 Zoltan Varga <vargaz@freemail.hu>
16618 * mini.c: Get rid of most of the helper_sig_... constants using
16619 mono_create_icall_signature ().
16621 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
16623 * jit-icalls.c (helper_ldstr): New helper function.
16625 * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
16627 * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
16628 throw, load the string using a helper call instead of creating a string object.
16630 * aot.c: Update after LDSTR changes.
16632 * mini.h: Bump AOT file version.
16634 * aot.c: Save class size info into the AOT file. Print more statistics during
16637 * mini.h: Bump AOT file version.
16639 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
16640 ordering of disasm cases. Fixes #74957.
16642 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
16644 * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
16645 jit-icalls.c, mini-codegen.c, Makefile.am: changes in
16646 the generic code needed for the ARM port.
16648 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
16650 * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
16651 inssel-arm.brg: more ARM features and fixes.
16653 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
16655 * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
16656 ARM port work in progress.
16658 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
16660 * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
16662 * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
16664 * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
16666 * inssel.brg (mini_emit_memset): Add support for unaligned access.
16668 * *-ia64.*: Ongoing IA64 work.
16670 * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
16672 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
16674 * TODO: Remove out-of-data todo stuff.
16676 * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
16679 * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
16681 * mini.h: Bump corlib version.
16683 2005-07-27 Martin Baulig <martin@ximian.com>
16686 (create_copy_ins): Added `const unsigned char *ip' argument; set
16687 `copy->cil_code' from it.
16689 2005-07-27 Martin Baulig <martin@ximian.com>
16691 * mini-exceptions.c (mono_handle_exception): Don't call
16692 mono_debugger_handle_exception() for filters.
16694 2005-07-27 Zoltan Varga <vargaz@freemail.hu>
16696 * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
16699 2005-07-26 Martin Baulig <martin@ximian.com>
16701 Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
16703 * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
16704 helper_compile_generic_method() if the method is actually virtual
16707 2005-07-26 Martin Baulig <martin@ximian.com>
16710 (trampoline_code): Renamed to `mono_trampoline_code' and made it
16711 public; this is now accessed directly by the debugger.
16712 (mono_generic_trampoline_code): Removed.
16715 (mono_debug_init_method): Also add interncalls and wrappers.
16717 2005-07-23 Zoltan Varga <vargaz@freemail.hu>
16719 * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
16721 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
16723 * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
16725 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
16727 * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
16729 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
16731 * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
16732 getting TLS offsets on AMD64 too.
16734 2005-07-20 Kornel Pal <kornelpal@hotmail.com>
16736 * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
16738 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
16740 * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
16741 inssel-arm.brg, mini-arm.h: ARM port work in progress.
16743 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
16745 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
16747 * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
16750 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call
16751 mono_sparc_is_virtual_call ().
16753 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
16755 * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
16756 trampoline parameters.
16758 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
16760 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
16761 to mono_arch_get_vcall_slot_addr.
16763 * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
16766 * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
16768 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
16770 * mini-ia64.h mini-ia64.c: Finish pinvoke support.
16772 2005-07-19 Martin Baulig <martin@ximian.com>
16774 * exceptions-amd64.c (throw_exception): Call
16775 mono_debugger_throw_exception() here like we're doing it on i386.
16777 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
16779 * mini-ia64.c: Add optimized TLS access support.
16781 2005-07-18 Zoltan Varga <vargaz@freemail.hu>
16783 * mini-exceptions.c: Ongoing IA64 work.
16785 * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
16787 * mini.c: Use the default optimization set when embedding. Fixes
16790 2005-07-11 Zoltan Varga <vargaz@freemail.hu>
16792 * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts
16793 of trampolines to a separate file.
16795 * mini-trampolines.c: New file.
16797 * mini.h tramp-x86.c: Move arch independent parts of trampolines to a
16800 * tramp-x86.c: Reorganize the trampoline code to be similar to the
16803 * mini-codegen.c: Fix cygwin build.
16805 2005-07-10 Zoltan Varga <vargaz@freemail.hu>
16807 * mini.c: Add some minor changes needed by the IA64 port.
16809 * *-ia64.*: Ongoing IA64 work.
16811 2005-07-09 Zoltan Varga <vargaz@freemail.hu>
16813 * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split
16814 trampolines into arch-independent and arch-dependent parts.
16816 * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
16818 2005-07-08 Zoltan Varga <vargaz@freemail.hu>
16820 * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
16822 * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
16823 the xp-regalloc-branch for amd64.
16825 * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
16826 xp-regalloc-branch for x86.
16828 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
16830 * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
16832 2005-07-06 Martin Baulig <martin@ximian.com>
16835 (mono_jit_compile_method_inner): Call mono_get_inflated_method().
16836 (mono_jit_runtime_invoke): Likewise.
16838 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
16840 * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
16843 * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
16844 without loading their metadata. Reorganize the file format so exception handling+
16845 debug info is kept separate from normal method info. Create MonoJitInfo
16846 structures for methods lazily.
16848 * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
16850 (x86_class_init_trampoline): Patch AOT class init trampolines too.
16852 * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
16854 * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
16857 * mini.h: Bump AOT file version.
16859 2005-07-04 Zoltan Varga <vargaz@freemail.hu>
16861 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
16863 2005-07-01 Raja R Harinath <rharinath@novell.com>
16865 * Makefile.am (check-local): Call semdel-wrapper.
16867 2005-06-29 Zoltan Varga <vargaz@freemail.hu>
16869 * mini-x86.c: Revert the last change as it seems to break the build..
16871 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
16873 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
16875 * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
16877 2005-06-27 Ben Maurer <bmaurer@ximian.com>
16879 * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
16880 outside of the macro, so strange stuff doesn't happen with gcc4
16881 (NEW_AOTCONST_TOKEN): Likewise.
16883 2005-06-28 Martin Baulig <martin@ximian.com>
16885 * mini.c (mini_class_is_system_array): New static method; use this
16886 instead of `klass->parent == mono_defaults.array_class' everywhere
16887 since this also works for the new generic array class.
16889 2005-06-26 Ben Maurer <bmaurer@ximian.com>
16891 * inssel.brg: Remove warnings.
16893 2005-06-24 Zoltan Varga <vargaz@freemail.hu>
16895 * mini-ia64.c: Ongoing IA64 work.
16897 * basic-float.cs: Add float->i1 conversion test.
16899 * iltests.il: Add conv.u4 test.
16901 2005-06-23 Zoltan Varga <vargaz@freemail.hu>
16903 * inssel-long.brg: Fix bug caused by last change.
16905 2005-06-23 Geoff Norton <gnorton@customerdna.com>
16907 * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other
16908 BSDs. Allows the x86 JIT to work on OSX86
16910 2005-06-22 Zoltan Varga <vargaz@freemail.hu>
16912 * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
16915 * mini-ia64.c: Ongoing IA64 work.
16917 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
16919 * mini-ia64.c: Ongoing IA64 work.
16921 * driver.c: Clean up jit_code_hash as well when using --regression.
16923 * inssel-long.brg: Fix long->i4/u4 conversion rules.
16925 * basic-long.cs: Add tests for long->u4 conversion.
16927 2005-06-18 Ben Maurer <bmaurer@ximian.com>
16929 * mini.c: Take mono_get_domainvar out of macros. This makes sure
16930 that we do not depend on undefined C behavior: the order stuff
16931 gets evaluated within an expression. Fixes mono when compiled on
16934 2005-06-18 Zoltan Varga <vargaz@freemail.hu>
16936 * *-ia64.*: Ongoing IA64 work.
16938 * aot.c: Lower memory usage while loading AOT methods.
16940 * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
16942 * mini.h: Bump AOT file format version.
16944 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
16946 * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
16948 2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
16950 * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
16951 not on callee assembly). Fixed some comments.
16953 2005-06-16 Zoltan Varga <vargaz@freemail.hu>
16955 * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
16956 it gets proper disassembly.
16957 (emit_method_info): Remove some dead code.
16959 * mini.c (mini_method_compile): Allways allocate the GOT var in
16960 mono_method_to_ir for emulating opcodes.
16962 2005-06-13 Zoltan Varga <vargaz@freemail.hu>
16964 * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
16965 before freeing the code memory. Fixes #74990.
16967 * objects.cs: Add regression test for #74992.
16969 * liveness.c: Extend live ranges of arguments to the beginning of the
16970 method. Fixes #74992.
16972 * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
16973 so it points into the faulting instruction.
16975 2005-06-12 Zoltan Varga <vargaz@freemail.hu>
16977 * jit-icalls.c (mono_imul_ovf): Add exception handling.
16979 * *-ia64.*: Ongoing IA64 work.
16981 * mini.c (mini_init): Fix signature of mono_delegate_ctor.
16983 2005-06-11 Zoltan Varga <vargaz@freemail.hu>
16985 * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
16987 * *-ia64.*: Ongoing IA64 work.
16989 2005-06-10 Zoltan Varga <vargaz@freemail.hu>
16991 * basic-long.cs: Add tests for add/sub.ovf.
16993 * basic.cs: Add tests for sub.ovf.
16995 * *-ia64.*: Ongoing IA64 work.
16997 2005-06-09 Zoltan Varga <vargaz@freemail.hu>
16999 * *-ia64.*: Ongoing IA64 work.
17001 * basic.cs: Add conv.ovf.i4.un test.
17003 2005-06-09 Massimiliano Mantione <massi@ximian.com>
17005 * mini.c: (remove_block_if_useless) Fixed bug 75061.
17007 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17009 * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
17011 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
17013 * *-ia64.*: Ongoing IA64 work.
17015 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17018 * mini.c: added the ability to toggle trace on/off using SIGUSR2.
17020 2005-06-04 Zoltan Varga <vargaz@freemail.hu>
17022 * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
17024 2005-06-03 Zoltan Varga <vargaz@freemail.hu>
17026 * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
17028 * mini-amd64.c (amd64_patch): Add an assert to check that the destination
17029 of a call is callable by a near call.
17031 2005-05-31 Zoltan Varga <vargaz@freemail.hu>
17033 * mini-ia64.c: Ongoing IA64 work.
17035 2005-05-29 Zoltan Varga <vargaz@freemail.hu>
17037 * genmdesc.c: Make the generated array non-static.
17039 * inssel-long.brg: Fix LSHR_IMM rule.
17041 * *-ia64.*: Ongoing IA64 work.
17043 * *-ia64.*: Ongoing IA64 work.
17045 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
17047 * *-ia64.*: Ongoing IA64 work.
17049 * *-ia64.*: Ongoing IA64 work.
17051 * mini-ia64.c: Ongoing IA64 work.
17053 * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
17055 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
17057 * objects.cs basic-calls.cs: Move some tests to objects.cs.
17059 * objects.cs basic-long.cs: Move some tests to objects.cs.
17061 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
17063 * *-ia64.*: Ongoing IA64 work.
17065 * iltests.il: Add a new test.
17067 * mini.c (mono_method_to_ir): Initialize valuetypes when created using
17068 newobj. Fixes #75042.
17070 2005-05-22 Zoltan Varga <vargaz@freemail.hu>
17072 * *-ia64.*: Ongoing IA64 work.
17074 * *-ia64.*: Ongoing IA64 work.
17076 * *-ia64.*: Ongoing IA64 work.
17078 * basic.cs objects.cs: Move tests accessing static variables as well.
17080 * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
17082 2005-05-21 Zoltan Varga <vargaz@freemail.hu>
17084 * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
17086 * driver.c: Always print failed tests.
17088 * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
17091 * *ia64*: Ongoing IA64 work.
17093 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
17095 * basic.cs: Add tests for add.ovf. Fix warnings.
17097 2005-05-18 Miguel de Icaza <miguel@novell.com>
17099 * driver.c (mono_main): Avoid crash if no argument is passed to
17100 --break; Do not use g_error, but f_printf. And fix all other
17101 ocurrences of the same crash.
17103 2005-05-17 Zoltan Varga <vargaz@freemail.hu>
17105 * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
17106 and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
17109 2005-05-14 Zoltan Varga <vargaz@freemail.hu>
17111 * *-ia64.*: Add beginnings of IA64 backend.
17113 * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.
17115 2005-05-13 Zoltan Varga <vargaz@freemail.hu>
17117 * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
17120 * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
17122 * mini-amd64.c: Fix a warning.
17124 2005-05-10 Zoltan Varga <vargaz@freemail.hu>
17126 * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
17127 in float_neg. Fixes #74897.
17129 * mini-amd64.c (emit_call): Fix another near call bug.
17131 2005-05-06 Sebastien Pouliot <sebastien@ximian.com>
17133 * declsec.c: Keep the appdomain information in the structure. Added a
17134 missing "return FALSE" for Unmanaged if FullTrust is set (or else the
17135 value gets overwritten).
17136 * declsec.h: Set the default MonoArray for the the stack to 6. Added
17137 an MonoAppDomain member to MonoSecurityFrame.
17138 * mini-exceptions.c: Do not use a glist to keep GC allocated objects
17139 used in the stack walk. Now use a MonoArray which grow (double) when
17142 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
17144 * mini.c: Re-enabled runtime cleanup, since running threads should
17145 now properly stop when exiting.
17147 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
17149 * mini-codegen.c: New file contaning the arch-independent local
17150 register allocator. Not used by any architectures yet.
17152 * mini.h linear-scan.c: Merge some changes from the
17153 mini-xp-local-regalloc branch.
17155 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
17157 * mini-amd64.c (emit_call): Fix calls to native functions when the
17158 runtime is compiled as a shared library. Fixes #74756.
17160 * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
17161 on a literal field. Fixes #74751.
17163 2005-04-25 Raja R Harinath <rharinath@novell.com>
17165 * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
17167 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
17169 * objects.cs: Add missing null casting test.
17171 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
17173 * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
17174 in wrapper methods. Also rename 'address' variable to 'offset'.
17176 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
17178 * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
17181 * Makefile.am (MCS): Use -unsafe instead of --unsafe.
17183 * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
17186 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
17188 * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
17190 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
17192 * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
17193 just the last bytes.
17195 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
17197 * aot.c (mono_compile_assembly): Fix warning.
17199 * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
17200 by the _MSC_VER stuff.
17202 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
17204 * inssel-long.brg: Fix #74588.
17206 * cpu-amd64.md: Fix #74591.
17208 * iltests.il: Add new regression tests.
17210 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
17212 * trace.c (mono_trace_enter_method): Print enums as an int, not as a
17215 2005-04-11 Zoltan Varga <vargaz@freemail.hu>
17217 * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
17219 * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches
17220 from Bill Middleton <flashdict@gmail.com>.
17222 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
17224 * arrays.cs: Add new regression test. Fix warnings.
17226 2005-04-09 Zoltan Varga <vargaz@freemail.hu>
17228 * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
17229 and leakage in CKFINITE.
17231 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
17232 this to a null op since it is called on amd64 too.
17234 * exceptions-amd64.c (get_throw_trampoline): Align stack.
17236 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
17237 body since this is not used on amd64.
17239 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
17241 * mini-amd64.c: Remove obsolete fixmes.
17243 * mini.c (print_method_from_ip): Fix debugging support.
17245 2005-2-1 Massimiliano Mantione <massi@ximian.com>
17247 * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
17248 so that expressions that don't give much gain are not reduced.
17249 * ssapre.h: Likewise.
17251 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
17253 * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
17255 * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
17257 * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
17259 2005-04-01 Zoltan Varga <vargaz@freemail.hu>
17261 * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
17263 * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
17265 2005-03-31 Zoltan Varga <vargaz@freemail.hu>
17267 * mini-x86.c: If sigaltstack support is enabled, perform win32 style
17270 * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
17272 * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
17274 * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
17276 * mini-x86.h mini-x86.c exceptions-x86.c: Add support for
17277 MONO_ARCH_USE_SIGACTION. Fixes #74252.
17279 * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
17281 * mini-x86.c: Fix up stack overflow handling.
17283 * exceptions.cs: Add new regression test.
17285 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
17287 * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
17288 mono_jit_thread_attach.
17290 * mini.c (mono_method_to_ir): Verify called method is not abstract.
17292 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
17294 * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
17295 avoid calling constructors using callvirt.
17297 * inssel.brg: Fix #74073.
17299 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
17301 * aot.c, mini.h: Added mono-compiler.h header to allow/ease
17302 compilation with non-GCC compilers.
17303 * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
17304 possible using VS.NET. Adapted from the work of J Lothian (for VC6).
17306 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
17308 * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
17309 klass->interface_offsets (will likely fix bug#74073).
17311 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
17313 * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
17315 2005-03-28 Zoltan Varga <vargaz@freemail.hu>
17317 * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
17318 to amd64_div_reg_size ().
17320 * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
17322 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
17324 * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
17326 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
17328 * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
17330 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
17332 * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
17334 * mini.c (mono_precompile_assembly): Load and precompile referenced
17335 assemblies as well. Fixes #74015.
17337 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
17339 * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
17341 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
17343 * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
17344 a lot of checks and (anyway) permissions cannot work until corlib is
17347 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
17349 * mini-ppc.c: fixed ABI issue on sysv/ppc.
17351 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
17353 * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
17354 calls (fixes bug#72824).
17356 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
17358 * mini.c: fix tail recursion elimination (see test in bug#73936).
17360 2005-03-21 Zoltan Varga <vargaz@freemail.hu>
17362 * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
17363 some fp functions in sse2 mode.
17365 2005-03-20 Zoltan Varga <vargaz@freemail.hu>
17367 * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
17369 2005-03-19 Zoltan Varga <vargaz@freemail.hu>
17371 * mini.h mini.c: Add mono_get_jit_tls_key ().
17373 * mini-x86.c: Enable fast TLS support on windows.
17375 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
17377 * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
17378 * mini.c: Check for p/invoke method when generating code. If a
17379 p/invoke method, or it's class, isn't decorated with [Suppress
17380 UnmanagedCodeSecurity] then generate code to call System.Security.
17381 UnmanagedDemand (only if the security manager is active).
17383 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
17385 * tramp-amd64.c (create_specific_trampoline): Revert parts of the
17386 last change as it seems to cause strange crashes.
17388 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
17390 * *.c: handle unsafe function pointers where needed.
17392 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
17394 * mini.c (mono_jit_free_method): Remove the fixme too.
17396 2005-03-15 Miguel de Icaza <miguel@novell.com>
17398 * mini.c: As discussed, make the code actually free the delegate
17399 thunk now, to enable the debugging of delegate problems, use
17400 MONO_DEBUG=1 when running Mono.
17402 This takes also care of parts of the leaks as seen by Joe.
17404 2005-03-15 Zoltan Varga <vargaz@freemail.hu>
17406 * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable
17407 thread_tls_offset calculation.
17409 2005-03-14 Sebastien Pouliot <sebastien@ximian.com>
17411 * declsec.c: Reworked linkdemand checks for icall. The previous code
17412 was using the declaration code (untrusted) and didn't work as expected
17413 with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
17416 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
17418 * iltests.il: Add new localloc test.
17420 * mini-amd64.c: Handle large stack allocations the same way as on
17421 windows if stack overflow handling is working.
17423 * mini-amd64.c: Allocate the signal stack using mmap.
17425 * mini.c (sigsegv_signal_handler): Fix reading of context.
17427 * mini-exceptions.c: Fix up stack overflow handling.
17429 * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
17431 * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
17433 * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
17435 * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
17437 * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
17438 tramp_init functions as they are no longer needed.
17440 2005-03-12 Zoltan Varga <vargaz@freemail.hu>
17442 * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
17444 * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
17446 * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
17448 * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
17451 * mini-ops.h: Add OP_LMUL_IMM.
17453 * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
17454 long mul/div opcodes as intrinsic.
17456 * mini-amd64.c (emit_call): Handle the case when the callee might be
17459 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
17461 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
17464 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
17466 * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
17468 2005-03-09 Ben Maurer <bmaurer@ximian.com>
17470 * mini.c (mono_codegen): Don't leak here, to help people running
17473 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
17475 * mini-amd64.c (mono_arch_output_basic_block): Fix int->float
17476 conversions in sse2 mode.
17478 * basic-float.cs: Add regression test.
17480 * mini-amd64.c: Reenable sse2.
17482 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
17484 * mini-amd64.c: Disable sse2 until some regressions are fixed.
17486 2005-03-07 Joerg Rosenkranz <joergr@voelcker.com>
17488 * driver.c: Copyright text should include 2005.
17490 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
17492 * cpu-amd64.md (load_membase): Fix more max lengths.
17494 2005-03-06 Zoltan Varga <vargaz@freemail.hu>
17496 * cpu-amd64.md (load_membase): Fix max length.
17498 * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
17500 * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
17502 * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
17503 support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
17505 * basic-float.cs: Add rounding regression test.
17507 * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
17509 2005-03-04 Neale Ferguson <NealeFerguson@earthlink.net>
17511 * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
17512 structures in registers for pinvoke wrappers.
17514 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
17516 * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
17518 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
17520 * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
17521 wrapper to mono_jit_thread_attach.
17523 * mini.c (mini_jit_thread_attach): New jit icall.
17525 * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in
17526 native->managed wrappers.
17528 * exceptions.cs: Add new regression test.
17530 * mini.c (optimize_branches): Check regions in the cbranch to throw
17531 block case as well. Fixes #73242.
17533 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
17535 * mini.c: thread safety fixes.
17537 2005-02-27 Zoltan Varga <vargaz@freemail.hu>
17539 * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
17540 patching stuff, since delegates use jump trampolines so there is
17543 * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in
17546 * tramp-amd64.c: Fix build.
17548 * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
17549 it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
17551 * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
17552 Rename this to mono_arch....
17553 (mono_amd64_get_delegate_method_ptr_addr): Ditto.
17555 * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
17557 * mini-amd64.c (emit_call): If both the caller and the callee is
17558 guaranteed to have 32 bit addresses, emit a normal call.
17560 * tramp-amd64.c: Adapt to changes in mini-amd64.c.
17562 * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines.
17563 * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
17564 method_ptr inside delegates.
17566 2005-02-26 Zoltan Varga <vargaz@freemail.hu>
17568 * mini.c (mono_jit_free_method): Free the method info even if the native code is
17569 invalidated. Fixes #73001.
17571 * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
17573 * mini-x86.c: Only use stdcall for pinvokes on windows.
17575 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
17577 * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
17578 * mini-x86.c: remove unreliable __thread var offset detection,
17579 use the correct accessors and enable by default.
17581 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
17583 * mini.c (mono_jit_free_method): Fix memory leak.
17585 2005-02-22 Zoltan Varga <vargaz@freemail.hu>
17587 * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW.
17589 2005-02-21 Zoltan Varga <vargaz@freemail.hu>
17591 * cpu-amd64.md: Fix lengths of atomic opcodes.
17593 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
17595 * driver.c: try to not imply using ICU is any good.
17597 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
17599 * mini-amd64.c (mono_arch_get_inst_for_method): Implement more
17600 functions as inline ops.
17602 * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
17603 some Interlocked functions as inline ops.
17605 * mini.c (move_basic_block_to_end): Fix bug in last patch.
17607 * mini.h (MonoBasicBlock): Reorganize fields a bit.
17609 * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
17611 * mini.c: Add support for OP_NOT_TAKEN.
17613 * mini-amd64.h mini-amd64.c: Add support for passing/returning small
17614 structures in registers for pinvoke wrappers.
17616 * mini-amd64.c: Fix warnings.
17618 2005-02-19 Zoltan Varga <vargaz@freemail.hu>
17620 * mini.h (MonoCompile): Add 'ret_var_is_local' field.
17622 * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
17624 * mini.c (NEW_RETLOADA): If the ret variable is a local, use its
17625 address instead of loading the address from it.
17627 * mini-x86.c: Add support for returning small structs in registers
17628 on Win32. Fixes part of #70864.
17630 2005-02-18 Zoltan Varga <vargaz@freemail.hu>
17632 * trace.c (get_token): Improve error checking.
17634 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
17636 * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
17638 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
17640 * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
17641 it can be reused for MonoClass.
17642 * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
17645 2005-02-15 Sebastien Pouliot <sebastien@ximian.com>
17647 * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code
17648 instead of a MonoReflectionMethod. The method information wasn't used
17649 when displaying SecurityException details (but will be now).
17651 2005-02-15 Atsushi Enomoto <atsushi@ximian.com>
17653 * Makefile.am : windows build fix.
17655 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
17657 * iltests.il: Add new regression test.
17659 * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
17662 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
17664 * mini.c: Moved linkdemand check into helper function check_linkdemand
17665 to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP,
17668 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
17670 * declsec.c: Added statistics counter for different kinds of
17672 * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
17673 (and commented) declaration.
17674 * mini.c: Added statistics counter for security Demand code
17675 generation. Added display of security statistics.
17677 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
17679 * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
17680 Fix compilation errors under gcc-2.95.
17682 2005-02-12 Ben Maurer <bmaurer@ximian.com>
17684 * mini.c, driver.c: Use the new jit trampoline hashtable
17686 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
17688 * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
17690 2005-02-11 Martin Baulig <martin@ximian.com>
17692 * debug-mini.c (mono_debug_close_method): Free the line number array.
17694 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
17696 * aot.c: Break up large methods into smaller ones. Share GOT slots for
17699 * mini.h: Bump AOT file format version.
17701 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
17703 * declsec.c: Added LinkDemand support and it's special cases for ECMA,
17705 * declsec.h: Added macros to get/set lazyly initialized security
17706 informations about assemblies. Added new enum for different type of
17707 possible LinkDemand violation. Added function to check LinkDemands.
17708 * mini.h: Added a field to MonoCompile to hold any security violation
17709 detected when JITting a method (so it can be thrown later).
17710 * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL
17711 and CEE_CALLVIRT. Added code to throw exception at the end of
17712 mini_method_compile (note: the exception is unhandled right now).
17714 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
17716 * mini.c, jit-icalls.c: use the managed implementation of
17717 memset for initobj and memset, to avoid managed <-> unmanaged
17720 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
17722 * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
17723 optimization if it would need a GOT var.
17725 * basic.cs: Add tests for constant propagation and switch statements.
17727 * ssa.c: Fix out-of-range constant propagation and switch statements.
17729 2005-02-09 <vargaz@freemail.hu>
17731 * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
17733 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
17735 * cpu-amd64.md (load_membase): Fix max length of load_membase.
17737 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
17739 * mini.c: update to new signature of mono_class_get_allocation_ftn().
17741 2005-02-06 Neale Ferguson <NealeFerguson@earthlink.net>
17743 * cpu-s390.md, mini-s390.c: Correct bug with register usage on certain
17744 arithmetic operations.
17746 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
17748 * mini-ppc.c: add a workaround for broken user code that
17749 DllImports vararg functions with non-vararg signatures.
17751 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
17753 * mini.c (mono_jit_compile_method_inner): Add detection and a
17754 meaningfull error message for assemblies written in Managed C++.
17756 * tramp-amd64.c mini-amd64.h: Add support for
17757 create_trampoline_from_token ().
17759 * aot.c mini-x86.c abcremoval.c: Applied patch from
17760 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
17762 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
17764 * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline
17765 which takes a MonoImage/token as parameter instead of a MonoMethod.
17767 * aot.c: Use the new trampoline for initializing vtables.
17769 * aot.c: Add support for ldfld/stfld_remote wrappers.
17771 * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
17772 rules for compare <MEM>, IMM.
17774 * mini.h (MONO_AOT_FILE_VERSION): Bump it.
17776 * aot.c: Handle inherited finalizers correctly.
17778 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
17780 * inssel.brg (stmt): Add a missing _setup_... ().
17782 * aot.c: Save some parts of the class state to the AOT file and use it
17783 to recompute that state when a class is initialized.
17785 * mini.c: Install AOT hooks into the runtime.
17787 * mini.h: Bump AOT file format version.
17789 * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
17792 * iltests.il: Add new test.
17794 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
17796 * mini.c: fix typo.
17798 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
17800 * mini.c: setup the statistical profiler in the thread attach
17801 callback to cope with the new single thread code.
17803 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
17805 * mini-ppc.c: ensure we have enough room for the profiler
17806 calls (fixed bug#72084).
17808 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
17810 * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding
17813 2005-2-1 Massimiliano Mantione <massi@ximian.com>
17815 * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
17817 2005-2-1 Massimiliano Mantione <massi@ximian.com>
17819 * ssapre.c: Fixed an issue with down safety (this allows IronPython
17820 to succesfully execute parrotbench).
17821 * ssapre.h: Likewise.
17823 2005-2-1 Massimiliano Mantione <massi@ximian.com>
17825 * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
17826 variable for stores to method arguments (fixes a SSAPRE issue).
17828 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
17830 * mini.c: handle value types in dup, fixes gen-112.cs.
17832 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
17834 * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
17835 sequence for calls in dynamic methods to avoid thunks.
17837 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
17839 * mini.c: correctly remove dynamic methods from the hashtable.
17841 2005-1-20 Massimiliano Mantione <massi@ximian.com>
17843 * driver.c: Disabled SSAPRE until fix the bug that appears
17844 in IronPython's parrotbench.
17846 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
17848 * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
17850 * mini.c (mono_method_to_ir): Revert the previous change.
17852 * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
17853 when AOT compiling.
17855 * tramp-x86.c (x86_magic_trampoline): Avoid calls to
17856 mono_jit_info_table_find () etc. when running under valgrind.
17858 * inssel.brg: Fix warnings.
17860 * mini-exceptions.c: Fix warnings.
17862 2005-01-31 Martin Baulig <martin@ximian.com>
17864 * driver.c (compile_all_methods_thread_main): Don't try to compile
17865 generic methods or anything which has type parameters.
17867 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
17869 * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
17871 * TestDriver.cs: Add --verbose flags.
17873 * graph.c ssa.c: Fix 64 bit warnings.
17875 * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c
17876 trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
17877 Fix 64 bit warnings.
17879 * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
17880 variable not spotted by gcc.
17882 * mini-amd64.c inssel-amd64.brg: Applied patch from
17883 Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of
17884 X86_COMPARE_MEMBASE opcodes.
17886 * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
17888 2005-01-29 Ben Maurer <bmaurer@ximian.com>
17890 * *: MonoMethod->signature might be NULL now. You *MUST* use
17891 mono_method_signature.
17893 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
17895 * driver.c (compile_all_methods_thread_main): Compile the methods
17896 without invoking cctors.
17898 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
17900 * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
17901 * basic-calls.cs: test for the above.
17903 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
17905 * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after
17906 MonoJitInfo changes.
17908 2005-01-27 Zoltan Varga <vargaz@freemail.hu>
17910 * mini-exceptions.c (mono_handle_exception): Compute the stack trace
17911 eagerly if it contains dynamic methods.
17913 * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
17915 * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
17916 trace, it is now computed by an icall from trace_ips.
17918 * mini-exceptions.c: Fix a warning.
17920 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
17922 * mini-exceptions.c: don't bother getting stack trace info if
17923 it's not going to be used.
17925 2005-01-27 Raja R Harinath <rharinath@novell.com>
17927 * Makefile.am (common_sources): Add ssapre-cee-ops.h and
17930 2005-01-26 Zoltan Varga <vargaz@freemail.hu>
17932 * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
17934 * aot.c: Avoid calling mono_method_get_header () if not needed.
17936 * mini.h: Bump AOT file format version.
17938 * mini.c (mono_emit_native_call): Allocate a GOT var here.
17940 * mini.c (mono_print_tree): Print more info for calls.
17942 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
17944 * declsec.h: Remove warning by adding missing include for marshal.h
17946 2005-01-26 Martin Baulig <martin@ximian.com>
17948 * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
17951 2005-01-25 Zoltan Varga <vargaz@freemail.hu>
17953 * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
17956 * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
17958 * aot.c (mono_compile_assembly): Fix a warning.
17960 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
17962 * declsec.c: Look for security attributes on the original MonoMethod
17963 (and not the wrapped one). This fix permissions on icalls.
17965 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
17967 * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
17969 * mini.c (mono_allocate_stack_slots): Add a fixme.
17971 * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
17973 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
17975 * inssel.brg: optimize casts of sealed types (more
17976 optimizations waiting for fixes in remoting).
17978 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
17980 * inssel.brg (stmt): Add another dummy rule.
17982 * driver.c: Fix warnings.
17984 * driver.c (mono_main): If running under valgrind, instruct glib to use
17985 the system allocation functions so valgrind can track the memory
17986 allocated by the g_... functions.
17988 * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
17990 * mini-ops.h: Add OP_DUMMY_STORE opcode.
17992 * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
17994 * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
17995 variables in try regions.
17997 * mini.c (mini_method_compile): Don't disable optimizations on large
17998 methods when AOT compiling.
18000 * mini.c (mono_allocate_stack_slots): New arch independent method to
18001 allocate stack slots. Not yet used.
18003 2005-01-22 Ben Maurer <bmaurer@ximian.com>
18005 * debug-mini.c (mono_debug_close_method): Plug some leaks.
18007 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
18009 * mini-ppc.c: make the branch info relative as the code
18010 buffer can be reallocated.
18012 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
18014 * aot.c: Allow decoding of the new MONO_PATCH_INFO_DECLSEC.
18015 * driver.c: Removed the AOT/security restriction. Now initialize the
18016 security manager (in metadata) if --security is used.
18017 * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
18018 rather than the pointer to declarative security, when AOT is used.
18020 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
18022 * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
18023 basic blocks, reduced intrinsic exception throwing code size.
18025 2005-01-22 Miguel de Icaza <miguel@ximian.com>
18027 * driver.c (mini_usage): Reorder the usage screen.
18029 2005-01-21 Zoltan Varga <vargaz@freemail.hu>
18031 * mini.c (mono_resolve_patch_target): Fix warning.
18033 2005-01-20 Zoltan Varga <vargaz@freemail.hu>
18035 * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
18038 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
18040 * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
18041 breaks the amd64 build.
18043 * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem
18044 register allocation. Fixes #71454.
18046 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
18048 * arrays.cs: Add new regression test.
18050 2005-1-20 Massimiliano Mantione <massi@ximian.com>
18052 * ssapre.c: Turned usage of snprintf to GString.
18053 * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
18054 (I left it on by mistake in my previous commit).
18056 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
18058 * mini.c, cfold.c, basic-calls.cs: preserve side effects
18059 on cond branch optimization (fixes bug# 71515).
18061 2005-1-20 Massimiliano Mantione <massi@ximian.com>
18063 * abcremoval.c: Fixed bug 71062.
18064 * abcremoval.h: Likewise.
18066 2005-1-20 Massimiliano Mantione <massi@ximian.com>
18068 * mini.c: Added a new functionality to optimize_branches, the removal
18069 of useless basic blocks, and fixed some problem in the removal of
18070 critical edges; some utility functions added for both purposes.
18071 * ssapre.c: Added complex expression support, and fixed bug 70637.
18072 * ssapre.h: Likewise.
18073 * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
18075 * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
18076 * driver.c: Re-enabled SSAPRE.
18078 2005-01-19 Martin Baulig <martin@ximian.com>
18080 * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
18081 the result of mono_get_method_constrained().
18083 2005-01-18 Neale Ferguson <NealeFerguson@earthlink.net>
18085 * exceptions-s390.c tramp-s390.c: Allocate code using the global code
18088 2005-01-18 Geoff Norton <gnorton@customerdna.com>
18090 * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
18091 be detected. Fixes #59296.
18093 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
18095 * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
18096 which can happen. Fixes #71361.
18098 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
18100 * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
18103 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
18105 * mini.c (mono_create_jump_trampoline): Revert last change as it causes
18106 appdomain-unload.exe to fail.
18108 * mini.c: Fix some memory leaks.
18110 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
18112 * inssel.brg: handle the new size of rank, idepth, max_interface_id.
18113 Fixed bug and sped up some codepaths.
18115 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
18117 * mini.c: Fix some memory leaks.
18119 * exceptions.cs basic-long.cs: Add test for checked ulong->int
18122 * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
18124 * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
18127 * iltests.il: Add regression test for #71320.
18129 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
18131 * mini.c (mono_codegen): Fix installation of profiler hooks.
18133 * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
18135 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
18137 * mini.h, mini.c, cfold.c: optimize access to enum
18138 readonly fields, too. Eval conditional branches if possible
18139 to perform unreachable code removal in more cases.
18141 2005-01-15 Zoltan Varga <vargaz@freemail.hu>
18143 * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
18145 * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
18148 * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
18149 WinXP DEP. Fixes #71244.
18151 2005-01-14 Zoltan Varga <vargaz@freemail.hu>
18153 * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
18155 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
18157 * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
18159 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
18161 * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo
18164 * mini.h: Bump AOT version.
18166 * mini.h (MonoCompile): Change exvar to a hash table.
18168 * mini.c: Allocate a separate exvar for each handler block.
18170 * mini.c: Get rid of the computation of filter_lengths, its not needed.
18172 * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
18173 ex var with the pending exception and only throw if the two are equal.
18176 * exceptions.cs: Add tests for rethrow and nested catch clauses.
18178 * mini-x86.c: Fix warnings.
18180 * Makefile.am (common_sources): Move mini-exceptions.c here as it is
18181 used by all the ports now.
18183 * aot.c: Add write-symbols and save-temps options.
18185 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
18187 * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
18189 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
18191 * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx
18194 * tramp-s390.c: Check vtable slot belongs to the domain.
18196 * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
18197 as per other platforms.
18199 * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
18201 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
18203 * driver.c: we don't run the Main() code in a subthread anymore.
18205 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
18207 * mini.c: added experimental rtc support in the statistical
18208 profiler: if the user has the permission, more accurate statistics
18209 are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
18210 The MONO_RTC value must be restricted to what the linux rtc allows:
18211 power of two from 64 to 8192 Hz.
18213 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
18215 * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
18217 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
18219 * mini-ppc.c: better icache flush for smp.
18221 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
18223 * mini-amd64.c (emit_move_return_value): Fix memory leak.
18225 * mini-x86.c (get_call_info): Add the get_call_info () code from the
18226 amd64 port, not yet used.
18228 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
18230 * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
18233 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
18235 * driver.c: Added --security option to activate the security manager.
18236 Right now this will allow code generation for declarative demands and
18237 is disabled when AOT is specified.
18238 * mini.c: Add code generation for declarative security demands.
18239 * mini.h: Add mono_use_security_manager as an extern gboolean.
18241 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
18243 * aot.c (mono_compile_assembly): Speed up compilation a bit by
18244 emitting more dense assembly code.
18246 * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
18247 exception throwing stuff.
18249 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
18251 * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
18254 * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
18255 left in by mistake.
18257 * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is
18260 * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
18262 * tramp-*.c: Only patch vtable slots if the object is in the current
18263 domain. Fixes appdomain-unload.exe.
18265 * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
18267 * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
18270 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
18272 * mini.c (reverse_branch_op): New helper function.
18274 * mini.c (optimize_branches): Run the new optimization only on
18275 platforms which support it. Also reverse all kinds of branches.
18277 * mini.h (MonoBasicBlock): Add 'out_of_line' field.
18279 * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
18282 * mini.c (optimize_branches): Reverse not-equals branches if the false
18283 bblock is a throw. This happens a lot of time with argument checking in
18286 * mini.c (mono_codegen): Add support for placing basic blocks after
18287 the function epilogue.
18289 * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
18292 2005-01-05 Miguel de Icaza <miguel@ximian.com>
18294 * mini.c (setup_stat_profiler): Only set this up if the platform
18295 supports ITIMER_PROF.
18297 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
18299 * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
18302 * inssel.brg: Fix a warning.
18304 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
18306 * mini.c: added support for statistical profiler
18307 (run with: --profile=default:stat).
18309 2005-01-04 Zoltan Varga <vargaz@freemail.hu>
18311 * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
18313 * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
18315 * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes
18316 related to global registers from the amd64 port.
18318 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
18320 * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
18322 * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
18323 with global registers.
18324 (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
18326 * aot.c (emit_method_code): Fix the 'method emitted as' messages.
18328 2004-12-31 Zoltan Varga <vargaz@freemail.hu>
18330 * debug-mini.c (encode_value): Fix off-by-one.
18332 * aot.c (encode_value): Likewise.
18334 * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
18336 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
18338 * mini.c linear-scan.c: Add a workaround for the mcs crash when using
18341 * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
18343 * aot.c (emit_method_info): Increase size of temp buffer.
18345 * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in
18348 2004-12-28 Zoltan Varga <vargaz@freemail.hu>
18350 * aot.c (emit_method_info): Fix build.
18352 * aot.c: Further rework of the AOT file format to reduce the size of
18353 the method info data.
18355 * mini.h: Bump AOT file format version.
18357 2004-12-27 Martin Baulig <martin@ximian.com>
18359 * mini.c (mini_get_method): New static method; call
18360 mono_get_method_full() and mono_get_inflated_method().
18361 (mono_method_to_ir): Use mini_get_method() instead of
18362 mono_get_method_full().
18364 2004-12-26 Patrik Torstensson <patrik.torstensson@gmail.com>
18366 * mini-x86.c (atomic ops): fixed bug interlocked bug #70784.
18368 2004-12-25 Zoltan Varga <vargaz@freemail.hu>
18370 * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
18372 * inssel-amd64.brg: Add some optimization rules.
18374 2004-12-24 Ben Maurer <bmaurer@ximian.com>
18376 * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
18377 standard not GC'd stuff is fine.
18379 2004-12-24 Zoltan Varga <vargaz@freemail.hu>
18381 * aot.c: Rework the AOT file format to get rid of most of the global
18382 symbols. This reduces the size of the mscorlib.dll.so by 1MB.
18384 * mini.h: Bump AOT file format version.
18386 2004-12-23 Zoltan Varga <vargaz@freemail.hu>
18388 * mini.h: Bump AOT file format version.
18390 * aot.c (mono_aot_is_got_entry): New function to determine if an
18391 address is inside a GOT.
18393 * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
18395 * cpu-pentium.md: Increase the maximum size of some instructions which
18396 might involve a got access.
18398 * mini.c (get_method_from_ip): Another debug helper function.
18400 * mini.c: Call mono_get_got_var () in a couple places. Handle the case
18401 when got var accesses are created during the decompose phase.
18403 * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
18405 * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
18406 argument mini_compile_method and to MonoCompile, and use this to
18407 determine whenever a given method is compiled for AOT. This allows the
18408 other methods compiled during AOT compilation to be free of AOT stuff,
18409 so the backends does not need to add special support for them by
18410 creating a fake GOT etc.
18412 * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
18415 2004-12-21 Ben Maurer <bmaurer@ximian.com>
18417 * mini.c (mono_method_to_ir): It turns out that some of the
18418 x-appdomain wrappers are lax with types, so just ignore this for
18421 * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
18422 at the vtable->klass. If it is non-shared code we can just use the
18425 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
18427 * mini-ppc.c: access MonoDomain from tls, too.
18429 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
18431 * declsec.c: Removed unused variable (and related warning ;-)
18433 2004-12-21 Ben Maurer <bmaurer@ximian.com>
18435 * iltests.il: New test for LDELEMA on an array of ref types.
18437 * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
18438 all ldelema's on reftypes.
18439 (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
18440 it was the wrong place to put it.
18442 * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
18443 register to pop to make this cleaner, at the request of Paolo.
18445 2004-12-20 Ben Maurer <bmaurer@ximian.com>
18447 * mini-ops.h (OP_GETHASHCODE): New op.
18449 * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
18451 * mini.c (mini_get_inst_for_method): Create the intrinsic hash
18454 For a microbenchmark, this reduces the cost of Hashtable.get_Item
18457 * mini-x86.c (mono_arch_output_basic_block): Rather than
18465 The first is 3 bytes while the second is 1. This saves 36 kb on
18466 mscorlib, quite a big saving. When bootstraping mcs, I was able to
18467 see a small boost because of icache locality.
18469 * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
18471 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
18473 * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
18474 started code sharing with the generic code.
18476 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
18478 * mini-ppc.c, cpu-g4.md: added code for direct access to
18481 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
18483 * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
18484 mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
18487 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
18489 * declsec.c|h: Added functions to cache the declarative stack modifiers
18490 in MonoJitInfo and to create a security frame from a MonoJitInfo
18492 * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
18493 created. Register internal calls for System.Security.SecurityFrame::
18494 _GetSecurityFrame and _GetSecurityStack.
18495 * mini.h: Added definition for new icalls (in mini-exceptions.c) and
18496 the definitions for the new stack walk/callback mechanism.
18497 * mini-exceptions.c: Added internal call GetSecurityFrame (to get the
18498 first security frame for LinkDemands and InheritanceDemands) and
18499 GetSecurityStack for Demands. Both use the new mono_walk_stack code
18501 * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
18502 walk initialization (lupus).
18504 2004-12-20 Ben Maurer <bmaurer@ximian.com>
18506 * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
18508 (handle_loaded_temps): Do not create a temporary variable for
18509 things that we know are temps. They will never be modified.
18510 (mono_spill_call): Set MONO_INST_IS_TEMP
18511 (mono_emulate_opcode): ditto
18513 (mono_method_to_ir.CEE_DUP): ditto
18515 2004-12-19 Ben Maurer <bmaurer@ximian.com>
18517 * mini.c (type_to_eval_stack_type): Make this handle the void type
18518 (mono_emit_call_args): set the call->type with type_to_eval_stack_type
18519 (emit_tree): use ip_in_bb to special case some common idioms
18520 Update all callers to pass in the IP.
18521 (mono_method_to_ir): Make CEE_CALL* do the above as well.
18523 This gives us a nice 2% speedup in mcs bootstrap.
18525 * mini-x86.c (peephole_pass): Peephole pass to make
18534 * mini.c (ip_in_bb): new method.
18535 (mono_method_to_ir): use this method rather than doing the hash
18538 * linear-scan.c (mono_linear_scan): When expiring actives, you
18539 don't need to keep around variables that expire on this
18540 instruction. This makes it so that:
18543 store (ebx add (ebx, 1))
18547 2004-12-19 Zoltan Varga <vargaz@freemail.hu>
18549 * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc
18550 combination to avoid doing two copies. Fix up problems with previous
18553 * mini.c: Fix 64 bit warnings.
18555 * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
18557 2004-12-17 Zoltan Varga <vargaz@freemail.hu>
18559 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
18560 changes from the x86 code.
18562 * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
18564 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
18566 * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
18567 throwing code to reduce its size, unify the AOT and non-aot code and
18568 get rid of relocations in the AOT case.
18570 * mini-x86.h mini.c exceptions-x86.c
18571 (mono_arch_get_throw_corlib_exception): New arch specific function to
18572 raise corlib exceptions which doesn't require relocations in the
18575 * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
18577 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
18579 * mini.c (mono_emit_method_call): Only allocate the got var when it is
18582 * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
18585 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
18587 * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
18588 with add function when used from Inc/dec atomic
18589 functions. Re-enabled optimization on x86.
18590 * mini-ops.h: renamed atomic_add functions to
18591 allow _add to match the Interlocked::Add and
18592 _add_next to match Interlocked::Inc/Dec.
18594 2004-12-15 Massimiliano Mantione <massi@ximian.com>
18596 * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
18597 linking of BBs to the end BB, and enabled SSAPRE also with
18598 consprop and copyprop (which was prevented by that bug).
18600 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
18602 * mini-x86.c: disabling the Interlocked optimizing code.
18604 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
18606 * aot.c (load_aot_module): Move reading of got_addr after the AOT
18607 file version check.
18609 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
18611 * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm
18612 interlocked optimization due lack of support on x86, rewrote
18613 exchange to take into account that base may be in eax.
18615 xsp works again; activated Interlocked optimizing code.
18617 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
18619 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
18621 2004-12-13 Zoltan Varga <vargaz@freemail.hu>
18623 * mini-ops.h: Add new opcodes.
18625 * mini.h: Add new patch types. Add got_var to MonoCompile.
18627 * mini.h mini-x86.c mini-amd64.c aot.c: Rename
18628 mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
18629 make it work with all kinds of patchable code.
18631 * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
18632 address of the GOT, and referencing entries in the GOT.
18634 * mini.c: Add code to load the GOT address if needed by an opcode.
18636 * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position
18637 independent AOT code on the x86 using an elf-style Global Offset Table.
18639 2004-12-14 Raja R Harinath <rharinath@novell.com>
18641 * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
18643 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18645 * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
18648 2004-12-13 Patrik Torstensson <patrik.torstensson@gmail.com>
18650 * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
18651 of Interlocked:Increment/Decrement/Add as inline ops.
18652 (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
18654 2004-12-12 Geoff Norton <gnorton@customerdna.com>
18656 * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
18657 * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
18659 2004-12-12 Duncan Mak <duncan@ximian.com>
18661 * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
18662 again. `patch_info->table_size' is no longer valid after Zoltan's
18665 2004-12-12 Martin Baulig <martin@ximian.com>
18667 * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
18668 if we are the "real" method, ie. not an inlined method inside it.
18670 2004-12-11 Ben Maurer <bmaurer@ximian.com>
18672 * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
18673 before we look in the special fields table. This fixes
18674 ../tests/thread-static-init.cs.
18676 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18678 * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
18679 for Array get_Rank and get_Length. Fixes bug #70465.
18681 2004-12-11 Zoltan Varga <vargaz@freemail.hu>
18683 * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
18684 separate structure to reduce the size of MonoJumpInfo.
18686 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
18688 * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
18690 2004-12-10 Patrik Torstensson <patrik.torstensson@gmail.com>
18692 * mini.c (mini_get_inst_for_method): Changed to allow ports
18693 to return a MonoInst instead of opcode
18694 (renamed mini_get_opcode_for_method to better reflect the new functionality)
18696 * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method):
18697 Allow ports to return a created MonoInst instead of op-code, will enable
18699 (renamed mini_get_opcode_for_method to better reflected the functionality)
18701 2004-12-09 Zoltan Varga <vargaz@freemail.hu>
18703 * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
18705 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
18707 * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
18710 2004-12-08 Martin Baulig <martin@ximian.com>
18712 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
18713 if we're a CEE_CONSTRAINED call. Fixes gen-118.cs.
18715 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
18717 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
18720 * exceptions.cs: Disable some tests which depend on properties of x86 fp
18723 2004-12-08 Raja R Harinath <rharinath@novell.com>
18725 * Makefile.am (CLEANFILES): Add *.exe, *.dll.
18727 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
18729 * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
18730 bug introduced by the previous patch.
18732 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
18734 * mini-ppc.c, objectc.cs: handle large structs passed by value
18735 (fixes bug #69972).
18737 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
18739 * mini-ppc.c: OP_ARGLIST implementation from
18740 Geoff Norton <gnorton@customerdna.com>.
18742 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
18744 * inssel-x86.brg, inssel-ppc.brg: fix reference to register
18745 in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
18747 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
18749 * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
18751 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18753 * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
18756 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
18758 * mini-sparc.c: Zero out localled-ed memory.
18760 * iltests.il: Add tests for zeroing out localloc-ed memory.
18762 2004-12-04 Martin Baulig <martin@ximian.com>
18764 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
18765 mono_method_get_signature_full().
18767 2004-12-03 Massimiliano Mantione <massi@ximian.com>
18769 * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
18770 and some utility functions (always for SSAPRE), integrated SSAPRE.
18771 * mini.h: Likewise.
18772 * driver.c: Added ssapre option.
18773 * ssa.c: Small fix on OP_ARG handling.
18774 * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
18775 * Makefile.am: Likewise.
18777 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
18779 * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
18780 now in the xp code.
18782 * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
18785 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18787 * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
18789 * cpu-s390.md : Increase instruction length of oparglist.
18791 * mini-s390.c : Implement vararg and TYPEDEBYREF support.
18793 2004-11-30 Martin Baulig <martin@ximian.com>
18795 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
18796 virtual generic methods. We call a special helper_compile_generic_method()
18797 icall to retrieve the method from the vtable, inflate and compile
18798 it and then do a CEE_CALLI. Thanks a lot to Paolo for this idea.
18800 * jit-icalls.c (helper_compile_generic_method): New JIT icall.
18802 2004-11-30 Zoltan Varga <vargaz@freemail.hu>
18804 * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
18806 2004-11-29 Zoltan Varga <vargaz@freemail.hu>
18808 * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
18811 2004-11-27 Ben Maurer <bmaurer@ximian.com>
18813 * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
18814 platforms with PIC aot.
18816 2004-11-28 Martin Baulig <martin@ximian.com>
18818 * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
18821 2004-11-28 Martin Baulig <martin@ximian.com>
18823 * mini-x86.c (mono_arch_call_opcode): Use the original type, not
18824 the result of mono_type_get_underlying_type() to check whether
18827 2004-11-26 Martin Baulig <martin@ximian.com>
18830 (mono_method_to_ir): Use `!method->signature->has_type_parameters'
18833 2004-11-26 Zoltan Varga <vargaz@freemail.hu>
18835 * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
18836 the same way as the other arguments so they won't get clobbered.
18838 * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual
18839 calls through R11 since it is clobbered by the trampoline code.
18841 2004-11-26 Raja R Harinath <rharinath@novell.com>
18843 * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
18844 pick up in-tree mscorlib.dll.
18846 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
18848 * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
18850 * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to
18851 runtime data/code are now stored in a table similar to the GOT in ELF.
18852 This allows the code itself to be position independent.
18854 * aot.c: Fix loading of referenced assemblies after the lazy assembly
18857 * aot.c: Attach ELF type (object/function) directives to all global
18860 * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
18862 * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
18864 * mini-amd64.h: Turn on PIC AOT code.
18866 * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
18867 returning the offset within an OP_AOTCONST instruction where the GOT
18868 offset needs to be added.
18870 * mini.h: Bump AOT file format version.
18872 2004-11-25 Martin Baulig <martin@ximian.com>
18874 * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
18875 uninflated generic methods.
18877 2004-11-25 Martin Baulig <martin@ximian.com>
18879 * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
18881 2004-11-24 Martin Baulig <martin@ximian.com>
18883 * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
18884 original klass (this only applies for generic instances).
18886 2004-11-24 Martin Baulig <martin@ximian.com>
18888 * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
18889 `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
18892 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
18894 * mini.c (mono_method_to_ir): Disable inlining for methods containing
18895 localloc. Fixes #69678.
18897 * iltests.il (test_0_localloc_inline): Add regression test for #69678.
18899 2004-11-23 Zoltan Varga <vargaz@freemail.hu>
18901 * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
18902 used SSE registers on pinvoke calls. Fixes #69774.
18904 2004-11-23 Geoff Norton <gnorton@customerdna.com>
18906 * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
18907 vt->inst_vtype->data.klass. This fixes generic structs and bug #69766
18909 2004-11-23 Raja R Harinath <rharinath@novell.com>
18911 * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
18912 Refer directly to the mcs/ tree.
18914 2004-11-19 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18916 * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
18917 Check if a trampoline for a synchronized method is required.
18919 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
18921 * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
18922 with localloc if needed. Throe arithmetric exception in
18923 div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
18924 Adapted from a patch by Geoff Norton <gnorton@customerdna.com>.
18926 2004-11-19 Geoff Norton <gnorton@customerdna.com>
18928 * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
18929 types before switching on type. Fixes #69622.
18931 2004-11-19 Raja R Harinath <rharinath@novell.com>
18933 * Makefile.am (check-local): New. Integrate into 'make check'.
18934 (MCS,RUNTIME): Define using in-tree mono and mcs.
18936 (%.exe): Use $(ILASM).
18938 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
18940 * mini-ppc.c: adjust initial prolog size (bug #69691).
18942 2004-11-18 Zoltan Varga <vargaz@freemail.hu>
18944 * cpu-pentium.md (localloc): Increase max instruction len. Fixes
18947 2004-11-17 Raja R Harinath <rharinath@novell.com>
18949 * Makefile.am (clean-local): Rename from 'clean'.
18951 2004-11-15 Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18953 * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
18954 to mono_arch_is_int_overflow.
18955 * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
18958 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
18960 * declsec.c|h: New files to support declarative security attributes.
18961 Added function to check if a method has (applicable) security.
18962 * mini.c|h: Add check for declarative security attributes in
18963 mono_method_check_inlining.
18964 * Makefile.am: Added declsec.c and declsec.h to the build.
18966 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
18968 * mini.c, mini.h: update to keep dynamic code info per-domain.
18970 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
18972 * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
18973 (mini_init): Get rid of it from here too.
18975 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
18977 * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
18978 implemented OP_RETHROW (patch by Geoff Norton
18979 <gnorton@customerdna.com>).
18981 2004-11-10 Geoff Norton <gnorton@customerdna.com>
18983 * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
18984 between appdomains. Fixes appdomain-unload on PPC.
18986 2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
18988 * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18989 mini-exceptions.c: handle the new wrapper types.
18990 * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
18991 token value as a MonoClass* when compiling a wrapper.
18992 mono_jit_create_remoting_trampoline now takes an additional
18993 MonoRemotingTarget parameter.
18995 2004-11-10 Martin Baulig <martin@localhost>
18997 * mini.c (mono_method_to_ir): Use `generic_container->context'
18998 rather than creating a new one.
19000 2004-11-09 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19002 * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
19004 * inssel-390.md, mini-s390.c: Correct register allocation for globals.
19006 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
19008 * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
19009 the experimental aot cache stuff.
19011 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
19013 * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
19014 mini-exceptions.c: update to exception clause structure changes.
19016 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
19018 * exceptions-x86.c (throw_exception): Fix warnings.
19020 * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support
19023 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
19025 * exceptions-sparc.c (get_throw_exception): Really fix this.
19027 2004-11-07 Ben Maurer <bmaurer@ximian.com>
19029 * tramp-*.c: we no longer support icalls without wrappers, so
19030 a bit of code can be removed here
19032 2004-11-07 Zoltan Varga <vargaz@freemail.hu>
19034 * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
19037 * cpu-sparc.md: Add op_rethrow.
19039 * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
19041 * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
19043 * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
19044 * mini-ops.h: Add OP_RETHROW.
19046 * mini.c inssel.brg: Distinguish between THROW and RETHROW.
19048 * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
19050 2004-11-05 Geoff Norton <gnorton@customerdna.com>
19052 * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
19053 Makes the output much easier to read
19055 2004-11-05 Ben Maurer <bmaurer@ximian.com>
19057 * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
19058 prevents another huge leak when compiling with ssa. Secondly, the
19059 performance of doing this rather than freeing the lists is much
19060 better. GList does a lock every time you allocate a list link,
19061 so that it can use a memory pool. So, it is better to just use
19062 a memory pool of our own.
19064 * ssa.c, linear-scan.c: replace g_list_remove_link with
19065 g_list_delete. The remove one does not free the GList, so we were
19066 leaking memory. On -O=all --compile-all with corlib, this cut down
19067 3 MB of allocations.
19069 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
19071 * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
19073 * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
19075 * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
19076 into a new function mono_create_jit_trampoline ().
19078 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
19080 * trace.c (get_spec): Allow tracing of classes without a namespace.
19082 2004-11-02 Sebastien Pouliot <sebastien@ximian.com>
19084 * mini.c: Fix pointer overwrite in mini_method_compile.
19086 2004-11-2 Geoff Norton <gnorton@customerdna.com>
19088 * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
19089 The darwin ABI needs some special handling for 1 and 2 byte structs
19090 Lets use lbz/lhz instead of lwz everywhere.
19091 * mini-ppc.c (calculate_sizes): The Darwin ABI needs from special handling
19092 for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
19093 Use stb/sth for the former, and put the latter always on stack instead of in
19094 argument registers.
19096 2004-10-30 Zoltan Varga <vargaz@freemail.hu>
19098 * trace.c (is_filenamechar): Add '_'.
19100 2004-10-29 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19102 * mini-s390.c: Fix prolog length to allow for large trace requirements.
19104 * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
19106 2004-10-29 Zoltan Varga <vargaz@freemail.hu>
19108 * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
19109 depends on libmonogc. Fixes #68805.
19111 2004-10-26 Miguel de Icaza <miguel@ximian.com>
19113 * mini.c (mono_jit_free_method): Provide extra information for
19114 this error. Currently this leaks, but will be turned into a
19115 developer option in the future.
19117 2004-10-26 Zoltan Varga <vargaz@freemail.hu>
19119 * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
19121 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
19123 * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte
19124 boundary. Fixes reading of PATCH_INFO_R4 and R8.
19125 (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
19127 2004-10-24 Zoltan Varga <vargaz@freemail.hu>
19129 * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
19130 trampolines for AOT code.
19132 2004-10-22 <vargaz@freemail.hu>
19134 * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
19135 constructed types. Fixes #68136.
19137 2004-10-21 Martin Baulig <martin@ximian.com>
19139 * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
19140 if it returns true, unwind the stack to the call instruction.
19142 2004-10-21 <vargaz@freemail.hu>
19144 * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
19146 * mini.h: Bump AOT version number.
19148 * objects.cs: Add another test for unbox trampolines.
19150 * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for
19153 2004-10-20 <vargaz@freemail.hu>
19155 * driver.c: Add SHARED to the set of optimizations tested.
19157 * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
19159 * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
19160 used by CEE_NEWARR.
19162 * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
19164 2004-10-20 Martin Baulig <martin@ximian.com>
19166 * mini-exceptions.c (mono_handle_exception): Call
19167 mono_debugger_handle_exception() to tell the debugger about
19168 catch/finally clauses.
19170 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
19172 * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
19174 * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
19177 2004-10-15 Geoff Norton <gnorton@customerdna.com>
19179 * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
19180 methods as their native size, fixed bug #57543, #57545.
19181 * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
19182 This saves a temporary register and mullw call down into 1 (minor perf
19183 increase for cases like sum = sum * 5; This use to translate into:
19186 It now translates to
19189 2004-10-15 Zoltan Varga <vargaz@freemail.hu>
19191 * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
19194 2004-10-11 Martin Baulig <martin@ximian.com>
19196 * mini.c (mono_method_to_ir): If we're a generic method, get the
19197 MonoGenericContainer from our MonoMethodNormal and create a
19198 MonoGenericContext from it.
19200 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
19202 * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
19204 * basic-long.cs: Add test for checked i8->i2 cast.
19206 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19208 * inssel-ppc.brg: added a couple of speedup rules.
19210 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
19212 * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
19213 to speed up rebuilds.
19215 2004-10-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19217 * mini-s390.c: Minor fix to OP_OR_IMM.
19219 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
19221 * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
19222 better. Fixes appdomain-unload.exe on sparc.
19224 2004-10-02 Massimiliano Mantione <massi@ximian.com>
19226 * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
19227 simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
19230 2004-10-02 Zoltan Varga <vargaz@freemail.hu>
19232 * jit-icalls.c: Handle a nonexisting trunc function more correctly.
19234 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
19236 * mini.c: Always generate a field read/write wrapper for members
19237 of the class MarshalByRefObject since the actual instance could
19240 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
19242 * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
19244 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
19246 * driver.c mini.h trace.c: Move the setting of the main assembly into
19247 a separate function called mono_trace_set_assembly () and call it after
19248 actually loading the main assembly. Fixes #66872.
19250 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
19252 * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
19253 using the code manager.
19255 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
19257 * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
19259 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
19261 * cpu-amd64.md: Fix bug in previous patch.
19263 * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
19266 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
19268 * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
19269 mini-exceptions.c: updates for changed stack walk interface.
19271 2004-09-21 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19273 * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
19275 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
19277 * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
19279 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
19281 * driver.c (mini_regression_list): Do not call mono_assembly_close
19282 since assemblies can't be unloaded.
19284 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
19286 * cpu-amd64.md: Fix more instruction lengths.
19288 * cpu-amd64.md: Fix lengths of some instructions.
19290 2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
19292 * inssel.brg: Make the array ldelema check aot friendly.
19294 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
19296 * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
19298 * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
19300 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
19302 * mini-x86.c: Fix build.
19304 * mini-sparc.c mini-x86.c mini-amd64.c: Use the new
19305 mono_type_get_underlying_type () helper function to simplify code.
19307 2004-09-09 Martin Baulig <martin@ximian.com>
19309 * mini-amd64.c: Don't access `type->data.klass' directly, call
19310 mono_class_from_mono_type() instead since the type may be a
19313 2004-09-09 Martin Baulig <martin@ximian.com>
19315 * mini-amd64.c (get_call_info): Fix support for generic instances.
19316 (add_valuetype): Use mono_class_from_mono_type() to get the class
19317 since we can be a generic instance.
19319 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
19321 * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
19323 2004-09-07 Ben Maurer <bmaurer@users.sourceforge.net>
19325 * liveness.c: reset spill costs on each scan: bug 62107
19327 2004-09-07 Bernie Solomon <bernard@ugsolutions.com>
19329 * exceptions-sparc.c (mono_arch_find_jit_info): remove
19330 unnecessary line that doesn't compile
19332 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
19334 * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
19335 trampolines, make them call an error function so people can fix their
19338 2004-09-06 Martin Baulig <martin@ximian.com>
19340 * mini.c (mono_method_to_ir): When initializing locals, handle a
19341 generic instances like a valuetype if it's a valuetype and like a
19342 class if it's a class.
19344 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
19346 * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
19347 stack. Fixes #64674.
19349 * exceptions.cs: Add test for unwinding of call arguments.
19351 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
19353 * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
19354 OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
19355 set the carry/borrow flag). The sparc and s390 implementations
19356 can now use optimized versions (and simplify the code). ppc bugfixes.
19358 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
19360 * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
19362 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
19364 * inssel-amd64.brg: Remove leftover 32 bit rule.
19366 * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
19368 2004-09-04 Zoltan Varga <vargaz@freemail.hu>
19370 * mini-exceptions.c (mono_find_jit_info): Refactor common code from
19371 mono_arch_find_jit_info functions into a new function. Fix a memory
19374 * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
19377 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
19379 * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
19382 * exceptions.cs: Add array size tests.
19384 * mini.c: Allocate a separate icall wrapper for each arity of
19385 mono_array_new_va. Fixes #59509.
19387 * exceptions.cs: Add testcase for 64578.
19389 * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
19391 * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
19393 2004-09-02 Martin Baulig <martin@ximian.com>
19395 * mini.c (mono_method_to_ir): When initializing the locals, call
19396 handle_initobj() on the generic instance itself, not its
19399 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
19401 * mini.h (MonoJitDynamicMethodInfo): New structure, extension of
19402 MonoJitInfo for dynamic methods.
19404 * mini.c: Rename trampoline_hash_mutex to jit_mutex.
19406 * mini.c: Add support for freeing JIT data for dynamic methods.
19408 2004-09-01 Martin Baulig <martin@ximian.com>
19410 * mini-x86.c (is_regsize_var): Added support for generic
19412 (mono_arch_emit_prolog): Make this compile again, use
19413 `x86_push_imm_template (code)'.
19415 2004-08-30 Ben Maurer <bmaurer@users.sourceforge.net>
19417 * mini-x86.c: make all push_imm instructions that get
19418 patched always emit the long form
19420 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
19422 * mini.c (mono_create_jump_trampoline): Store the jump trampolines
19423 in a per-domain hash.
19425 * mini-amd64.c (merge_argument_class_from_type): Handle generic
19428 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
19430 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
19433 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
19436 * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
19437 Beginnings of SSE2 support.
19439 * exceptions.cs: Add more tests for checked int<->uint casts.
19441 2004-08-28 Martin Baulig <martin@ximian.com>
19443 * mini-x86.c (mono_arch_instrument_epilog): Added support for
19447 (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
19448 Handle generic instances recursively.
19450 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
19452 * iltests.il: test for conv.u8 on a constant
19454 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
19456 * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
19457 LCONV_x4 (shrun_32 (membase)).
19459 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
19461 * inssel-x86.brg: c&p rules for push/setret of long
19463 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
19465 * inssel-x86.brg: c&p rules for compare (base, regvar) and
19466 compare (regvar, base)
19468 * inssel-x86.brg: more burg love
19470 * inssel.brg: more cleanup
19472 * inssel-x86.brg, inssel-long32.brg: burg cleanup.
19474 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
19476 * basic-long.cs, basic-calls.cs: new tests for optimization.
19478 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
19480 * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
19483 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
19485 * mini-amd64.c (read_tls_offset_from_method): Add another case.
19487 2004-08-25 Bernie Solomon <bernard@ugsolutions.com>
19489 * inssel.brg (mini_emit_memcpy): use
19490 NO_UNALIGNED_ACCESS to disable memcpy optimization
19492 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
19494 * mini-amd64.c: Handle generic types in various places.
19496 * mini.c (mono_method_to_ir): Handle generic types in init locals.
19498 2004-08-24 Zoltan Varga <vargaz@freemail.hu>
19500 * mini.c (handle_box): Fix warning.
19502 * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
19504 * mini-amd64.h: Enable the emit_state optimization.
19506 * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
19508 * mini-amd64.c: Add some new 64 bit peephole opts.
19510 * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
19512 * cpu-amd64.md: sreg1 of div instructions must be %rax.
19514 * mini-amd64.c: Register allocator fixes.
19516 * mini.c: Add an optimization to emit_state to avoid allocation of new
19517 registers on some platforms.
19519 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
19521 * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
19523 * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
19524 allocation. Fixes #63085.
19526 * basic-long.cs: Add new regression test.
19528 * mini-amd64.c: Register allocator improvements.
19530 2004-08-21 Zoltan Varga <vargaz@freemail.hu>
19532 * mini-amd64.c (read_tls_offset_from_method): Add another code
19535 * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
19536 instruction sequence for nullifying class init trampolines.
19538 * objects.cs: Add new regalloc test.
19540 * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
19542 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
19544 * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
19546 * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
19549 * driver.c: Fix profiling after TLS changes.
19551 * driver.c (mono_main): Set mono_stats.enabled if needed.
19553 * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
19556 2004-08-20 Ben Maurer <bmaurer@users.sourceforge.net>
19558 * mini-x86.c: use a 1 op rather than a 2 op tls access
19559 instruction -> faster.
19561 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
19563 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
19566 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
19568 * exceptions-sparc.c (throw_exception): fix typo
19570 2004-08-19 Ben Maurer <bmaurer@users.sourceforge.net>
19572 * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
19573 set tree->dreg correctly with tls. Allow any
19574 register to be used.
19576 * mini-x86.c (read_tls_offset_from_method): add new code
19577 generation pattern seen with GCC.
19580 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
19582 * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
19583 exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
19584 exceptions-sparc.c: fix some performance issues in exception
19585 handling and setting of the stack trace for exceptions that were
19588 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
19590 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
19593 * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible
19596 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
19598 This patch inlines tls access, when possible.
19600 * mini.h: new arch functions for TLS intrinsics.
19601 All platforms updated with a stub.
19603 * mini.c: use the new intrinsics
19605 * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
19606 arch specific intrinsic for tls variables
19608 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
19610 * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
19613 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
19615 * mini.c: thread local allocation
19617 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
19619 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
19621 * Makefile.am: Link against the static version of libmonogc.
19623 * Makefile.am: Link the static versions of the convenience libraries
19624 into the mono executable.
19626 * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
19628 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
19630 * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
19631 on integer overflow.
19633 * mini-amd64.c: Reorganize function call code.
19635 * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
19637 2004-08-14 Ben Maurer <bmaurer@ximian.com>
19639 * inssel-x86.brg: use xor eax,eax.
19641 * basic.cs: new tests
19643 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
19645 * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
19646 in exception throwing code.
19648 2004-08-14 Ben Maurer <bmaurer@ximian.com>
19650 * inssel-x86.brg: use xor esi,esi.
19652 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
19654 * driver.c (mono_main): Call mono_trace_parse_options earlier so it
19655 can trace methods compiled during mini_init () too.
19657 * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle
19660 2004-08-14 Ben Maurer <bmaurer@ximian.com>
19662 * Makefile.am: static link on x86 (r=zoltan)
19664 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
19666 * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
19667 code since it causes some programs to fail.
19669 2004-08-12 Zoltan Varga <vargaz@freemail.hu>
19671 * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
19673 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
19675 * mini.c: ovfops_op_map - add STACK_OBJ case for
19677 * basic.cs: add test_0_pin_string as test
19680 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
19682 * Makefile.am: build C# if srcdir != builddir
19684 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
19686 * dominators.c, mini.h, mini-x86.c: fix loop alignment with
19687 fall-through blocks.
19689 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19691 * driver.c: enable loop by default again and include abcrem in -O=all.
19693 2004-08-08 Zoltan Varga <vargaz@freemail.hu>
19695 * iltests.il: Add some localloc tests.
19697 * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
19699 * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly.
19702 * inssel-amd64.brg: Add some optimizations.
19704 * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
19707 * Makefile.am: Statically link mono against libmono on AMD64.
19709 * mini-amd64.c inssel-amd64.brg: Optimizations.
19711 2004-08-07 Zoltan Varga <vargaz@freemail.hu>
19713 * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
19715 * tramp-amd64.c: Patch calling code in trampolines.
19717 2004-08-06 Zoltan Varga <vargaz@freemail.hu>
19719 * mini-amd64.c: pinvoke struct passing fixes.
19721 2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
19723 * mini-sparc.c: redo change, make mono_arch_cpu_init call
19724 mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
19726 2004-08-05 Duncan Mak <duncan@ximian.com>
19728 * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
19731 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
19733 * mini-amd64.c (emit_move_return_value): Move return value for normal
19736 2004-08-05 Martin Baulig <martin@ximian.com>
19738 * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
19739 `type->type'; just modify `type' itself when dealing with enums
19740 and generic instances.
19741 (check_call_signature): Make `simple_type' a `MonoType *'.
19743 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
19745 * mini.c: Use OP_PADD to add offsets to addresses.
19747 * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
19749 2004-08-04 Bernie Solomon <bernard@ugsolutions.com>
19751 * mini-sparc.c (mono_arch_emit_epilog): fix check
19752 for folding last op into restore instruction
19754 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
19756 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
19757 helper methods using the code manager.
19759 * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
19761 * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
19763 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19765 * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
19766 cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
19768 * mini-s390.c: fix tail processing
19770 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
19772 * mini-ppc.c: mul.ovf.un exception name fix.
19774 2004-08-03 Martin Baulig <martin@ximian.com>
19776 * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
19777 instances; before jumping to `handle_enum', also modify `ptype'.
19779 2004-08-02 Bernie Solomon <bernard@ugsolutions.com>
19781 * cpu-sparc.md: fcall maximal length too small.
19783 2004-08-02 Zoltan Varga <vargaz@freemail.hu>
19785 * mini-amd64.c mini.h: Add initial support for passing/returning
19786 structures to/from pinvoked methods.
19788 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
19790 * mini-ppc.c: reg allocator fix.
19792 2004-07-31 Zoltan Varga <vargaz@freemail.hu>
19794 * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
19796 * inssel.brg: Optimize memset on 64 bit machines.
19798 * mini-amd64.c: Fix some vararg cases.
19800 2004-07-30 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19802 * mini-s390.c: Corrected macro in emit_float_to_int
19804 * s390-abi.cs: Tests to exercise the s390 ABI
19806 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
19808 * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
19811 * basic.cs: Add a test for add.ovf.un.
19813 2004-07-30 Bernie Solomon <bernard@ugsolutions.com>
19815 * mini-sparc.c: add case for OP_IDIV_UN
19817 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
19819 * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
19821 * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
19823 2004-07-30 Ben Maurer <bmaurer@ximian.com>
19825 * basic.cs: regression tests.
19827 * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
19830 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
19832 * basic.cs: Add a new test.
19834 * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling
19835 and AOT. Various fixes and optimizations.
19837 * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
19839 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
19841 * mini-ppc.c: make sure temp regs are not used for global reg
19844 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
19846 * cpu-sparc.md: conv_i8 fix for 64bits
19848 * mini-sparc.c: add cases for OP_IXXX codes for 64bits
19850 2004-07-29 Ben Maurer <bmaurer@ximian.com>
19852 * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
19853 add opcode for cmp BYTE PTR [eax], imm.
19855 * inssel.brg: Make memcpy and memset takes bases.
19857 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
19859 * *-amd64.*: More AMD64 work.
19861 2004-07-28 Ben Maurer <bmaurer@ximian.com>
19863 * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
19864 add a compare-not-equal opcode.
19866 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
19868 * mini.c: Use mono_init_from_assembly instead of mono_init.
19870 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
19872 * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
19874 * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
19876 * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
19878 * inssel.brg: 64 bit fixes.
19880 * mini.h (MonoCallInst): Add some AMD64 specific data.
19882 * mini.h: Add some OP_P opcodes.
19884 2004-07-28 Ben Maurer <bmaurer@ximian.com>
19886 * basic.cs: tests for 61797 and 61740
19888 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
19890 * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
19891 numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
19893 2004-07-24 Zoltan Varga <vargaz@freemail.hu>
19895 * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
19897 * *-amd64*.*: Ongoing AMD64 work.
19899 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
19901 * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
19903 * *-amd64*: Ongoing AMD64 work.
19905 * mini-arch.h: Add AMD64 support.
19907 * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
19909 * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
19911 * mini-ops.h: Add new opcodes.
19913 * Makefile.am: Add AMD64 support.
19915 * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
19916 rules into the inssel-long*.brg files.
19918 * *-amd64.*: Add beginnings of AMD64 backend.
19920 2004-07-22 Ben Maurer <bmaurer@ximian.com>
19922 * mini.c (print_dfn): commenting out the code that prints
19923 the cil. With -O=deadce, this makes -v -v crash.
19925 * cpu-pentium.md: make checkthis have a length of 2
19927 2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
19929 * mini-sparc.h: fix implementations of __builtin
19930 functions for Sun compiler for V9.
19932 2004-07-16 Ben Maurer <bmaurer@ximain.com>
19934 * mini.c: use the new stelem.ref wrapper
19935 * exceptions.cs, arrays.cs: new stelem.ref tests
19937 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19939 * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
19940 new XSP should work with these changes).
19942 2004-07-14 Ben Maurer <bmaurer@ximain.com>
19944 * inssel-{long32,x86,}.brg: trivial optimizations.
19946 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
19948 * mini.c: load value when emitting box operation in
19951 2004-07-12 Ben Maurer <bmaurer@ximian.com>
19953 * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
19954 is one byte shorter than cmp DWORD PTR [eax], 0.
19956 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
19958 * inssel-ppc.brg: arguments on the stack are always
19959 relative to the stack pointer (spotted by Neale Ferguson).
19961 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19963 * exceptions-x86.c: delay appending the method name to the trace until
19964 after mono_jit_info_table_find is called, as this gets the real
19967 2004-07-09 Ben Maurer <bmaurer@ximian.com>
19969 * aot.c: register roots
19971 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
19973 * aot.c : I could just use PLATFORM_WIN32 flag.
19975 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
19977 * aot.c : Reverting the previous fix. This time it broke linux build.
19979 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
19981 * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
19983 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
19985 * mini.c (handle_stack_args): Remove some more debugging code.
19987 * mini.c (handle_stack_args): Remove debug output left in by mistake.
19989 * driver.c mini.h aot.c: Allow additional options to be specified with
19990 --aot and pass them to mono_compile_assembly.
19992 * aot.c: Add experimental code to AOT compile all loaded assemblies
19993 on demand and save the code into a cache in the filesystem.
19995 * aot.c: Add support for more wrapper methods.
19997 * mini.c (handle_stack_args): Handle some corner cases. Fixes
20000 * cpu-*.md: Remove removed opcodes.
20002 * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
20003 CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
20004 related icalls to marshal.c.
20006 2004-07-06 Zoltan Varga <vargaz@freemail.hu>
20008 * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
20010 * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
20012 * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
20014 2004-07-06 Ben Maurer <bmaurer@ximian.com>
20015 * liveness.c: If liveness is recomputated we need to reset the information
20016 for each variable. This way, if the liveness range has been narrowed
20017 by optimizations that happened after the last computation, we can return
20020 For example, if you have
20025 // Tons of code that does not affect i
20031 i = 0 is dead code and will be removed by SSA. However, when
20032 linear scan gets to the code, i will still appear to be live
20033 throughout the entire block. This prevents good register allocation.
20035 2004-07-06 Martin Baulig <martin@ximian.com>
20037 * debug-mini.c (mono_debug_init_method): Allow
20038 MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
20039 (mono_debug_add_icall_wrapper): New method.
20041 * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
20043 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
20045 * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
20048 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
20050 * aot.c (mono_aot_load_method): Fix loading of debug info.
20052 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
20054 * aot.c: Add logging support.
20056 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
20058 * mini.h: Add prototype for mono_print_method_from_ip.
20060 * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
20062 * inssel.brg: 64 bit fixes.
20064 * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to
20067 * Makefile.am: Add SPARC64 support.
20069 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
20071 * aot.c: Fix alignment problems on 32 bit platforms.
20073 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
20075 * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
20078 * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
20081 * mini.h: Bump AOT file version. Some 64 bit fixes.
20083 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
20085 * inssel-sparc.brg: Add new rule to avoid register moves.
20087 * inssel.brg: Add ldind_to_load_membase helper function.
20089 2004-06-30 Ben Maurer <bmaurer@ximian.com>
20091 * mini.c: OffsetToStringData intrinsic.
20093 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
20095 * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
20097 * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
20100 * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
20101 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
20103 * mini.c: reinstated mono_compile_get_interface_var()
20104 on x86, too, since the change breaks the Gtk# build there as well.
20106 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
20108 * driver.c: remove loop from the default optimizations: it seems to
20109 interact badly with some of the other options (see bug #60613).
20111 2004-06-25 Zoltan Varga <vargaz@freemail.hu>
20113 * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
20114 (fld@informatik.uni-bremen.de): Add Solaris x86 support.
20116 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
20118 * mini-ppc.c, cpu-g4.md: small updates to be able to compile
20119 vararg-using methods.
20121 2004-06-21 Martin Baulig <martin@ximian.com>
20123 * mini/mini-exceptions.c
20124 (mono_handle_exception): Added `gpointer original_ip' argument.
20125 After calling mono_unhandled_exception(), call
20126 mono_debugger_unhandled_exception() and if that returns true,
20127 restore the context and return.
20129 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
20131 * mini-ppc.c: prefer the use of relative branches so
20132 they won't need to be patched in aot code (patch from Patrick Beard).
20134 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
20136 * aot.c: patch from Patrick Beard to make the output assembly
20137 more correct for the MacOSX assembler. Small tweak to
20138 generate sane images on Linux/PPC, too.
20140 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
20142 * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
20143 case until bug #59509 is fixed (shows up in #60332).
20145 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
20147 * mini.c: make sure the needed wrappers are compiled, too, with
20150 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
20152 * driver.c: remove NPTL reference in --version output.
20154 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
20156 * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
20157 generate valid assembly for the Mach-O assembler.
20159 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
20161 * driver.c: don't include abcrem in the all optimization specifier
20162 since it slows down jit compilation too much for now.
20164 2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
20166 * mini.c: use BIGMUL only if both operands have the same signage.
20167 * iltests.il: Test for bug 60056. (errors related to signage in
20172 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
20174 * mini.c, aot.c: memory leak fixes.
20176 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
20178 * inssel-long32.brg: implemented a few missing ulong cast opcodes.
20180 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
20182 * Makefile.am: remove the -static hack completely, it links in
20183 statically glib as well.
20185 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
20187 * iltests.il, mini.c: fixed bug#59580 in branch optimization.
20188 * exceptions.cs: make it compile with new mcs/csc.
20190 2004-06-03 Massimiliano Mantione <massi@ximian.com>
20191 * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
20192 and added relevant test case.
20194 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
20196 * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
20197 regressions in gtk-sharp.
20199 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
20201 * exceptions.cs: New regression tests.
20203 * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
20205 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
20207 * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
20209 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
20211 * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
20213 * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
20215 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
20217 * mini.c (mono_jit_runtime_invoke): Init class in this
20218 method instead of trusting mono_jit_compile_method to
20219 do the work (because wrappers can be in object class)
20221 2004-05-27 Zoltan Varga <vargaz@freemail.hu>
20223 * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
20225 * basic-long.cs: New regression test.
20227 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
20229 * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
20230 and div/rem checks.
20232 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
20234 * Makefile.am: fix miguel's change to build mono statically against
20235 libmono (track build dependencies).
20237 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
20239 * cfold.c: Some glib versions do not have G_MININT32.
20241 2004-05-26 Massimiliano Mantione <massi@ximian.com>
20243 * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
20244 with precision of tan, atan, sin and cos, and implemented related
20245 regressions tests (fixes bug 54467, but one new problem appeared and
20248 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
20250 * cfold.c (FOLD_BINOPZ): Avoid division by zero.
20252 * exceptions.cs: Add test for constant folding && division by zero.
20254 * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
20255 since driver.c is in libmono too, so the optimization was useless.
20257 * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
20258 variable to driver.c so the compiler can emit more efficient code to
20261 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20263 * Makefile.am: don't distribute generated inssel.[ch] files.
20265 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
20267 * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
20268 into the default appdomain. Fixes #58707.
20270 * jit-icalls.c: Remove the broken approximation for truncl, doing
20271 no conversion is better.
20273 * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
20276 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
20278 * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
20279 of the mcrxr instruction which is not available on some processors
20280 even if it's documented to be. Implement add and sub overflow correctly
20281 (still not complete for long unsigned). Speed up icalls a bit.
20283 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
20285 * mini.c (mono_jit_compile_method_with_opt): Make sure that
20286 we run .cctor in the current domain instead of target_domain.
20288 Fixes bug #58558, .cctor not being called in -O=shared.
20290 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
20292 * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
20294 2004-05-24 Ben Maurer <bmaurer@users.sourceforge.net>
20296 * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
20297 which can be done with an imm8, do it that way.
20298 (mono_arch_output_basic_block): ditto for a jmp
20299 (mono_arch_emit_prolog): Computate maximum offset of a label.
20301 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
20303 * mini-x86.c (mono_arch_local_regalloc): the reg allocator
20304 now tries to allocate prefered physical reg's for virtual
20305 regs. This reduces the number of emited spills/loads with
20306 20-30% on our core assemblies.
20308 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
20310 * jit-icalls.c: truncl() is not needed and trunc() is
20311 the correct thing to do anyway (bug #58287).
20313 2004-05-24 Zoltan Varga <vargaz@freemail.hu>
20315 * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
20318 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
20320 * driver.c: enable loop optimizations by default.
20322 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
20324 * mini-x86.c: fix calc of max loop size when aligning loops start.
20326 2004-05-23 Zoltan Varga <vargaz@freemail.hu>
20328 * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
20331 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
20333 * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
20336 * basic-long.cs: Add tests for add/subtract of immediates with carry.
20338 * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
20340 * mini.c (inline_method): Allways inline some wrappers even if the cost
20341 is too large. Fixes #58785.
20343 * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
20345 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
20347 * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
20348 (crichton@gimp.org). Beginning of support for sparc/linux.
20350 * mini-sparc.c: Optimize retrieval of LMF address.
20352 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
20354 * exceptions-ppc.c: handle alloca in methods with clauses.
20356 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
20358 * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
20360 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
20362 * mini.c: Delegate most of the abort signal work to
20363 mono_thread_request_interruption, which also handles Stop and Suspend
20366 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
20368 * mini.c mini.h: Allow inlining of icall wrappers if the backend
20369 supports the save/restore lmf opcodes.
20371 2004-05-19 Zoltan Varga <vargaz@freemail.hu>
20373 * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
20374 by gcc-3.4 as well.
20376 * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
20378 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
20380 * mini.h mini.c (mini_method_compile): Only run abc removal pass on
20381 methods which contain array accesses.
20383 * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
20384 boundaries. Fixes #58537.
20386 * iltests.il: Add regression test for #58537.
20388 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
20390 * mini-x86.c (mono_arch_local_regalloc): Last part of
20391 fix for bug #58633 (releasing register to early).
20393 2004-05-18 Miguel de Icaza <miguel@ximian.com>
20395 * basic-long.cs: Add new regression test.
20397 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
20399 * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
20400 register too early on the chain.
20402 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
20404 * mini.c (create_helper_signature): Use a helper function to reduce
20405 the code which needs to be written. Also set the calling convention of
20406 icalls on windows. Fixes #57840.
20408 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
20410 * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
20411 exceptions-ppc.c: added helper function to get the instruction address
20412 from a signal handler context.
20414 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
20416 * helpers.c: use g_get_tmp_dir. Invokes happyness
20419 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
20421 * helpers.c: Add new env variable to pass args to objdump.
20422 Specifically for those of us who love -Mintel. r=miguel, gonzalo.
20424 2004-05-17 Radek Doulik <rodo@ximian.com>
20426 * Makefile.am (common_sources): added abcremoval.h so it get
20427 disted and daily mono packages on go-mono.com will build again
20429 2004-05-17 Massimiliano Mantione <massi@ximian.com>
20431 * abcremoval.c: Fixed coding style, added copyright header.
20433 * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
20435 * mini.h: Added prototype for abc removal main function.
20437 * build_relations_propagation_table.pl: Added copyright header.
20439 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
20441 * basic-long.cs: reg test for complex ceq_long bug.
20443 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
20445 * mini-x86.c (mono_arch_local_regalloc): Correctly free
20446 reg in long and clob case (bug #58343). Fixed/added comments.
20448 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
20450 * mini.c (mono_jit_runtime_invoke): Follow new convention
20451 of calling the invoke method with an function pointer.
20453 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
20455 * ChangeLog: Fix author of memory leak patch.
20457 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
20459 * Makefile.am: fix make dist as well...
20462 2004-05-14 Massimiliano Mantione <massi@ximian.com>
20464 * cfold.c: Made so that conversions from pointer to int4 are no-ops
20465 on archs where pointers are 4 bytes long.
20467 * Makefile.am: Added abcremoval.c source file.
20469 * abcremoval.c: Added abcremoval.c.
20471 * abcremoval.h: Added abcremoval.h.
20473 * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
20475 * inssel.brg: Enabled bounds check removal.
20477 * mini.c: Added support for abcrem optimization.
20479 * mini.h: Added abcrem optimization label.
20481 * driver.c: Added support for abcrem optimization.
20483 * propagated_relations_table.def: Added propagated_relations_table.def.
20485 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
20487 * mini.c, cfold.c: fix style.
20489 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
20491 * mini.c: handle issue with the low-level implementation of
20492 some long opcodes (bug #54209).
20494 2004-05-13 Ben Maurer <bmaurer@users.sourceforge.net>
20496 * basic.cs: test for my new cmov stuff.
20498 2004-05-13 Patrik Torstensson
20500 * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
20501 opt and added peephole documentation.
20503 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
20505 * tramp-ppc.c: rewrote the generic trampoline code.
20507 2004-05-11 Patrik Torstensson
20509 * mini-x86.c: optimize long shl/shr asm code (one less branch)
20511 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
20513 * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
20515 * mini.h mini.c dominators.c: Applied patch from Derek Woo
20516 (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
20518 * mini.c: Add new icalls for AsAny marshalling.
20520 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
20522 * tramp-ppc.c, mini-ppc.c: more cleanups.
20524 2004-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20526 * mini.c: no warnings.
20528 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
20530 * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
20532 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
20534 * mini.c: In the thread abort signal handler, if the thread is in the
20535 process of being stoped, don't throw the Abort exception, just stop the
20538 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
20540 * tramp-ppc.c: removed old code.
20542 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
20544 * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
20545 do some simple speed optimizations on ppc.
20547 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
20549 * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
20550 and large offsets in load/store.
20552 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
20554 * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
20555 it causes regressions.
20557 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
20559 * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
20562 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
20564 * jit-icalls.c: remove warnings.
20565 * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
20566 speedups for unsafe code.
20568 2004-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
20570 * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
20572 2004-05-06 Zoltan Varga <vargaz@freemail.hu>
20574 * basic-calls.cs: Add new regression test.
20576 * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
20579 * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
20581 * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
20584 2004-05-06 Patrik Torstensson
20586 * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
20587 long reg allocation in any reg (not only eax:edx) and implemented
20588 long shl/shr ops in asm instead of helpers.
20590 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
20592 * mini-sparc.h: Fix warnings.
20594 * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
20597 * mini-exceptions.c (mono_handle_exception): Call the filter in a
20598 separate statement for clarity.
20600 * mini-sparc.c: Update status.
20602 2004-05-04 Zoltan Varga <vargaz@freemail.hu>
20604 * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
20607 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
20609 * inssel-ppc.brg: another small pre-release workaround:
20610 we don't do overflow detection for long_sub_un.
20612 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
20614 * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
20615 (also works around a weird ppc bug: 57957).
20617 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
20619 * tramp-ppc.c: trampoline fixes.
20621 Fri Apr 30 15:54:26 EDT 2004 Paolo Molaro <lupus@ximian.com>
20623 * mini-ppc.c: fixed typos.
20625 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
20627 * mini-ppc.c, exceptions-ppc.c: more code saves registers
20628 at the top of the stack. Fixed typos. Use a frame registers
20629 for all the methods with exception clauses.
20631 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
20633 * exceptions-ppc.c: restore fp registers.
20635 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
20637 * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
20638 order from the stack top (moved the stack room to save the
20639 return value for trace after the param area). Fixed corruption
20640 in restoring registers on unwind.
20642 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
20644 * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
20646 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
20648 * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
20649 and prolog/epilog for methods that use it. Allow
20650 enough param area room for varargs methods. Fix miguel's
20651 breakage in exception handling.
20653 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
20655 * Makefile.am: run genmdesc only on current arch.
20657 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20659 * exceptions-x86.c:
20660 * mini-x86.h: fix the build on windows.
20662 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
20664 * 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.
20666 * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
20668 * mini-exceptions.c: New file.
20670 * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
20671 Move some parts of the x86 exception handling code to an
20672 arch-independent file so it can be shared with other ports.
20674 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
20676 * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
20678 2004-04-26 David Waite <mass@akuma.org>
20680 * driver.c: remove comma from end of enumeration declaration
20682 2004-04-26 Jackson Harper <jackson@ximian.com>
20684 * driver.c: parse config file before loading first assembly. This
20685 allows the user gac to be enabled/disabled.
20687 2004-04-23 Miguel de Icaza <miguel@ximian.com>
20689 * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
20690 simpler mechanism: we do not care what is encoded initially
20691 (branch absolute or relative), we care about the code and its
20692 target. I kept the old code for reference for now.
20694 The new code tries first to determine if the jump is anywhere in
20695 the -/+32 absolute meg range, if it succeeds, it encodes using the
20696 absolute branch; If not, it tried to find something in the
20697 relative range, if not, it uses the handle_thunk code.
20699 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
20701 * exceptions-ppc.c: use the correct ip register on macosx.
20703 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
20705 * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
20707 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
20709 * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
20710 Raise exception on integer divide by zero by hand since the hw
20711 doesn't support it. Handle NaNs in FP compares.
20713 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
20715 * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
20716 code reducing duplication between the platforms and enabled
20717 signal exception handling (on linux for now).
20719 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
20721 * exceptions-ppc.c: more macosx support.
20723 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
20725 * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
20727 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
20729 * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
20731 2004-04-19 Ben Maurer <bmaurer@users.sourceforge.net>
20733 * iltests.il: more tests.
20735 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
20737 * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
20740 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
20742 * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
20744 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
20746 * liveness.c: Mark variables as volatile in all basic blocks reachable
20747 from exception clauses.
20749 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
20751 * exceptions.cs (test_0_rethow_stacktrace): Make this work with
20754 2004-04-18 Ben Maurer <bmaurer@users.sourceforge.net>
20756 * iltests.il, basic.cs: more tests for regalloc.
20758 2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
20760 * iltests.il: Some tests for register allocation modifications
20763 2004-04-16 Zoltan Varga <vargaz@freemail.hu>
20765 * exceptions.cs: Add regression test for bug #56782.
20767 * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
20768 original stack trace if an exception is rethrown. Fixes #56782. Oh,
20769 the beauty of fixing the same thing in 5 different files...
20771 2004-04-15 Zoltan Varga <vargaz@freemail.hu>
20773 * mini.c (mono_method_to_ir): Do not compute coverage for inlined
20776 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
20778 * mini.c: Add support for STRWLPARRAY marshalling convention.
20780 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
20782 * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
20783 to init the context to setup the regs pointer).
20785 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
20787 * exceptions-ppc.c: more exceptions work.
20789 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
20791 * mini.c: avoid reusing the same MonoInst on multiple trees: this is
20794 2004-04-13 Miguel de Icaza <miguel@ximian.com>
20796 * inssel-x86.brg (reg): Add new rules for add, sub and mul that
20797 can use the memory directly.
20799 * cpu-pentium.md: Update documentation from a post from Zoltan.
20801 add x86_add_membase, x86_sub_membase, x86_mul_membase
20803 2004-04-13 Miguel de Icaza <miguel@ximian.com>
20805 * mini-ppc.c: Remove unused definitions FLOAT_REGS and
20806 GENERAL_REGS they were also hardcoded for all PPC ports.
20808 (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
20810 Remove hard-coded limit for floating point registers, use
20811 PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
20813 Notice that in MacOS X calling conventions you can fit a lot more
20814 floating point values in registers, so I should update the PInvoke
20815 test to excercise the passing of floating point values on the
20816 stack (currently broken).
20818 2004-04-06 Miguel de Icaza <miguel@ximian.com>
20820 * tramp-ppc.c (create_trampoline_code): Added
20821 JUMP_TRAMPOLINE_SIZE.
20822 (ppc_magic_trampoline): Follow the pattern from
20823 x86_magic_trampoline: if code is set to zero, return.
20824 (create_trampoline_code): Always pass MonoMethod to the jump
20825 trampoline, before it was passing a null.
20826 (mono_arch_create_jump_trampoline): Implement the jump stub, could
20827 share the code with mono_arch_create_jit_trampoline.
20829 * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
20831 (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
20834 * cpu-g4.md: Added length for jmp instruction, the worst case
20835 scenario is 92 bytes (4 mandatory bytes, potential 19 registers
20838 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
20840 * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
20842 2004-04-07 Zoltan Varga <vargaz@freemail.hu>
20844 * mini.c: Only set bblock->real_offset when adding a new bblock, and
20845 before each IL instruction.
20847 * mini.c (CEE_BOX): Fix warnings.
20849 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20851 * mini.c: removed a few unused vars and extra whitespace.
20853 2004-04-05 Ben Maurer <bmaurer@users.sourceforge.net>
20855 * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
20857 (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
20859 (OP_GETCHR): use the above
20860 (CEE_LDELEMA): use the above.
20862 * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
20863 version of the generic impl.
20864 (MONO_EMIT_BOUNDS_CHECK_IMM): the same
20865 (CEE_LDELEMA): use the above.
20867 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
20869 * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
20872 * iltests.il: Added new regression test for #56317.
20874 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
20876 * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
20877 under NetBSD. Fixes #56450.
20879 * liveness.c (update_gen_kill_set): Fix previous patch.
20881 2004-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20883 * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
20885 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
20887 * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
20888 ldsfld and ldsflda.
20890 * inssel-sparc.brg: Add more optimizations.
20892 * mini-sparc.c: Replace multiply/divide with shifts if possible.
20894 2004-04-01 Martin Baulig <martin@ximian.com>
20896 * mini.c (handle_box): New static function; moved the
20897 implementation of CEE_BOX here.
20898 (mono_method_to_ir): Added `constrained_call' variable.
20899 (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
20900 (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
20901 mono_method_get_constrained() to get the method.
20903 2004-04-01 Martin Baulig <martin@ximian.com>
20905 * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
20906 (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
20907 (mono_method_to_ir): We don't need these macros anymore since
20908 mono_class_get_full() already takes care of it.
20910 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20912 * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
20913 use @function (as doesn't accept #function here) and check the return
20914 value of system and stop if fails.
20916 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20918 * mini.c: set the timeout to 2s when calling mono_domain_finalize.
20920 2004-03-31 Zoltan Varga <vargaz@freemail.hu>
20922 * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
20924 * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
20926 * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
20929 * basic-long.cs: Add test for negation of Int64.MinValue.
20931 2004-03-30 Zoltan Varga <vargaz@freemail.hu>
20933 * mini-sparc.c: Update status.
20935 * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
20937 * exceptions-sparc.c: Fix return value in filters.
20939 * inssel-sparc.brg: Fix register allocation in some rules.
20941 2004-03-28 Martin Baulig <martin@ximian.com>
20943 * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
20946 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
20948 * mini-x86.c (mono_arch_patch_code): Fix warnings.
20950 * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if
20951 dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
20952 remove unused conv_u4 opcode.
20954 * mini-x86.c: Remove valgrind workaround since it slows down things
20955 even when mono is not run under valgrind.
20957 2004-03-26 Zoltan Varga <vargaz@freemail.hu>
20959 * mini-sparc.c: Update status.
20961 * inssel-sparc.brg: Add some optimizations.
20963 * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
20964 future delay slot filling. Add support for varargs, tail calls and JMP.
20966 * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of
20967 CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
20969 * inssel.brg: Fix register allocation in OP_ARGLIST.
20971 * inssel.brg: Fix warnings.
20973 2004-03-25 Martin Baulig <martin@ximian.com>
20975 * mini.c (inflate_generic_field): Removed.
20976 (mini_get_method): Removed, use mono_get_method_full(),
20977 (mini_get_class): Removed, use mono_class_get_full().
20978 (mono_method_to_ir): Pass our generic context to
20979 mono_field_from_token().
20981 2004-03-25 Martin Baulig <martin@ximian.com>
20983 * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
20984 of a `MonoMethod *'.
20985 (mini_get_method): Take a `MonoGenericContext *' instead
20986 of a `MonoMethod *'.
20987 (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
20988 a new local variable called `generic_context' which holds the
20989 current `MonoGenericContext *'; use it to lookup things.
20991 2004-03-24 Martin Baulig <martin@ximian.com>
20993 * mini.c (mini_get_class): New static method; if we're inside a
20994 generic instance, inflate the class if neccessary.
20995 (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
20997 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
20999 * iltests.il: New regression test for #55976.
21001 * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
21004 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
21006 * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
21009 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
21011 * liveness.c: Consider SSA stores as well as loads when making vars
21014 * exceptions.cs: New regression tests for register allocation.
21016 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
21018 * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
21019 * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
21020 domain lock only to protect puntual access to data structures.
21021 Added access lock for sighash, jit_icall_hash_name,
21022 jit_icall_hash_addr and domain->code_mp.
21024 2004-03-20 Zoltan Varga <vargaz@freemail.hu>
21026 * driver.c: Print SIGSEGV handling method.
21028 * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
21030 * mini.c (setup_jit_tls_data): Handle case when this is called
21031 multiple times for a thread.
21033 * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx
21034 is different from fbxx_un. Fixes #54303. Also use constants instead of
21035 magic numbers in a lot of places.
21037 2004-03-19 Zoltan Varga <vargaz@freemail.hu>
21039 * exceptions.cs: Fix cctor test when --regression is used.
21041 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
21043 * mini-ppc.c, exceptions-ppc.c: basic exceptions support
21046 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
21048 * inssel-ppc.brg: fixed register assignments for some rules.
21050 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
21052 * exceptions.cs: Add test for exceptions in static constructors.
21054 * mini.c (mono_jit_compile_method_with_out): Move the calling of
21055 static constructors outside the domain lock. Fixes #55720.
21057 2004-03-17 Martin Baulig <martin@ximian.com>
21059 * mini.c (get_generic_field_inst): Removed, this'll never happen.
21060 (inflate_generic_field): Take the `MonoMethod *' instead of the
21061 `MonoClass *' and added support for generic method.
21062 (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
21063 have a `field->parent->gen_params', only inflate the field if it's
21064 an open constructed type.
21066 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
21068 * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
21069 exception object instead of the preconstructed ones.
21071 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21073 * mini.c: reverted changed to sigsegv_signal_handler commited
21074 accidentally in the previous patch.
21076 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21079 (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
21080 running --aot with an old assembly.
21082 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
21084 * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
21087 * mini-sparc.c: Add support for v9 branches with prediction.
21089 2004-03-15 Bernie Solomon <bernard@ugsolutions.com>
21091 * mini.c (mini_init): #warning is GNUC only
21093 * mini-sparc.h: implement __builtin_frame_address
21094 and __builtin_return_address for Sun C compiler
21096 2004-03-15 Zoltan Varga <vargaz@freemail.hu>
21098 * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
21100 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
21102 * basic-calls.cs: Add test for unaligned byref long argument passing.
21104 * mini-ops.h: Add sparcv9 compare and branch instructions.
21106 * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
21107 v9 instructions if we have a v9 cpu.
21109 * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
21110 registers for global allocation.
21112 * exceptions-sparc.c: Fixes.
21114 2004-03-11 Zoltan Varga <vargaz@freemail.hu>
21116 * liveness.c (mono_analyze_liveness): Optimized version.
21118 * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
21120 * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
21123 * basic-float.cs basic-calls.cs: New regression tests.
21125 2004-03-10 Zoltan Varga <vargaz@freemail.hu>
21127 * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
21128 sigaltstack implementation.
21130 * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
21132 * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
21133 stuff if SIGSEGV_ON_ALTSTACK is not defined.
21135 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
21137 * mini.c: Fix warnings.
21139 * mini.c (mono_resolve_patch_target): New function which contains the
21140 arch independent part of the patching process.
21142 * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
21143 patching code to a separate function.
21145 2004-03-09 Bernie Solomon <bernard@ugsolutions.com>
21147 * mini.c (add_signal_handler): ifdef out on Windows
21149 2004-03-08 Zoltan Varga <vargaz@freemail.hu>
21151 * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c
21152 cpu-sparc.md: Add exception handling support + other fixes.
21154 * driver.c: Print --help output to stdout. Fixes #55261. Also fix
21155 typed GC detection in --version.
21157 * basic.cs exceptions.cs: New regression tests.
21159 * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
21160 the arch specific code can store data during a compilation.
21162 * mini-ops.h: Add OP_SETFRET.
21164 * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
21165 function, register a separate icall for each arity, so the icalls can
21168 * mini.c (mono_print_tree): Print negative offsets in a more readable
21171 * mini.c: Make signal handling work on sparc.
21173 * mini.c (mini_init): Add emulation for lconv_to_r8_un.
21175 * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
21177 * jit-icalls.c: Emulate truncl by aintl on solaris.
21179 * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
21181 2004-03-05 Zoltan Varga <vargaz@freemail.hu>
21183 * mini.c (mini_init): fconv_to_ovf can raise exceptions.
21185 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
21187 * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
21188 a MarshalByRef type, inline a method that performs the check, taking into
21189 account that the object can be a proxy. Also implemented tow new opcodes:
21190 CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
21191 * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and
21192 OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
21194 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
21196 * mini-ppc.c: if a relative branch displacement is too big
21197 but it points to and area reachable with an absolute branch,
21200 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
21202 * mini.c: optimize small copies in cpblk.
21204 2004-03-01 Zoltan Varga <vargaz@freemail.hu>
21206 * basic-calls.cs basic-float.cs: New regression tests.
21208 * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at
21209 negative offsets from %fp. Implement localloc. Fix local register
21210 allocation. Fix the case when the this argument needs to be saved to
21211 the stack. Implement some missing opcodes.
21213 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
21215 * mini.c (mini_method_compile): Reenable global regalloc in methods
21216 with exception handlers.
21218 * linear-scan.c (mono_varlist_sort): Fix warning.
21220 * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
21222 * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
21225 * liveness.c: Make all variables uses in exception clauses volatile, to
21226 prevent them from being allocated to registers. Fixes #42136.
21228 2004-02-25 Zoltan Varga <vargaz@freemail.hu>
21230 * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
21231 causes regressions.
21233 * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
21234 argument to mono_arch_regalloc_cost.
21236 * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs
21239 2004-02-24 Zoltan Varga <vargaz@freemail.hu>
21241 * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c:
21242 Make the cost of allocating a variable to a register arch dependent.
21244 * basic-calls.cs: Fix compilation of tests.
21246 * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
21247 helper function to cut back on the number of #ifdefs needed.
21249 * mini-ppc.c: Fix compilation.
21251 * basic-calls.cs: New regression tests.
21253 * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
21255 * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
21256 of l0 since that is callee saved.
21258 * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
21261 * mini-sparc.c: Ongoing work + flag virtual calls with a special kind
21262 of delay instruction.
21264 * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
21266 * mini.h (MonoCallInst): Add 'virtual' flag.
21268 * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
21270 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
21272 * *.cs: New regression tests.
21274 * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc
21277 * mini.c (mono_runtime_install_handlers): Fix build.
21279 * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
21280 'signal_stack_size' members.
21282 * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an
21283 alternate signal stack.
21285 * exceptions-x86.c: Add stack overflow handling.
21287 * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing
21288 functions to arch independent code.
21290 * mini.c (mono_print_tree): Print more detailed info for load_membase
21293 2004-02-23 Martin Baulig <martin@ximian.com>
21295 * mini.c (mini_get_method): Set `gmethod->generic_inst'.
21297 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
21299 * mini-x86.c: fixed reg allocation for div/rem.
21301 2004-02-22 Miguel de Icaza <miguel@ximian.com>
21303 * driver.c (mono_main): Report some configuratio options on --version.
21305 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
21307 * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
21308 low in the address space. Correctly flush memory in thunks where we
21309 output native code.
21311 2004-02-20 Martin Baulig <martin@ximian.com>
21313 * mini.c (mini_get_method): New static method; inflate all generic
21314 methods and methods in open generic instances.
21315 (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
21316 (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
21318 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
21320 * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
21322 * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
21324 2004-02-19 Bernie Solomon <bernard@ugsolutions.com>
21326 * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
21328 * mini-sparc.c (flushi mono_arch_output_basic_block): make
21329 it compile using Sun's compiler.
21331 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
21333 * 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.
21335 * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
21337 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
21339 * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
21341 * mini-ppc.c: handle calls outside of the allowed range with thunks
21342 allocated using the code manager.
21343 * tramp-ppc.c: use the code manager to hold generated native code.
21344 Fixed the magic trampoline to just patch vtable entries.
21346 2004-02-17 Zoltan Varga <vargaz@freemail.hu>
21348 * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
21351 2004-02-16 Zoltan Varga <vargaz@freemail.hu>
21353 * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
21356 * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
21357 if we have a working __thread implementation.
21359 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove
21360 OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
21362 2004-02-15 Zoltan Varga <vargaz@freemail.hu>
21364 * mini-x86.c: Fix compilation under gcc 2.
21366 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
21368 * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
21369 contains a call to the wrapped function.
21371 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add
21372 OP_<CALL>_IMM opcodes, and use them under X86.
21374 * mini.c (mono_jit_find_compiled_method): Fix warning.
21376 * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
21378 * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
21380 * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
21381 functionality to mini.c.
21383 * mini.c (mono_create_jump_trampoline): New function to create a jump
21384 trampoline. Return a compiled method instead of a trampoline if it
21385 exists. Add a cache for jump trampolines.
21387 * mini.c (mono_jit_find_compiled_method): New function to return a
21388 compiled method if it exists.
21390 * mini-x86.c: Call mono_create_jump_trampoline instead of
21391 mono_arch_create_jit_trampoline.
21393 * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
21394 a jump trampoline. Fixes #52092.
21396 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
21398 * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
21399 which is not up-to-date. Add check_corlib_version () instead.
21401 * mini.c (mini_init): Call mono_thread_attach () so embedders do not
21404 * mini.c (mono_runtime_install_handlers): Remove check for valgrind
21405 since newer valgrind versions do not need it.
21407 * mini.c (mono_jit_compile_method_with_opt): New helper function to
21408 compile a method with a given set of optimizations.
21410 * mini.c: Compile icall wrappers on-demand instead of at startup.
21412 * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
21413 wrapper for an icall.
21415 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
21417 * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
21420 * iltests.il: Add test for non-empty stack before switch instruction.
21422 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
21424 * mini.c: Add support for new stringbuilder marshalling conventions.
21426 * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
21428 2004-02-01 Martin Baulig <martin@ximian.com>
21430 * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
21431 in `ginst->mtype_argv'.
21433 2004-01-31 Miguel de Icaza <miguel@ximian.com>
21435 * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
21436 facilitate grepping.
21438 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
21440 * mini.c: fixed buglet in initobj generic implementation for references.
21442 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
21444 * Makefile.am: make the version script conditional.
21445 * jit-icalls.c: handle missing truncl().
21447 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
21449 * exceptions.cs: Add more tests for double->int conversion.
21451 * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
21452 we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
21454 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
21456 * driver.c: make --verbose --version emit an error
21457 if the loaded corlib doesn't match the runtime version.
21459 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
21461 * mini-ppc.h: export ppc_patch().
21462 * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
21463 * tramp-ppc.c: call convention fixes: Linux/PPC support should be
21464 on par or better than on MacOSX.
21466 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
21468 * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
21469 mono_lookup_pinvoke_call.
21471 * mini-x86.c: Under windows, the default pinvoke calling convention is
21472 stdcall. Fixes #52834.
21474 * mini.c (optimize_branches): Add an upper bound to the number of
21475 iterations to prevent infinite loops on strange loops. Fixes #53003.
21477 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
21479 * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
21480 and ISINST. Fixes #52093.
21482 * objects.cs (test_0_vector_array_cast): New tests.
21484 2004-01-15 Zoltan Varga <vargaz@freemail.hu>
21486 * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
21487 checking in Array.Set ().
21489 * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
21492 * object.cs (test_0_multi_array_cast): New regression test.
21494 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
21496 * exceptions-ppc.c: fix build on Linux/PPC.
21498 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
21500 * tramp-x86.c (x86_magic_trampoline): Disable code patching when
21501 running under valgrind.
21502 (x86_magic_trampoline): Fix build bustage.
21504 * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
21505 negative values as well. This is needed for the encoding of the line number
21506 info, since sometimes the line numbers are not in increasing order.
21508 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
21510 * cpu-pentium.md (localloc): Increase the size of the localloc
21511 instruction since it is a loop under Win32.
21513 * debug-mini.c (record_line_number): Get rid of unneccesary memory
21516 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
21518 * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c
21519 tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from
21520 Max Horn (max@quendi.de). Fix file names in comments.
21522 2004-01-03 Zoltan Varga <vargaz@freemail.hu>
21524 * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
21525 avoid stack overflow.
21526 (replace_usage): Avoid uninitialized variable warnings.
21528 * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
21529 and taking the address of valuetype variables.
21531 2004-01-03 Patrik Torstensson
21533 * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
21534 for other purposes than FP later on.
21536 2004-01-02 Zoltan Varga <vargaz@freemail.hu>
21538 * mini.c (mono_method_to_ir): Prevent register allocation for arguments
21541 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
21543 * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
21545 2003-12-30 Patrik Torstensson <p@rxc.se>
21547 * mini-x86.h: Decreased number of availiable fp regs.
21548 Solves corner cases with FP spilling.
21550 2003-12-23 Patrik Torstensson <p@rxc.se>
21552 * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
21553 for floating point stack tracking / spilling on x86.
21556 * basic-float.cs: added float mul overflow test.
21558 2003-12-23 Zoltan Varga <vargaz@freemail.hu>
21560 * mini.c (mono_method_to_ir): Add workaround for bug #51126.
21562 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
21564 * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
21565 supports for cond branches that overflow the immediate
21566 overflow offset. mcs can compile simple programs.
21568 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
21570 * exceptions-ppc.c: exception handling support wip:
21571 finally handlers get run on exception.
21573 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
21575 * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while
21578 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
21580 * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
21581 initial support for stack walking and unwinding.
21583 2003-12-18 Zoltan Varga <vargaz@freemail.hu>
21585 * driver.c (mono_main): Make corlib-out-of-sync message more
21586 descriptive. Also remove verify_corlib call.
21588 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
21590 * mini.c: make CEE_NEWARR calls and other emulated opcodes
21591 not overlap with other call's arguments, too.
21593 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
21595 * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c:
21596 move to arch-specific code the choice of arch-specific
21597 intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
21598 * mini.c: ensure emulation calls will not interleave
21601 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
21603 * tramp-ppc.c, basic-calls.cs: rework trampolines so that
21604 the magic trampoline stack frame is dropped before executing
21607 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
21609 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
21610 and integer to fp conversions. Added support for overflowing
21611 arguments on the stack. Reserve a couple more registers as temps.
21612 Added support for aot compilation (as output still needs to be
21615 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
21617 * mini-ppc.c, basic-long.cs: fix jumps to known labels.
21618 Don't overwrite return register in some corner cases.
21620 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
21622 * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
21623 static constructors when AOT compiling.
21625 * driver.c (mono_main): Call mono_check_corlib_version.
21627 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
21629 * cpu-g4.md, basic.cs: fixed div target register.
21631 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
21633 * mini-ppc.c, basic.cs: shl_imm fix with test.
21635 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
21637 * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing
21638 structures by value. Misc fixes.
21639 * objects.cs: more tests.
21641 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
21643 * mini-ppc.c: lconv.ovf.i implemented.
21645 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21648 (mini_init): don't error out if someone already called g_thread_init.
21650 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
21652 * exceptions-x86.c, exceptions-ppc.c: allow the exception object
21653 to be any type per the spec. Fix abnormal memory usage when
21654 the same object is repeatedly thrown.
21656 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
21658 * mini.c: check for overruns in IL code.
21660 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
21662 * TODO: Add/remove some todo entries.
21664 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
21666 * driver.c (mono_main): Call mono_verify_corlib.
21668 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
21670 * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy.
21671 This has been moved to mini.c
21672 * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
21673 type being casted is marshalbyref it could be a proxy, so instead of
21674 emitting the type check code, emit a call to a runtime method that will
21675 perform the check by calling CanCastTo if needed.
21677 2003-12-06 Zoltan Varga <vargaz@freemail.hu>
21679 * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
21680 methods with large stack frames under Win32.
21682 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
21684 * Makefile.am: Distribute regression tests.
21686 * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
21687 at the end instead of inserting each variable into the sorted list.
21689 * linear-scan.c (mono_varlist_sort): New helper function.
21691 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
21693 * mini.c: ensure arguments and locals are within bounds.
21695 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
21697 * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and
21700 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
21702 * mini.c (mono_cprop_copy_values): Fix crash.
21704 * aot.c: Set verbosity back to 0.
21706 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
21708 * regalloc.c: complete memory leak fix by Laurent Morichetti
21711 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
21713 * driver.c (main_thread_handler): Revert the previous patch.
21715 * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
21718 * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
21719 memory from the memory pool.
21721 * driver.c (main_thread_handler): Turn on all optimizations when
21724 * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
21725 an array for better performance.
21727 * regalloc.c (mono_regstate_assign): Fix memory leak.
21729 * debug-mini.c (mono_debug_serialize_debug_info): New function to
21730 serialize the debug info.
21732 * debug-mini.c (mono_debug_add_aot_method): New function to load the
21733 debug info from the serialized representation.
21735 * aot.c: Save debug info into the generated file and load it when
21738 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
21740 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
21742 * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
21743 More FP-related fixes.
21745 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
21747 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
21748 and register allocation buglet. Hello world now runs.
21750 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
21752 * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
21753 * tramp-ppc.c: fixed class init trampoline.
21754 * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
21756 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
21758 * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
21759 mini.c: more ppc changes/fixes.
21761 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
21763 * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
21764 Also optimize the case when the arguments are the same in the caller
21767 * iltests.il: Add tests for tail calls with valuetype arguments.
21769 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
21771 * mini-ppc.c: fixes for struct return type.
21773 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
21775 * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move
21776 mono_spillvar_offset() to arch-specific code.
21778 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
21780 * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
21782 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
21784 * exceptions-x86.c: Fix stack space leaks.
21786 * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
21787 registers from the lmf if the method has save_lmf set.
21789 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
21791 * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
21792 of icall wrappers into InvokeInDomain, since these are now per-domain.
21794 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
21796 * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
21797 make some opcode emulation and intrinsic ops enabled/disabled
21798 according to the architecture. More fixes.
21800 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
21802 * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
21804 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
21806 * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
21807 arch-specific handling for 'this' and struct return type to
21808 arch-specific code.
21810 2003-11-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21812 * aot.c: prevent divide by zero error when reporting (it happened with
21813 Accessibility.dll).
21815 2003-11-25 Zoltan Varga <vargaz@freemail.hu>
21817 * mini.h (inst_switch): Remove unused macro.
21819 2003-11-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21822 (load_aot_module): free 'info->methods' and 'info' properly. No more
21823 "free(): invalid pointer blah" messages when you have an old aot
21826 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
21828 * jit-icalls.c, mini.c: Added support for context static fields.
21830 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
21832 * mini.c (mono_method_blittable): Methods which set LastError are not
21833 blittable either. Fixes #51108.
21835 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
21837 * mini.c: flush icache.
21838 * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
21840 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
21842 * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
21844 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
21846 * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
21849 * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with
21852 * inssel.brg (CEE_MKREFANY): Fix AOT case.
21854 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
21856 * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div
21857 instruction when the result is discarded.
21859 * iltests.il (test_0_div_regalloc): New regression test.
21861 * arrays.cs: Fix compilation error.
21863 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
21865 * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
21866 float rules to inssel-x86.brg: sane architectures with FP registers
21867 don't need to implement these rules.
21869 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
21871 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
21873 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
21875 * mini.h, inssel-long32.brg: fixed endianess issues in int64
21876 implementation of 32 bit systems.
21878 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
21880 * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
21881 (Jeroen Zwartepoorte).
21883 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
21885 * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
21886 the caller and the callee matches.
21888 * mini.c (mono_method_to_ir): Add comment.
21890 * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
21891 signbit is missing on some platforms.
21893 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
21895 * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
21897 * mini.c (setup_jit_tls_data): Call the new function.
21899 * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
21901 * mini-x86.c: Add experimental support for fast access to the lmf
21902 structure under NPTL/Linux 2.6.x.
21904 2003-11-06 Martin Baulig <martin@ximian.com>
21906 * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
21907 `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
21910 2003-11-02 Martin Baulig <martin@ximian.com>
21912 * mini.c (inflate_generic_field): New static method.
21913 (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
21914 generic instance and the field is declared in a generic type, call
21915 inflate_generic_field() to inflate it. Fixes gen-28.cs.
21917 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
21919 * mini.h mini.c (mono_method_same_domain): New function to return
21920 whenever the caller and the callee are in the same domain.
21922 * tramp-x86.c (x86_magic_trampoline): Use the new function.
21924 2003-10-30 Martin Baulig <martin@ximian.com>
21926 * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
21927 similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
21929 (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
21930 MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS().
21932 2003-10-29 Zoltan Varga <vargaz@freemail.hu>
21934 * mini.c mini-ops.h inssel.brg: Implement undeniable exception
21937 * mini.c (sigusr1_signal_handler): Move creation of the thread abort
21938 object here, so it is in the correct appdomain etc.
21940 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
21942 * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
21944 (mono_method_to_ir): Avoid freeing the type created returned from
21945 mono_type_create_from_typespec, since it is put into an internal cache
21946 by the function. Fixes pointer.exe.
21948 * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal
21949 trampolines for icalls and pinvokes as well. Fixes #33569.
21951 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
21953 * mini.c: Update after appdomain changes.
21955 * mini.c (mono_jit_compile_method_inner): Allways compile native
21956 method wrappers in the root domain, since there can only be one
21957 instance of them, whose address is stored in method->info.
21959 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
21961 * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
21962 environment variable. Instead detect automatically whenever running
21963 under valgrind using the magic macro RUNNING_ON_VALGRIND from
21966 2003-10-16 Miguel de Icaza <miguel@ximian.com>
21968 * trace.c, trace.h: New files that implement the new trace option
21971 * driver.c: Document new --trace options.
21973 * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
21976 - if (mono_jit_trace_calls)
21977 + if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
21979 * mini.h: prototypes.
21981 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
21983 * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
21985 * mini.c inssel.brg: Implement typedefbyref opcodes.
21987 * mini.c (mono_jit_compile_method): Remove unused local variable.
21989 * mini.c (mono_jit_compile_method_inner): Ditto.
21991 2003-10-12 Zoltan Varga <vargaz@freemail.hu>
21993 * tramp-x86.c (x86_class_init_trampoline): Fix build.
21995 * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
21997 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
21999 * mini.c (mono_no_aot): Remove unused global variable.
22001 * mini.c: Thread safety fixes.
22003 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
22005 * mini.c (mono_create_class_init_trampoline): Add a lock around
22006 class_init_hash_addr.
22008 * arrays.cs (test_0_newarr_emulation): Add new regression test for
22011 * mini.c: Decompose the NEWARR instruction before decomposing its
22012 arguments. Fixes #30073.
22014 2003-10-08 Zoltan Varga <vargaz@freemail.hu>
22016 * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
22019 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
22021 * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
22023 * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
22025 * driver.c: Add support for compiling icall wrappers to --compile.
22027 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
22029 * inssel.brg: The empty value in class->interface_offsets is -1, not
22032 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
22034 * objects.cs: New test for 'is' operator on an array of interfaces.
22036 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
22038 * tramp-ppc.c: update trampoline code to support jumps
22039 and class initialization.
22041 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
22043 * mini.c (mono_jit_compile_method): Fix reading of freed memory.
22045 * inssel.brg (OP_UNBOXCAST): Fix #46027.
22047 * inssel.brg (OP_UNBOX): Remove unused rule.
22049 * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
22050 region instead of one for each method. Fixes #47813.
22052 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
22054 * exceptions.cs (test_0_nested_finally): New regression test for
22055 nested exception handlers.
22057 * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
22059 * mini.c (mono_method_to_ir): Avoid inlining tail calls.
22061 * mini.c (mono_method_to_ir): Fix tail recursion in the presence of
22064 * mini.c (mono_method_check_inlining): Make the inlining limit
22065 configurable by an environment variable.
22067 * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
22069 * mini.h: Bump AOT file version.
22071 * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a
22072 token, store the image along with the token, since the token might not
22073 refer to the same image as the method containing the relocation,
22074 because of inlining.
22076 2003-09-27 Zoltan Varga <vargaz@freemail.hu>
22078 * mini.c (mono_precompile_assemblies): New function to compile
22079 all methods in all loaded assemblies.
22081 * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
22083 * regalloc.h regalloc.c (MonoRegState): Change the type of
22084 iassign and fassign to int*, since they can contain large negative
22085 values if the register is spilled. Also added some comments. Fixes
22088 * exceptions-x86.c (seh_handler): Fix handling of system exceptions
22089 under Win32. Fixes #42964.
22091 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
22093 * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
22095 * aot.c: Added support for AOT compiling methods which contain calls
22096 to wrappers. Currently, only remoting-invoke-with-check wrappers are
22099 * driver.c (compile_all_methods): Run the compilation in a thread
22100 managed by mono. Fixes #44023.
22102 * mini.c (mono_codegen): Print full method name in verbose output.
22104 * mini-x86.c (mono_arch_patch_code): Fix warning.
22106 * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
22107 jumps, since the method we are jumping to might be domain-specific.
22109 * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
22111 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
22113 * inssel.brg: string chars are unsigned.
22115 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
22117 * TODO: New todo item.
22119 * tramp-x86.c (x86_class_init_trampoline): New trampoline function
22120 which calls mono_runtime_class_init and patches the call site to
22121 avoid further calls.
22122 (mono_arch_create_class_init_trampoline): New arch specific function
22123 to create a class init trampoline.
22124 (create_trampoline_code): Generalized so it can create
22125 class init trampolines as well.
22127 * mini.c (helper_sig_class_init_trampoline): New helper variable.
22128 (mono_create_class_init_trampoline): New function to create and cache
22129 class init trampolines.
22130 (mono_find_class_init_trampoline_by_addr): New function to lookup the
22131 vtable given the address of a class init trampoline. Used by the
22133 (mono_codegen): Generate a call to a trampoline instead of
22134 mono_runtime_class_init in LDSFLD[A].
22135 (mono_codegen): Add relocations for the new trampoline.
22137 * mini.h mini-x86.c aot.c: Added a new relocation type:
22138 MONO_PATCH_INFO_CLASS_INIT.
22140 * mini.h: Bump AOT version number.
22142 * aot.c: Create a copy of the loaded code instead of using the original
22143 so methods which call each other will be close in memory, improving
22146 * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
22147 patch since it breaks the regression tests.
22149 * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
22150 for the register saving instruction sequence since the
22151 frame_state_for function in glibc 2.3.2 don't seem to detect it.
22153 2003-09-14 Zoltan Varga <vargaz@freemail.hu>
22155 * TODO: Fix todo item && remove another.
22157 2003-09-12 Zoltan Varga <vargaz@freemail.hu>
22159 * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
22162 * aot.c: Moved the check for MONO_LASTAOT into the initialization
22163 function of the module.
22165 * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
22166 turning on/off the usage of AOT code. Got rid of mono_no_aot and the
22167 --no-aot command line option.
22169 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
22171 * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
22172 by Bernie Solomon (bernard@ugsolutions.com).
22174 * inssel.brg: Refactor the interface offset table related code into
22175 its separate functions and add support for the AOT case.
22177 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
22179 * aot.c (mono_aot_get_method_inner): Fix memory leak.
22181 * aot.c: Added mono_aot_verbose variable and made all debugging
22182 output depend on the value of this variable.
22184 * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
22185 method_label and info_label.
22187 * mini.h mini-x86.c aot.c: Added a new relocation type
22188 MONO_PATCH_INFO_IID for klass->interface_id.
22190 * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
22191 the MonoJitInfo structure.
22193 * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
22194 a non-root appdomain in shared mode.
22196 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
22198 * aot.c: make aot loader less verbose. Remove free of unused variable.
22200 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
22202 * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
22204 * .cvsignore: Added *.dll.
22206 * mini.c (mono_print_tree_nl): New function callable while debugging.
22208 * mini.c (mono_print_code): Export this.
22210 * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
22213 2003-09-05 Zoltan Varga <vargaz@freemail.hu>
22215 * mini.h (MonoCompile): Added 'jit_info' field.
22217 * mini.c (mini_method_compile): Save the generated MonoJitInfo into
22218 the cfg structure, since it is needed by the AOT compiler.
22220 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
22222 * aot.c: A major rewrite. Changes include:
22223 - save exception tables for methods which have them.
22224 - cache failed lookups in aot_get_method () to avoid the (slow) calls
22225 to g_module_symbol.
22226 - reworked the file format so it is now much smaller and needs
22227 fewer relocation entries.
22229 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
22231 * aot.c (load_aot_module): Fix build bustage on platforms without
22234 2003-09-04 Martin Baulig <martin@ximian.com>
22236 * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
22238 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
22240 * TODO: Some new optimization ideas.
22242 * aot.c: Move AOT module loading logic here from mono_assembly_open.
22244 * aot.c: Save the optimization flags used to compile the code into
22247 * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
22248 support emitting domain specific code.
22250 * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is
22251 no longer domain neutral. It can be made domain neutral by compiling
22252 with --optimize=shared.
22254 * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
22255 between appdomains.
22257 * driver.c mini.h mini.c: New --no-aot debugging option which disables
22258 loading of AOT code.
22260 * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
22262 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
22263 if there is no domain neutrality information.
22265 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
22267 * aot.c (mono_compile_assembly): Emit a symbol containing the file
22268 format version into the generated library.
22270 * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
22271 callee method into the caller since one of them could be shared.
22273 * mini.h mini-x86.c aot.c: Added two new relocations so throwing
22274 system exceptions from AOT code now works.
22276 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling
22277 method if it is domain neutral and the callee is not.
22279 * graph.c (cfg_emit_one_loop_level): Fix warning.
22281 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
22283 * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
22286 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
22288 * mini.c (mini_init): Call mono_marshal_init () explicitly since it
22289 is needed by code which is executed before mono_runtime_init ().
22290 Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
22292 * mini.c (mono_thread_abort): Fix warning.
22293 (mono_jit_compile_method): Call static constructor in the AOT case too.
22295 * aot.c (mono_compile_assembly): Fix warning.
22297 2003-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22299 * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
22301 2003-08-28 Zoltan Varga <vargaz@freemail.hu>
22303 * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
22305 * cpu-pentium.md: Fix the length of call opcodes so they include the
22306 ESP restoring instruction. Fixes #47968.
22308 2003-08-28 Martin Baulig <martin@ximian.com>
22310 * mini-x86.c (mono_arch_call_opcode): Added support for
22311 MONO_TYPE_GENERICINST.
22313 * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.
22315 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
22317 * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
22318 a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
22320 * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
22323 2003-08-26 Martin Baulig <martin@ximian.com>
22325 * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
22326 when reporting an error, set this to the actual error location.
22327 (mono_method_to_ir): Report the correct error location if
22328 get_basic_blocks() returned an error.
22330 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
22332 * mini.c (mono_type_blittable): OBJECT is not blittable.
22333 (mono_method_blittable): Methods which have marshalling descriptors
22334 are not blittable either. Fixes #47842.
22336 2003-08-22 Zoltan Varga <vargaz@freemail.hu>
22338 * driver.c mini.c: Use an environment variable instead of a global
22339 variable. Also fix the build.
22341 * mini.c (mini_init): Call g_thread_init () to make glib thread-safe.
22342 Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
22345 * driver.c mini.c: Added --with-valgrind option to turn off some
22346 code which prevents mono from running under valgrind.
22348 * mini.c (mono_emit_call_args): Fixed warning.
22350 * mini.c (mono_emulate_opcode): Fixed warning.
22352 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22354 * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
22355 * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
22356 regalloc.c, regalloc.h: specify available registers in arch-specific
22357 code and support floats in the regallocator (patch by Laurent Morichetti
22360 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
22362 * mini.c: mono_thread_current() can be called only after
22363 mono_runtime_init(): rearrange code to not call it early on.
22365 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
22367 * mini.c: allocate jump tables in the code mempools.
22369 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
22371 * mini.c, mini.h: make sure per-thread data allocated by the jit is
22374 2003-08-10 Miguel de Icaza <miguel@ximian.com>
22376 * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
22377 12 to 16. This fixes bug #47453.
22380 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
22382 * mini-ppc.c: fixed indexed load and unsigned compares.
22384 2003-08-06 Lluis Sanchez Gual <lluis@ximian.com>
22386 * mini.c: reenabled installation of handler for
22387 thread abort signal.
22389 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22391 * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
22392 by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
22393 until it's fixed and actually useful.
22395 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
22397 * inssel-long32.brg: couple more opcodes implemented.
22399 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
22401 * mini-sparc.c: Even more opcodes implemeted.
22403 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
22405 * mini-sparc.c: More opcodes implemented.
22407 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
22409 * mini-sparc.c: More opcodes implemented.
22411 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
22413 * inssel-sparc.brg: Add some needed rules. Direct
22415 * Makefile.am: Use inssel-sparc.brg
22416 * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
22417 an assert happy for now.
22419 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
22421 * mini-sparc.c: Fixed compile errors.
22422 * exceptions-sparc.c: Same. We now produce a mono binary
22423 on sparc-linux. Yea.
22425 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
22427 * mini-sparc.c: Renamed registers. Also some macro cleanups.
22428 * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
22429 They compile, but do not work.
22431 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
22433 * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
22434 mini-sparc.h, tramp-sparc.c: Beginning of sparc support
22435 from Mark Crichton <crichton@gimp.org> and Christopher Taylor
22438 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22440 * mini.c: more opcodes implemented and better support for generics.
22442 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
22444 * cpu-g4.md, cpu-pentium.md: updates for new instructions.
22445 * mini.c, mini.h: first cut at generics support: some new instructions
22446 added and changed the behaviour of some of the existing ones.
22448 2003-07-21 Miguel de Icaza <miguel@ximian.com>
22450 * mini.c: Removed definition of metadata_shared mutex here.
22452 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
22454 * mini-x86.c: make vararg calls work for instance methods.
22456 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
22458 * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
22459 returns the arguments in a separte list, now.
22461 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
22463 * aot.c, mini.c: updates for array type representation changes.
22465 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
22467 * mini.c: register function to perform jit shutdown.
22469 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
22471 * mini.c: use a faster allocator if possible.
22473 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
22475 * aot.c: some cleanups and portability changes.
22477 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
22479 * mini.c: use faster allocation for CEE_BOX if possible.
22481 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
22483 * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
22484 Moved inlined mempcy code to its own function so that is can be
22485 reused. Added an inline memset function as well (optimized initobj).
22486 * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
22488 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
22490 * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
22492 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
22494 * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
22495 arch code can setup the cpu for CLR execution, if needed.
22496 We use it on x86 to set the precision of FP operations.
22498 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
22500 * mini.c: disable some optimizations if we can guess they'll cost too
22501 much for a given method.
22503 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
22505 * mini.h mini.c: Rework last patch based on suggestions by Paolo.
22507 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
22508 * mini.h mini.c mini-x86.c: Added instruction level coverage
22509 info collection support.
22511 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
22513 * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
22514 is now implemented in the profiling API. Get rid of a couple of
22515 unnecessary global variables.
22517 2003-06-15 Nick Drochak <ndrochak@gol.com>
22519 * basic-long.cs: tests for negative values for bigmul, and unsigned.
22520 * cpu-g4.md: add op_bigmul and op_bigmul_un
22521 * cpu_pentium.md: add op_bigmul_un
22522 * inssel-long32.brg: add rule for unsigned bigmul
22523 * mini-ops.h: define OP_BIGMUL_UN
22524 * mini-x86.c: THE BUG: handle (un)signed properly
22525 * mini.c: choose unsigned opcode if needed.
22526 This set of patches fixes bug #44291
22528 2003-06-13 Dietmar Maurer <dietmar@ximian.com>
22530 * mini.c (optimize_branches): improved to handle all kinds of
22531 conditional branches.
22533 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
22535 * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
22536 don't raise exceptions.
22538 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
22540 * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
22541 to arch-specific files.
22543 2003-06-09 Martin Baulig <martin@ximian.com>
22545 * Makefile.am (libs): Added $(LIBGC_LIBS).
22547 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
22549 * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
22550 and OP_ATAN (fixes bug#44293).
22552 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
22554 * Makefile.am, mini-x86.c: rename cpu description array to
22555 pentium_desc, since some compilers define the 'pentium' preprocessor
22558 2003-05-28 Dietmar Maurer <dietmar@ximian.com>
22560 * mini.c (mini_select_instructions): add explicit branch if the
22561 following block is not the false target of a conditional branch -
22562 we need this with any optimization that reorder or remove bblocks
22564 * mini.c (optimize_branches): bug fixes
22566 2003-06-06 Dietmar Maurer <dietmar@ximian.com>
22568 * mini.c (mono_method_to_ir): inline static readonly fields
22570 * ssa.c (fold_tree): start cfold support for long (very simple
22573 * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
22575 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
22577 * inssel.brg: fixed memcpy (bug #44219).
22579 2003-06-05 Dick Porter <dick@ximian.com>
22581 * driver.c: Set the glib log levels to not abort if g_message
22584 g_set_prgname() has to happen before mini_init() so that the
22585 process handle gets the info.
22587 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
22589 * driver.c: add intrins to the default optimizations to get wider
22592 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
22594 * mini.h: some large basic blocks will overflow a 16-bit
22595 integers for symbolic registers.
22597 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
22599 * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
22600 (mono_arch_output_basic_block): fix bug 43499
22602 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
22604 * mini.c: kill duplicated definition of mono_debug_format.
22606 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
22608 * mini-x86.c, arrays.cs: fixed register allocation bug.
22610 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
22612 * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
22614 * mini.c (mini_get_opcode_for_method): inline IEEERemainder
22616 2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22619 (print_method_from_ip): also print source location information if
22622 2003-06-02 Dietmar Maurer <dietmar@ximian.com>
22624 * mini.c (mono_find_block_region): bug fix in region code
22625 (mini_method_compile): enable removing unreachable code again, but
22626 only in methods without exception clauses.
22628 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
22630 * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
22631 Implemented arglist opcode and handling of TypedReference type.
22632 Fixed x86 call convention when a structure is returned.
22633 Minimal support for calling static vararg methods.
22635 2003-05-30 Dietmar Maurer <dietmar@ximian.com>
22637 * mini.c (mini_method_compile): always remove unreachable code,
22638 because the code in them may be inconsistent (access to dead
22639 variables for example).
22641 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
22643 * driver.c, debug-mini.c: warning fixes.
22645 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
22647 * Makefile.am, jit.h, mini.h: install header for embedding mono.
22649 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
22651 * mini.c: thread-static fields are registered in mono_class_vtable(),
22652 so ensure the function is called before checking for them.
22654 2003-05-27 Dietmar Maurer <dietmar@ximian.com>
22656 * mini.c (optimize_branches): fix for bug 43586
22658 * jit-icalls.c (mono_llmult_ovf): added an additional check for
22659 overflow (fixes Bug #43639)
22661 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
22663 * mini.c, objects.cs: allow the use of stobj for primitive types.
22665 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
22667 * mini.c: be less strict about argument checking until we support
22668 running the verifier.
22670 2003-05-27 Nick Drochak <ndrochak@gol.com>
22672 * basic-long.cs: tests for (ulong)int * (ulong)int also
22673 * mini.c: use the same trick for (ulong)int * (ulong)int
22675 2003-05-27 Nick Drochak <ndrochak@gol.com>
22677 * basic-long.cs: add regression test for (long)int * (long)int
22678 * cpu-pentium.md: add op_bigmul specification
22679 * inssel-long32.brg: add OP_BIGMUL rule
22680 * mini-ops.h: add OP_BIGMUL
22681 * mini-x86.c: register allocator: handle case where src1 needs to be
22683 * mini.c: substitute special BIGMUL opcode in the tree for
22684 (long)int * (long)int
22686 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
22688 * jit-icalls.c: call the type ctor on field access if needed.
22690 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
22692 * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
22693 to a method (including results of ldelema, bug#43207).
22695 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
22697 * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
22698 colors to show exception handler blocks.
22700 * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
22701 (fix for pinvoke7.cs).
22703 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
22705 * mini.h, mini.c: ensure correct initialization order for types that
22706 require it. Prepare for lazy compilation of jit icall wrappers.
22707 Provide a name for opcode emulation to reduce unneeded mallocing.
22709 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
22711 * mini-x86.c: better register restoring code and profiling
22712 support for tail calls.
22714 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
22716 * mini.h, driver.c: prepare for leaf methods optimization.
22718 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
22720 * mini.c: get targets of branches before converting a method.
22722 2003-05-23 Dietmar Maurer <dietmar@ximian.com>
22724 * mini.c (optimize_branches): added some experimental code (disbaled)
22726 2003-05-22 Dietmar Maurer <dietmar@ximian.com>
22728 * mini.c (optimize_branches): fix branch to branch optimization
22730 * exceptions-x86.c (mono_arch_handle_exception): bug fix.
22732 * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
22734 * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
22736 * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
22739 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
22741 * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
22742 enable use of interface variables again.
22744 * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
22745 I1 to registers because there is no simply way to sign extend 8bit
22746 quantities in caller saved registers on x86.
22748 * inssel-float.brg: set costs of some rules to 2 so
22749 that monobure always select the arch. specific ones if supplied,
22750 regardless of the order we pass the files to monoburg.
22752 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
22754 * mini.c, mini-x86.c: since the magic trampoline for jumps
22755 can't patch the code directly, we do it as soon as the
22756 method gets compiled.
22758 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
22760 * mini-x86.c, mini.h: introduce a new patching method
22761 to support CEE_JMP and tail calls.
22762 * mini.c: obey tail.call. Don't precompile methods target
22764 * tramp-x86.c: new trampoline code to handle methods
22765 reached through a jump.
22767 2003-05-20 Dietmar Maurer <dietmar@ximian.com>
22769 * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
22770 bit values to registers
22772 2003-05-19 Dietmar Maurer <dietmar@ximian.com>
22774 * mini.c (mono_compile_get_interface_var): share interface
22775 variables if possible.
22777 2003-05-16 Martin Baulig <martin@ximian.com>
22779 * debug-mini.c (mono_init_debugger): New function to initialize
22780 the debugger. This is not in the debugger since it needs to
22781 access some of mini's internals.
22783 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
22785 * mini.c (mono_method_to_ir): inlining fixes/cleanups
22787 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
22789 * mini.c, mini-opts.h, inssel.brg: inline small memcpy
22790 for value type handling.
22792 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
22794 * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
22795 (mono_method_check_inlining): enable inlining of all kinds of wrappers
22797 2003-05-15 Lluis Sanchez Gual <lluis@ideary.com>
22799 * mini.c: fixed little bug in CEE_NEWOBJ case when calling
22800 the constructor through a proxy.
22802 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
22804 * jit-icalls.c, inssel.brg: fixes to array element address
22807 2003-05-15 Dietmar Maurer <dietmar@ximian.com>
22809 * mini-x86.c (is_regsize_var): allocate pointer to registers
22811 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
22813 * driver.c: fixed typo, added intrins to the set of optimizations
22814 tested with regressions.
22816 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
22818 * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
22819 * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
22822 2003-05-14 Dietmar Maurer <dietmar@ximian.com>
22824 * inssel.brg: remove some common pop instructions without side effects
22826 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
22828 * inssel-x86.brg: fixed thinko in int to double conversions.
22830 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
22832 * mini.c, jit-icalls.c: added runtime thread-static variable support.
22834 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
22836 * inssel-long32.brg: two more missing instructions.
22838 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
22840 * mini.c (mono_emit_call_args): set the cil_code for all arguments
22841 if not already set.
22843 2003-05-12 Zoltan Varga <vargaz@freemail.hu>
22845 * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
22848 * basic-float.cs: Added tests for negative zero.
22850 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
22852 * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
22853 a couple of missing operations for long casts, with test cases.
22855 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22857 * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
22859 2003-05-09 Dietmar Maurer <dietmar@ximian.com>
22861 * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
22862 code size estimation.
22864 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
22866 * mini.c (mono_jit_create_remoting_trampoline): make it work with
22867 abstract methods (fix bug 42542)
22869 * aot.c: add ability to handle array types
22871 2003-05-08 Zoltan Varga <vargaz@freemail.hu>
22873 * mini.c: Call the _specific versions of the object allocation
22874 functions if possible.
22876 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
22878 * driver.c: call setlocale ().
22880 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
22882 * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
22885 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
22887 * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
22889 * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
22890 wrappers (fix bug 42122)
22892 2003-05-04 Martin Baulig <martin@ximian.com>
22894 * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
22896 * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
22897 s/mini_set_defaults/mono_set_defaults/g.
22899 2003-05-04 Martin Baulig <martin@ximian.com>
22901 * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
22903 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22905 * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
22906 (reported by Don Roberts).
22908 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
22910 * mini.c: temporarily work around two bugs for this release.
22912 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
22914 * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
22915 that contains -export-dynamic and it makes using the ld script
22917 * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
22919 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
22921 * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
22924 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
22926 * mini.c: make sure leave calls all the needed finally blocks,
22927 even when the target jumps out of multiple exception clauses.
22929 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
22931 * ldscript, Makefile.am: add linker script to reduce the number of
22932 exported symbols (should also fix the issues with libwine defining
22933 some of the same symbols in io-layer).
22935 2003-05-01 Zoltan Varga <vargaz@freemail.hu>
22937 * driver.c (mini_main): Avoid assertion when no file name is given on
22940 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
22942 * driver.c: added --version/-V command line option.
22943 Added the inline optimization in the regression tests.
22945 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
22947 * mini.c, basic-calls.cs: when inlining, save arguments to locals according
22948 to the type in the method signature (fixes bug#42134).
22950 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
22952 * mini.c: when inlining, check this is not null only when needed (bug #42135).
22954 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
22956 * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
22958 2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22960 * driver.c: fixed bug #42100.
22962 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
22964 * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
22966 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
22968 * mini.c: moved most of the code required to do inlining to its own
22969 function so it can be reused. Inline also ctors if appropriate.
22971 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
22973 * Makefile.am: Link with -export-dynamic so shared libs loaded by
22974 the runtime can call mono API functions.
22976 2003-04-27 Martin Baulig <martin@ximian.com>
22978 * debug-mini.c (mono_debug_init_method): Added
22979 `guint32 breakpoint_id' argument; if the method has a breakpoint,
22980 send a notification to the debugger.
22982 * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
22983 running in the Mono Debugger, just pass the breakpoint number to
22984 mono_debug_init_method().
22986 * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
22988 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
22990 * mini.c: allow some more unsafe compares.
22992 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
22994 * mini-x86.c, Makefile.am: make distcheck works (partially from
22995 a patch by Richard Lee <r.h.lee@attbi.com>).
22996 * regset.c, regset.h: removed, they are unused.
22998 2003-04-25 Dick Porter <dick@ximian.com>
23000 * driver.c: Usage reports the name as 'mono' not 'mini'
23001 * exceptions-x86.c: Build and run on freebsd
23003 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
23005 * Makefile.am: install the program with the 'mono' name and
23006 the library as libmono instead of mini and libmini.
23008 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
23010 * driver.c: provide the APIs for the embedding interface of the old jit.
23012 2003-04-23 Dietmar Maurer <dietmar@ximian.com>
23014 * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
23016 2003-04-23 Martin Baulig <martin@ximian.com>
23018 * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
23020 * driver.c: Added `--debug' command line argument to enable
23023 2003-04-23 Martin Baulig <martin@ximian.com>
23025 * debug.[ch]: Removed. The code is now in
23026 ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
23028 * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
23031 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
23033 * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
23035 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23038 (mini_cleanup): moved mono_runtime_cleanup call after the call to
23039 mono_domain_finalize.
23040 (mini_method_compile): use mono_method_profile* if the the option is
23043 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
23045 * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
23046 methods with their wrapper.
23048 * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
23049 methods with their wrapper.
23051 * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
23054 * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
23057 * mini.c (mono_method_check_inlining): Avoid inlining synchronized
23060 2003-04-17 Dietmar Maurer <dietmar@ximian.com>
23062 * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
23064 2003-04-16 Dietmar Maurer <dietmar@ximian.com>
23066 * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
23067 of the mempool. This is slightly faster and uses less memory
23069 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
23071 * mini.c: avoid O(n) allocation for variables.
23073 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
23075 * mini.c: handle items on the stack after inlining methods.
23077 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
23079 * mini.c: make the method->opcode optimization dependent
23080 on MONO_OPT_INSTRINS and do it lazily.
23082 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
23084 * driver.c: print overall results at the end of regression run.
23086 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
23088 * inssel.brg: don't overwrite symbolic registers.
23090 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
23092 * inssel-x86.brg: fix conversion from long to float.
23094 2003-04-11 Dietmar Maurer <dietmar@ximian.com>
23096 * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
23098 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
23100 * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
23102 * driver.c: Added --print-vtable option as in the old JIT.
23104 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
23106 * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
23108 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
23110 * inssel.brg, basic.cs: fixed checked conversions to byte and short.
23112 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
23114 * mini.c regalloc.c regalloc.h: Fix memory leak.
23116 2003-04-09 Dietmar Maurer <dietmar@ximian.com>
23118 * aot.c (mono_aot_get_method): register all used strings
23120 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
23122 * mini.c: always intern strings references with ldstr at compile time.
23124 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
23126 * Makefile.am: add BUILT_SOURCES.
23128 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
23130 * driver.c: give a better error message when the assembly to execute
23131 doesn't have an entry point.
23133 2003-04-07 Dietmar Maurer <dietmar@ximian.com>
23135 * Makefile.am: added hack for automake
23137 * mono/mini/mini.c (mono_save_args): always copy arguments to keep
23140 * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
23142 22003-04-07 Martin Baulig <martin@ximian.com>
23144 * Makefile.am: Added Makefile.am.
23146 * debugger-main.c: Removed, this is now in the debugger where it
23149 * mini.pc.in: Call this package `mini' for the moment.