1 2009-01-05 Zoltan Varga <vargaz@gmail.com>
5 * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
6 instead of directly accessing type->data.klass. Fixes #462016.
7 (mono_allocate_stack_slots_full): Ditto.
11 * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio
12 <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
14 2009-01-04 Zoltan Varga <vargaz@gmail.com>
18 * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
23 * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
24 instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
27 * iltests.il.in: Add a regression test.
29 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
33 * basic-simd.cs: Add a regression test for #462457.
35 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
39 * mini-ops.h: Add a definition of XPHI.
41 * mini.h (MONO_IS_PHI): Make is aware of simd instrincs.
43 * ssa.c (op_phi_to_move): Handle XPHI.
45 * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
49 2008-12-29 Zoltan Varga <vargaz@gmail.com>
53 * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
54 while loading AOT methods.
58 * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
59 since only the former is nulled out after a successful cast. This prevents
60 crashes with rethrown exceptions when using --debug=casts.
62 2008-12-24 Mark Probst <mark.probst@gmail.com>
66 * mini.h: New macro for checking whether a method is final,
67 i.e. whether the method or its class is marked final.
69 * method-to-ir.c: Use the new macro for all final-checks
70 consistently. Fixes the crash in the System.ServiceModel tests.
72 2008-12-24 Mark Probst <mark.probst@gmail.com>
74 * mini-ppc.c (mono_arch_build_imt_thunk): Fix the build.
76 2008-12-23 Mark Probst <mark.probst@gmail.com>
80 * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
81 Clobbering it is not allowed because the caller might use it as
82 the vtable register in the interface call.
84 2008-12-23 Mark Probst <mark.probst@gmail.com>
86 * mini-exceptions.c (get_exception_catch_class): Removed another
87 overly strict assertion. Fixes #461198.
89 2008-12-19 Mark Probst <mark.probst@gmail.com>
91 * mini-exceptions.c (get_exception_catch_class): Removed overly
94 2008-12-19 Mark Probst <mark.probst@gmail.com>
98 * method-to-ir.c: Removed an unnecessary assertion.
100 2008-12-16 Martin Baulig <martin@ximian.com>
104 * method-to-ir.c (mono_method_to_ir): Disable debugging
105 information for the init locals block to make the debugger stop
106 after all locals have been initalized.
108 2008-12-16 Martin Baulig <martin@ximian.com>
112 * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
113 running inside the debugger.
115 2008-12-16 Martin Baulig <martin@ximian.com>
117 Backport of r120407 from Zoltan Varga.
119 * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
122 * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the
123 alu->alu imm optimization which only shows if deadce is disabled.
125 2008-12-16 Martin Baulig <martin@ximian.com>
129 * mini-exceptions.c (mono_handle_native_sigsegv): Check
130 mono_debug_using_mono_debugger() in addition to the
131 `no_gdb_backtrace' flag in the `MonoDebugOptions'.
133 2008-12-14 Zoltan Varga <vargaz@gmail.com>
137 * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
138 the stack in CEE_LDFLDA. Fixes #450542.
140 * generics.cs: Add a new test.
142 2008-12-14 Zoltan Varga <vargaz@gmail.com>
146 * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
147 gshared code. Fixes #458947.
149 * generics.cs: Add a test.
151 2008-12-12 Zoltan Varga <vargaz@gmail.com>
155 * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
157 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
159 * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
160 expect that an OP_BR_REG will be there.
162 * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
163 for the many branch ops. The original check miss OP_BR_REG.
167 Backported from trunk r121173 and r121175
169 2008-12-09 Zoltan Varga <vargaz@gmail.com>
173 * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
174 while holding the aot lock.
176 2008-12-09 Zoltan Varga <vargaz@gmail.com>
180 * aot-runtime.c (decode_exception_debug_info): Acquire the domain
181 lock when calling mono_domain_alloc (). Hopefully fixes #415608.
183 2008-12-08 Zoltan Varga <vargaz@gmail.com>
187 * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
188 as such. Fixes #456669.
190 2008-12-04 Zoltan Varga <vargaz@gmail.com>
194 * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
196 * mini.c (mono_resolve_patch_target): Allow pinvoke methods in
197 MONO_PATCH_INFO_ICALL_ADDR.
199 2008-12-03 Mark Probst <mark.probst@gmail.com>
203 * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
204 generic type (via a typedef or typeref) correctly.
206 2008-12-03 Zoltan Varga <vargaz@gmail.com>
210 * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
211 diagnose an assertion failure.
213 2008-11-29 Zoltan Varga <vargaz@gmail.com>
217 * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
219 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
221 * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
224 Backported from trunk.
226 2008-11-17 Zoltan Varga <vargaz@gmail.com>
228 * mini-amd64.h: Change the monitor fastpath defines to check for
229 !PLATFORM_WIN32 so they work on *bsd too.
231 2008-11-11 Zoltan Varga <vargaz@gmail.com>
233 * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
235 2008-11-10 Mark Probst <mark.probst@gmail.com>
237 * mini-x86.c (mono_arch_get_argument_info): Don't align argument
238 space for stdcall. Fixes regressions on Win32.
240 2008-11-10 Zoltan Varga <vargaz@gmail.com>
242 * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
244 (linear_scan): Remove an assert which doesn't seem to be needed.
246 * local-propagation.c (mono_local_deadce): Avoid a call to
247 MONO_DELETE_INS which would screw up the instruction linking.
249 * mini.c (mono_decompose_op_imm): Make this work with globalra.
251 * regalloc2.c: Upgrade to work the current JIT code.
253 2008-11-09 Zoltan Varga <vargaz@gmail.com>
255 * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
258 * aot-runtime.c: Remove some dead code.
260 * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
262 (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
264 * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
265 trampolines using sscanf since atoi doesn't work on large unsigned values.
267 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full):
268 Initialize code_size.
270 2008-11-08 Mark Probst <mark.probst@gmail.com>
272 * method-to-ir.c (mini_emit_inst_for_method): Make
273 Interlocked.CompareExchange work for Int arguments on 32 bit
276 2008-11-07 Mark Probst <mark.probst@gmail.com>
278 * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
280 2008-11-06 Bill Holmes <billholmes54@gmail.com>
282 * main.c Fix MSVC build.
284 Contributed under MIT/X11 license.
286 2008-11-06 Mark Probst <mark.probst@gmail.com>
288 * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
289 alignment larger than 8 bytes are aligned correctly, too.
291 * mini.c: Honor the min_align field of MonoClass when laying out
294 2008-11-06 Zoltan Varga <vargaz@gmail.com>
296 * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
298 * aot-compiler.c (emit_plt): Fix a warning.
300 * aot-compiler.c: Implement ARM support in the binary writer.
302 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
304 * basic-simd.cs: Add test for getter with byref arg.
305 Fix the naming of a few tests.
306 Add missing checks to a test.
308 2008-11-05 Zoltan Varga <vargaz@gmail.com>
310 * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
312 * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
313 most of the full-aot support for monitor enter/exit trampolines.
315 * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
316 enter/exit trampoline creation functions.
318 * Makefile.am: Fix the generation of buildver.h so it is not invoked during
321 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
323 * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
324 incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
325 implement the needed functionality without adding crap to the runtime.
327 2008-11-05 Zoltan Varga <vargaz@gmail.com>
329 * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
332 * mini.c (mono_build_date): New global version holding the build date in
335 * Makefile.am (buildver.c): Generate a file containing the build date.
337 * main.c: Set the build date from the generated file.
339 * mini.c (mono_get_runtime_build_info): New helper function returning build
340 information in a string format.
342 * driver.c (mono_main): Print the build date in --version.
344 * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
345 file when the bind-to-runtime-version option is used.
347 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
349 * simd-intrinsics.c: Fix bug when using getters and byref args.
351 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
353 * simd-methods.h: Rename prefetch methods.
355 * simd-intrinsics.c: Same.
357 2008-11-05 Mark Probst <mark.probst@gmail.com>
359 * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
362 2008-11-04 Zoltan Varga <vargaz@gmail.com>
364 * aot-compiler.c: Use the bundled elf header files instead of depending on
367 * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
370 * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
373 2008-11-04 Rodrigo Kumpera <rkumpera@novell.com>
375 * cpu-x86.md: Add store nta ops.
381 * mini.h: Add an enum for simd prefetch modes.
383 * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
384 of store. Use the changed code to support store nta.
386 * simd-intrinsics.c: Add prefetch ops for all vector types.
388 2008-11-04 Zoltan Varga <vargaz@gmail.com>
390 * aot-compiler.c: Add an option for JIT compiling the methods by multiple
393 * aot-compiler.c: Use statically allocated buffers for constructing symbol
396 * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
399 2008-11-04 Mark Probst <mark.probst@gmail.com>
401 * mini-x86.c: Fixed commit.
403 2008-11-04 Zoltan Varga <vargaz@gmail.com>
405 * aot-compiler.c (emit_plt): Align the plt section only on x86.
407 2008-11-04 Mark Probst <mark.probst@gmail.com>
409 * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
410 and MONITOR_EXIT, for the ASM fastpaths.
412 * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
415 * mini.c, patch-info.h: Signature and patch infos for
416 Monitor.Enter/Exit trampolines.
418 * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
420 * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
421 Monitor.Enter/Exit ASM fastpath for Linux.
423 2008-11-04 Zoltan Varga <vargaz@gmail.com>
425 * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
427 * objects.cs: Add a new test.
429 * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
431 * aot-runtime.c (load_method): Run class initialization in the PLT case even
432 if MONO_LOG_LEVEL is set.
434 * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
436 * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
438 * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
440 * aot-compiler.c: Change the relocation code to use virtual addresses instead
441 of file offsets. Align the sections belonging to the data segment to
444 2008-11-03 Zoltan Varga <vargaz@gmail.com>
446 * aot-compiler.c: Simplify the elf writer by depending on the definitions in
447 elf.h. Port it to amd64.
449 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
451 * driver.c: Enable SIMD by default.
453 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
455 * cpu-x86.md: Add prefetch op.
461 * mini.h: Add an enum for simd prefetch modes.
463 * simd-methods.h: Add prefetch function names.
465 * simd-intrinsics.c: Add prefetch ops for all vector types.
467 2008-11-03 Zoltan Varga <vargaz@gmail.com>
469 * aot-compiler.c (emit_bytes): Speed this up a little.
471 2008-11-02 Zoltan Varga <vargaz@gmail.com>
473 * aot-compiler.c: Add JIT time etc. statistics.
475 * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
477 * mini.h (MonoCompile): Add 'got_offset' field.
479 * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
480 method_got_offsets array.
482 * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
485 * aot-compiler.c (compile_method): Add generic method instances referenced
486 by the method to the list of methods to be compiled, this is required so if
487 A<T> references B<T>, and another assembly references A<int>, then it will
488 also get a copy of B<int>.
490 * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
491 when checking for monitor enter/exit.
493 2008-10-30 Mark Probst <mark.probst@gmail.com>
495 * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
496 for Monitor.Enter and Monitor.Exit if enabled.
498 * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
501 2008-10-30 Zoltan Varga <vargaz@gmail.com>
503 * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
504 of an OP_MOVE. Fixes #440046.
506 * basic-long.cs: Add a new test.
508 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
510 * mini.h: Add synchronization note for the managed counter-part.
512 * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
513 returns the simd caps of the current cpu.
515 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
517 * basic-simd.cs: Remove Console.WriteLine.
519 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
521 * basic-simd.cs: New tests for Vector2ul.
523 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
525 * simd-intrinsics.c: Add new vector type Vector2ul.
527 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
529 * basic-simd.cs: New tests for Vector2l.
531 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
533 * cpu-x86.md: Add long version of most packed int ops.
539 * simd-intrinsics.c: Add new vector type Vector2l.
541 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
543 * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
545 * simd-methods.h: Remove SN_op_BitwiseXor.
547 2008-10-28 Zoltan Varga <vargaz@gmail.com>
549 * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
552 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
554 * basic-simd.cs: Test for Vector2d.
556 * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
559 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
561 * cpu-x86.md: Add double version of all packed float ops.
567 * simd-intrinsics.c: Add new vector type Vector2d.
569 * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
571 * simd-methods.h: Add Duplicate.
573 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
575 * basic-simd.cs: Test for packing with signed saturation.
577 2008-10-28 Zoltan Varga <vargaz@gmail.com>
579 * aot-compiler.c (add_generic_instances): Add all methods of generic instances
580 found in the TYPESPEC table.
582 2008-10-26 Zoltan Varga <vargaz@gmail.com>
584 * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
587 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
589 * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
590 instead of the RVA, since the RVA can be changed by tools like the cil
593 * method-to-ir.c (mono_method_to_ir2): Ditto.
595 * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
596 (deserialize_variable): Ditto.
598 2008-10-25 Martin Baulig <martin@ximian.com>
600 * debug-mini.c (write_variable): Use
601 `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
603 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
605 * cpu-x86.md: Add unsigned variants of packd and packw.
609 * mini-x86.h: Emit the right instruction for packd and packw.
610 Add unsigned variants of packd and packw.
612 * simd-intrinsics.c: Packd and packw were used in place of their
613 unsigned variants. Change that.
614 Add intrinsics for (Signed)PackWithSignedSaturation.
616 * simd-methods.h: Add (Signed)PackWithSignedSaturation.
618 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
620 * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
622 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
624 * mini-ops.h: Remove dword packed add/sub with saturation ops.
626 * cpu-x86.md: Remove dword packed add/sub with saturation ops.
628 * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
631 * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
633 2008-10-24 Mark Probst <mark.probst@gmail.com>
635 * method-to-ir.c, mini.c: Special casing for the synchronized
636 wrapper for the ldtoken+GetTypeFromHandle case.
638 2008-10-24 Zoltan Varga <vargaz@gmail.com>
640 * mini.c (mono_replace_ins): Move this to branch-opts.c.
642 * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
643 created/split bblocks.
645 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
647 * mini-ops.h: Add packed signed mul high.
651 * mini-x86.c (mono_arch_output_basic_block): Same.
653 * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
655 * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
657 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
659 * basic-simd.cs: Tests for Vector16sb.
661 2008-10-24 Zoltan Varga <vargaz@gmail.com>
663 * inssel.brg (stmt): Fix OP_HARD_NOP rule.
665 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
667 * mini-ops.h: Add packed signed min, max and compare greater.
671 * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
674 * simd-methods.h: Add CompareGreaterThan.
676 * simd-methods.h: Remove CompareEquals.
678 * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
680 * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
682 * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
685 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
687 * basic-simd.cs: Fix tests due to change in the API.
689 2008-10-21 Zoltan Varga <vargaz@gmail.com>
691 * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
693 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
695 * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
697 * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
698 inst_offset as this has invalid values for LDADDR.
700 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
702 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
704 * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
706 2008-10-21 Zoltan Varga <vargaz@gmail.com>
708 * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
709 for accessing field->data.
711 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
713 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
715 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
717 * simd-methods.h: Add SignedPackWithUnsignedSaturation.
719 * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
721 2008-10-21 Zoltan Varga <vargaz@gmail.com>
723 * dominators.c (mono_compute_natural_loops): Allocate GList enties
724 from the cfg mempool.
726 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
728 * basic-simd.cs: Tests for new methods in Vector8us.
730 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
732 * mini-ops.h: Add multiply and store high.
736 * mini-x86.c (mono_arch_output_basic_block): Same.
738 * simd-methods.h: Same.
740 * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
743 2008-10-19 Zoltan Varga <vargaz@gmail.com>
745 * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
746 mono_class_setup_vtable ().
748 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
749 mono_class_get_vtable_entry () for accessing klass->vtable.
751 * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
753 * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
756 * method-to-ir.c (mono_save_token_info): Don't save references made from
759 * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
760 of generic instances.
762 * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
764 2008-10-19 Mark Probst <mark.probst@gmail.com>
766 * cpu-ppc.md, mini-ppc.c: The length of the code generated for
767 OP_JMP depends on the method signature. Calculate it properly.
769 2008-10-19 Zoltan Varga <vargaz@gmail.com>
771 * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
774 * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
776 (emit_extra_methods): Add another table mapping method indexes to
777 offsets in the extra_method_info table.
779 * mini.h: Bump AOT file format version.
781 * aot-runtime.c: Merge most of the code from mono_aot_get_method
782 and mono_aot_get_method_from_token () into one function.
784 2008-10-19 Mark Probst <mark.probst@gmail.com>
786 * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
789 2008-10-18 Zoltan Varga <vargaz@gmail.com>
791 * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
794 * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
797 * mini.c (mono_patch_info_equal): Compare the generic context as well.
799 * mini.h: Bump aot file format version.
801 * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
802 AOT file can contain native code for methods which are not in the METHOD
803 table. Generate code for non-sharable generic instances of generic methods
804 found in the METHODSPEC table.
806 * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
807 encoding generic type handles.
809 * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
810 (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
812 * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
813 macros + MONO_ADD_INS.
815 * mini.c (mono_jump_info_token_new2): New function which takes a generic
818 * mini.h (MonoJumpInfoToken): Include fields for a generic context.
820 * mini.h: Bump aot file format version.
822 * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
824 2008-10-17 Mark Probst <mark.probst@gmail.com>
826 * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
827 platforms, with definable stack alignment value. Set to 16 now
830 * mini.c, mini.h, driver.c: Command line option for disabling
833 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
835 * basic-simd.cs: Tests for new methods in Vector4ui.
837 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
839 * mini-ops.h: Add packed int shuffle.
843 * mini-x86.c (mono_arch_output_basic_block): Same.
845 * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
846 extract mask, max, min, shuffle.
848 * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
850 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
852 * basic-simd.cs: Tests for new methods in Vector8us.
854 2008-10-17 Mark Probst <mark.probst@gmail.com>
856 * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
857 RuntimeTypeHandle, not a TypedReference.
859 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
861 * simd-intrinsics.c: remove relocations.
863 2008-10-17 Zoltan Varga <vargaz@gmail.com>
865 * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM
866 optimizations from the x86 backend.
868 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
870 * simd-methods.h, simd-intrinsics.c: debloat method names and
871 prepare for no relocations.
873 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
875 * mini-ops.h: Add packed min/equal and sum of absolute differences.
879 * mini-x86.c (mono_arch_output_basic_block): Same.
881 * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
882 extract mask, max, min and sum of absolute differences.
884 * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
887 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
889 * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
890 Renamed one test for consistency.
892 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
894 * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
895 fix to the code that deal with other blocks.
897 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
899 * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
901 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
903 * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
904 that deals with vreg interference. Explicitly check for OP_LDADDR to be
905 able to process the source reg.
907 2008-10-16 Martin Baulig <martin@ximian.com>
909 * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
911 * inssel.brg: Add `OP_HARD_NOP'.
913 * mini.h (MonoCompile): Added `keep_cil_nops' flag.
915 * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
916 `OP_HARD_NOP' instruction when running inside the debugger.
918 * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
919 `OP_HARD_NOP' instruction when running inside the debugger.
921 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
923 * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
924 now works. The issue with the regalloc tripping up no longer
927 * simd-intrinsics.c (load_simd_vreg): Same.
929 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
931 * basic-simd.cs: Tests for new Vector8ui methods.
933 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
935 * simd-intrinsics.c (get_simd_vreg): Simplify code and test
936 only for type. This fixes crashes where MonoInst::klass is checked
937 for ops of type != VTYPE or OBJ.
939 * simd-intrinsics.c (load_simd_vreg): Same.
941 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
943 * mini-ops.h: Add ops for packed shuffle/max/avg and
948 * mini-x86.c (mono_arch_output_basic_block): Same.
950 * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
953 * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
954 to emit extract mask op.
956 * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
957 to emit word shuffles.
959 2008-10-15 Mark Probst <mark.probst@gmail.com>
961 * mini.c (mono_allocate_stack_slots_full): Align stack frame to
962 the largest alignment needed by a variable, but at least
965 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
967 * basic-simd.cs: Tests for the fixes in the last commit.
969 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
971 * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
972 no longer handles STACK_PTR input.
974 * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
976 * simd-intrinsics.c (load_simd_vreg): New function that works like
977 get_simd_vreg but handles STACK_PTR input.
979 * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
980 as the input can be an arbitrary pointer.
982 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
983 LDADDR local optimization directly otherwise use a store op.
985 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
987 * basic-simd.cs: Tests for dup low and dup high.
989 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
991 * mini-ops.h: Add dup low and dup high ops.
995 * mini-x86.c (mono_arch_output_basic_block): Same.
997 * simd-intrinsics.c (vector4f_intrinsics): Same.
999 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
1001 * basic-simd.cs: Tests for recently added functionality.
1003 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
1005 * mini-ops.h: Add remaining sse1 fp ops.
1007 * cpu-x86.md: Add remaining sse1 fp ops.
1009 * mini-x86.c (mono_arch_output_basic_block): Same.
1011 * mini.h: Add enum for simd FP compare conditions.
1013 * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
1015 * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
1016 so the backed can generate the appropriate op.
1018 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
1019 This patch squeese one more byte from the SimdIntrinsc struct.
1021 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
1022 a a shift amount intead of simply or'ing it.
1024 * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
1026 * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
1027 byte so we can have an aditional flags field without increasing struct size.
1029 * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
1030 against the simd_supported_versions bitmask.
1032 * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
1034 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
1036 * mini.c: remove rawbuffer code (the only use here is unsafe because
1037 it takes locks during signal handling and the kernel now provides much
1038 better info in proc/pid/smaps these days).
1040 2008-10-13 Zoltan Varga <vargaz@gmail.com>
1042 * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
1043 OP_X86_PUSH_OBJ. Fixes #434620.
1045 * objects.cs: Add a test.
1047 2008-10-12 Rodrigo Kumpera <rkumpera@novell.com>
1049 * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
1050 that the packuswb/packusdw don't work with unsigned numbers for what
1051 would be negative numbers in signed format.
1053 * cpu-x86.md: Add doubleword forms of many ops and packing ones.
1054 Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
1056 * mini-ops.h: Add doubleword forms of many ops and packing ones.
1058 * mini-x86.c: Emit doubleword forms of many ops and packing ones.
1060 * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
1062 * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
1064 * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
1067 * simd-intrinsics.c (simd_version_name): New function, returns the name of the
1068 version as the enum in mini.h.
1070 * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
1071 for sse3 ops, check the simd_version field if present. This way the code
1072 works with all versions of sse.
1074 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1076 * simd-intrinsics.c: Fixed intrinsic name typo.
1078 * mini.h: Added missing simd exported function.
1080 * basic-simd.cs: Added tests for Vector4ui.
1081 Fixed broken test for Vector16b.
1083 2008-10-10 Zoltan Varga <vargaz@gmail.com>
1085 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
1086 the max length to 64.
1088 2008-10-10 Mark Probst <mark.probst@gmail.com>
1090 * method-to-ir.c: Only do the fast virtual generic method call for
1091 non-wrapper methods.
1093 * mini.h, mini-trampolines.c: The new generic virtual remoting
1094 trampoline handles virtual method calls via the vtable (as done by
1095 the fast virtual generic method calls) to remoting proxies.
1097 * mini.c (mono_jit_create_remoting_trampoline): For generic
1098 methods reate a generic virtual remoting trampoline.
1100 * mini-amd64.h: Enable fast virtual generic method calls again.
1102 2008-10-10 Mark Probst <mark.probst@gmail.com>
1104 * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
1105 restore registers when doing tail calls.
1107 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1109 * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
1112 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1114 * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
1116 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1118 * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
1120 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1122 * basic-simd.cs: Retrofit for API changes.
1124 2008-10-10 Mark Probst <mark.probst@gmail.com>
1126 * mini-ppc.c: Handle integer stack arguments for tail calls.
1128 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1130 * optflags-def.h: Removed sse3 optimization.
1134 * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
1137 * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
1139 * mini.h: Added enumeration with simd versions.
1141 * simd-intrinsics.c (emit_intrinsics): Use the new static var
1144 * simd-intrinsics.c: Added mono_simd_intrinsics_init.
1146 * mini.c (mini_init): Call mono_simd_intrinsics_init.
1148 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
1150 * basic-simd.cs: Added tests for Vector8u and Vector16u.
1152 * basic-simd.cs: Fixed test naming.
1154 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
1156 * mini-ops.h: Added ops for packed and saturated math, shifts
1157 and packing/unpacking.
1159 * cpu-x86.md: Added descriptors for the above ops.
1161 * mini-x86.c: Added code to emmit the above ops.
1163 * simd-intrinsics.c: Added support for Vector16u and Vector8u.
1165 2008-10-08 Zoltan Varga <vargaz@gmail.com>
1167 * aot-compiler.c (compile_method): Enable AOT for generic code.
1169 * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
1171 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
1173 * mini.c: add a workaround for a common screwup that ends up blamed
1174 to mono (other processes blocking signal delivery).
1176 2008-10-07 Zoltan Varga <vargaz@gmail.com>
1178 * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
1179 in the LDFLD/STFLD opcodes. Fixes #432673.
1181 * iltests.il.in: Add a new test.
1183 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
1185 * mini-arm.c: attach the thread in unmanaged->managed transitions
1186 using delegates (bug #433148).
1188 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
1190 * basic-simd.cs: Use new ShuffleSel constants.
1192 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
1194 * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
1196 * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
1197 only disable simd intrinsics if no sse2 is detected.
1199 * optflags-def.h: Added sse3.
1201 * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
1204 2008-10-07 Zoltan Varga <vargaz@gmail.com>
1206 * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
1207 when adding delegate-invoke wrappers.
1209 2008-10-07 Zoltan Varga <vargaz@gmail.com>
1211 * Makefile.am: Reenable the simd tests.
1213 2008-10-07 Bill Holmes <billholmes54@gmail.com>
1215 * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
1216 add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
1217 other vreg is allocated to that hreg.
1219 Contributed under MIT/X11 license.
1221 2008-10-07 Zoltan Varga <vargaz@gmail.com>
1223 * Makefile.am: Disable the simd tests for now as Mono.Simd is not
1226 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
1228 * basic-simd.cs: New test suite for SIMD intrinsics.
1230 * Makefile.am: Added new tests.
1232 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
1234 * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
1238 * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
1240 * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
1241 using SSE2 aware opcodes.
1243 * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
1244 is enabled, this code path is only reachable if conversion ops are emmited after
1247 * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
1249 This optimization saves 6 bytes per conversion against the old version.
1251 2008-10-06 Zoltan Varga <vargaz@gmail.com>
1253 * aot-compiler.c (compile_method): Don't skip methods referencing
1254 generic methods without a corresponding entry in token_info_hash, since
1255 encode_method_ref () can handle all generic methods now.
1257 * method-to-ir.c (mono_save_token_info): Don't save the token info if a
1258 generic context is set.
1260 * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
1261 generic sharing of LDTOKEN.
1263 2008-10-06 Mark Probst <mark.probst@gmail.com>
1265 * mini-amd64.h: Temporarily disabled fast virtual generic method
1266 calls because it breaks the System.Runtime.Remoting tests.
1268 2008-10-06 Zoltan Varga <vargaz@gmail.com>
1270 * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
1272 * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
1273 so inlining actually works.
1274 (check_inline_caller_method_name_limit): Ditto.
1276 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
1278 * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
1279 64 bit safety (from Olaf Hering and Andreas Färber).
1281 2008-10-06 Zoltan Varga <vargaz@gmail.com>
1283 * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
1284 mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
1285 unused virtual call support code.
1287 * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
1289 * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
1290 which can't use aot trampolines.
1291 (decode_patch): Don't create aot trampolines for methods which can't use
1294 * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
1295 use aot trampolines.
1297 * mini.h: Bump AOT image format version.
1299 2008-10-05 Zoltan Varga <vargaz@gmail.com>
1301 * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
1302 to save_token_info () since cmethod is inflated for constrained calls.
1304 * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
1306 2008-10-04 Andreas Färber <andreas.faerber@web.de>
1308 * Makefile.am: Add build rules for ppc64.
1309 This avoids the build failing at pedump with unresolved symbols
1310 due to lack of arch_sources. Instead it will now fail earlier
1311 due to lack of cpu-ppc64.md.
1313 Contributed under MIT/X11 license.
1315 2008-10-04 Mark Probst <mark.probst@gmail.com>
1317 * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
1320 * iltests.il.in: Add test case for tail call with many arguments.
1322 2008-10-03 Zoltan Varga <vargaz@gmail.com>
1324 * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
1325 to the fast virtual generic method code until the aot case is fixed.
1327 2008-10-03 Mark Probst <mark.probst@gmail.com>
1329 * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
1331 2008-10-03 Mark Probst <mark.probst@gmail.com>
1333 * mini-amd64.c, mini-amd64.h: Implement generic virtual method
1336 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
1338 * simd-intrinsics.c: Forgot to add this one.
1340 * mini-codegen.c: Fix macro in case SIMD is not supported.
1342 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
1344 This patch land initial JIT support for simd intrinsics.
1346 * mini-x86.h: Added new define to make --enable_minimal work on x86.
1348 * Makefile.am: Added simd-intrinsics.c
1350 * simd-intrinsics.c: New file with simd instrinsic related
1353 * cfold.c (mono_constant_fold_ins2): Fold XZERO.
1355 * cpu-x86.md: Add simd related instructions.
1357 * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
1359 * driver.c: Added two new --regression variants.
1361 * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
1363 * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
1365 * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
1366 extract some complicated logic to helper functions.
1368 * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
1370 * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
1372 * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
1373 the specialized simplification pass.
1375 * method-to-ir.c (mono_spill_global_vars): Use new macro.
1377 * mini-codegen.c: Added SIMD constants to all regbanks arrays.
1379 * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
1382 * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
1383 if MONO_ARCH_NEED_SIMD_BANK is defined.
1385 * mini-ops.h: Added the new simd ops.
1387 * mini-x86.c: Added mono_arch_xregname.
1389 * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
1391 * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
1393 * mini-x86.h: Define simd related MONO_ARCH macros.
1395 * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
1397 * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
1399 * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
1400 MONO_CLASS_IS_SIMD to deal with simd related IR.
1402 * mini.h (MonoInst): Added spill_var to the backend union.
1404 * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
1406 * mini.h: Added forward declarations of the new simd fuctions.
1408 * optflags-def.h: Added new optimization names SIMD.
1410 * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
1412 * regalloc.h: Added support for working with 3 register banks.
1414 * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
1416 * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
1418 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
1420 * mini-exceptions.c: remove 64 bit related ifdef clutter.
1422 2008-10-03 Zoltan Varga <vargaz@gmail.com>
1424 * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
1425 instead of one on 64 bit systems.
1427 * method-to-ir.c: Remove unused includes.
1429 2008-10-02 Zoltan Varga <vargaz@gmail.com>
1431 * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
1432 cfg->used_int_regs, since the two are different on arm.
1434 2008-10-02 Mark Probst <mark.probst@gmail.com>
1436 * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
1437 mono_method_get_vtable_index() to get the vtable index.
1439 2008-10-02 Mark Probst <mark.probst@gmail.com>
1441 * method-to-ir.c (mono_method_to_ir2): Don't create native
1442 wrappers for array methods, because they're never called (and if
1443 they were called they wouldn't work).
1445 2008-10-02 Mark Probst <mark.probst@gmail.com>
1447 * method-to-ir.c (mono_method_to_ir2): Array methods are
1448 special-cased and must not be invoked indirectly via the (M)RGCTX
1449 when generic sharing is turned on. Fixes #431413.
1451 2008-10-01 Mark Probst <mark.probst@gmail.com>
1453 * method-to-ir.c: When generic sharing is active, call
1454 non-interface virtual generic methods via the standard trampoline.
1456 * mini-trampolines.c: Handle virtual generic shared methods.
1458 * mini.h, mini-x86.c, mini-x86.h: New argument for
1459 mono_arch_build_imt_thunk() which is non-NULL for virtual generic
1460 method thunks and which is the trampoline to call if the lookup
1461 fails. Enable the virtual generic method thunk for x86.
1463 * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
1464 mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
1465 argument but assert that it's NULL, because these archs don't yet
1466 implement the virtual generic method thunk. Changes in the IMT
1467 thunk data structures.
1469 2008-10-01 Zoltan Varga <vargaz@gmail.com>
1471 * aot-compiler.c (emit_globals): Avoid invalid characters in
1472 the static linking symbol.
1474 * objects.cs: Add a test for the range check optimization. Fix warnings.
1476 * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
1477 optimization from the current JIT.
1479 * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
1480 later in decompose_array_access_opts () to allow more optimizations.
1482 * method-to-ir.c (mono_handle_soft_float): Rename this to
1483 mono_decompose_soft_float () for consistency.
1485 * mini-ops.h: Fix arguments of OP_STRLEN.
1487 * method-to-ir.c (save_cast_details): Extract the cast details saving code
1488 into a separate function.
1489 (reset_cast_details): Ditto.
1490 (handle_unbox): Save cast details. Fixes #431254.
1492 * method-to-ir.c: Remove some obsolete FIXMEs.
1494 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1496 * ir-emit.h (alloc_dreg): Write a warning before crashing.
1498 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1500 * mini-codegen.c: More work on macros to make them
1501 ready for multiple regbanks.
1503 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1505 * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
1507 * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
1509 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1511 * mini-codegen.c (mono_spillvar_offset): Proper support for
1514 2008-09-30 Zoltan Varga <vargaz@gmail.com>
1516 * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
1517 the stack overflow changes.
1519 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1521 * mini-codegen.c: Make all bank macros depend on reg_bank.
1523 * mini-codegen.c (mono_local_regalloc): Make free mask
1524 initialization regbank aware.
1526 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1528 * mini-codegen.c (mono_local_regalloc): Extract callee
1529 mask selection to a function and make it regbank aware.
1531 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1533 * mini-codegen.c (mono_local_regalloc): Changed the cloberring
1534 code to deal with many regbanks.
1536 2008-09-30 Zoltan Varga <vargaz@gmail.com>
1538 * mini-codegen.c: More fp->regbank changes.
1540 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
1542 * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
1543 of a hardcoded constant.
1545 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
1547 * method-to-ir.c (type_from_stack_type): Fix typo.
1549 2008-09-29 Zoltan Varga <vargaz@gmail.com>
1551 * mini-ia64.c (emit_move_return_value): Convert float return values to
1554 * objects.cs: Add a new test.
1556 * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
1557 VARARG methods to fix an assert later.
1559 * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
1560 end so it at least compiles.
1562 2008-09-28 Zoltan Varga <vargaz@gmail.com>
1564 * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
1566 2008-09-28 Rodrigo Kumpera <rkumpera@novell.com>
1568 * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
1569 optimization to a new function (emit_optimized_ldloca_ir) and enable
1570 it for both ldloca and ldloca_s.
1572 2008-09-28 Zoltan Varga <vargaz@gmail.com>
1574 * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
1575 gshared CASTCLASS code.
1577 * driver.c (mono_main): Add a workaround for shutdown crashes seen on
1578 amd64, where the libc stack unwinder encounters stack frames referring to
1579 native code in unmapped memory.
1581 * method-to-ir.c (mini_emit_check_array_type): Add support for generic
1584 * generics.cs: Add new test.
1586 2008-09-27 Zoltan Varga <vargaz@gmail.com>
1588 * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
1589 add a check that one of the ARM_FPU_ constants is defined.
1591 * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
1593 * mini-exceptions.c: Fix build on non-altstack platforms.
1595 * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
1598 * ir-emit.h: Add a comment to NEW_PCONST.
1600 * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
1602 * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
1604 * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
1605 after the changes to MonoJitDomainInfo.
1607 2008-09-27 Mark Probst <mark.probst@gmail.com>
1609 * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
1611 2008-09-27 Mark Probst <mark.probst@gmail.com>
1613 * mini-ppc.c: Compiler warning fixes.
1615 2008-09-27 Mark Probst <mark.probst@gmail.com>
1617 * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
1620 2008-09-27 Mark Probst <mark.probst@gmail.com>
1622 * exceptions-ppc.c, mini-ppc.h: Compile
1623 mono_arch_handle_altstack_exception() on Darwin, too.
1625 2008-09-27 Mark Probst <mark.probst@gmail.com>
1627 * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
1628 work on archs which don't have generic sharing implemented, only
1629 without the vtable_arg.
1631 2008-09-26 Mark Probst <mark.probst@gmail.com>
1633 * mini.c: Added comment explaining why delegate ctor icall
1634 wrappers are compiled.
1636 2008-09-26 Mark Probst <mark.probst@gmail.com>
1638 * mini.c: Don't produce trampolines to delegate ctor icall
1639 wrappers but compile them upfront.
1641 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
1643 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
1644 runtime-set function when going back to managed code. Currently this
1645 is used to set back the protection on the soft ovf pages and/or to
1646 throw the stack overflow exception that happened in unmanaged code.
1648 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
1650 * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
1651 runtime-set function when going back to managed code. Currently this
1652 is used to set back the protection on the soft ovf pages and/or to
1653 throw the stack overflow exception that happened in unmanaged code.
1655 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1657 * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
1658 the support code for restoring stack protection after stack overflows
1659 that happen in unmanaged code. Don't set the exec permission on the
1662 2008-09-26 Zoltan Varga <vargaz@gmail.com>
1664 * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
1665 delegate->method_ptr is set. Fixes #428054.
1667 2008-09-25 Zoltan Varga <vargaz@gmail.com>
1669 * tests.cs: Rename to ratests.cs.
1671 * method-to-ir.c: Merge the emit_get_rgctx () calls into the
1672 emit_get_rgctx_... functions.
1674 2008-09-25 Mark Probst <mark.probst@gmail.com>
1676 * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
1678 2008-09-25 Mark Probst <mark.probst@gmail.com>
1680 * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
1681 before asserting that method is sharable.
1683 2008-09-25 Mark Probst <mark.probst@gmail.com>
1685 * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
1686 whether method needs a static RGCTX wrapper used instead of
1689 * generic-sharing.c, mini.h: A few functions moved to
1690 metadata/generic-sharing.c.
1692 2008-09-25 Mark Probst <mark.probst@gmail.com>
1694 * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
1695 Generic code sharing for value types, which essentially means
1696 treating value type methods like static methods. The RGCTX is
1697 passed in the same way.
1699 2008-09-25 Zoltan Varga <vargaz@gmail.com>
1701 * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
1702 opcode when creating multi-dimensional arrays of open types.
1704 * generic-sharing.c (mono_method_check_context_used): Handle arrays of
1707 * generics.cs: Add a test.
1709 * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
1711 2008-09-24 Zoltan Varga <vargaz@gmail.com>
1713 * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
1715 * mini.c (mini_method_compile): Set it when running under the debugger.
1717 * method-to-ir.c (mono_handle_global_vregs): Disable global->local
1718 vreg optimization if the flag is set.
1720 * driver.c (mono_main): Add --attach= option to pass options to
1723 * mini.c (sigquit_signal_handler): Start the attach agent.
1725 * ssapre.c: Disable this to save space since it is not yet ported to
1728 * regalloc2.c: Disable this to save space.
1730 * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
1732 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
1734 * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
1735 the -v option useful again.
1737 2008-09-24 Zoltan Varga <vargaz@gmail.com>
1739 * mini-amd64.c (mono_arch_output_basic_block): Add support for
1742 * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
1743 arrays of arrays. Fixes #428406.
1745 * method-to-ir.c (mini_emit_castclass): Ditto.
1747 * objects.cs: Add new test.
1749 2008-09-23 Rodrigo Kumpera <rkumpera@novell.com>
1751 * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
1752 was wrong at it choked against target_type_is_incompatible for byref types.
1754 2008-09-23 Zoltan Varga <vargaz@gmail.com>
1756 * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most
1759 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
1761 * mini-exceptions.c: update a few more exceptions-related counters.
1763 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
1765 * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
1766 new functions to allocate from persistent mempools.
1768 2008-09-23 Zoltan Varga <vargaz@gmail.com>
1770 * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow
1771 multiple register banks in the future.
1773 * mini-codegen.c (mono_local_regalloc): Fix a warning.
1775 2008-09-22 Rodrigo Kumpera <rkumpera@novell.com>
1777 * mini.c (type_to_eval_stack_type): Remove duplicated function.
1779 * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
1781 * mini.h: Export type_to_eval_stack_type.
1783 This function was nearly duplicated in method-to-ir.c and mini.c. The difference
1784 is only ins->klass of byref types.
1786 2008-09-22 Zoltan Varga <vargaz@gmail.com>
1788 * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
1789 (mini_emit_memcpy2): Ditto.
1791 * mini-amd64.c: Fix a warning.
1793 2008-09-21 Mark Probst <mark.probst@gmail.com>
1795 * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
1798 2008-09-19 Rodrigo Kumpera <rkumpera@novell.com>
1800 * method-to-ir.c: Extract stloc micro-optimization to a
1801 function and apply it to all cases.
1803 2008-09-19 Mark Probst <mark.probst@gmail.com>
1805 * method-to-ir.c: Don't fail generic code sharing in cases we
1808 2008-09-18 Mark Probst <mark.probst@gmail.com>
1810 * mini-ppc.c: Handle structs in tailcalls on Darwin.
1812 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
1814 * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
1817 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
1819 * trace.c: make tracing more useful and correct, with per-thread
1822 2008-09-15 Mark Probst <mark.probst@gmail.com>
1824 * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
1825 doing a method call and the argument is an R4.
1827 2008-09-14 Zoltan Varga <vargaz@gmail.com>
1829 * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
1832 2008-09-13 Mark Probst <mark.probst@gmail.com>
1834 * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
1836 2008-09-12 Zoltan Varga <vargaz@gmail.com>
1838 * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
1839 (MONO_JUMP_TABLE_FROM_INS): Ditto.
1841 2008-09-11 Zoltan Varga <vargaz@gmail.com>
1843 * driver.c: Add a --agent argument (not supported yet) to load managed
1844 agent assemblies before loading the main assembly, similarly to how the
1845 Java VM handles agents.
1847 2008-09-11 Mark Probst <mark.probst@gmail.com>
1849 * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
1850 function to do stack layout of local variables.
1852 2008-09-11 Mark Probst <mark.probst@gmail.com>
1854 * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
1857 2008-09-11 Zoltan Varga <vargaz@gmail.com>
1859 * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
1860 abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
1861 JIT if DISABLE_JIT is defined.
1863 * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
1866 2008-09-10 Mark Probst <mark.probst@gmail.com>
1868 * iltests.il.in: Disable the fconv test on PPC (the result is
1869 undefined according to ECMA).
1871 2008-09-10 Mark Probst <mark.probst@gmail.com>
1873 * iltests.il.in: Enable tail call tests for PPC.
1875 * mini.h: Add variable for storing incoming valuetype argument
1876 addresses for tail calls.
1878 * mini-ppc.c: Implement valuetype arguments and return values for
1881 2008-09-09 Mark Probst <mark.probst@gmail.com>
1883 * mini-ppc.c: Partially implement tail calls (struct arguments and
1884 return values not supported).
1886 * method-to-ir.c: Enable tail calls on PPC.
1888 2008-09-08 Zoltan Varga <vargaz@gmail.com>
1890 * aot-compiler.c (emit_wrapper_info): Omit the klass name from
1891 runtime-invoke wrappers to work around the problem of them getting
1892 assigned to a random class.
1894 * aot-runtime.c (mono_aot_get_method): Ditto.
1896 2008-09-07 Zoltan Varga <vargaz@gmail.com>
1898 * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
1899 the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
1901 2008-09-07 Mark Probst <mark.probst@gmail.com>
1903 * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
1904 until they're implemented properly.
1906 * exceptions-ppc.c: Use arch-independent exception-handling code
1907 instead of custom one.
1909 * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
1912 * tramp-ppc.c, mini-ppc.c: Fixed warnings.
1914 * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
1915 applies when __powerpc__ is defined.
1917 2008-09-06 Zoltan Varga <vargaz@gmail.com>
1919 * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
1920 methods to their code to avoid computing the full name of wrappers and
1921 doing a lookup in a string hash table.
1923 2008-09-05 Zoltan Varga <vargaz@gmail.com>
1925 * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
1926 we identify bblocks before method_to_ir () is ran.
1928 * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
1929 Also avoid optimizing branches pointing to themselves.
1931 * mini.c (mini_method_compile): Ditto. Fixes #422947.
1933 2008-09-05 Rodrigo Kumpera <rkumpera@novell.com>
1935 * driver.c (mono_main): Enable the new verifier under core-clr and cas.
1937 2008-09-05 Zoltan Varga <vargaz@gmail.com>
1939 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
1940 (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
1941 (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
1944 * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all
1945 jumped to the same entry in plt_jump_table.
1947 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
1949 * method-to-ir.c (initialize_array_data): Handle field with RVA from
1952 2008-08-31 Zoltan Varga <vargaz@gmail.com>
1954 * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
1955 other assignment can be if converted. Saves 1.5% on corlib size and fixes
1958 2008-08-29 Geoff Norton <gnorton@novell.com>
1960 * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
1961 segment, and doesn't properly handle .space as .text. Fixes
1964 2008-08-29 Geoff Norton <gnorton@novell.com>
1966 * mini.c: Disable the mach exception handler when running on
1969 2008-08-29 Geoff Norton <gnorton@novell.com>
1971 * aot-compiler.c: Patch from Renaldas Zioma to properly register
1972 globals on Darwin/ARM
1974 2008-08-28 Zoltan Varga <vargaz@gmail.com>
1976 * mini.c: Avoid not initializing the runtime when doing AOT compilation,
1977 since too many things depend on it. Instead, call
1978 mono_runtime_set_no_exec ().
1980 * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
1983 * aot-compiler.c: Add an 'asm-only' AOT option.
1985 * mini.c: Avoid initializing the runtime when doing AOT compilation.
1987 * aot-compiler.c (compile_method): Disable gshared support for now as it
1990 2008-08-27 Bill Holmes <billholmes54@gmail.com>
1992 * mini-amd64.h : Fix a compiler warning.
1994 * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
1995 Changed to use a callback function to retrieve the unwind info.
1996 This avoids problems observed when code blocks were removed by
1997 unloading an app domain.
1999 * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole
2000 and branch excludes for Winx64. The fix in exceptions-amd64.c allows them
2003 Contributed under MIT/X11 license.
2005 2008-08-27 Bill Holmes <billholmes54@gmail.com>
2007 * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
2008 case to keep the stack aligned to 8.
2010 Contributed under MIT/X11 license.
2012 2008-08-26 Zoltan Varga <vargaz@gmail.com>
2014 * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
2015 avoid repeated linear searches.
2017 2008-08-25 Zoltan Varga <vargaz@gmail.com>
2019 * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
2020 methods it can't handle.
2022 * aot-compiler.c (add_method): Avoid adding a method twice.
2023 (add_wrappers): Add runtime invoke wrappers for all methods.
2025 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
2026 function to create an aot-compatible version of this trampoline.
2028 * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
2030 2008-08-24 Zoltan Varga <vargaz@gmail.com>
2032 * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
2034 * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
2035 with a generic sharing failure.
2037 * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
2039 * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
2040 CEE_RETHROW. Fixes #419634.
2042 * mini.c (mono_method_to_ir): Ditto.
2044 * exceptions.cs: Add a new test.
2046 * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
2047 to mono_type_stack_size_internal () since some callers might not pass in
2050 * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
2051 instrument_prolog. Fixes #419878.
2053 * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
2054 doubles in soft float mode volatile.
2056 2008-08-23 Zoltan Varga <vargaz@gmail.com>
2058 * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
2060 * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
2061 to handle soft float correctly.
2063 * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
2066 * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
2068 * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
2069 to sp, since the generics catch code requires it.
2071 * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
2074 * method-to-ir.c (emit_imt_argument): Pass imt_arg to
2075 mono_arch_emit_imt_argument ().
2077 * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
2079 * mini-arm.c tramp-arm.c: Generic sharing updates.
2081 2008-08-22 Zoltan Varga <vargaz@gmail.com>
2083 * mini-arm.c: Fix the arm build.
2085 * generic-sharing.c (mini_type_get_underlying_type): New helper function
2086 handling enums, generic instances and generic sharing.
2087 (mini_type_stack_size_full): Ditto.
2089 * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
2091 * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
2093 * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
2095 * tramp-arm.c: Implement the rgctx fetch and the generic class init
2098 * mini-arm.c: Various small generic sharing changes.
2100 * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
2102 (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
2105 * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
2106 helper function to return a generic class init trampoline.
2108 * method-to-ir.c mini.c: Use it.
2110 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
2111 arch-specfic function to return a generic class init trampoline.
2113 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
2114 the GENERIC_CLASS_INIT custom code.
2116 * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
2117 a fatal error, not a sharing failure.
2119 * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
2122 * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
2123 trampoline argument from MONO_ARCH_VTABLE_REG.
2125 * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
2126 order of the arguments to the C trampoline: pass 'slot' as the trampoline
2127 argument, and pass the vtable in VTABLE_REG.
2129 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
2130 order of the arguments to the C trampoline: pass 'slot' as the trampoline
2131 argument, and pass the vtable in VTABLE_REG.
2132 (mono_arch_create_trampoline_code_full): Remove some special casing for
2133 the rgctx fetch trampoline.
2135 * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
2138 * iltests.il: Add a test for it.
2140 2008-08-21 Zoltan Varga <vargaz@gmail.com>
2142 * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
2144 * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
2147 * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
2148 use mono_jit_info_table_find () to avoid recursion.
2149 (mono_delegate_trampoline): Add a sync wrapper here.
2151 * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
2154 * mini.c (mono_method_to_ir): Ditto.
2156 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
2157 add_sync_wrapper argument. Don't add a sync wrapper here.
2158 (mono_create_jump_trampoline): Don't add a sync wrapper here.
2160 * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
2162 2008-08-20 Bill Holmes <billholmes54@gmail.com>
2164 * exceptions-amd64.c (seh_handler): For Winx64 adding missing copy
2165 of nonvolatile registers back from MonoContext to CONTEXT.
2167 Contributed under MIT/X11 license.
2169 2008-08-20 Bill Holmes <billholmes54@gmail.com>
2171 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): When shifting the
2172 arguments on Winx64 there are only 4 argument registers. For this
2173 logic to work the last argument must be pulled from the stack.
2175 Contributed under MIT/X11 license.
2177 2008-08-20 Zoltan Varga <vargaz@gmail.com>
2179 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2181 * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
2182 MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
2183 encode/decode_method_ref ().
2185 * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
2187 * aot-runtime.c (decode_patch): Ditto.
2189 * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
2190 MONO_PATCH_INFO_METHOD.
2192 * aot-runtime.c (decode_exception_debug_info): Decode the contents of
2195 * aot-compiler.c (emit_exception_debug_info): Emit the contents of
2198 * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
2200 * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
2201 one from the caller.
2203 * aot-runtime.c (decode_generic_inst): New function to decode and
2204 return a interned generic inst.
2205 (decode_klass_ref): Use it.
2206 (decode_method_ref): Ditto.
2208 * aot-compiler.c (emit_exception_debug_info): Save
2209 jinfo->has_generic_jit_info too.
2211 2008-08-19 Zoltan Varga <vargaz@gmail.com>
2213 * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
2215 * iltests.il.in: Add a test for fconv_to_i.
2217 * liveness.c: Disable the liveness2 pass for now to save space.
2219 * regalloc2.c: Include mempool-internals.h to fix warnings.
2221 * aot-compiler.c (encode_method_ref): Encode the context of generic
2224 * aot-runtime.c (decode_method_ref): Inflate generic methods using
2225 the context saved in the aot file.
2227 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2229 * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
2231 * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
2232 volatile so they won't be optimized away.
2234 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
2240 * dominators.c: Remove duplicated functions that now are in
2241 mempool-internals.h.
2243 2008-08-19 Zoltan Varga <vargaz@gmail.com>
2245 * aot-compiler.c: Fix warnings.
2247 * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
2249 * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
2251 * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
2254 * mini.c (mono_resolve_patch_target): Ditto.
2256 * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
2257 (encode_klass_ref): Add support for encoding VARs/MVARs.
2259 * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
2261 * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
2262 the handling of the got entries into a separate 'decode_got_entry' function.
2263 Add support for RGCTX_FETCH.
2265 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
2266 clobbered by the trampoline code.
2268 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
2269 not clobbered by the indirect calling code.
2271 2008-08-18 Zoltan Varga <vargaz@gmail.com>
2273 * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
2276 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
2278 * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
2279 signature using the compilation mempool otherwise we would leak it.
2281 2008-08-18 Zoltan Varga <vargaz@gmail.com>
2283 * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
2284 mono_emit_abs_call ().
2286 * patch-info.h: Add GENERIC_CLASS_INIT.
2288 * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
2290 * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
2291 as their target as a near call.
2293 * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
2295 (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
2297 * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
2298 call to a runtime function described by a patch.
2300 * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
2301 mono_emit_abs_call, this has the advantage that the ABS handling code in
2302 mono_codegen () can handle them both, and can handle other stuff in the
2303 future without additional code.
2305 * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
2307 (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
2310 * mini.h: Add missing bblock related prototypes.
2312 * mini.h (MonoCompile): Remove unused reverse_inst_list and
2313 reverse_inst_list_len fields.
2315 * mini.c: Refactor this file a bit by moving branch optimizations to
2318 * method-to-ir.c: Merge generic sharing changes missed earlier.
2320 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
2322 * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
2323 shared patches. Process METHODCONST as a shared patch.
2325 * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
2326 as it crashes on the 2.0 mscorlib.
2328 * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
2331 * aot-compiler.c: Use is_plt_patch () in a few additional places.
2332 (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
2335 * aot-compiler.c: Reorganize the got handling code to be a bit more
2338 2008-08-17 Zoltan Varga <vargaz@gmail.com>
2340 * aot-compiler.c: Make the patch_to_plt_offset hash table use
2341 mono_patch_info_equals/hash, and use it to massively simplify
2344 * mini.c (mono_patch_info_hash): Simplify this and add support for
2347 * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
2349 * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
2350 handling code, since an offset is not enough to identify a trampoline.
2352 * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
2354 2008-08-17 Mark Probst <mark.probst@gmail.com>
2356 * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
2358 * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
2360 * mini-ops.h: Argument and result types for OVF_CARRY ops.
2362 * decompose.c: PPC decompositions for various ops.
2364 * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
2366 2008-08-17 Zoltan Varga <vargaz@gmail.com>
2368 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
2369 call the generic trampoline code using a call, instead of a jump, to
2370 remove some special casing from the generic trampoline code.
2372 * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
2373 (mono_codegen): Ditto.
2375 * aot-compiler.c aot-runtime.c: Ditto.
2377 * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
2379 * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
2380 helper function to find the offset corresponding to a lazy fetch trampoline.
2382 * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
2383 when doing generic sharing.
2385 * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
2388 * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
2389 mini-trampolines.c to be with the other trampoline creation functions.
2391 * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
2392 as it is equal to method->signature in most cases, add a
2393 mono_emit_method_call_full variant which takes a signature and an imt
2396 2008-08-16 Zoltan Varga <vargaz@gmail.com>
2398 * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
2399 to this function, since it could be computed easily from the method
2401 (mono_helper_compile_generic_method_wo_context): Removed, not needed any
2404 * method-to-ir.c mini.c: Remove references to
2405 compile_generic_method_wo_context.
2407 * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
2408 generic method calls.
2410 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
2411 dimensional non-szarrays.
2413 * mini.c (mini_init): Register mono_array_new_1.
2415 * jit-icalls.c (mono_array_new_1): New jit icall.
2417 * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
2418 pointing to the method.
2420 * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
2421 method addresses belonging to METHOD_JUMP patches in the
2422 jump_target_got_slot_hash.
2423 (mono_aot_load_method): Ditto.
2425 * aot-compiler.c (compile_method): Allow AOT compilation of methods with
2426 METHOD_JUMP patches.
2428 * mini.c (mini_create_jit_domain_info): New helper function which
2429 initializes/frees domain->runtime_info.
2430 (mini_free_jit_domain_info): Ditto.
2431 (mini_init): Install the domain hook functions with the runtime.
2433 * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
2434 information maintained by the JIT.
2436 * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
2437 insertion into jump_table_hash into mono_codegen (), also implement proper
2440 * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
2441 tail calls, it is already done by the aot code.
2443 * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
2446 * iltests.il.in: Make the jmp test a bit more complex.
2448 * aot-compiler.c (encode_method_ref): Handle references to normal methods of
2449 generic instances which doesn't have a token.
2451 * aot-runtime.c (decode_method_ref): Ditto.
2453 * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
2454 can handle this case now.
2455 (handle_box): Ditto.
2457 2008-08-15 Geoff Norton <gnorton@novell.com>
2459 * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
2462 2008-08-15 Zoltan Varga <vargaz@gmail.com>
2464 * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
2465 calling generic methods.
2467 * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
2469 * aot-runtime.c (decode_patch_info): Ditto.
2471 * mini.c (mono_resolve_patch_target): Ditto.
2473 * patch-info.h: Add METHOD_RGCTX.
2475 * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
2477 2008-08-14 Zoltan Varga <vargaz@gmail.com>
2479 * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
2480 arguments in registers.
2482 * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
2483 OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
2485 * mini.c (mini_method_compile): Abort aot compilation for generic
2486 methods if generic sharing is disabled.
2488 * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
2491 * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls
2492 requiring an mrgctx.
2494 * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
2495 store instructions when converting a vcall to a normal call.
2497 * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
2498 mono_arch_find_jit_info.
2500 2008-08-13 Zoltan Varga <vargaz@gmail.com>
2502 * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
2503 avoid calling mono_method_full_name () for every method even if the
2505 (check_inline_caller_method_name_limit): Ditto.
2507 2008-08-12 Zoltan Varga <vargaz@gmail.com>
2509 * driver.c (main_thread_handler): Allow AOT compilation of multiple
2510 assemblies in one run.
2512 * aot-compiler.c (mono_compile_assembly): Only print out a count of
2513 skipped methods if it is not 0.
2515 * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
2517 2008-08-12 Bill Holmes <billholmes54@gmail.com>
2519 * mini.c (mono_codegen): Changing a preprocessor check from WIN64 to
2520 MONO_ARCH_HAVE_UNWIND_TABLE.
2522 Contributed under MIT/X11 license.
2524 2008-08-12 Bill Holmes <billholmes54@gmail.com>
2526 * mini-amd64.c (mono_arch_cpu_optimizazions): Remove peephole and branch
2527 from default optimizaton list on Winx64.
2529 * mini-amd64.c (emit_tls_get): Added Winx64 specific implementation for GetTLS.
2531 * mini-amd64.c (mono_arch_emit_prolog): Adding an offset on Winx64 to get
2532 the LMF from the MonoJitTlsData structure.
2534 * mini-amd64.c (mono_arch_setup_jit_tls_data): Added Winx64 implementation.
2536 Contributed under MIT/X11 license.
2538 2008-08-12 Zoltan Varga <vargaz@gmail.com>
2540 * mini.c (sigsegv_signal_handler): Fix the build.
2542 * mini-amd64.c (emit_call_body): Use image->aot_module instead of
2543 assembly->aot_module.
2545 * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
2546 hash table. This simplifies and speeds up a lot of code, and fixes support
2549 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
2552 * mini-exceptions.c: Ditto.
2554 * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
2555 'native_offset' argument, since these are computed in the
2556 mono_find_jit_info () function.
2558 * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
2559 is used by exceptions-ppc.c.
2561 * exceptions-ppc.c: Call mono_find_jit_info () instead of
2562 mono_arch_find_jit_info ().
2564 * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
2565 mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
2566 generic code in mini-exceptions.c.
2568 2008-08-11 Zoltan Varga <vargaz@gmail.com>
2570 * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
2572 * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
2574 * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
2575 the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
2576 called while holding the loader lock. Fixes #415608.
2577 (mono_aot_get_method_from_token_inner): Ditto.
2579 2008-08-09 Zoltan Varga <vargaz@gmail.com>
2581 * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
2582 to reduce differences between this and the generic implementation in
2584 (ves_icall_get_frame_info): Ditto.
2586 * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
2588 * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
2591 * exceptions-ppc.c (arch_get_call_filter): Rename this to
2592 mono_arch_get_call_filter () and make it non-static, for consistency with the
2593 other architectures.
2595 2008-08-09 Rodrigo Kumpera <rkumpera@novell.com>
2598 * local-propagation.c:
2599 * mini-x86.c: Correct the name of arch defines.
2601 2008-08-09 Zoltan Varga <vargaz@gmail.com>
2603 * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
2604 NO_EMULATE_LONG_SHIFT_OPS define.
2606 2008-08-08 Zoltan Varga <vargaz@gmail.com>
2608 * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
2609 now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
2611 * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
2612 MACH fixes. Merged from the 2.0 branch.
2614 * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
2616 * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
2617 (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
2619 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
2621 * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
2622 mono_marshal_get_native_wrapper () signature changes.
2624 2008-08-07 Rodrigo Kumpera <rkumpera@novell.com>
2626 * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
2627 conversion bug under arm.
2629 2008-08-06 Rodrigo Kumpera <rkumpera@novell.com>
2631 * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
2633 * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
2634 with overflow checking.
2636 2008-08-05 Marek Habersack <mhabersack@novell.com>
2638 * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
2639 to the genmdesc.pl file
2641 2008-08-05 Zoltan Varga <vargaz@gmail.com>
2643 * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
2644 arg_array in the soft-float versions of the LOAD/STORE macros.
2646 * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
2649 * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
2651 2008-08-02 Zoltan Varga <vargaz@gmail.com>
2653 * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
2654 a float HFA. Fixes #413621.
2656 2008-08-02 Gert Driesen <drieseng@users.sourceforge.net>
2658 * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
2659 frame_size to args_size. Fixes build.
2661 2008-08-02 Zoltan Varga <vargaz@gmail.com>
2663 * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
2664 and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
2666 * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
2667 the stack are not unaligned. Fixes #413247.
2669 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
2671 * mini.c: update jitted methods performance counters.
2673 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
2675 * mini-exceptions.c: increase the exceptions thrown performance
2676 counter in mono_handle_exception ().
2678 2008-07-29 Zoltan Varga <vargaz@gmail.com>
2680 * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
2681 can work with netmodules.
2683 2008-07-28 Geoff Norton <gnorton@novell.com>
2685 * mini-x86.h: Correct the frame alignment on OSX. Fixes the jit
2688 2008-07-28 Zoltan Varga <vargaz@gmail.com>
2690 * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
2693 2008-07-28 Bill Holmes <billholmes54@gmail.com>
2695 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2696 The float param registers and other param registers must be the
2697 same index on Windows x64.
2699 * mini-amd64.c (mono_arch_allocate_vars) : Implementing the
2700 ArgValuetypeAddrInIReg argument case. Setting the argument
2701 op to OP_VTARG_ADDR (OP_REGOFFSET)).
2703 * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix. Use the size
2704 variable computed above as the copy length for arguments of storage
2705 type ArgValuetypeAddrInIReg.
2707 * mini-amd64.c (mono_arch_emit_call) : Implementing the
2708 ArgValuetypeAddrInIReg argument case. This case will rely on
2709 mono_arch_emit_outarg_vt to emit the correct code later in the process.
2711 * mini-amd64.c (mono_arch_emit_call) : On Winx64 there always needs to be
2712 a 32 byte stack allocation for all calls. We will omit the adjustment for
2713 jump and tail call instructoins as they do not follow the typical call behavior.
2715 * mini-amd64.c (mono_arch_emit_outarg_vt) : Implementing the case for
2716 ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
2717 local variable and pass the local variable by reference to the called method.
2719 * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
2720 Implementing the ArgValuetypeAddrInIReg argument case. When the address
2721 of a struct is passed in a register it must be saved with the other
2722 volatile argument on the stack.
2724 * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix. When omitting the
2725 frame pointer the stack adjustment value must be saved to the unwind
2728 Contributed under MIT/X11 license.
2730 2008-07-28 Zoltan Varga <vargaz@gmail.com>
2732 * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
2733 which got lost in the merge.
2735 2008-07-27 Zoltan Varga <vargaz@gmail.com>
2737 * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
2740 * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
2742 * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
2743 icalls, since they won't be patched.
2745 * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
2746 different code sequence when running under valgrind to prevent some valgrind
2749 * iltests.il.in: Add new regression test.
2751 * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
2754 * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
2755 accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
2757 * iltests.il.in: Add new test.
2759 * aot-compiler.c: Fix some warnings.
2761 * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
2764 2008-07-27 Zoltan Varga <vargaz@gmail.com>
2766 * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
2767 (mini_usage_jitdeveloper): Add a missing --wapi option.
2769 2008-07-25 Zoltan Varga <vargaz@gmail.com>
2771 * mini-codegen.c: Simplify the is_fp macros.
2772 (free_up_ireg): Remove, use free_up_reg instead.
2773 (free_up_reg): Fix the fp case.
2775 2008-07-26 Zoltan Varga <vargaz@gmail.com>
2777 * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
2780 * exceptions-x86.c: Merge some changes which seemed to have got lost
2781 in the linear-ir merge.
2783 * liveness.c: Disable the liveness2 pass on 32 bit platforms.
2785 * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
2786 long vreg volatile even if the variable was already created.
2788 * liveness.c (update_liveness2): Avoid eliminating dead definitions of
2791 2008-07-26 Zoltan Varga <vargaz@gmail.com>
2793 * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
2795 * mini.c (mono_jit_compile_method_inner): Add support for
2796 MONO_EXCEPTION_BAD_IMAGE.
2798 * method-to-ir.c (mono_method_to_ir2): Avoid a crash if
2799 mini_method_get_context () returns NULL. Fixes #356531.
2801 * mini.c (mono_method_to_ir): Ditto.
2803 * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
2804 accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
2806 2008-07-25 Zoltan Varga <vargaz@gmail.com>
2808 * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
2809 in the LDFTN implementation.
2811 2008-07-25 Mark Probst <mark.probst@gmail.com>
2813 * mini-trampolines.c (mono_magic_trampoline): When sharing generic
2814 code, patch calls to icalls, too, even if they're not in the
2815 shared generic code hash. Fixes #411962.
2817 2008-07-25 Zoltan Varga <vargaz@gmail.com>
2819 * cpu-x86.md: Increase the length of the fcall opcodes.
2821 * mini-x86.c (emit_move_return_value): Avoid some precision issues for
2822 calls returning floats.
2824 * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
2827 * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
2830 * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
2831 into the domain->method_code_hash.
2833 * aot-compiler.c: Fix win32 build.
2835 * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
2837 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
2838 gshared NEWARR implementation.
2840 * cpu-sparc.md: Remove duplicate localloc_imm opcode.
2842 * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
2843 can be used outside of method_to_ir.
2845 * mini.h (MonoCompile): Add arg_types field.
2847 * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
2849 * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
2850 the values of the local arg_array and param_types array.
2852 2008-07-24 Zoltan Varga <vargaz@gmail.com>
2854 * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
2855 got accesses might only get generated later when NEWOBJ is decomposed.
2857 * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
2858 looking up the native code of the target method when a delegate is called
2861 * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
2864 * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
2866 * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
2867 AOT work on platforms without a working dlsym implementation.
2869 * mini.h: Bump AOT image format version.
2871 2008-07-24 Mark Probst <mark.probst@gmail.com>
2873 * mini-exceptions.c: Free a MonoType with
2874 mono_metadata_free_type() instead of g_free().
2876 * aot-runtime.c: Free a MonoType.
2878 2008-07-24 Zoltan Varga <vargaz@gmail.com>
2880 * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
2883 * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
2886 2008-07-23 Massimiliano Mantione <massi@ximian.com>
2887 * mini.c (sigprof_signal_handler): call the new "runtime initialized"
2890 2008-07-23 Zoltan Varga <vargaz@gmail.com>
2892 * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
2893 NEWOBJ calls on valuetypes.
2895 * iltests.il.in: Add new test.
2897 * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
2899 2008-07-22 Zoltan Varga <vargaz@gmail.com>
2901 * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
2902 is no longer needed.
2904 * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
2905 non register sized integer arguments.
2906 (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
2907 (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to
2910 * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
2913 * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
2914 two a binop with different sized arguments is emitted.
2916 * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
2917 instruction in the ins==NULL case.
2919 2008-07-23 Zoltan Varga <vargaz@gmail.com>
2921 * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
2923 * mini-x86.c: Fix osx build.
2925 * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
2928 * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
2929 instruction for non int sized variables.
2931 * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
2934 2008-07-23 Robert Jordan <robertj@gmx.net>
2936 * method-to-ir.c: Fix MSVC build.
2938 2008-07-22 Zoltan Varga <vargaz@gmail.com>
2940 * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
2941 a non int sized type, widen it to an int since newer versions of gcc seem to
2942 generate code which needs this.
2944 * ssa2.c abcremoval2.c: Fix warnings.
2946 * *: Merge the Linear IR branch.
2948 The original branch is at trunk/branches/vargaz/mini-linear-il, and
2949 the ChangeLog file there describes all the changes done over the years.
2950 Further documentation can be found at www.mono-project.com/Linear_IL.
2952 2008-07-21 Bill Holmes <billholmes54@gmail.com>
2954 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2955 The float param registers and other param registers must be the
2956 same index on Windows x64.
2958 Contributed under MIT/X11 license.
2960 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
2962 * mini.c: Make the previous fix GC safe.
2964 2008-07-21 Raja R Harinath <harinath@hurrynot.org>
2966 * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
2968 2008-07-21 Bill Holmes <billholmes54@gmail.com>
2970 * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
2971 on Winx64. This type will not be passed on the stack (ArgOnStack), but
2972 ArgValuetypeAddrInIReg instead.
2974 Contributed under MIT/X11 license.
2976 2008-07-21 Zoltan Varga <vargaz@gmail.com>
2978 * mini-codegen.c (get_register_spilling): Fix a warning.
2980 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
2982 * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
2983 for types which the initialization fails. Raises the provided exception
2984 at the right stop after cleanup.
2986 2008-07-16 Zoltan Varga <vargaz@gmail.com>
2988 * aot-compiler.c: Free most of the memory allocated during compilation.
2990 * mini.c (mini_parse_debug_options): Fix a leak.
2992 * mini.c (mini_method_compile): Don't add the method to the jit info tables
2993 during aot compilation.
2995 2008-07-14 Zoltan Varga <vargaz@gmail.com>
2997 * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as
2998 it has too much register pressure.
3000 2008-07-13 Zoltan Varga <vargaz@gmail.com>
3002 * inssel.brg (CEE_CASTCLASS): Remove some dead code.
3004 2008-07-12 Zoltan Varga <vargaz@gmail.com>
3006 * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
3009 * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
3010 on amd64 similar to the way it is done on arm.
3012 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3014 * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for
3015 consistency, normalize error messages, avoid loading aot-only modules in
3018 * driver.c (mono_main): Rename --aot-only command line option to --full-aot
3021 * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
3023 2008-07-11 Martin Baulig <martin@ximian.com>
3026 (MonoDebuggerInfo): Add `interruption_request'.
3028 2008-07-12 Zoltan Varga <vargaz@gmail.com>
3030 * aot-compiler.c (emit_plt): Remove some dead code.
3032 * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
3034 * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
3035 return the plt info offset belonging to a given plt entry.
3037 * mini-trampolines.c (mono_aot_plt_trampoline): Use
3038 mono_aot_get_plt_info_offset.
3040 * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
3041 similar to the amd64 code by makeing jumps through a separate jump table
3042 instead of embedding the jump addresses into the code.
3044 2008-07-11 Zoltan Varga <vargaz@gmail.com>
3046 * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
3049 2008-07-10 Martin Baulig <martin@ximian.com>
3051 * mini.c (mini_method_compile): Disable generics sharing when
3052 running in the debugger.
3054 2008-07-10 Zoltan Varga <vargaz@gmail.com>
3056 * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
3058 * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
3059 the local register allocator from running out of registers on x86 when
3062 2008-07-10 Bill Holmes <billholmes54@gmail.com>
3064 * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when
3065 expressing IntMin for the VS Compiler. See Compiler Warning (level 2)
3068 Contributed under MIT/X11 license.
3070 2008-07-10 Zoltan Varga <vargaz@gmail.com>
3072 * aot-compiler.c: Get rid of whitespace in the generated assembly file to
3073 speed up the assembler.
3075 2008-07-09 Zoltan Varga <vargaz@gmail.com>
3077 * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
3080 * mini.c: Move the soft float handling macros a bit earlier, add
3081 NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
3084 * mini.h: Add prototype for mono_arch_fixup_jinfo.
3086 * mini.c (mini_init): In aot-only mode, set the root domain code manager to
3087 read-only to help catch code allocation requests.
3089 * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
3090 and turn it off when using --aot-only or when compiling with --aot=full.
3092 * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
3093 jump table for switches from the normal domain mempool, not the code
3096 * mini-trampolines.c (get_unbox_trampoline): New function to return an
3097 unbox trampoline which handles aot-only mode too.
3099 * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
3100 an AOTed unbox trampoline.
3102 * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
3104 2008-07-09 Bill Holmes <billholmes54@gmail.com>
3106 * wapihandles.c: Fixing MSVC builds. Include statement changed from <> to
3109 Contributed under MIT/X11 license.
3111 2008-07-09 Bill Holmes <billholmes54@gmail.com>
3113 * mini.c (mono_codegen): Allocate space at the end of the code block and store
3114 the unwind information for the method at the end of the allocated block.
3116 * mini-amd64.h: Added declarations for the unwind routines and adding field to
3117 MonoCompileArch to hold the unwind info for SEH on Winx64
3119 * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
3120 frame pointer info for the method being compiled.
3122 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
3123 the call to mono_exception_from_token.
3125 * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations. This code is responsible
3126 storing the method prolog information in a format that the Winx64 SEH can understand. This
3127 information is stored a the end of the method block because it is all 32-bit offset based.
3129 Contributed under MIT/X11 license.
3131 2008-07-09 Zoltan Varga <vargaz@gmail.com>
3133 * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
3135 * wapihandles.c: Fix warnings.
3137 * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
3140 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling
3141 mono_jit_compile_method in aot-only mode since that calls the type
3144 * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
3145 get_delegate_invoke_impl in aot-only mode.
3147 * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
3149 2008-07-08 Zoltan Varga <vargaz@gmail.com>
3151 * trace.c (mono_trace_enter_method): Fix printing of Type instances.
3153 * aot-compiler.c (compile_method): Disable the check for GSHARED since it
3156 * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
3158 * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
3159 init trampoline from the AOT file as well.
3161 * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
3162 mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
3165 * mini.c (mini_init): Move the call to mono_exceptions_init () after
3168 * exceptions-amd64.c: Add _full variants for the remaining exception code
3169 creation functions as well, allow emission of relocatable code, remove
3170 caching since that is now done by the caller.
3172 * mini-exceptions.c: Add _full variants for the remaining exception code
3173 creation functions as well, add aot-only support.
3175 * aot-compiler.c (compile_method): Allow calls to methods of constructed types
3176 if we can determine a proper token for them.
3177 (add_wrappers): Add a few more wrappers.
3178 (emit_method_code): Remove some dead code.
3179 (emit_trampolines): Emit exception code too.
3181 * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
3183 * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
3184 mono_array_new_va which avoids varargs.
3186 * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
3188 * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
3189 mono_arch_create_specific_trampoline () in all places.
3191 * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
3192 a bit so it can be used for other things as well.
3194 * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
3197 * exceptions-amd64.c: Rename the caching from the exception code creation
3198 functions, it is done by the caller instead.
3200 * exceptions-amd64.c: Change the signature of the exception code creation
3201 functions to allow the creation of relocatable code later.
3203 * mini-exceptions.c: Add a set of functions to query the various
3204 runtime-generated exception functions.
3206 * mini.c mini-exceptions.c: Use the newly added functions instead of the
3207 mono_arch_.. () functions.
3209 2008-07-07 Zoltan Varga <vargaz@gmail.com>
3211 * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
3213 * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
3215 * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
3216 (mini_get_vtable_trampoline): Ditto.
3218 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
3219 code in the AOT case by returning the code size and a list of relocations to
3222 * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
3224 2008-07-07 Bill Holmes <billholmes54@gmail.com>
3226 * mini-amd64.c: On Winx64 the calling convention always requires the caller to
3229 Contributed under MIT/X11 license.
3231 2008-07-07 Zoltan Varga <vargaz@gmail.com>
3233 * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
3234 so the buffer size can be computed correctly. Fixes #404735.
3236 * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
3237 normally as cfg->debug_info is already freed.
3239 2008-07-06 Zoltan Varga <vargaz@gmail.com>
3241 * mini-amd64.c: For calls returning vtypes in registers, don't store
3242 the return address on the stack, instead allocate a separate local for
3245 2008-07-05 Mark Probst <mark.probst@gmail.com>
3247 * mini-trampolines.c, mini.h: Add an argument to
3248 mono_create_jit_trampoline_in_domain() for turning off the adding
3249 of the sync wrapper.
3251 * mini.c: Use the JIT trampoline without sync instead of
3252 ldftn_nosync in static RGCTX invoke wrappers so that the call can
3255 2008-07-04 Mark Probst <mark.probst@gmail.com>
3257 * driver.c: Turn on GSHARED optimization by default.
3259 2008-07-04 Zoltan Varga <vargaz@gmail.com>
3261 * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
3262 to MONO_TRAMPOLINE_JIT since it better reflects what it does.
3264 * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
3265 create a variant of the generic trampoline code callable from AOTed trampolines.
3267 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
3268 trampoline code callable from AOTed trampolines.
3270 * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
3272 2008-07-04 Mark Probst <mark.probst@gmail.com>
3274 * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
3275 pass-through manner.
3277 * mini.c: Generic method sharing. Pass MRGCTX to generic methods
3278 and don't fail sharing for them anymore.
3280 * mini-exceptions.c: Handle exceptions in shared generic methods.
3282 * generic-sharing.c: When checking the context of a generic
3283 method, also check its class's context. Don't treat wrappers as
3286 * mini-trampolines.c: Some code factored out to
3287 metadata/generic-sharing.c. Handle the MRGCTX case.
3289 * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
3290 we must deal with the method being of another instantiation of the
3291 class. Add static rgctx invoke wrappers to generic methods.
3293 2008-07-04 Mark Probst <mark.probst@gmail.com>
3295 * mini.c: Provide all jit infos of generic shared methods with a
3298 * mini-exceptions.c: Handle the new situation that a generic info
3299 might be available, but not info about the this/vtable/mrgctx
3302 2008-07-03 Mark Probst <mark.probst@gmail.com>
3304 * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
3307 2008-07-03 Zoltan Varga <vargaz@gmail.com>
3309 * dominators.c (check_dominance_frontier): Fix a warning.
3311 * mini.h: Add some missing prototypes.
3313 * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
3315 * driver.c (mono_jit_init_version): Correct the comments since the first
3316 argument should be the name of the root domain, not a filename.
3318 * aot-runtime.c (make_writable): Error out if this is called while running
3320 (load_aot_module): Ditto.
3322 * aot-compiler.c: Really fix the computation of method indexes.
3324 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous
3325 optimizations as this is no longer called frequently.
3327 * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
3328 method and the invoke impl code and pass it to the delegate trampoline instead of
3329 just the delegate class.
3331 2008-07-02 Zoltan Varga <vargaz@gmail.com>
3333 * aot-compiler.c: Fixup the computation of method indexes.
3334 (add_wrappers): Create the base methods of the runtime invoke wrappers using
3335 the method builder infrastructure.
3337 * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
3340 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
3341 mode, load the method right away instead of creating a trampoline.
3343 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
3345 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
3348 2008-07-01 Zoltan Varga <vargaz@gmail.com>
3350 * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
3351 (mono_aot_load_method): Use method_index instead of method->token.
3353 * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
3354 can handle icalls etc. properly.
3356 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3358 * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
3360 * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
3361 (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
3362 JIT_ICALL_ADDR patch type.
3364 * patch-info.h: Add JIT_ICALL_ADDR patch type.
3366 * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
3368 (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
3370 * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
3372 2008-06-30 Zoltan Varga <vargaz@gmail.com>
3374 * mini.c: Use domain->jit_code_hash_lock for controlling access to
3375 domain->jit_code_hash.
3377 2008-06-29 Zoltan Varga <vargaz@gmail.com>
3379 * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
3381 2008-06-27 Zoltan Varga <vargaz@gmail.com>
3383 * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
3384 get_this_arg_from_call, let it compute it when needed.
3386 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
3387 gsctx from code only when needed.
3389 * mini-trampolines.c (get_generic_context): Rename this to
3390 mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
3391 it can be called by the arch backends.
3393 * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
3395 2008-06-26 Zoltan Varga <vargaz@gmail.com>
3397 * driver.c (mono_main): Add experimental --aot-only command line option.
3399 * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
3402 2008-06-26 Kornél Pál <kornelpal@gmail.com>
3404 * driver.c (DllMain): Remove mono_module_handle.
3406 Contributed under MIT/X11 license.
3408 2008-06-25 Zoltan Varga <vargaz@gmail.com>
3410 * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
3411 for emitting methods which are not in the source assembly. Detect and report
3412 failure of assembling+linking.
3414 * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
3416 * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
3418 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
3420 * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
3422 2008-06-24 Zoltan Varga <vargaz@gmail.com>
3424 * mini.h: Remove some obsolete prototypes.
3426 * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
3428 2008-06-24 Mark Probst <mark.probst@gmail.com>
3430 * mini.c (get_object_generic_inst): Variable-sized arrays are not
3431 supported by Visual Studio, so use alloca().
3433 2008-06-23 Zoltan Varga <vargaz@gmail.com>
3435 * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
3438 2008-06-23 Mark Probst <mark.probst@gmail.com>
3440 * mini.c: Fail sharing of a generic method if it contains an open
3441 catch clause (because we don't pass MRGCTXs yet).
3443 2008-06-23 Mark Probst <mark.probst@gmail.com>
3445 * mini.c: When compiling a method with generic sharing, insert the
3446 method instantiated with an all-Object generic context into the
3447 jit info table, instead of the context of the first instantiation
3448 of the method we happen to compile.
3450 2008-06-18 Martin Baulig <martin@ximian.com>
3452 * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
3453 `major_version' and `minor_version'.
3455 2008-06-17 Mark Probst <mark.probst@gmail.com>
3457 * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
3458 mono_method_is_generic_sharable_impl() takes an additional
3459 argument specifying whether to treat type variables as reference
3462 2008-06-17 Mark Probst <mark.probst@gmail.com>
3464 * mini.h: Removed obsolete prototypes.
3466 2008-06-17 Mark Probst <mark.probst@gmail.com>
3468 * mini.c: Don't fail generic sharing for initobj and sizeof - we
3469 already handle them.
3471 2008-06-17 Mark Probst <mark.probst@gmail.com>
3473 * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
3474 tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
3475 tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
3476 tramp-x86.c: Added a MonoGenericContext* argument to
3477 mono_arch_get_unbox_trampoline() so that it can call other
3478 functions which require it.
3480 2008-06-17 Mark Probst <mark.probst@gmail.com>
3482 * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
3483 mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
3484 mono_arch_get_this_arg_from_call() takes a
3485 MonoGenericSharingContext* as well.
3487 2008-06-17 Mark Probst <mark.probst@gmail.com>
3489 * mini.c: Factor out code for emitting unbox into emit_unbox() and
3490 implement generic sharing of unbox.
3492 2008-06-17 Mark Probst <mark.probst@gmail.com>
3494 * mini.c: Don't compute the vtable to determine whether a field is
3495 special static, because it might not work for open types.
3497 2008-06-17 Mark Probst <mark.probst@gmail.com>
3499 * mini.c: Removed the unused token_type and token_source arguments
3500 from get_runtime_generic_context_ptr().
3502 2008-06-17 Marek Habersack <mhabersack@novell.com>
3504 * mini.c (ADD_BINOP): fix the build
3506 2008-06-16 Zoltan Varga <vargaz@gmail.com>
3508 * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
3511 2008-06-16 Mark Probst <mark.probst@gmail.com>
3513 * mini.h: Removed class relations enum that's not used anymore.
3515 2008-06-16 Mark Probst <mark.probst@gmail.com>
3517 * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
3519 * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
3520 the lazy fetch trampoline access code.
3522 2008-06-15 Zoltan Varga <vargaz@gmail.com>
3524 * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
3526 2008-06-14 Zoltan Varga <vargaz@gmail.com>
3528 * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
3530 * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
3532 * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
3534 2008-06-13 Zoltan Varga <vargaz@gmail.com>
3536 * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
3539 * mini-ops.h: Add MIN/MAX_UN opcodes.
3541 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
3544 * basic-math.cs: Add more min/max tests.
3546 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
3548 2008-06-13 Mark Probst <mark.probst@gmail.com>
3550 * mini.c: Small fix in the prologue of emit_castclass.
3552 2008-06-13 Zoltan Varga <vargaz@gmail.com>
3554 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
3556 * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
3557 do not work even for unsigned types. Fixes #400014.
3559 * basic-math.cs: Add regression tests for unsigned Min/Max.
3561 2008-06-13 Mark Probst <mark.probst@gmail.com>
3563 * mini.c: Added additional context_used argument to several
3564 functions, which will be needed for sharing generic methods. Use
3565 GET_RGCTX macro wherever appropriate. Declare only one
3566 context_used in mono_method_to_ir().
3568 2008-06-13 Mark Probst <mark.probst@gmail.com>
3570 * mini.c, generic-sharing.c: Removed generic class relations.
3572 * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
3573 functions due to MRGCTX changes.
3575 2008-06-13 Mark Probst <mark.probst@gmail.com>
3577 * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
3578 graph.c, local-propagation.c, aliasing.c: New opcodes for calls
3579 with calculated IMT.
3581 * mini.c: Generic sharing of calls via generic interfaces.
3583 * jit-icalls.c, jit-icalls.h: Helper function for compiling a
3584 generic method with non-constant MonoGenericContext*. Instead,
3585 the context is taken out of the method itself.
3587 2008-06-13 Mark Probst <mark.probst@gmail.com>
3589 * mini.c: Generic sharing of ldvirtftn.
3591 2008-06-13 Mark Probst <mark.probst@gmail.com>
3593 * mini.c: Generic sharing of ldftn.
3595 2008-06-13 Mark Probst <mark.probst@gmail.com>
3597 * mini.c: Do pass VTable/RGCTX argument to static generic methods.
3599 2008-06-13 Mark Probst <mark.probst@gmail.com>
3601 * mini.c: Generic sharing of the special case of ldtoken followed
3602 by a call to GetTypeFromHandle.
3604 2008-06-13 Mark Probst <mark.probst@gmail.com>
3606 * mini.c: Generic sharing of box for nullable types.
3608 2008-06-13 Zoltan Varga <vargaz@gmail.com>
3610 * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
3611 are passed on the stack. Fixes #324807.
3613 2008-06-12 Bill Holmes <billholmes54@gmail.com>
3615 * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
3616 for the ArgValuetypeAddrInIReg case.
3618 * mini-amd64.c:mono_arch_allocate_vars: Adding a case for
3619 ArgValuetypeAddrInIReg to avoid asserts. Code needs to be added here.
3621 * mini-amd64.c: mono_arch_call_opcode: Adding Winx64 code for an ArgInfo of
3622 type ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
3623 local variable and pass the local variable by reference to the called method.
3625 * mini-amd64.c: mono_arch_emit_prolog: Adjust the stack for calls to
3626 mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
3628 Contributed under MIT/X11 license.
3630 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3632 * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
3634 * debug-mini.c (mono_debug_print_vars): Release memory after printing
3637 2008-06-10 Martin Baulig <martin@ximian.com>
3640 (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
3642 2008-06-09 Kornél Pál <kornelpal@gmail.com>
3644 * main.c: Add and set argv [argc] to NULL to match C specification that fixes
3645 possible error when no arguments are passed.
3647 Contributed under MIT/X11 license.
3649 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
3651 * mini-exceptions.c (ves_icall_get_trace): Skip source locations
3652 where the file name is NULL.
3654 2008-06-09 Zoltan Varga <vargaz@gmail.com>
3656 * mini.c: Fix s390 build.
3658 2008-06-08 Zoltan Varga <vargaz@gmail.com>
3660 * trace.c (mono_trace_parse_options): Fix warnings.
3662 * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
3664 2008-06-07 Zoltan Varga <vargaz@gmail.com>
3666 * mini.c (remove_block_if_useless): Avoid printing the method name.
3668 * mini.c: Remove needless setting of ins->cil_code which is now done by
3671 * mini-amd64.c: Add some code to avoid saving callee saved registers in the
3674 * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
3675 translated code after it has been patched.
3677 2008-06-06 Zoltan Varga <vargaz@gmail.com>
3679 * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
3680 avoid problems during code patching on SMP systems.
3681 (emit_call): Avoid adding a patch info which is already added by
3683 (mono_arch_emit_exceptions): Ditto.
3685 2008-06-05 Zoltan Varga <vargaz@gmail.com>
3687 * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
3688 MONO_TYPE_ISSTRUCT already checks for it.
3690 2008-06-05 Bill Holmes <billholmes54@gmail.com>
3692 * mini-amd64.c:merge_argument_class_from_type: When marshaling
3693 structs with floats on Winx64 the float registers are not used.
3694 The integer registers are always used..
3695 * mini-amd64.c:add_valuetype: When marshaling structs on Winx64
3696 only one register will be used and only if the size of the struct
3697 is 1,2,4, or 8 bytes.
3699 * tramp-amd64.c : Adjusting size used for mono_global_codeman_reserve
3702 Contributed under MIT/X11 license.
3704 2008-06-05 Martin Baulig <martin@ximian.com>
3706 * debug-debugger.c (debugger_lookup_class): Also call
3707 mono_class_setup_methods() here; we're only called from RTI.
3709 2008-06-05 Andreas Färber <andreas.faerber@web.de>
3711 * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
3712 (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
3713 * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
3714 Post-process object files and add dtrace-generated object, if necessary.
3716 Contributed under MIT/X11 license.
3718 2008-06-04 Mark Probst <mark.probst@gmail.com>
3720 * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
3723 * mini.c: Generic sharing for unbox.any and castclass.
3725 2008-06-04 Mark Probst <mark.probst@gmail.com>
3727 * mini.c: Ignore tailcall prefix in shared generic code and when
3728 doing calls which require a vtable/rgctx argument.
3730 2008-06-04 Mark Probst <mark.probst@gmail.com>
3732 * mini.c: Don't free the JIT info.
3734 * driver.c: Changes in the JIT info table testing code.
3736 2008-06-03 Zoltan Varga <vargaz@gmail.com>
3738 * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread
3739 interruption. Fix some warnings.
3741 * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
3742 interruption_checkpoint.
3744 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
3746 * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
3747 from embedding applications.
3749 2008-06-02 William Holmes <billholmes54@gmail.com>
3751 * mini-amd64.c : Correcting some of the issues for Winx64 dealing with
3752 reserving 32 bytes on the stack when making calls.
3754 Contributed under MIT/X11 license.
3756 2008-06-01 Zoltan Varga <vargaz@gmail.com>
3758 * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
3759 the linear IL branch.
3761 * driver.c: Print out more information for --version on arm.
3763 2008-05-30 Zoltan Varga <vargaz@gmail.com>
3765 * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
3766 bb_exit instead, since out of line bblocks might not actually be emitted
3769 * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
3770 maximum epilog size for out of line bblocks if tracing is enabled.
3772 * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
3774 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
3776 * arrays.cs: Regression tests for allocating arrays with negative sizes.
3778 2008-05-28 Zoltan Varga <vargaz@gmail.com>
3780 * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
3781 CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE
3784 2008-05-27 Zoltan Varga <vargaz@gmail.com>
3786 * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
3787 the 'value' to store is a constant.
3789 * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
3791 * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
3792 of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
3794 2008-05-26 Zoltan Varga <vargaz@gmail.com>
3796 * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
3797 for accessing method->generic_container.
3799 2008-05-24 Zoltan Varga <vargaz@gmail.com>
3801 * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
3803 * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
3805 * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
3807 * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
3810 2008-05-23 Zoltan Varga <vargaz@gmail.com>
3812 * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
3814 * mini.c: Handle the case when mono_class_vtable () fails.
3816 2008-05-23 Massimiliano Mantione <massi@ximian.com>
3817 * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
3820 2008-05-22 Mark Probst <mark.probst@gmail.com>
3822 * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
3823 together with domain sharing.
3825 2008-05-22 Mark Probst <mark.probst@gmail.com>
3827 * mini.c: Treat callvirts to final methods like non-virtual calls
3828 when doing generic sharing, i.e. look them up in the runtime
3831 2008-05-22 Mark Probst <mark.probst@gmail.com>
3833 * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
3834 with computed types (for generic sharing).
3836 * mini.c: Generic sharing for mkrefany and refanyval.
3838 2008-05-22 Zoltan Varga <vargaz@gmail.com>
3840 * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
3843 * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
3844 the generic sharing code.
3846 * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
3849 2008-05-21 Zoltan Varga <vargaz@gmail.com>
3851 * mini.h: Remove the declaration of mono_aot_init_vtable ().
3853 2008-05-21 C.J. Adams-collier <cjac@colliertech.org>
3855 * driver.c: updated copyright date
3857 2008-05-21 Zoltan Varga <vargaz@gmail.com>
3859 * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
3862 2008-05-19 Martin Baulig <martin@ximian.com>
3864 * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
3865 pointing to the new `_mono_debug_using_mono_debugger' variable.
3868 (mono_main): Check mono_debug_using_mono_debugger() rather than
3869 the `MONO_INSIDE_MDB' environment variable to check whether we're
3870 inside the debugger.
3872 2008-05-19 Zoltan Varga <vargaz@gmail.com>
3874 * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
3877 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
3879 * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
3881 * mini.c: Added mini_assembly_can_skip_verification. This
3882 function checks if the assembly requested to skip verification.
3883 Fixes part of #387274.
3885 2008-05-07 Zoltan Varga <vargaz@gmail.com>
3887 * mini.c (mini_get_method): Disable the check for open generic classes when
3888 using generic sharing.
3890 * generics.cs: Add a test for #387034.
3892 * mini.c (mini_get_method): Check whenever the method class is an open generic
3893 type, and return NULL in that case, causing a verification error. Fixes
3896 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
3898 * driver.c (mono_main): Revert r102623. The right
3899 thing to do is to enable the verifier under verifiable
3900 unless a --security flag was passed.
3902 We need this non-trivial behavior for --verify-all otherwise
3903 mcs-compileall won't be able to use it. As it needs everything to
3904 be verified under validil.
3906 2008-05-06 Martin Baulig <martin@ximian.com>
3910 * debug-mini.c (mono_debugger_thread_created): Add proper locking.
3911 (mono_debugger_thread_cleanup): Likewise.
3912 (mono_debugger_extended_notification): Likewise.
3914 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
3916 * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
3917 against both inflated and non-inflated methods. We need to check against the
3918 generic definition for cases where the instantiated method is not visible.
3919 We need to check against the inflated types for cases where the instantiation
3920 changes any super type. This fixes #382986.
3922 Note that this doesn't need to be applied to other parts of mono_method_to_ir
3923 that check for visibiliy as generic params only appears as the type subject
3924 of tokens on call opcodes. Field manipulation and ldftn must always
3925 target an exact type.
3927 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
3929 * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
3930 if no related --security flag is passed.
3932 2008-05-05 Andreas Färber <andreas.faerber@web.de>
3934 * mini-arch.h: Prepare support for ppc64.
3936 Contributed under MIT/X11 license.
3938 2008-05-05 Andreas Färber <andreas.faerber@web.de>
3940 * aot-runtime.c: Prepare support for ppc64.
3942 Contributed under MIT/X11 license.
3944 2008-05-05 Andreas Färber <andreas.faerber@web.de>
3946 * mini-ops.h: Prepare support for ppc64.
3948 Contributed under MIT/X11 license.
3950 2008-05-04 Andreas Färber <andreas.faerber@web.de>
3952 * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
3954 Contributed under MIT/X11 license.
3956 2008-05-03 Zoltan Varga <vargaz@gmail.com>
3958 * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
3959 assemblies, since aot_name is not a full path, causing us to load MS.NET
3960 assemblies on windows.
3962 2008-04-28 Kornél Pál <kornelpal@gmail.com>
3964 * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
3965 for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
3966 * main.c: Use UTF-8 encoded command line instead of Windows default code
3967 page on Windows to support Unicode.
3968 * driver.c (DllMain): New function for mixed-mode assembly support.
3969 * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
3970 export __stdcall functions without decoration.
3972 Contributed under MIT/X11 license.
3974 2008-04-28 Mark Probst <mark.probst@gmail.com>
3976 * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
3977 saving it very early.
3979 2008-04-28 Mark Probst <mark.probst@gmail.com>
3981 * mini.h, mini.c: Lots of code for accessing the old RGCTX
3982 deleted. The only way to access the new RGCTX is via the
3985 * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
3986 vtable instead of the RGCTX to static methods.
3988 * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
3989 accessing the new RGCTX.
3991 * generic-sharing.c: There is no separation between self, type
3992 arguments and other types in the RGCTX anymore.
3994 2008-04-25 Jonathan Chambers <joncham@gmail.com>
3996 * mini-amd64.c (add_general): Remove previous stack adjustment.
3997 (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
3998 adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
3999 for 32 bytes of stack space reserved for all calls.
4001 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
4002 (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack
4005 Code contributed under MIT/X11 license.
4007 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
4009 * mini.c (mini_method_verify): Only verify non-inflated methods, check
4010 against the root definition, peeling out method and type instantiations.
4011 Cache verify success results, code that fails verification is still
4012 checked multiple times.
4014 2008-04-23 Zoltan Varga <vargaz@gmail.com>
4016 * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
4018 2008-04-23 Jonathan Chambers <joncham@gmail.com>
4020 * mini-amd64.c (add_general): Always increment stack on Win64.
4021 (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
4024 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for
4025 stack based argument handling on Win64.
4027 Code contributed under MIT/X11 license.
4029 2008-04-23 Raja R Harinath <harinath@hurrynot.org>
4031 * Makefile.am (version.h): Add support for git-svn.
4033 2008-04-22 Zoltan Varga <vargaz@gmail.com>
4035 * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
4036 so instead of calling g_spawn_command_line_sync, we do everything by hand,
4037 avoiding allocations and libc functions which might deadlock.
4039 * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
4040 'no-gdb-backtrace' option is set.
4042 * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
4044 * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
4046 2008-04-21 Martin Baulig <martin@ximian.com>
4048 * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
4049 and `get_lmf_addr'; `notification_address' is no longer a pointer.
4051 2008-04-21 Martin Baulig <martin@ximian.com>
4053 * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
4054 `thread_vtable', `event_handler_ptr' and `event_handler'.
4056 2008-04-21 Martin Baulig <martin@ximian.com>
4058 * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
4059 allows delayed initialization of the `executable_code_buffer' when
4062 2008-04-21 Martin Baulig <martin@ximian.com>
4064 * mini.h (mono_debugger_create_notification_function): Removed.
4065 * tramp-*.c (mono_debugger_create_notification_function): Removed.
4067 * mdb-debug-info64.s
4068 (MONO_DEBUGGER__notification_function): Added this in the .text section.
4070 * mdb-debug-info32.s
4071 (MONO_DEBUGGER__notification_function): Added this in the .text section.
4073 * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
4074 currently only works on x86 and x86_64, so don't create it on ppc.
4076 2008-04-21 Martin Baulig <martin@ximian.com>
4078 * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
4081 (mini_method_compile): In the fp elimination check, check
4082 `debug_options.mdb_optimizations' in addition to
4083 mono_debug_using_mono_debugger().
4085 * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
4086 disable some JIT optimizations which are only disabled when
4087 running inside the debugger.
4088 Added `--help-debug' option to describe the debugging options.
4089 (parse_debug_options): New static function to parse the `--debug'
4090 options, so we can easily add more stuff in future.
4092 2008-04-20 Zoltan Varga <vargaz@gmail.com>
4094 * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
4095 the method has no body.
4097 2008-04-19 Jonathan Chambers <joncham@gmail.com>
4099 * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
4100 assembly is not allowed in MSVC 64-bit compiler.
4101 (mono_arch_cpu_init): Don't set floating point precision on MSVC build
4102 as we get floating point exceptions everywhere.
4104 * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
4105 correctly align arguments for call to throw_exception.
4106 (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
4108 Code contributed under MIT/X11 license.
4110 2008-04-19 Zoltan Varga <vargaz@gmail.com>
4112 * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
4114 2008-04-17 Zoltan Varga <vargaz@gmail.com>
4116 * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
4118 * mini-amd64.c (NEW_INS): Set cil_code.
4120 * mini.c (mini_method_compile): Move the disabling of fp elimination to here
4121 from mini-amd64.c so all debugger related logic is in one place.
4123 * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
4124 later won't have a random ip assigned to them.
4126 2008-04-16 Zoltan Varga <vargaz@gmail.com>
4128 * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
4129 the arch specific function initializes code_size.
4130 (mono_create_delegate_trampoline): Ditto.
4132 * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
4133 tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
4136 * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if
4137 running under the debugger.
4139 * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
4142 * mini.c (mini_method_compile): Set a few flags in cfg if running under the
4143 debugger. Also move the disabling of optimizations here from driver.c.
4144 (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
4147 * mini.h (MonoCompile): Add a few new flags.
4149 2008-04-15 Zoltan Varga <vargaz@gmail.com>
4151 * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
4152 so the cil_code field of created MonoInst's is properly set.
4153 (mini_select_instructions): Ditto.
4155 * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
4156 (MONO_INST_NEW_CALL): Ditto.
4158 * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
4159 in many places so the ins->cil_code field is properly initialized.
4161 * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
4164 2008-04-14 Zoltan Varga <vargaz@gmail.com>
4166 * mini.c (mini_method_compile): Print a different message when compiling a
4169 * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
4172 2008-04-11 Zoltan Varga <vargaz@gmail.com>
4174 * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
4177 * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
4179 2008-04-11 Zoltan Varga <vargaz@gmail.com>
4181 * mini.c (handle_stack_args): Make this return void since its return value was
4182 never used. Also set cfg->unverifiable for invalid IL instead of calling
4185 2008-04-10 Mark Probst <mark.probst@gmail.com>
4187 * mini.c: Make sure "this" is live in catch clauses with type
4188 variables in shared generic code.
4190 2008-04-08 Mark Probst <mark.probst@gmail.com>
4192 * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
4193 generic_class_is_reference_type() to ensure the proper behaviour
4194 when sharing generic code and the type in question is a type
4197 2008-04-08 Zoltan Varga <vargaz@gmail.com>
4199 * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
4200 race conditions when printing thread dumps. Fixes #377738.
4202 2008-04-08 Massimiliano Mantione <massi@ximian.com>
4204 aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
4205 shows up when both MonoInst arguments can cause aliasig.
4206 There is likely no way in the current JIT to trigger this problem, but
4207 it showed up in the development of generics sharing, when in a new
4208 opcode both args of an OP_GROUP can be aliases (addresses of a local).
4209 When the generics sharing code will be committed, its tests will be
4210 valid also for this bug.
4212 2008-04-08 Zoltan Varga <vargaz@gmail.com>
4214 * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
4217 * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
4220 2008-04-07 Zoltan Varga <vargaz@gmail.com>
4222 * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
4223 use a more detailed exception message for InvalidCastException.
4225 * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
4227 * driver.c (mono_main): Add --debug=casts option to turn on better
4228 InvalidCastException message details.
4230 * mini.c (mini_get_debug_options): New helper function to return the address of
4231 the debug_options variable.
4233 * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
4234 the jit_tls TLS variable.
4236 * mini.c (mono_jit_tls): New TLS variable.
4238 * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
4241 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
4243 * mini.h: Removed verifer related stuff. This code was moved to verify.c
4245 * mini.c: Removed verifer related stuff, code moved to verify.c.
4247 * driver.c: Using code from verify.c instead of mini.c.
4249 2008-04-05 Zoltan Varga <vargaz@gmail.com>
4251 * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
4254 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
4256 * mini.c (check_for_method_verify): Enabling verification of
4257 corlib if mono_verify_all is set. Bugs in the verifier preventing that
4260 2008-04-04 Zoltan Varga <vargaz@gmail.com>
4262 * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
4263 caller saved registers as well.
4265 * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
4266 saved registers as well.
4268 2008-03-30 Zoltan Varga <vargaz@gmail.com>
4270 * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
4272 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
4275 2008-03-27 Zoltan Varga <vargaz@gmail.com>
4277 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
4279 (get_call_info): Take a gsctx argument instead of 'cfg'.
4281 2008-03-26 Zoltan Varga <vargaz@gmail.com>
4283 * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
4284 mono_verify_all is set.
4286 * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
4288 * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
4290 2008-03-25 Zoltan Varga <vargaz@gmail.com>
4292 * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
4295 * driver.c mini.c mini.h: Add a --verify-all development option to test the
4296 verifier and the code generated by the compiler.
4298 2008-03-25 Mark Probst <mark.probst@gmail.com>
4300 * mini.c: Generic sharing of the non-nullable case of the box
4303 2008-03-24 Zoltan Varga <vargaz@gmail.com>
4305 * inssel.brg: Fix the build.
4307 * iltests.il.in: Add a test for lconv.ovf.u8.un.
4309 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
4311 * mini.c (mono_method_to_ir): Implement readonly for ldelema and
4312 Array:Address. Fixes #372410.
4314 * iltests.il.in: New tests for readonly prefix.
4316 2008-03-23 Zoltan Varga <vargaz@gmail.com>
4318 * mini.h mini.c mini-trampolines.c: Move trampoline related code to
4321 * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to
4324 * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
4326 * mini.c (mono_decompose_op_imm): New helper function.
4328 * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
4329 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
4332 * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
4333 mono_arch_output_basic_block. Fix warnings.
4335 * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
4338 2008-03-22 Zoltan Varga <vargaz@gmail.com>
4340 * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
4341 since the extra frame is now detected automatically inside the loop.
4343 * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole
4344 opts which are now in mono_peephole_ins ().
4346 * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
4348 * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
4349 frames and skip duplicate managed-to-native frames. Fixes #367665.
4351 * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
4352 opts which are now in mono_peephole_ins ().
4353 (mono_arch_peephole_pass_2): Ditto.
4355 * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
4357 * mini-codegen.c (mono_peephole_ins): New helper function containing the
4358 arch independent peephole optimizations.
4360 * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
4361 opts which are now in mono_peephole_ins ().
4363 * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
4365 * mini-s390.c (mono_arch_output_basic_block): Fix build.
4367 * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
4370 * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
4371 CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
4374 2008-03-21 Zoltan Varga <vargaz@gmail.com>
4376 * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
4377 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
4380 * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
4381 mono_arch_output_basic_block. Fix warnings.
4383 2008-03-20 Zoltan Varga <vargaz@gmail.com>
4385 * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
4388 2008-03-20 Zoltan Varga <vargaz@gmail.com>
4390 * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
4393 * iltests.il: Add new tests.
4395 2008-03-20 Kornél Pál <kornelpal@gmail.com>
4397 * mini.c: Removed Windows version macros.
4399 2008-03-20 Mark Probst <mark.probst@gmail.com>
4401 * generic-sharing.c: Put reflection types in the extensible part
4402 of the runtime generic context.
4404 * mini.c: Generic sharing of the GetTypeHandle special case of the
4405 ldtoken instruction.
4407 2008-03-20 Zoltan Varga <vargaz@gmail.com>
4409 * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
4411 * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
4413 * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for
4414 consistency with the other version on the linear IR branch.
4416 * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
4418 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
4420 * iltests.il.in: Add new tests.
4422 2008-03-19 Zoltan Varga <vargaz@gmail.com>
4424 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
4426 * iltests.il.in: Add new tests.
4428 2008-03-19 Mark Probst <mark.probst@gmail.com>
4430 * mini.c: Two variables with the same name were declared in
4431 nesting contexts and one wasn't initialized. Fixed.
4433 2008-03-19 Mark Probst <mark.probst@gmail.com>
4435 * mini.c: Generic sharing of the initobj instruction.
4437 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
4439 * mini.c: make the test to optimize ldtoken from typeof() more
4442 2008-03-18 Mark Probst <mark.probst@gmail.com>
4444 * mini.c: Generic sharing of the initobj instruction for reference
4447 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
4449 * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
4450 the mono_breakpoint_clean_code() code to perform bound checks.
4452 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
4454 * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
4455 mono_arch_patch_callsite() to include the start of the managed method
4456 to be able to perform bound checks.
4458 2008-03-17 Mark Probst <mark.probst@gmail.com>
4460 * mini.c: Generic sharing for the isinst instruction.
4462 2008-03-17 Mark Probst <mark.probst@gmail.com>
4464 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
4465 inssel-long32-mips.brg: Added opcodes for doing indirect calls
4466 with the runtime generic context argument.
4468 * mini.c: Share calls to several types of unsharable methods by
4469 putting the address of the method code in the runtime generic
4470 context and doing an indirect call.
4472 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
4475 2008-03-16 Mark Probst <mark.probst@gmail.com>
4477 * generic-sharing.c: Change due to a change in the runtime genric
4480 2008-03-15 Martin Baulig <martin@ximian.com>
4483 (mono_arch_nullify_class_init_trampoline): Add call to
4484 mono_breakpoint_clean_code() to make things work when running
4485 inside the debugger.
4488 (mono_arch_nullify_class_init_trampoline): Add call to
4489 mono_breakpoint_clean_code() to make things work when running
4490 inside the debugger.
4492 2008-03-14 Zoltan Varga <vargaz@gmail.com>
4494 * inssel-long.brg (reg): Fix 64 bit build.
4496 2008-03-14 Mark Probst <mark.probst@gmail.com>
4498 * mini.c, mini.h: Share static generic code by passing it an
4499 implicit argument pointing to the runtime generic context.
4501 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
4502 inssel-long32-mips.brg: New opcodes for calling shared static,
4503 which need to be passed the runtime generic context.
4505 * mini-amd64.c, mini-x86.c: Save the runtime generic context
4506 argument on the stack in the prologue if needed. New function for
4507 finding the runtime generic context argument from the registers
4508 saved by the trampoline.
4510 * mini-amd64.h, mini-x86.h: Specify which register to use for the
4511 runtime generic context argument.
4513 * tramp-amd64.c: Also restore the register used for the runtime
4514 generic context argument.
4516 * mini-trampoline.c: Resolve shared static calls by consulting the
4517 runtime generic context via the new argument.
4519 * generic-sharing.c: Add an argument to sharability-checking
4520 functions that specifies whether type variables should be treated
4521 as sharable type arguments.
4523 * inssel-x86.brg: Removed a superfluous, buggy rule.
4525 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
4528 2008-03-14 Martin Baulig <martin@ximian.com>
4530 * debug-debugger.c (main_thread_handler): Call
4531 mono_runtime_run_main() without sending any notifications.
4533 * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
4535 2008-03-14 Zoltan Varga <vargaz@gmail.com>
4537 * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
4539 2008-03-14 Mark Probst <mark.probst@gmail.com>
4541 * tramp-x86.c: Fixed register restore offsets in the trampoline
4542 code for ECX and EDX.
4544 2008-03-12 Geoff Norton <gnorton@novell.com>
4546 * mini-arm.h: Add some #defines for locating sp, pc, r4 with
4547 different ucontext_t implementations.
4548 * exceptions-arm.c: Use the above defines to get exceptions working on
4549 iPhone (based on a patch by Luke Howard lukeh@padl.com)
4550 * mini-arm.c: Implement iPhone icache support (based on a patch by
4551 Luke Howard lukeh@padl.com)
4553 2008-03-12 Mark Probst <mark.probst@gmail.com>
4555 * mini.c: Enable generic sharing of calls to non-static
4556 non-interface non-generic non-value-type methods.
4558 * mini-trampolines.c: Resolve calls from shared generic code.
4560 2008-03-11 Zoltan Varga <vargaz@gmail.com>
4562 * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
4564 * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
4566 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
4568 * mini.c: some fixes for the AOT compiler.
4570 2008-03-07 Zoltan Varga <vargaz@gmail.com>
4572 * cpu-amd64.md: Add clob:1 to some float opcodes.
4574 2008-03-07 Rodrigo Kumpera <rkumpera@novell.com>
4576 * mini.h: Added MiniVerifierMode enumeration.
4578 * mini.c: Added mini_verifier_set_mode to control
4579 the usage of the new verifier.
4581 * mini.c (mono_method): Integrated the new verifier.
4583 * driver.c: Extended --security option with validil and
4584 verifiable options to activate the new verifier.
4586 2008-03-07 Zoltan Varga <vargaz@gmail.com>
4588 * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation
4589 optimization to ctors taking 0 or 2 arguments too.
4591 * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
4594 * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
4596 * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
4598 2008-03-06 Zoltan Varga <vargaz@gmail.com>
4600 * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
4601 non-aot case as well.
4603 * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
4605 * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
4608 * aot-compiler.c (encode_patch): Ditto.
4610 * mini.h (G_MININT32): Fix the definition of this.
4612 2008-03-05 Zoltan Varga <vargaz@gmail.com>
4614 * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
4616 * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
4618 2008-03-04 Zoltan Varga <vargaz@gmail.com>
4620 * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for
4621 methods returning vtypes in registers.
4622 (mono_arch_allocate_vars): Ditto.
4624 * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
4626 * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().
4628 * generics.cs: Add a test from the linear IR branch.
4630 * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
4632 * mini.c (inline_method): Cache failed inline attempts.
4634 2008-03-04 Mark Probst <mark.probst@gmail.com>
4636 * mini.c: For shared methods of generic classes put the location
4637 of "this" into the MonoGenericJitInfo.
4639 * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
4640 register out of a MonoContext by register number. Add the generic
4641 sharing context as an argument to mono_arch_find_this_argument().
4643 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
4644 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
4645 for new arch function.
4647 * mini-exception.c: Handle open exception clauses in shared
4650 * mini-trampolines.c: Supply additional argument to
4651 mono_arch_find_this_argument().
4653 2008-03-04 Zoltan Varga <vargaz@gmail.com>
4655 * Makefile.am (regtests): Run the bench.exe tests last.
4657 2008-03-03 Zoltan Varga <vargaz@gmail.com>
4659 * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
4662 2008-03-02 Zoltan Varga <vargaz@gmail.com>
4664 * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
4667 * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
4669 * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
4671 * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
4672 whose class has no cctor.
4674 * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
4676 2008-03-01 Zoltan Varga <vargaz@gmail.com>
4678 * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
4681 2008-02-29 Zoltan Varga <vargaz@gmail.com>
4683 * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
4684 to be in sync with the code on the linear IR branch.
4686 * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
4688 * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
4690 2008-02-27 Zoltan Varga <vargaz@gmail.com>
4692 * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
4694 * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
4696 * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
4698 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
4700 * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
4702 * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
4705 2007-11-14 Yoichi NAKAYAMA <nakayama@pixela.co.jp>
4707 * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
4708 OP_LOADR4_MEMBASE emission.
4710 * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
4711 (mono_spillvar_offset_float): Ditto.
4713 * mini-mips.c (mono_arch_emit_prolog): Ditto.
4715 * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
4718 * basic-long.cs: Add regression tests for them.
4720 * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
4722 (mono_arch_allocate_vars): Fix representation of single-precision float
4724 (mono_arch_output_basic_block): Ditto.
4726 * inssel-mips.brg: Ditto, remove duplicate items.
4728 * mini-mips.c (emit_load_volatile_arguments): New function to handle
4729 arguments of tail calls as on other platforms.
4730 (mono_arch_output_basic_block): Handle tail calls.
4732 * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
4735 * objects.cs (test_5_pass_static_struct): Add test for it.
4737 Contributed under MIT/X11 license.
4739 2008-02-26 Zoltan Varga <vargaz@gmail.com>
4741 * Makefile.am: Use gmcs for compiling the regression tests.
4743 * *.2.cs *.2.il: Rename to *.cs and *.il.
4745 2008-02-24 Zoltan Varga <vargaz@gmail.com>
4747 * regalloc.h: Make the vassign array smaller.
4749 * mini.c (mini_method_compile): Remove an unused field in cfg.
4751 * mini-codegen.c: Add a bunch of micro optimizations.
4753 2008-02-23 Zoltan Varga <vargaz@gmail.com>
4755 * regalloc.h: Remove some unused fields.
4757 2008-02-22 Zoltan Varga <vargaz@gmail.com>
4759 * mini-amd64.c (mono_arch_patch_code): Fix a warning.
4761 * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
4763 2008-02-22 Mark Probst <mark.probst@gmail.com>
4765 * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
4767 * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
4768 trampoline: Fetch an entry from the runtime generic context. If
4769 it's NULL, jump to the actual trampoline to fill the runtime
4770 generic context. Otherwise, return it.
4772 * mini.c: Call the lazy fetch trampoline to get entries out of the
4773 runtime generic context.
4775 * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
4776 tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
4777 tramp-sparc.c: Stubs for the lazy fetch trampoline.
4779 2008-02-21 Mark Probst <mark.probst@gmail.com>
4781 * mini.c: Fetch data out of the extensible part of the runtime
4782 generic context instead of calling a helper function.
4784 * generic-sharing.c: Some functions moved into
4785 metadata/generic-sharing.c. Helper function for fetching other
4786 types now checks and asserts against extensible rgctx (just for
4787 debugging purposes - the helper function isn't called anymore
4788 unless for debugging).
4790 2008-02-21 Zoltan Varga <vargaz@gmail.com>
4792 * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
4793 for tail calls up to the point that the tests in iltests.exe run. Also add a
4794 dummy CKFINITE implementation.
4795 (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
4796 needed for trampoline LMF frames.
4798 * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for
4799 trampoline LMF frames.
4801 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
4803 * mini.c (inline_method): clean any pending loader error when inlining fail.
4804 Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
4806 2008-02-21 Zoltan Varga <vargaz@gmail.com>
4808 * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
4810 * aot-runtime.c (decode_patch_info): Ditto.
4812 * mini.c (mono_resolve_patch_target): Ditto.
4814 * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
4817 * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
4819 * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
4820 if it references an icall address.
4822 2008-02-20 Zoltan Varga <vargaz@gmail.com>
4824 * cpu-s390x.md: Remove some more unused opcodes.
4826 * cpu-s390x.md: Remove some unused opcodes.
4828 * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
4829 mono_op_imm_to_op ().
4831 * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
4832 instead of a switch statement.
4834 * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
4835 the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
4837 * mini-codegen.c: Eliminate rassign macro which is no longer needed.
4839 * mini-codegen.c: Remove unused mono_regstate2_... functions.
4841 * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
4844 2008-02-19 Zoltan Varga <vargaz@gmail.com>
4846 * driver.c (mono_main): Improve error reporting when an assembly cannot be
4847 opened. Fixes #362607.
4849 * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
4851 * iltests.il.in: Add a test for static methods in interfaces.
4853 2008-02-18 Zoltan Varga <vargaz@gmail.com>
4855 * genmdesc.c (build_table): Fix a crash on older glib versions.
4857 * cpu-sparc.md: Remove some unused opcodes.
4859 * genmdesc.c: Error out if the .md contains CEE_ opcodes if
4860 MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
4862 * cpu-amd64.md: Remove some unused opcodes.
4864 * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
4865 like the other opcodes.
4867 2008-02-17 Zoltan Varga <vargaz@gmail.com>
4869 * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
4871 * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
4873 * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
4874 variables 'cfg' instead of 'm' for consistency.
4876 * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
4878 * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
4879 argument holding the vtype return address, to avoid the ambigious use of
4880 cfg->ret for this purpose.
4882 * mini.c (NEW_RETLOADA): Use vret_addr if set.
4884 * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
4886 * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
4887 new mono_print_ins () function which only takes one argument.
4889 2008-02-15 Zoltan Varga <vargaz@gmail.com>
4891 * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
4894 2008-02-14 Zoltan Varga <vargaz@gmail.com>
4896 * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
4898 * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
4900 * mini-x86.c: Sync with the version on the linear IR branch by adding new
4901 opcodes and other small changes.
4903 * mini-ops.h: Add some new opcodes from the linear IR branch.
4905 * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
4907 * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
4908 opcodes, use the REG_MEMBASE opcodes instead.
4910 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
4911 opcodes, use the REG_MEMBASE opcodes instead.
4913 * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
4916 * mini.c (mono_op_imm_to_op): New helper function.
4918 * mini-ops.h: Add some opcodes from linear IR branch.
4920 2008-02-13 Zoltan Varga <vargaz@gmail.com>
4922 * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov
4925 2008-02-12 Zoltan Varga <vargaz@gmail.com>
4927 * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to
4930 * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
4932 2008-02-09 Zoltan Varga <vargaz@gmail.com>
4934 * aot-compiler.c (emit_method_code): Add an assert.
4936 * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
4937 the IMT code so it is AOT friendly. Enable AOT for methods which call interface
4940 2008-02-08 Zoltan Varga <vargaz@gmail.com>
4942 * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for
4943 some load/store opcodes so they are consistent.
4944 (mono_arch_emit_prolog): Simplify some code.
4946 * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
4948 * objects.cs: Add tests for large argument offsets on ARM.
4950 * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large
4951 stack offsets. Fixes #359651.
4953 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
4955 * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
4957 * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
4959 * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
4961 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
4963 * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
4964 rid of CEE_CONV_R_UN.
4966 * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
4968 2008-02-07 Zoltan Varga <vargaz@gmail.com>
4970 * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
4972 * mini.c (mono_normalize_opcodes): Add some more opcodes.
4974 * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
4976 * cpu-amd64.md: Remove some unused opcodes.
4978 * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
4980 * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
4982 * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make
4983 arch specific functions for its parts. Call the peephole pass after local
4984 regalloc so the prolog can compute a more accurate max_offset.
4986 * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
4987 the corresponding OP_I/OP_L opcodes.
4989 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
4991 * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
4993 2008-02-06 Zoltan Varga <vargaz@gmail.com>
4995 * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
4996 as they are handled in mini.c.
4998 * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
5000 * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
5001 case since it is handled in mini.c.
5003 * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
5005 * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
5007 * *.c: Use the new opcodes in the IR and back end code.
5009 * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
5011 * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
5013 2008-02-06 Mark Probst <mark.probst@gmail.com>
5015 * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
5016 an assert because it has a race condition.
5018 2008-02-06 Zoltan Varga <vargaz@gmail.com>
5020 * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
5022 * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
5024 * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
5026 * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
5027 use OP_MOVE/OP_FMOVE/OP_ICONST instead.
5029 2008-02-05 Zoltan Varga <vargaz@gmail.com>
5031 * cpu-amd64.md (move): Correct the maximum size of move.
5033 2008-02-05 Mark Probst <mark.probst@gmail.com>
5035 * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
5036 the generic class init trampoline to return quickly if the class
5039 2008-02-04 Zoltan Varga <vargaz@gmail.com>
5041 * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
5042 issues where an 32 bit callsite cannot be patched by a 64 bit address.
5044 2008-02-03 Zoltan Varga <vargaz@gmail.com>
5046 * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
5049 2008-01-31 Zoltan Varga <vargaz@gmail.com>
5051 * objects.cs: Add some soft-float tests.
5053 * mini.c: Fix a couple more soft-float issues.
5055 * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
5057 * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
5060 2008-01-30 Zoltan Varga <vargaz@gmail.com>
5062 * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
5063 exception happens while compiling a virtual method.
5065 2008-01-29 Zoltan Varga <vargaz@gmail.com>
5067 * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
5069 * mini-sparc.c: Fix build.
5071 * mini-sparc.c (get_call_info): Add support for generic sharing.
5073 * mini-exceptions.c: Add a FIXME.
5075 2008-01-27 Zoltan Varga <vargaz@gmail.com>
5077 * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
5078 altstack handling code.
5080 * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
5082 * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
5084 * mini-s390.c: Add support for generic sharing.
5086 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
5088 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
5090 * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
5092 * mini-s390x.c: Add support for generic sharing.
5094 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
5096 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
5098 * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
5099 can be used since it takes a 16 bit signed immediate.
5101 * inssel-s390x.brg: Fix OP_SETRET.
5103 * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
5105 * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
5107 * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
5109 * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
5111 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
5114 * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
5117 * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
5118 of the unused mono_arch_patch_delegate_trampoline stuff.
5120 2008-01-26 Zoltan Varga <vargaz@gmail.com>
5122 * basic-long.cs: Move the fp related tests to basic-float.cs.
5124 * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
5126 * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
5128 * basic-calls.cs: Add a test for proper float argument passing.
5130 * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
5131 if the context corresponds to an exception received through a signal.
5133 * exceptions.cs: Add a test for nullref handling at the start of a try
5136 * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
5138 * jit-icalls.c (mono_break): New JIT icall.
5140 * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
5142 * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
5144 2008-01-25 Zoltan Varga <vargaz@gmail.com>
5146 * cpu-*.md: Get rid of unused opcodes.
5148 * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
5150 * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
5153 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
5156 * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
5157 the arch independent trampoline code in mini-trampolines.c.
5159 * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
5161 * mini.c (get_runtime_generic_context_ptr): Fix a warning.
5163 * mini-s390.h: Remove an unused define.
5165 * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
5166 the arch independent trampoline code in mini-trampolines.c.
5168 * mini-arm.c (mono_arch_emit_prolog): Fix build.
5170 2008-01-24 Zoltan Varga <vargaz@gmail.com>
5172 * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
5174 * mini-s390.c (mono_arch_emit_prolog): Fix build.
5176 * mini-s390x.c (mono_arch_emit_prolog): Fix build.
5178 * mini-ppc.c (mono_arch_emit_prolog): Fix build.
5180 * cpu-amd64.md: Use smaller sizes for int opcodes.
5182 * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
5184 * *.cs: Add some tests from the linear-ir branch. Move structs tests to
5187 * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
5190 * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
5191 instead of though a pointer to save an indirection when accessing elements of
5194 * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
5196 (NOT_IMPLEMENTED): New helper macro.
5197 (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
5200 * *.c: Use the new helper macro.
5202 2008-01-21 Zoltan Varga <vargaz@gmail.com>
5204 * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
5206 2008-01-20 Zoltan Varga <vargaz@gmail.com>
5208 * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
5211 2008-01-18 Zoltan Varga <vargaz@gmail.com>
5213 * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
5214 profiling is enabled.
5216 * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
5218 (mono_arch_emit_prolog): Add more first bblock optimizations.
5220 * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
5221 in order if possible.
5222 (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
5223 bblock, since the arguments are still in their original registers.
5225 * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
5227 2008-01-17 Zoltan Varga <vargaz@gmail.com>
5229 * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
5232 * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
5235 * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
5237 * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
5238 process async exceptions received while in unmanaged code.
5240 * mini.c (mini_init): Install a callback with the runtime which will be called
5241 when a thread receives an async exception while in unmanaged code.
5243 * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
5245 * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
5247 2008-01-16 Wade Berrier <wberrier@novell.com>
5254 2008-01-16 Zoltan Varga <vargaz@gmail.com>
5256 * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
5257 compilation with sun cc.
5259 * cpu-*.md: Fix the build.
5261 * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
5263 * mini-amd64.h: Add some comments to the MonoLMF structure.
5265 * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
5267 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
5268 in the LMF structure if possible. This saves two instructions in the
5269 managed->native wrappers.
5271 * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
5273 2008-01-16 Mark Probst <mark.probst@gmail.com>
5275 * generic-sharing.c: New type argument lookup code which uses the
5276 runtime generic context template.
5278 2008-01-15 Zoltan Varga <vargaz@gmail.com>
5280 * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
5282 * mini-arm.c (add_general): Fix arm eabi parameter passing.
5283 (mono_arch_output_basic_block): Fix localloc implementation.
5285 * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
5287 * mini-ia64.c (peephole_pass): Fix ia64 build.
5289 * mini-amd64.c (peephole_pass): Fix a warning.
5291 * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
5292 at a constant offset from sp/fp.
5294 * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
5295 instead of obtaining it from *lmf in the managed method case.
5297 2008-01-14 Zoltan Varga <vargaz@gmail.com>
5299 * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
5301 Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
5303 * mini.h (MonoInstList): New type.
5304 (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
5305 __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
5306 MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
5307 __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
5308 MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
5309 MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
5310 MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
5311 MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
5312 MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
5313 MONO_INST_LIST_FOR_EACH_PREV_SAFE,
5314 MONO_INST_LIST_FOR_EACH_ENTRY,
5315 MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
5316 MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
5317 mono_inst_list_first, mono_inst_list_last,
5318 mono_inst_list_next, mono_inst_list_prev): New instruction
5319 list handling interfaces.
5320 (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
5321 list head 'ins_list'.
5322 (MonoInst): Replace next pointer with list head 'node'.
5323 (MonoCallInst): Make 'out_args' a MonoInstList.
5324 (MONO_INST_NEW_CALL): Explicitly init ->out_args.
5325 (MonoCompile): Delete reverse_inst_list and
5326 reverse_inst_list_len.
5327 * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
5328 mono_arch_lowering_pass, mono_arch_local_regalloc,
5329 mono_arch_output_basic_block, mono_arch_emit_prolog):
5330 Convert to new instruction lists.
5331 (insert_after_ins): Delete.
5332 * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
5334 * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
5335 * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
5336 split_bblock, mono_add_ins_to_end, mono_emit_call_args,
5337 mono_emulate_opcode, mono_emit_load_got_addr,
5338 inline_method, mono_method_to_ir, mono_print_bb_code,
5339 print_dfn, decompose_pass, nullify_basic_block,
5340 replace_out_block_in_code, remove_block_if_useless,
5341 merge_basic_blocks, move_basic_block_to_end,
5342 try_unsigned_compare, optimize_branches, mono_print_code,
5343 mini_select_instructions, remove_critical_edges): Likewise.
5344 * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
5345 peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
5346 mono_arch_output_basic_block, mono_arch_emit_prolog):
5348 * mini-mips.c (mono_arch_call_opcode, peephole_pass,
5349 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5350 mono_arch_output_basic_block): Likewise.
5351 (inst_list_prepend, insert_after_ins): Delete.
5352 * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
5353 MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
5355 * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
5356 peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
5357 mono_arch_emit_prolog): Likewise.
5358 * cfold.c (mono_constant_fold): Likewise.
5359 * liveness.c (visit_bb, mono_analyze_liveness,
5360 optimize_initlocals): Likewise.
5361 * ssapre.c (dump_code, process_bb, code_motion): Likewise.
5362 * graph.c (mono_draw_code_cfg): Likewise.
5363 * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
5364 mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
5365 mono_ssa_cprop): Likewise.
5366 * abcremoval (get_relations_from_previous_bb, process_block):
5368 * local-propagation (mono_cprop_invalidate_values,
5369 mono_local_cprop_bb): Likewise.
5370 * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
5371 peephole_pass, mono_arch_output_basic_block,
5372 mono_arch_emit_prolog): Likewise.
5373 * mini-arm.c (mono_arch_call_opcode, peephole_pass,
5374 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5375 mono_arch_emit_prolog): Likewise.
5376 (insert_after_ins): Delete.
5377 * aliasing.c (print_code_with_aliasing_information,
5378 mono_build_aliasing_information, mono_aliasing_deadce):
5379 Convert to new instruction lists.
5380 * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
5381 peephole_pass, NEW_INS, mono_arch_lowering_pass,
5382 mono_arch_local_regalloc, mono_arch_output_basic_block):
5384 (insert_after_ins): Delete.
5385 * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
5386 peephole_pass, mono_arch_output_basic_block): Convert to
5387 new instruction lists.
5388 * mini-codegen (InstList, inst_list_prepend,
5389 insert_after_ins): Delete.
5390 (insert_before_ins, get_register_force_spilling,
5391 get_register_spilling, free_up_ireg, free_up_reg,
5392 create_copy_ins, create_spilled_store, alloc_int_reg,
5393 alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
5394 to new instruction lists.
5395 * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
5396 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5397 mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
5398 (insert_after_ins): Delete.
5399 * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
5400 mono_arch_local_regalloc, mono_arch_output_basic_block,
5401 mono_arch_call_opcode): Convert to new instruction lists.
5402 (insert_after_ins): Delete.
5403 * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
5404 peephole_pass, mono_arch_output_basic_block,
5405 mono_arch_emit_prolog): Convert to new instruction lists.
5407 2008-01-11 Zoltan Varga <vargaz@gmail.com>
5409 * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
5411 * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
5414 * Makefile.am (version.h): Make this work with non-bash shells.
5416 2008-01-10 Zoltan Varga <vargaz@gmail.com>
5418 * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
5420 2008-01-08 Zoltan Varga <vargaz@gmail.com>
5422 * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
5423 the InitializeArray optimization.
5425 2008-01-06 Zoltan Varga <vargaz@gmail.com>
5427 * mini.c driver.c: Don't include os/gc_wrapper.h.
5429 2008-01-05 Zoltan Varga <vargaz@gmail.com>
5431 * mini.c (print_jit_stats): Print GC statistics if available.
5433 2008-01-04 Zoltan Varga <vargaz@gmail.com>
5435 * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
5437 2007-12-29 Zoltan Varga <vargaz@gmail.com>
5439 * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
5441 2007-12-26 Zoltan Varga <vargaz@gmail.com>
5443 * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
5445 * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
5447 * driver.c (mono_main): Ditto.
5449 2007-12-23 Zoltan Varga <vargaz@gmail.com>
5451 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
5453 * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
5454 in the vtable can't be encoded.
5455 (compile_method): Ditto.
5457 2007-12-21 Zoltan Varga <vargaz@gmail.com>
5459 * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
5462 * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
5465 * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
5466 the top LMF entry belongs to the current method.
5468 * mini.c: Update after renaming of mono_thread_get_pending_exception ().
5470 2007-12-20 Zoltan Varga <vargaz@gmail.com>
5472 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
5474 * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
5476 * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
5478 * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
5480 * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
5482 * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
5485 * basic-float.cs: Add an ulong->double cast test.
5487 2007-12-15 Zoltan Varga <vargaz@gmail.com>
5489 * mini.c (mono_method_to_ir): Fix a warning.
5491 2007-12-14 Zoltan Varga <vargaz@gmail.com>
5493 * mini-ops.h: Add OP_SWITCH.
5495 * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
5496 CEE_SWITCH in back-end code, use OP_SWITCH instead.
5498 2007-12-11 Geoff Norton <gnorton@novell.com>
5500 * mini-s390x.c: Minor change to the MAX() define to allow
5501 it to compile with other gcc versions.
5503 2007-12-11 Geoff Norton <gnorton@novell.com>
5506 * mini-s390x.c: Implement sext_i4 to fix the build on s390x
5508 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
5510 exceptions-arm.c (mono_arch_get_restore_context): Restore
5513 exceptions-arm.c (throw_exception): Save the frame pointer.
5514 This is a partial fix for #323747. Only the client side is
5517 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
5519 * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
5520 was using an unrelated variable to log the class which
5521 needed the cctor to be called. This was crashing on arm.
5523 2007-12-09 Robert Jordan <robertj@gmx.net>
5525 * mini-x86.c (mono_arch_emit_epilog):
5526 Consider all kinds of 64-bit types. Fixes #323114.
5528 2007-12-08 Zoltan Varga <vargaz@gmail.com>
5530 * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
5532 2007-12-07 Zoltan Varga <vargaz@gmail.com>
5534 * mini-amd64.c (peephole_pass): Add a missing instruction check.
5536 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
5538 * mini.c: run type ctor before allocating an object, not only
5539 when running it's constructor method (fixes at least part of bug #342507).
5541 2007-12-07 Zoltan Varga <vargaz@gmail.com>
5543 * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
5545 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
5546 * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
5549 * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
5550 mono_generic_class_init_trampoline () the same as it is done with the other
5553 * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
5554 aot-runtime.c aot-compiler.c: Implement AOT support.
5556 2007-12-07 Mark Probst <mark.probst@gmail.com>
5558 * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
5559 build for archs which don't have the vtable trampoline defined
5562 2007-12-07 Zoltan Varga <vargaz@gmail.com>
5564 * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
5566 * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
5568 * mini-trampolines.c (mono_get_trampoline_func): New helper function.
5570 * tramp-<ARCH>.c: Use the new helper function.
5572 2007-12-07 Mark Probst <mark.probst@gmail.com>
5574 * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
5575 trampoline call, which takes a vtable argument.
5577 * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
5578 OP_TRAMPCALL_VTABLEs like other calls.
5580 * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
5581 register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
5582 call. Implemented a support function which fetches the vtable
5583 from a register set.
5585 * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
5586 Implemented a generic class init trampoline, using the
5587 OP_TRAMPCALL_VTABLE opcode.
5589 * mini.c: Implemented static field access when sharing generic
5590 code. This implies initing the class using the new
5591 OP_TRAMPCALL_VTABLE call.
5593 2007-12-07 Mark Probst <mark.probst@gmail.com>
5595 * mini.c: Don't compile methods with sharing enabled if their
5596 classes are disabled for sharing.
5598 2007-12-06 Zoltan Varga <vargaz@gmail.com>
5600 * inssel.brg: Add a missing sign extension to the GETCHR and array access
5601 opcodes. Fixes #346563.
5603 * objects.cs: Add a new test.
5605 * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
5607 * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
5608 HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
5610 2007-12-06 Zoltan Varga <vargaz@gmail.com>
5612 * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
5614 2007-12-03 Zoltan Varga <vargaz@gmail.com>
5616 * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
5619 2007-12-02 Zoltan Varga <vargaz@gmail.com>
5621 * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
5623 * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
5624 optimization in the AOT case.
5626 2007-11-30 Zoltan Varga <vargaz@gmail.com>
5628 * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
5630 * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
5632 * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
5634 * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
5636 * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
5637 is created by the inlined delegate ctor.
5639 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
5641 * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
5643 2007-11-29 Zoltan Varga <vargaz@gmail.com>
5645 * cpu-x86.md: Fix the length of ckfinite.
5647 2007-11-28 Zoltan Varga <vargaz@gmail.com>
5649 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
5651 * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
5652 (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
5654 * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
5656 * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
5657 OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
5659 2007-11-28 Martin Baulig <martin@ximian.com>
5662 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
5663 after creating the trampoline.
5665 2007-11-27 Zoltan Varga <vargaz@gmail.com>
5667 * aot-runtime.c (load_aot_module): Check runtime version if needed.
5669 * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
5672 * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
5673 instead of the calling method to help AOT.
5675 * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
5677 2007-11-26 Zoltan Varga <vargaz@gmail.com>
5679 * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
5682 2007-11-23 Zoltan Varga <vargaz@gmail.com>
5684 * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
5686 * aot-compiler.c (compile_method): Correct check for generic method definitions.
5687 (encode_method_ref): No need to handle generic method definitions specially.
5689 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5691 * aot-runtime.c (decode_klass_ref): Clean this up and rename from
5694 * aot-compiler.c (encode_klass_ref): Clean this up and rename from
5696 (compile_method): Enable generic sharing.
5698 2007-11-22 Zoltan Varga <vargaz@gmail.com>
5700 * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
5701 (mini_method_compile): Add preliminary support for AOTing shared generic code.
5703 * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
5706 * mini-trampolines.c: Fix a warning.
5708 * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
5710 (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
5711 (generic_class_is_reference_type): Remove unused function.
5713 * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
5714 in the generic vtable trampoline case.
5716 * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
5718 * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
5719 return an AOT method based on a vtable slot.
5721 * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
5723 * mini.c (mini_get_vtable_trampoline): Export this.
5725 2007-11-22 Martin Baulig <martin@ximian.com>
5728 (MonoDebuggerInfo): Move `debugger_version' up.
5730 2007-11-22 Martin Baulig <martin@ximian.com>
5733 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
5735 * mini-trampolines.c
5736 (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
5737 after compiling the method.
5739 2007-11-20 Martin Baulig <martin@ximian.com>
5742 (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
5743 (mono_debugger_remove_breakpoint): Likewise.
5744 (mono_debugger_check_breakpoints): Likewise.
5746 * debug-debugger.c: Implement the new breakpoint interface here.
5748 2007-11-18 Zoltan Varga <vargaz@gmail.com>
5750 * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
5751 CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
5753 * mini-x86.c (mono_arch_output_basic_block): Ditto.
5755 2007-11-17 Zoltan Varga <vargaz@gmail.com>
5757 * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
5759 * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
5762 * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
5765 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
5766 returning a vtype in a register.
5768 * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
5769 here from the arch specific code.
5771 * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
5774 * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
5775 (mono_arch_emit_prolog): Increment maximum prolog size.
5777 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
5778 START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
5780 * mini-x86.c (get_call_info): Receive a MonoCompile instead of a
5781 MonoGenericSharingContext.
5783 * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
5784 MonoGenericSharingContext. Allocate memory from the cfg mempool.
5786 2007-11-15 Mark Probst <mark.probst@gmail.com>
5788 * mini.c, mini.h, generic-sharing.c: Functions for producing code
5789 which extract fields out of the runtime generic context. Full
5790 sharing of the NEWARR opcode.
5792 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
5794 * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
5795 --enable-minimal=ssa.
5797 2007-11-13 Zoltan Varga <vargaz@gmail.com>
5799 * mini-trampolines.c (mono_delegate_trampoline): Update after
5800 mono_marshal_get_delegate_invoke () signature change.
5802 2007-11-13 Mark Probst <mark.probst@gmail.com>
5804 * mini.c: Removed the shared context in favor of the generic
5805 sharing context. Allocate the MonoJitInfo structure with room for
5806 the generic sharing context if it's needed.
5808 * mini.h: Remove MonoGenericSharingContext declaration. It's in
5809 domain-internals.h now.
5811 * mini-x86.c: Pass the generic sharing context to get_call_info ().
5813 * generic-sharing.c: Several changes for working without a shared
5814 context and instead operating on open types instead.
5816 2007-11-12 David S. Miller <davem@davemloft.net>
5818 * inssel-sparc.brg: Fix double instruction emit.
5820 2007-11-12 Zoltan Varga <vargaz@gmail.com>
5822 * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
5823 Get/Set/Address methods.
5825 * mini.c debug-debugger.c mini-trampolines.c: Update after
5826 mono_marshal_get_delegate_invoke signature change.
5828 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
5830 * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
5831 This can happens with dynamic methods. Fixes the other bug in #322722.
5833 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
5835 * tramp-arm.c (mono_arch_patch_callsite): Support patching
5838 * mini-arm.c (arm_patch): Implement patching of BX call
5839 sequence. Fixes one of the bugs in #322722.
5841 2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
5843 * mini-sparc.c (mono_arch_flush_icache): Make more efficient
5844 under Linux. We only need to flush every 32-byte cache line.
5846 2007-11-07 Massimiliano Mantione <massi@ximian.com>
5849 move_basic_block_to_end: Add branches when needed, eventually creating
5851 optimize_branches: added a parameter that tells if it's ok to create
5852 new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
5853 and avoid calling move_basic_block_to_end when it's not ok.
5856 2007-11-07 Mark Probst <mark.probst@gmail.com>
5858 * mini.c: Abort inlining call to InitializeArray if something
5859 looks wrong. Let the icall handle it, which now has proper safety
5862 2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
5864 * mini.c (mono_spill_call): add support for soft-float.
5866 * mini.c (mono_method_to_ir): add support for soft-float
5867 to inlined functions that return float.
5869 * mini.c (mono_method_to_ir): add support for soft-float
5870 to cee_stsfld opcode on float fields.
5872 2007-11-05 Geoff Norton <gnorton@novell.com>
5874 * mini-x86.h: Fix the structure access for X86 Leopard.
5877 2007-11-05 Martin Baulig <martin@ximian.com>
5879 * mini-trampolines.c
5880 (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
5881 after compiling the method to notify the debugger.
5883 2007-11-05 Martin Baulig <martin@ximian.com>
5885 * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
5887 2007-11-02 Zoltan Varga <vargaz@gmail.com>
5889 * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
5890 David Miller <davem@davemloft.net>. Allow larger offsets in branches.
5892 2007-11-01 Zoltan Varga <vargaz@gmail.com>
5894 * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
5895 native-to-managed wrappers.
5897 2007-11-01 Geoff Norton <gnorton@novell.com>
5899 * mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
5902 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
5904 * mini.c, mini-x86.c: when getting back from unmanaged code
5905 to managed via a marshaled delegate we also need to set the
5908 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5910 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
5913 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
5915 * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
5916 let the debugger or other external agents to tell the JIT when
5917 a sw breakpoint has been inserted in the code that the JIT needs
5918 to be able to inspect.
5920 2007-10-31 Martin Baulig <martin@ximian.com>
5923 (MonoDebuggerInfo): Remove `runtime_class_init'.
5925 2007-10-30 Martin Baulig <martin@ximian.com>
5928 (mono_debugger_thread_created): Added `MonoThread *' argument.
5929 (mono_debugger_extended_notification): New public method.
5930 (mono_debugger_trampoline_compiled): New public method.
5933 (MonoDebuggerThreadInfo): Added `thread' and
5934 `extended_notifications' fields.
5937 (debugger_executable_code_buffer): New static variable.
5940 (MonoDebuggerInfo): Added `executable_code_buffer',
5941 `executable_code_buffer_size', `breakpoint_info_area',
5942 `breakpoint_table' and `breakpoint_table_size'.
5944 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
5946 * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
5947 that IP either is an unused value or the vtable pointer. IMT
5948 calls use vtable + offset now. Reduced by almost half the size
5951 2007-10-26 Jonathan Chambers <joncham@gmail.com>
5953 * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
5954 defines to access param registers. Replace long usage with
5955 gsize as sizeof(long) != sizeof(void*) on Win64.
5957 * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
5958 on Win64. Fix intrinsic, use _AddressOfReturnAddress
5959 instead of non-existant _GetAddressOfReturnAddress.
5961 * tramp-amd64.c: Use AMD64_ARG_REG# defines to access
5962 param registers. Save/restore %rdi and %rsi in MonoLMF.
5964 * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
5965 param registers. Modify (throw_exception) signature to take
5966 %rdi and %rsi on Win64.
5968 Code is contributed under MIT/X11 license.
5970 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5972 * helpers.c: unlink debugging output files.
5974 2007-10-25 Zoltan Varga <vargaz@gmail.com>
5976 * mini.c: Move mono_create_ftnptr () to object.c.
5978 2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5980 * helpers.c (mono_disassemble_code): MonoCompile parameter is now
5981 optional. This function can now be used to disassemble code generated
5982 outside the JIT such as trampolines and IMT thunks.
5984 * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
5986 * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
5987 vtable pointer from a ldr instruction.
5989 * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
5990 new IMT call sequence.
5992 * mini-arm.c (mono_arch_output_basic_block): emit the IMT
5993 call sequence for interface invocations.
5995 * mini-arm.c (mono_arch_emit_imt_argument): added, required
5996 for imt support. This function is empty since IMT on ARM requires no
5997 special handling on the IR side.
5999 * mini-arm.c (mono_arch_find_imt_method): added, required for
6002 * mini-arm.c (mono_arch_find_this_argument): added, required
6005 * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
6006 a ldr instruction to load a value stored in the code stream.
6008 * mini-arm.c (mono_arch_build_imt_thunk):added, required
6012 2007-10-23 Zoltan Varga <vargaz@gmail.com>
6014 * mini.c (mini_init): Install the jump trampoline callback.
6016 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6018 * mini-trampolines.c: handle synchronized methods with the common
6019 vtable trampoline (bug #335601).
6021 2007-10-17 Zoltan Varga <vargaz@gmail.com>
6023 * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
6025 * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
6028 * mini-ia64.h mini-ia64.c: Add support for IMT.
6030 * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
6031 prolog. Fixes #331958.
6033 2007-10-15 Zoltan Varga <vargaz@gmail.com>
6035 * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
6037 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6039 * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
6042 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6044 * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
6047 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
6049 * mini-x86.c, mini-x86.h: x86 support for the common vtable
6052 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6054 * mini-trampolines.c: changed the magic rampoline to understand
6055 the common vtable trampoline method: the method to invoke is
6056 determined by the vtable displacement of the call.
6058 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6060 * mini.c, mini.h: register the common vtable trampoline if the
6061 architecture supports it.
6063 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6065 * cpu-amd64.md: use the correct max length for tls_get.
6067 2007-10-14 Zoltan Varga <vargaz@gmail.com>
6069 * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
6070 CEE_STELEM_ANY. Fixes #333696.
6072 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6074 * exceptions-x86.c: provide more graceful handling of the case where
6075 we followed a bogus function pointer from managed code (bug #332866).
6077 2007-10-11 Mark Probst <mark.probst@gmail.com>
6079 * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
6080 replaces the generic_shared flag and will carry more information
6083 * generic-sharing.c: Added mini_type_stack_size() which allows
6084 allows open types if given a generic sharing context.
6085 mini_get_basic_type_from_generic() takes a
6086 MonoGenericSharingContext* instead of a MonoCompile* now.
6088 * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
6089 mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
6090 mini-sparc.c, mini-x86.c: Trivial changes required by the two
6091 changes above. Just passing arguments through to the right
6094 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6096 * mini-arm.c: unify the call emission to emit_code_seq().
6098 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
6100 * tramp-arm.c: reduced the trampoline size.
6102 2007-10-10 Mark Probst <mark.probst@gmail.com>
6104 * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
6105 variable handling out of arch-specific code.
6107 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
6109 * mini-arm.c: implemented fast delegate dispatch.
6111 2007-10-09 Zoltan Varga <vargaz@gmail.com>
6113 * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
6114 that fp elimination is turned off if the space required by locals is too
6117 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6119 * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
6120 ARM to the new style trampoline.
6122 2007-10-09 Zoltan Varga <vargaz@gmail.com>
6124 * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
6126 * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
6128 2007-10-09 Martin Baulig <martin@ximian.com>
6131 (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
6132 `field_info_offset_offset'.
6134 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
6136 * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
6137 removed more internal usage of the r11 register and made it available
6138 to the register allocator.
6140 2007-10-08 Mark Probst <mark.probst@gmail.com>
6142 * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
6143 when sharing generics and treat type variables as references.
6145 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6147 * mini-ppc.c: started removing the internal uses of register r11
6148 to eventually allow the register allocator to manage it as an
6149 additional available register.
6151 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6153 * tramp-amd64.c: fixed memory corruption in the trampoline generation.
6155 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
6157 * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
6158 specific trampolines as they are not performance critical as a jump
6159 target (maybe align as before only for AOT code?). This saves about
6160 200 KB of native code on x86 for monodevelop startup.
6162 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
6164 * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
6165 monodevelop startup.
6167 2007-10-06 Zoltan Varga <vargaz@gmail.com>
6169 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
6171 * mini-sparc.h mini-sparc.c: Implement IMT support.
6173 * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
6174 its smaller and doesn't clobber sparc_g1.
6176 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
6178 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6180 * mini-ppc.c: optimized the size of the IMT thunks a bit.
6182 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6184 * mini-ppc.c: implemented fast delegate invocation.
6186 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
6188 * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
6190 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6192 * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
6193 code to the new style trampoline in preparation for IMT support.
6195 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
6197 * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
6198 systems already. This also reduces the specific trampiline sizes and
6199 prepares for the use of r12 as the IMT identifier register.
6201 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6203 * mini-mips.h: endianess fix (simplified from a patch by
6204 Thomas Kunze <thommy@tabao.de>, bug #323737).
6206 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6208 * exceptions-ppc.c, mini-ppc.h: refactor to use macros
6209 to access ucontext fields and enable netbsd support
6210 (partially from Magnus Henoch <mange@freemail.hu>).
6212 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6214 * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
6215 use the preprocessor from the CPP env var if it is set.
6217 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6219 * mini-trampolines.c: fixed an assertion and moved it earlier in the
6220 code, before interface_offset gets used.
6222 2007-10-02 Zoltan Varga <vargaz@gmail.com>
6224 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
6225 mono_class_setup_vtable () before accessing klass->vtable.
6227 2007-10-01 Zoltan Varga <vargaz@gmail.com>
6229 * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
6232 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6234 * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
6235 IMT slots (this saves hundreds of KB of memory in programs like
6236 IronPython and Monodevelop).
6238 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6240 * mini.c: print the delegate counter.
6242 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
6244 * mini-x86.c: make it easier to enable the debugging code for IMT
6247 2007-09-28 Martin Baulig <martin@ximian.com>
6250 (MonoDebuggerMetadataInfo): Add `klass_image_offset',
6251 `mono_method_klass_offset' and `mono_method_token_offset'.
6253 2007-09-20 Mark Probst <mark.probst@gmail.com>
6255 * mini.c: First generics sharing implementation. Can only share
6256 in very simple cases. If sharing doesn't work it falls back to
6257 dedicated compilation.
6259 * mini.h: Flag in MonoCompile to specify whether generic
6260 compilation is shared. Flags enum for marking which generic inst
6261 of a context is used. Prototypes for helper functions.
6263 * generic-sharing.c: Helper functions for generic method sharing.
6265 * optflags-def.h: Optimization flag (gshared) for enabling generic
6266 method sharing added.
6268 * Makefile.am: generic-sharing.c added.
6270 2007-09-19 Daniel Nauck <dna@mono-project.de>
6272 * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
6274 2007-09-19 Massimiliano Mantione <massi@ximian.com>
6275 * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
6278 2007-09-19 Martin Baulig <martin@ximian.com>
6280 * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
6281 mono_debug_cleanup() is now part of mono_cleanup().
6283 2007-09-18 Zoltan Varga <vargaz@gmail.com>
6285 * driver.c (mono_main): Fix a warning.
6287 2007-09-17 Zoltan Varga <vargaz@gmail.com>
6289 * aot-compiler.c: Optimize various parts when processing large assemblies.
6292 * mini.c (mono_patch_info_hash): Improve hash function.
6294 2007-09-14 Jonathan Chambers <joncham@gmail.com>
6296 * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
6298 Code is contributed under MIT/X11 license.
6300 2007-09-14 Zoltan Varga <vargaz@gmail.com>
6302 * mini.c (mini_init): Fix a leak.
6304 * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
6306 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6308 * mini.c: redirect string.InternalAllocStr() to the managed allocator.
6310 2007-09-14 Zoltan Varga <vargaz@gmail.com>
6312 * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
6314 2007-09-13 Zoltan Varga <vargaz@gmail.com>
6316 * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
6319 * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
6321 * mini.c (handle_alloc): Enable managed allocators in AOT code.
6323 * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
6325 * aot-runtime.c (decode_patch_info): Ditto.
6327 2007-09-12 Jonathan Chambers <joncham@gmail.com>
6329 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
6330 static case. Cache delegates in architecture specific code,
6331 based on number of parameters.
6333 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
6334 in architecture specific code, based on number of parameters.
6336 * mini-trampolines.c (mono_delegate_trampoline): Architecture specific
6337 caching happen in architecture specific code now.
6339 Code is contributed under MIT/X11 license.
6341 2007-09-12 Jonathan Chambers <joncham@gmail.com>
6343 * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
6344 mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
6345 mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
6347 Code is contributed under MIT/X11 license.
6349 2007-05-15 Massimiliano Mantione <massi@ximian.com>
6350 * mini.c: (mono_thread_abort) Fixed bug #82416.
6352 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6354 * mini.: hook the new managed GC allocation feature into the JIT.
6356 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6358 * mini.c: implementation for the new runtime tls opcode.
6360 2007-09-11 Martin Baulig <martin@ximian.com>
6363 (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
6364 `mono_method_inflated_offset'.
6366 2007-09-07 Zoltan Varga <vargaz@gmail.com>
6368 * driver.c mini.h mini.c: Add a new devel command line option for injecting
6369 async exceptions into a method.
6371 * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
6372 purpose of testing whenever the unwinder works at every instruction.
6374 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
6376 * mini.c: check accessibility of method used in ldftn (fixes
6379 2007-09-04 Zoltan Varga <vargaz@gmail.com>
6381 * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
6383 * inssel.brg: Fix a warning.
6385 2007-09-03 Martin Baulig <martin@ximian.com>
6387 * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
6388 now takes the `main_method' as argument.
6390 2007-09-02 Zoltan Varga <vargaz@gmail.com>
6392 * cpu-sparc.md (endfilter): Add missing src1:i argument.
6394 2007-08-30 Jonathan Chambers <joncham@gmail.com>
6396 * driver.c: include the cil-coff.h header on Windows.
6398 Code is contributed under MIT/X11 license.
6400 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6402 * mini.c, driver.c: don't include the cil-coff.h header.
6404 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6406 * mini.c: flag places that needs fixes fo soft-float support.
6408 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
6410 * mini.h, inssel-float.brg: fix soft-float constant loads on big
6411 endian systems (partially from Dean Jenkins, bug #81924).
6413 2007-08-28 Mark Probst <mark.probst@gmail.com>
6415 * mini.c (check_linkdemand): Remove embedded reference object in
6416 call to LinkDemandSecurityException.
6417 (mono_jit_compile_method_inner): Call LinkDemandSecurityException
6418 with an IntPtr instead of a reference object.
6420 2007-08-28 Zoltan Varga <vargaz@gmail.com>
6422 * mini.c (handle_initobj): Handle alignment properly.
6424 * inssel.brg (mini_emit_memset): Ditto.
6426 * inssel.brg (mini_emit_memcpy): Ditto.
6428 * inssel-sparc.brg: Ditto.
6430 * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
6432 2007-08-26 Zoltan Varga <vargaz@gmail.com>
6434 * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
6435 exceptions raised in unmanaged code. Fixes part of #82594.
6437 2007-08-24 Mark Probst <mark.probst@gmail.com>
6439 * mini.c (mono_method_to_ir), declsec.c
6440 (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
6442 2007-08-22 Martin Baulig <martin@ximian.com>
6445 (MonoDebuggerThreadInfo): New typedef.
6446 (mono_debugger_thread_table): New global variable.
6447 (mono_debugger_thread_created): New public function.
6448 (mono_debugger_thread_cleanup): New public function.
6452 - removed `get_current_thread' and `lookup_assembly'.
6453 - removed `data_table'.
6454 - added `thread_table'.
6457 (mono_thread_start_cb): Call mono_debugger_thread_created().
6458 (mono_thread_attach_cb): Likewise.
6459 (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
6460 (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
6463 * driver.c (mono_main): Move mono_debug_init() up, before calling
6464 mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
6466 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6468 * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
6469 together when passing several arguments of type double (gives a small
6470 speedup and saves a few bytes of generated code).
6472 2007-08-20 Jb Evain <jbevain@novell.com>
6474 * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
6476 2007-08-20 Jb Evain <jbevain@novell.com>
6478 * mini.c (mono_method_to_ir): throw MethodAccessException
6479 and FieldAccessException instead of InvalidProgramException.
6481 2007-08-20 Mark Probst <mark.probst@gmail.com>
6483 * mini.c: CoreCLR security checks.
6485 * mini.h: Removed MonoSecurityMode (moved to
6486 metadata/security-manager.h) and mono_security_mode global var
6487 (replaced by set/get functions in security-manager.h).
6489 * driver.c: Added "core-clr-test" security mode for testing. Used
6490 set-function for setting security mode.
6492 2007-08-17 Mark Probst <mark.probst@gmail.com>
6494 * mini.c: MonoJitInfo's are freed hazardously now. Statistics for
6495 the new jit_info_table.
6497 * driver.c: Test code for the new jit_info_table (enabled by the
6498 define MONO_JIT_INFO_TABLE_TEST).
6500 2007-08-14 Zoltan Varga <vargaz@gmail.com>
6502 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
6503 detection of call <REG> instruction sequence. Fixes build on freebsd.
6505 2007-08-13 Zoltan Varga <vargaz@gmail.com>
6507 * mini-exceptions.c: Fix a warning.
6509 2007-08-11 Zoltan Varga <vargaz@gmail.com>
6511 * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
6512 stack overflow handling code on amd64 too.
6514 * mini-exceptions.c (mono_setup_altstack): Make this use
6515 mono_thread_get_stack_bounds ().
6517 * mini-x86.h: Disable sigaltstack on solaris x86.
6519 2007-08-10 Zoltan Varga <vargaz@gmail.com>
6521 * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
6523 2007-08-10 Geoff Norton <gnorton@customerdna.com>
6525 * tramp-x86.c: Remove some unneeded alignment changes on Apple. Fixes #82387.
6527 2007-08-08 Zoltan Varga <vargaz@gmail.com>
6529 * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
6531 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
6533 2007-08-03 Neale Ferguson <neale@sinenomine.net>
6535 * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
6538 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6540 * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
6541 to be emitted (bug #82281).
6543 2007-08-01 Martin Baulig <martin@ximian.com>
6545 Merged the `debugger-dublin' branch.
6547 * debug-debugger.h (MonoDebuggerInfo):
6548 Removed the `old_*' compatibility entries.
6549 Added `debugger_version' and `data_table'.
6550 Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
6551 Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
6554 (MiniDebugMethodBreakpointInfo): Add `address_list'.
6555 (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
6556 instead of a `gconstpointer'.
6557 (mono_debugger_insert_method_breakpoint): Return a
6558 `MonoDebugMethodAddressList *'.
6560 2007-06-28 Martin Baulig <martin@ximian.com>
6562 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6564 2007-08-01 Zoltan Varga <vargaz@gmail.com>
6566 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using
6567 __builtin_frame_address () since it is broken on older gcc versions.
6569 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6571 * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
6572 on the stack overflow handling and made the managed stack overflows
6573 catchable in most cases using soft guard pages.
6574 * exceptions-x86.c: added code to restore the protection in the soft
6575 guard pages at the end of exception handling.
6577 2007-07-31 Zoltan Varga <vargaz@gmail.com>
6579 * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
6581 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6583 * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
6586 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6588 * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
6589 signal handling support until it has been ported to the new mechanism.
6590 * mini.c: fixed stack overflow detection and use the new
6591 architecture code to handle signals on the altstack.
6593 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
6595 * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
6596 stack overflows on the alt stack.
6598 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
6600 * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
6601 stack overflows on the alt stack.
6603 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
6605 * exceptions-ppc.c: cleanup preparing for altstack support.
6607 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6609 * exceptions-arm.c: cleanup preparing for altstack support.
6611 2007-07-27 Mark Probst <mark.probst@gmail.com>
6613 * mini.c (print_jit_stats): Output hazard pointer stats.
6615 2007-07-26 Mark Probst <mark.probst@gmail.com>
6617 * driver.c, mini.c: Replaced security mode flags with a single
6620 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6622 * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
6624 2007-07-25 Mark Probst <mark.probst@gmail.com>
6626 * mini.c, mini.h, driver.c (mono_main): Added command-line flag
6627 (which doesn't do anything yet) for activating Core CLR
6628 (Silverlight) security.
6630 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
6632 * mini-codegen.c: work around a possible gcc bug on arm.
6634 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6636 * driver.c, mini-x86.h, mini-amd64.h: print a nice error
6637 message for platforms that don't support AOT compilation.
6639 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6641 * mini.h, mini.c, driver.c: temporary smcs hack.
6643 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
6645 * mini-arm.h, mini-arm.c: arm EABI fixes.
6647 2007-07-22 Zoltan Varga <vargaz@gmail.com>
6649 * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
6652 * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
6653 trampolines taking a method argument.
6655 * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
6657 * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
6658 * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
6660 * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
6661 JIT compilation throws an exception. Fixes #82050.
6663 2007-07-19 Mark Probst <mark.probst@gmail.com>
6665 * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
6666 with the MONO_EXCEPTION_ defines.
6668 2007-07-17 Zoltan Varga <vargaz@gmail.com>
6670 * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
6673 * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
6674 the cause of an assertion.
6676 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
6678 * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
6681 2007-07-15 Zoltan Varga <vargaz@gmail.com>
6683 * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
6684 assert. Should fix #82103.
6686 2007-07-14 Zoltan Varga <vargaz@gmail.com>
6688 * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
6689 here too. Fixes #82095.
6691 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
6694 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
6696 * mini-amd64.h: Enable IMT for amd64.
6698 * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
6700 2007-07-12 Zoltan Varga <vargaz@gmail.com>
6702 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
6704 2007-07-12 Mark Probst <mark.probst@gmail.com>
6706 * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
6707 as soon as check_linkdemand sets an exception_type.
6709 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6711 * mini-x86.c: fixed offsets for IMT call sequence.
6712 * mini-x86.h: enable IMT again.
6714 2007-07-11 Zoltan Varga <vargaz@gmail.com>
6716 * trace.c (mono_trace_enter_method): Decode MonoType too.
6718 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
6720 * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
6722 * mini-amd64.c: Add preliminary IMT implementation.
6724 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6726 * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
6727 understand the new IMT-base interface invocation (thanks to
6728 Daniel Nauck for the report and the remote debugging session).
6730 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6732 * mini-x86.c: size and speed optimizations for the IMT bsearch.
6734 2007-07-11 Zoltan Varga <vargaz@gmail.com>
6736 * Makefile.am (aotcheck): Make this actually use the AOTed code.
6738 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
6740 * mini-trampolines.c: implement AOT IMT support.
6741 * mini-x86.h: enable IMT support for wider testing.
6743 2007-07-10 Zoltan Varga <vargaz@gmail.com>
6745 * inssel.brg (emit_imt_argument): Add aot support here.
6747 * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
6749 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6751 * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
6752 of the IMT implementation, partially from massi, with my
6753 implementation of the bsearch sequence. Disabled by default until
6754 the AOT code is implemented.
6756 2007-07-10 Zoltan Varga <vargaz@gmail.com>
6758 * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
6760 * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
6762 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6764 * inssel.brg, mini.c, mini.h, mini-trampolines.c:
6765 arch-independent IMT JIT code from Massimiliano
6766 Mantione (massi@ximian.com) with small cleanups from me.
6768 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6770 * Makefile.am: fix svn invocation to get the svn revision to be
6771 independent of the local language (build fix).
6773 2007-07-09 Mark Probst <mark.probst@gmail.com>
6775 * mini.c (inline_method): Reset cfg->exception_type if the
6776 inlining is aborted. Fixes: 82049.
6778 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
6780 * mini.c: remove assert from exception handling code when exception_ptr
6783 2007-07-05 Zoltan Varga <vargaz@gmail.com>
6785 * mini.c (mono_codegen): Add an assert.
6787 * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method
6788 enter and leave code.
6789 * mini-amd64.c (mono_arch_emit_prolog): Likewise.
6791 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6793 * mini-ppc.c: fixed memory corruption for localloc(0)
6796 2007-07-05 Zoltan Varga <vargaz@gmail.com>
6798 * mini.c: Fix warnings.
6800 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
6802 * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
6803 to emit better double->int conversions.
6805 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6807 * mini.c: the provided Min/Max optimizations are valid for unisgned
6810 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
6812 * 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
6814 2007-06-28 Miguel de Icaza <miguel@novell.com>
6816 * mini.c (mono_running_on_valgrind): Add support for reporting the
6817 method and its boundaries to valgrind.
6819 2007-06-28 Martin Baulig <martin@ximian.com>
6821 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6823 2007-06-25 Zoltan Varga <vargaz@gmail.com>
6825 * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
6827 * generic.2.cs: Add new test case.
6829 2007-06-25 Martin Baulig <martin@ximian.com>
6831 Merged the `debugger-dublin' branch.
6834 (mono_debugger_insert_method_breakpoint): New public method.
6835 (mono_debugger_remove_method_breakpoint): Likewise.
6836 (mono_debugger_check_breakpoints): New static method.
6837 (mono_debug_close_method): Call mono_debugger_check_breakpoints().
6839 * debug-debugger.h (MonoDebuggerInfo):
6840 Renamed (to keep backward compatibility in the vtable):
6841 `insert_breakpoint' -> `old_insert_breakpoint'.
6842 `remove_breakpoint' -> `old_remove_breakpoint'.
6843 `create_string' -> `old_create_string'.
6844 `lookup_class' -> `old_lookup_class'.
6845 `lookup_type' -> removed; changed into a dummy field.
6846 `lookup_assembly' -> `old_lookup_assembly'.
6847 Added (same functionality, but different signature):
6848 `create_string', `lookup_class', `lookup_assembly'
6850 `get_method_addr_or_bpt', `remove_method_breakpoint',
6851 `runtime_class_init'.
6853 * debug-debugger.c: Merged the `debugger-dublin' branch.
6855 2007-06-23 Zoltan Varga <vargaz@gmail.com>
6857 * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
6859 (peephole_pass): Likewise.
6861 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
6863 * driver.c: hopefully make setaffinity work also for ancient
6866 2007-06-22 Atsushi Enomoto <atsushi@ximian.com>
6868 * driver.c : win32 build fix.
6870 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6872 * driver.c: check for the MONO_NO_SMP env var and bind to a single
6873 processor if it is set.
6875 2007-06-21 Martin Baulig <martin@ximian.com>
6877 * debug-mini.h: New file.
6880 (mono_debugger_insert_breakpoint_full): Moved here from
6881 ../metadata/mono-debug-debugger.c.
6882 (mono_debugger_remove_breakpoint): Likewise.
6883 (mono_debugger_breakpoint_callback): Likewise.
6885 2007-06-15 Raja R Harinath <rharinath@novell.com>
6887 * jit-icalls.c (mono_helper_compile_generic_method): Update to
6888 changes in MonoGenericClass.
6890 2007-06-14 Zoltan Varga <vargaz@gmail.com>
6892 * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
6894 2007-06-14 Raja R Harinath <rharinath@novell.com>
6896 * jit-icalls.c (mono_helper_compile_generic_method): Update to
6897 removal of MonoGenericMethod.
6899 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6901 * mini-exceptions.c: hooks for the exception events profiling API.
6903 2007-06-14 Randolph Chung <tausq@debian.org>
6905 * Makefile.ma: Add hppa target.
6906 * mini-arch.h: Include mini-hppa.h
6907 * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
6908 mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
6909 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6911 2007-06-14 Randolph Chung <tausq@debian.org>
6913 * inssel.brg: Add rules for "chained" compare-branch operations so that
6914 a single compare op can affect multiple branches. Adjust cost for
6915 OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
6916 * inssel-long32.brg: Update rules to use compare-branch macros. Adjust
6917 cost for some rules so that they can more easily be overridden by
6918 per-arch rules (with fixes from lupus).
6919 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6921 2007-06-13 Randolph Chung <tausq@debian.org>
6923 * mini-ops.h: Reorder branch ops so that they match the order of the
6924 corresponding CEE_* ops. The code expects them this way.
6925 Add new ops for HPPA target.
6926 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6928 2007-06-13 Randolph Chung <tausq@debian.org>
6930 * mini-exceptions.c: Handle cases where the stack grows towards
6932 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6934 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6936 * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
6938 * driver.c: explain where a non-matching corlib is found.
6940 2007-06-13 Mark Probst <mark.probst@gmail.com>
6942 * mini.c (print_jit_stats): Output dynamic code allocation stats.
6944 2007-06-10 Sanghyeon Seo <sanxiyn@gmail.com>
6946 * mini-exceptions.c: Generate a method profile leave event during
6947 an exception to ensure that the profiler gets notified.
6949 2007-06-07 Zoltan Varga <vargaz@gmail.com>
6951 * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir
6954 * cpu-amd64.md: Add long_and/or/xor opcodes.
6956 2007-06-06 Wade Berrier <wberrier@novell.com>
6958 * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
6959 (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction
6960 length of instruction shr_imm (expected 8, got 10)
6962 2007-06-06 Zoltan Varga <vargaz@gmail.com>
6964 * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
6966 2007-06-06 Mark Probst <mark.probst@gmail.com>
6968 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6969 MonoInternalHashTable again (fixed bug in the internal hash table
6972 2007-06-06 Mark Probst <mark.probst@gmail.com>
6974 * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
6975 Have to figure out what makes it crash the SWF regression.
6977 2007-06-05 Zoltan Varga <vargaz@gmail.com>
6979 * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
6981 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6983 * mini.c: optimize out the type check when storing null in a
6986 2007-06-04 Mark Probst <mark.probst@gmail.com>
6988 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6989 MonoInternalHashTable.
6991 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
6993 * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
6994 signed integer methods.
6996 2007-06-02 Zoltan Varga <vargaz@gmail.com>
6998 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case
6999 permanently since the current approach doesn't work.
7001 2007-06-02 Zoltan Varga <vargaz@gmail.com>
7003 * inssel.brg (stmt): Only call delegate->invoke_impl if
7004 MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
7006 2007-06-01 Zoltan Varga <vargaz@gmail.com>
7008 * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
7009 the sreg2==rdx case.
7011 * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
7012 account if it contains a rex prefix.
7013 (peephole_pass): Handle OP_FMOVE as well.
7015 2007-06-01 Zoltan Varga <vargaz@gmail.com>
7017 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
7018 as it causes regressions.
7020 2007-05-31 Zoltan Varga <vargaz@gmail.com>
7022 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
7023 static case as well.
7025 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
7027 * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
7028 (mono_arch_get_this_arg_from_call): Ditto.
7030 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
7032 * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
7035 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
7036 (mono_arch_get_this_arg_from_call): Ditto.
7038 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
7040 * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
7041 try to create optimized invoke code and use that for further invocations.
7042 Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
7044 * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
7046 2007-05-29 Rodrigo Kumpera <kumpera@gmail.com>
7048 * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
7049 sealed classes or methods.
7050 *devirtualization.cs: tests for the new optimization
7052 2007-05-29 Zoltan Varga <vargaz@gmail.com>
7054 * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
7055 by the update_volatile () function.
7057 2007-05-27 Zoltan Varga <vargaz@gmail.com>
7059 * driver.c (mono_main): Call g_thread_init () early since newer glib versions
7062 * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
7064 2007-05-24 Jonathan Chambers <joncham@gmail.com>
7066 * mini.c: Add configure checks for header files.
7067 * mini-x86.c: Add configure checks for header files.
7068 * trace.c: Add configure checks for header files.
7069 * aot-runtime.c: Add configure checks for header files.
7070 * aot-compiler.c: Add configure checks for header files.
7071 * driver.c: Add configure checks for header files.
7072 * mini-codegen.c: Add configure checks for header files.
7074 Code is contributed under MIT/X11 license.
7076 2007-05-22 Zoltan Varga <vargaz@gmail.com>
7078 * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
7079 icompare_imm -128 + op_iclt. Fixes #81703.
7081 2007-05-19 Zoltan Varga <vargaz@gmail.com>
7083 * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
7085 2007-05-15 Massimiliano Mantione <massi@ximian.com>
7087 * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
7088 inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
7089 so that all isinst checks now use "interface_bitmap".
7091 2007-05-15 Zoltan Varga <vargaz@gmail.com>
7093 * cpu-amd64.md (jmp): Fix a warning.
7095 * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
7097 * basic.cs: Add new regression test.
7099 * basic.cs: Remove test which is now in basic-long.cs.
7101 * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
7103 * basic-long.cs: Add new test.
7105 2007-05-13 Zoltan Varga <vargaz@gmail.com>
7107 * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
7109 2007-05-12 Zoltan Varga <vargaz@gmail.com>
7111 * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
7113 * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
7116 * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception
7117 throwing code a bit.
7119 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of
7120 the exception throwing code a bit.
7122 * mini-x86.c (get_call_info): Allocate result from a mempool.
7124 2007-05-11 Zoltan Varga <vargaz@gmail.com>
7126 * aot-compiler.c (find_typespec_for_class): Fix the assert.
7128 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
7130 * mini.h (MonoCompile): Add 'token_info_hash' field.
7132 * mini.c: Save token->method associations during compilation so the AOT
7133 compiler can use it.
7135 * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
7136 which reference generic classes and methods.
7138 2007-05-10 Zoltan Varga <vargaz@gmail.com>
7140 * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
7142 * aot-compiler.c (compile_method): Fix a typo in a comment.
7144 * aot-runtime.c (decode_cached_class_info): Skip generic types.
7146 * aot-compiler.c: Add minimal support for AOTing generic code by skipping
7149 * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
7151 2007-05-09 Zoltan Varga <vargaz@gmail.com>
7153 * mini.h (MonoCompile): Add 'args' field.
7155 * mini.c (mono_compile_create_vars): Store variables representing the arguments
7158 * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
7160 2007-05-08 Zoltan Varga <vargaz@gmail.com>
7162 * mini.c (mono_compile_get_interface_var): Remove this unused function.
7164 * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
7166 * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
7167 opcodes for some opcodes.
7169 * mini.h *.brg *.c: Use the new opcodes.
7171 2007-05-08 Massimiliano Mantione <massi@ximian.com>
7173 * mini.h: Bumped aot revision.
7175 * inssel.brg: modified code generation of type checks for interfaces
7176 to use the new "MonoClass.interface_bitmap" instead of the old
7177 "MonoClass.interface_offsets".
7179 2007-04-30 Zoltan Varga <vargaz@gmail.com>
7181 * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
7183 2007-04-29 Zoltan Varga <vargaz@gmail.com>
7185 * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
7188 2007-04-27 Neale Ferguson <neale@sinenomine.net>
7190 * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
7192 2007-04-27 Wade Berrier <wberrier@novell.com>
7194 * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in
7195 mini.h) to fix build.
7197 2007-04-26 Zoltan Varga <vargaz@gmail.com>
7199 * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
7201 * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
7202 causes the corlib unit tests to fail.
7204 2007-04-25 Zoltan Varga <vargaz@gmail.com>
7206 * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
7208 * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
7210 * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional
7211 opcodes to the comparison relations.
7213 * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional
7214 opcodes to their types.
7216 * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
7218 * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache
7219 it in cfg->arch.cinfo.
7221 * local-propagation.c (mono_local_cprop_bb): Fix a warning.
7223 * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in
7224 cfg->cil_offset_to_bb.
7226 2007-04-24 Zoltan Varga <vargaz@gmail.com>
7228 * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
7229 created becase of initlocals.
7231 2007-04-23 Zoltan Varga <vargaz@gmail.com>
7233 * mini-alpha.c cpu-alpha.md: More alpha port work from
7234 Sergey Tikhonov <tsv@solvo.ru>.
7236 2007-04-21 Andreas Faerber <andreas.faerber@web.de>
7238 * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
7240 2007-04-19 Zoltan Varga <vargaz@gmail.com>
7242 * cpu-s390.md (break): Correct the length of break instruction.
7244 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7246 * mini.c: fix a couple of soft-float issues and comments.
7248 2007-04-15 Miguel de Icaza <miguel@novell.com>
7250 * trace.c (is_filenamechar): - is also a filename char.
7252 2007-04-15 Neale Ferguson <neale@sinenomine.net>
7254 * mini-s390.c: Correct checking for enum type in return value processing.
7256 2007-04-14 Raja R Harinath <rharinath@novell.com>
7258 * Makefile.am (BUILT_SOURCES): Add 'version.h'.
7259 (version.h): Makefile is in the build directory.
7261 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
7263 * mini-amd64.h: fix for assertion failure on Solaris/amd64
7265 2007-04-11 Martin Baulig <martin@ximian.com>
7267 * mini.c (can_access_member): Fix handling of generic classes;
7270 2007-04-10 Zoltan Varga <vargaz@gmail.com>
7272 * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
7274 2007-04-05 Zoltan Varga <vargaz@gmail.com>
7276 * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
7278 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7280 * mini-codegen.c: make sure the right spill amount is
7281 used for fp or integer registers (fixes the float_sub_spill() on ppc).
7283 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
7285 * mini-ppc.c: fixes for the fp_branch_nan test.
7287 2007-03-23 Zoltan Varga <vargaz@gmail.com>
7289 * basic.cs: Comment out new test which still fails on ia64.
7291 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7293 * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
7295 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7297 * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
7299 2007-03-22 Zoltan Varga <vargaz@gmail.com>
7301 * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
7302 on 64 bit machines. Fixes part of #80738.
7304 * basic.cs: Add regression test.
7306 2007-03-17 Zoltan Varga <vargaz@gmail.com>
7308 * inssel.brg basic.cs: Revert previous change to fix build.
7310 * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
7313 * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
7315 * basic.cs: Add new regression test.
7317 2007-03-17 Zoltan Varga <vargaz@gmail.com>
7319 * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
7322 2007-03-16 Neale Ferguson <neale@sinenomine.net>
7324 * cpu-s390x.md: Correct length of break instruction.
7326 2007-03-16 Neale Ferguson <neale@sinenomine.net>
7328 * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
7329 * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
7331 2007-03-15 Jonathan Chambers <joncham@gmail.com>
7333 * *.c: Begin WIN64 port.
7334 * mini.c: Use correct register in profiler.
7335 * mini-amd64.c: No inline assembly on Win64.
7336 * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
7337 Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
7338 * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
7339 is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
7340 mono_arch_ip_from_context for Win64.
7342 Contributed under MIT/X11 license.
7344 2007-03-15 Zoltan Varga <vargaz@gmail.com>
7346 * exceptions-amd64.c (seh_handler): Ditto.
7348 * exceptions-x86.c (seh_handler): Fix a memory leak.
7350 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
7352 * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
7353 mini-s390x.c: fixed peephole optimizations to deal
7354 correctly with 1 and 2 byte reload avoidance.
7356 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
7358 * cpu-s390.md, cpu-s390x.md: update localloc length.
7360 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
7362 * cpu-g4.md: added missing descriptions.
7364 2007-03-14 Miguel de Icaza <miguel@novell.com>
7366 * Makefile.am: Add support so the tail tests are not executed on
7367 PowerPC as that is a known limitation of the PowerPC port.
7369 2007-03-13 Jonathan Chambers <joncham@gmail.com>
7371 * runmdesc.bat: Move to msvc directory.
7373 2007-03-13 Jonathan Chambers <joncham@gmail.com>
7375 * runmdesc.bat: Run executable that was produced by the current
7376 target and sent via an argument.
7378 2007-03-11 Zoltan Varga <vargaz@gmail.com>
7380 * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
7383 * generics.2.cs: Add regression test.
7385 2007-03-09 Wade berrier <wberrier@novell.com>
7387 * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
7389 2007-03-09 Zoltan Varga <vargaz@gmail.com>
7391 * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
7392 AOT code depends on this.
7394 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7396 * mini.c: more precise tracking of types in the eval stack
7397 (part of fix for bug #81044).
7399 2007-03-07 Zoltan Varga <vargaz@gmail.com>
7401 * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
7403 * aot-compiler.c (encode_patch): Remove an obsolete comment.
7405 2007-03-06 Zoltan Varga <vargaz@gmail.com>
7407 * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
7409 * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
7411 2007-02-22 Zoltan Varga <vargaz@gmail.com>
7413 * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
7414 a pointer on 64 bit systems. Fixes #80190.
7416 * iltests.il: Add new regression test.
7418 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7420 * mini.c: inline a constant for Environment.IsRunningOnWindows.
7422 2007-02-19 Geoff Norton <gnorton@customerdna.com>
7424 * trace.c: Remove an erroneous alignemnt check when tracing.
7425 Fixes --trace on OSX86.
7427 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7429 * mini-$(arch).h: initialize SP in context for all the archs.
7431 2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
7433 * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
7434 regressions in the thread tests.
7436 2007-02-14 Zoltan Varga <vargaz@gmail.com>
7438 * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
7439 - fixed implementation of LOCALLOC opcode
7440 - implemented non-un compare for floats
7442 - implementation of FDIV and CKFINITE opcodes
7443 - fixes for latest mono updates
7444 - additional arch opcodes
7446 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7448 * Makefile.am: simplify and merge rules for cross-compilation.
7450 2007-02-07 Massimiliano Mantione <massi@ximian.com>
7452 * local-propagation.c: Actually *apply* the fix for bug 80591...
7454 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
7456 * mini-exceptions.c: backuot part of the last change
7457 (fixes cas tests on amd64 related to GetExecutingAssembly ()).
7459 2007-02-06 Massimiliano Mantione <massi@ximian.com>
7460 * inssel.brg: Fix bug 59286.
7463 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
7465 * mini-exceptions.c: patch from Zoltan to correctly check for
7466 stack boundaries (using the stack register, not the frame register),
7467 fixes bugs #80724, #79717.
7469 2007-02-03 Zoltan Varga <vargaz@gmail.com>
7471 * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
7472 OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
7474 * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
7475 presence of frame pointer elimination.
7477 2007-02-01 Geoff Norton <gnorton@customerdna.com>
7479 * mini-x86.h: NetBSD UCONTEX_REG defines.
7481 2007-02-01 Zoltan Varga <vargaz@gmail.com>
7483 * inssel-amd64.brg: Fix amd64 build.
7485 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
7487 * mini.h: remove extern to workaround what looks likes gcc bug 26905
7490 2007-01-31 Zoltan Varga <vargaz@gmail.com>
7492 * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
7495 * mini-<ARCH>.c: Use mono_is_regsize_var ().
7497 2007-01-30 Mark Mason <mason@broadcom.com>
7499 * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
7500 * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
7501 * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
7502 beginning support for CEE_JMP [not quite working yet]
7503 * tramp-mips.c: LMF handling now works
7505 2007-01-30 Zoltan Varga <vargaz@gmail.com>
7507 * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
7509 * mini.h (NULLIFY_INS): New macro.
7511 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7513 * mini.c: statistical profiler fix for windows, patch
7514 from Tor Lillqvist (tml@novell.com).
7516 2007-01-30 Massimiliano Mantione <massi@ximian.com>
7517 * local-propagation.c: Fix bug 80591.
7519 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7521 * Makefile.am: put back the --export-dynamic option as with
7522 the previous gmodule flags (thanks to Robert Jordan).
7524 2007-01-28 Zoltan Varga <vargaz@gmail.com>
7526 * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
7528 mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
7529 simplify and speed up the local register allocator. Also rename some fields
7530 like iassign->vassign.
7532 * regalloc.c: Remove some functions which are no longer used since their
7533 inlined version is in mini-codegen.c.
7535 * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
7537 * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
7539 2007-01-27 Zoltan Varga <vargaz@gmail.com>
7541 * mini-amd64.c (peephole_pass): Remove optimizations which omit a
7542 narrowing. Fixes #80622.
7544 * iltests.il: Add new regresssion test.
7546 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7548 * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
7549 debug-debugger.c, debug-debugger.h: warning fixes.
7550 * driver.c: updated copyright year and made it fit in one line.
7552 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
7554 * aot-runtime.c: updated to use mono-dl instead of gmodule.
7556 2007-01-25 Zoltan Varga <vargaz@gmail.com>
7558 * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
7560 * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
7562 * iltests.il: Add new test for bug #80507.
7564 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7566 * mini-arm.h: use soft-float also on vfp for now.
7568 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7570 * mini.c: fix some more soft-float issues.
7572 2007-01-24 Zoltan Varga <vargaz@gmail.com>
7574 * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
7576 2007-01-24 Massimiliano Mantione <massi@ximian.com>
7577 * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
7578 mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
7579 MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
7581 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
7583 * mini-arm.c: typo fix.
7585 2007-01-23 Neale Ferguson <neale@sinenomine.net>
7587 * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
7589 2007-01-21 Zoltan Varga <vargaz@gmail.com>
7591 * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
7592 Share stack slots for scalar types. Avoid expensive g_list_free () calls.
7594 * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
7596 * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto.
7598 * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
7600 * inssel.brg: Fix a warning.
7602 * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
7604 * abcremoval.c ssa.c ssapre.c: Update after this change.
7606 * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
7608 * dominators.c (df_set): Use mono_bitset_union_fast.
7610 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7612 * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
7613 mini-codegen.c: reduce relocations and memory usage for the cpu
7616 2007-01-20 Zoltan Varga <vargaz@gmail.com>
7618 * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
7620 * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
7621 to reduce their size.
7623 2007-01-19 Mark Mason <mason@broadcom.com>
7625 * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
7626 * mini-mips.c: more configuration macros, support long conditional branches, additional
7627 asserts, fix epilog instrumentation.
7628 * mini-mips.h: use standard stack walk
7629 * cpu-mips.md: increase size of div, rem and conditional branches
7631 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
7633 * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
7636 2007-01-19 Zoltan Varga <vargaz@gmail.com>
7638 * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
7639 (compile_method): Ditto.
7641 * aot-runtime.c (decode_klass_info): Ditto.
7643 * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
7644 needed by the code generated by inssel.brg. Also fix a warning.
7646 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
7648 * mini.c: deal with enums that become genericinsts by
7649 being nested in a generic class (bug #79956).
7651 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7653 * mini.c: match the generic definition to check for
7654 private access with generic types (bug #78431).
7656 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7658 * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
7659 to make life easier for people cross-compiling that insist on not
7662 2007-01-17 Mark Mason <mason@broadcom.com>
7664 * inssel-long.brg: patch to deal with mips missing flags
7665 * inssel-long32-mips.brg: implement overflow checks
7666 * insset-mips.brg: implement overflow checks
7667 * mini-mips.h: implement conditional exception handling
7668 * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
7669 Remove unused code, minor cleanups.
7670 * exceptions-mips.c: minor cleanups
7671 * mini-ops.h: add mips conditional exception ops
7672 * cpu-mips.md: add mips conditional exception ops
7675 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7677 * inssel.brg: patch from Mark Mason <mason@broadcom.com>
7678 to deal with mips missing of flags.
7680 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7682 * exceptions-ppc.c: execute fault handlers.
7684 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
7686 * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
7688 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7690 * mini.c: handle also floating point values in initialize_array.
7692 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7694 * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
7695 array initialization and make it conditional on the intrins option.
7697 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7699 * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
7700 relocations and put the patch info names close to the enum definition.
7702 2007-01-15 Mark Mason <mason@broadcom.com>
7704 * basic.cs, exceptions.cs: break up large tests to increase debugability.
7706 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7708 * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
7710 2007-01-12 Raja R Harinath <rharinath@novell.com>
7712 * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
7714 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
7716 * Makefile.am: distribute the mips sources.
7718 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7720 * mini-codegen.h: handle bug #80489 here, by excluding ecx
7723 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
7725 * cpu-x86.md: back out for now as this triggers other regressions.
7727 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7729 * cpu-x86.md: force src1 and dest regpair for long shift instructions
7730 to eax:edx, so ecx can't get allocated to them (bug #80489).
7732 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
7734 * mini.c, mini-exceptions.c: enabled running fault handlers
7737 2007-01-03 Miguel de Icaza <miguel@novell.com>
7739 * driver.c: If nothing fail, do not use the string "failed",
7740 because it makes it very annoying to view test result logs on the
7743 2006-12-30 Miguel de Icaza <miguel@novell.com>
7745 * debug-debugger.c (mono_debugger_main): Rename "main" to
7746 "main_method" to prevent a warning.
7748 Remove a warning for unused field.
7750 2006-12-28 Martin Baulig <martin@ximian.com>
7753 (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
7755 2006-12-22 Martin Baulig <martin@ximian.com>
7757 * mdb-debug-info32.s, mdb-debug-info64.s: New files.
7758 Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
7759 seperate `.mdb_debug_info' section, so we can access it from the
7760 debugger even if the binary is stripped.
7762 * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
7763 from the `.mdb_debug_info' here to prevent the linker from
7764 removing that section.
7766 * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
7769 2006-12-19 Robert Jordan <robertj@gmx.net>
7771 * mini-x86: enable the code to return small structures in
7772 registers for FreeBSD as well. Fixes bug #80278.
7773 * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
7775 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7777 * mini-x86.c: align the stack when calling the profiler
7778 function instrumenting the prolog (on OSX).
7780 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
7782 * mini.c: emit a break opcode where Debugger.Break () is called.
7784 2006-12-13 Miguel de Icaza <miguel@novell.com>
7786 * mini.c (mono_method_to_ir): Provide useful information on this
7787 assert, to prevent others from debugging like I did.
7789 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7791 * mini.c: enable code which was incorrectly commented
7794 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7796 * mini-x86.c: enable on OSX, too, the code to return small
7797 structures in registers.
7799 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7801 * mini-x86.c: remove the use of the dynamic code manager here, too.
7803 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
7805 * mini.h, debug-debugger.c, tramp-*.c: fixed
7806 mono_debugger_create_notification_function() to use
7807 mono_global_codeman_reserve () instead of a dynamic code manager.
7809 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
7811 * mini.c, jit-icalls.h, jit-icalls.c: remove the
7812 ves_array_element_address() jit icall and use a generated
7813 managed method instead (which is about 4 times faster for a rank 3
7816 2006-11-29 Mark Mason <mason@broadcom.com>
7818 * basic-calls.cs: additional tests for passing
7819 structures as function arguments.
7821 2006-11-29 Mark Mason <mason@broadcom.com>
7823 * mini-mips.h: disable custom exception handling
7824 * mini-mips.c: throw/rethrow should use jalr to call
7825 exception stubs. Fixed bug with passing structures
7826 by value. More support for tracing floating point
7829 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7831 * mini.c: fixed typo in the soft-float ldind.r4 handling
7834 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7836 * mini.c, mini.h, driver.c: added --runtime command line
7837 option to select a different runtime than the autodetected one.
7838 * jit.h: added API for embedders to initialize with a specific
7841 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
7843 * mini.c: handle also boxing of r4 values (bug #80024).
7845 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
7847 * mini-ppc.c: force indirect calls until we reserve
7848 enough address space for all the generated code.
7850 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
7852 * exceptions-arm.c: workaround bugs in the libc definition
7855 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
7857 * inssel.brg: fixes from me and Mark Mason.
7859 2006-11-23 Dick Porter <dick@ximian.com>
7861 * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
7862 semaphore display now we've fixed the initial value
7864 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7866 * inssel.brg: partially revert the last change to fix the build.
7868 2006-11-21 Mark Mason <mason@broadcom.com>
7870 * inssel.brg: Add and use compare-and-branch macros to support
7871 architectures that do not have condition code registers (ie. MIPS).
7872 * *-mips.{c,brg,md}: Fix copyright statements
7874 2006-11-20 Mark Mason <mason@broadcom.com>
7876 * Makefile.am: remove mini-codegen.c from list of MIPS sources
7877 * mini.c: Allow GET_CONTEXT to be specified by the arch port
7878 * mini.h: Added declaration for mono_print_ins()
7879 * mini-codegen.c: added ins_spec initializer for MIPS
7880 * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
7881 vreg to be virtual and hreg to be non-virtual.
7882 * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
7883 is not yet working/implemented correctly.
7884 * mini-codegen.c (print_ins): rename to mono_print_ins(), make
7885 non-static, fixup calls to print_ins() from other parts in the file.
7887 2006-11-20 Mark Mason <mason@broadcom.com>
7889 * basic-calls.cs: added tests for passing structures as arguments
7892 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7894 * inssel-long32.brg: optimize signed division by power of two.
7896 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
7898 * mini-arm.c: added support for interworking with thumb code
7899 (mono must be still be built using the ARM instruction encoding).
7901 2006-11-19 Miguel de Icaza <miguel@novell.com>
7903 * mini.c (type_from_op): Separate the conditions for OP_EQ as the
7904 verifier has different rules for it. Fixes a few verifier issues
7907 * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
7908 at the end, so people know what happened.
7910 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7912 * brach-opts.c: in optimize_exception_target() make sure we
7913 are in a catch clause (fixes bug #79871).
7915 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7917 * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
7918 more soft-float support fixes.
7920 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
7922 * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
7923 that are passed half on the stack and half in registers.
7925 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
7927 * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
7928 more mips integration work from Mark E Mason
7929 <mark.e.mason@broadcom.com>.
7931 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7933 * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
7934 cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
7935 tramp-mips.c: added sources for the mips port, not
7936 integrated in the build yet. Contributed by
7937 Mark E Mason <mark.e.mason@broadcom.com>.
7939 2006-11-14 Neale Ferguson <neale@sinenomine.net>
7941 * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
7943 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7945 * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
7946 put the soft-float rules in its own file since it seems to
7947 break s390 compilation.
7949 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7951 * mini-arm.c: fixed wrnings.
7953 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
7955 * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
7956 inssel-arm.brg: ARM support for soft-float.
7958 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7960 * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
7961 loads and stores of 32 bit fp values.
7963 2006-11-10 Zoltan Varga <vargaz@gmail.com>
7965 * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
7967 * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
7968 works. Fixes #79852 and #79463.
7970 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7972 * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
7973 more soft-float support WIP and fixes.
7975 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
7977 * mini-arm.c: some VFP updates.
7979 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
7981 * mini-exceptions.c: 0 is a valid local var offset in some
7982 architectures, don't assert (bug #78508).
7984 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
7986 * exceptions-arm.c: fixed off by one error in stack walk code.
7988 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
7990 * mini.h, mini.c: more precise tracking of type load exceptions.
7992 2006-11-03 Robert Jordan <robertj@gmx.net>
7994 * Makefile.am: [WIN32] Add monow.exe target.
7995 * driver.c: [WIN32] Don't detach the console when debugging.
7998 2006-10-30 Miguel de Icaza <miguel@novell.com>
8000 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
8002 2006-10-23 Zoltan Varga <vargaz@gmail.com>
8004 * aot-compiler.c (emit_method_info): Add a case missed earlier.
8006 * driver.c (mini_regression): Fix --regression with AOT.
8008 * aot-compiler.c (emit_method_info): Fix AOT on amd64.
8010 2006-10-17 Zoltan Varga <vargaz@gmail.com>
8012 * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
8014 * mini-sparc.h: Don't use sigaction on sparc/linux.
8016 * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
8018 * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
8020 * mini-exceptions.c: Add proper include files for getpid ().
8022 2006-10-16 Zoltan Varga <vargaz@gmail.com>
8024 * aot-runtime.c (mono_aot_get_method): Change this to return the native code
8025 address instead of a MonoJitInfo* to avoid decoding the exception info for the
8028 * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
8029 name cache to reduce its size.
8031 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
8033 2006-10-15 Zoltan Varga <vargaz@gmail.com>
8035 * mini-x86.c: Save/restore the current LMF structure more efficiently using
8036 the mono_lmf TLS variable.
8038 * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in
8039 trampoline lmf frames.
8041 * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
8043 2006-10-14 Zoltan Varga <vargaz@gmail.com>
8045 * mini-amd64.c: Save/restore the current LMF structure more efficiently using
8046 the mono_lmf TLS variable.
8048 * mini-exceptions.c: Access the LMF structure through accessors.
8050 * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS
8051 variable instead of in jit_tls->lmf.
8053 * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
8055 * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in
8056 trampoline lmf frames.
8058 * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
8060 2006-10-12 Zoltan Varga <vargaz@gmail.com>
8062 * mini.c trace.c mini-x86.c: Revert these too.
8064 * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
8067 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
8069 * genmdesc.c: removed now dead code.
8071 2006-10-09 Robert Jordan <robertj@gmx.net>
8073 * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
8075 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
8077 * mini.h: do not leave gaps in the opcode values.
8079 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
8081 * jit-icalls.h: flag functions as internal here, too.
8083 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
8085 * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
8086 functions with the internal attribute.
8088 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
8090 * aot-compiler.c: fclose the file descriptor in the profile read loop.
8092 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
8094 * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
8097 2006-10-05 Zoltan Varga <vargaz@gmail.com>
8099 * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
8100 tail calls as on other platforms.
8102 * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
8104 * iltests.il: Add a few tailcall tests.
8106 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8108 * driver.c: fix loop for old compilers (bug #79521).
8110 2006-10-02 Zoltan Varga <vargaz@gmail.com>
8112 * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
8114 * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
8116 * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
8117 metadata without any code.
8119 * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
8120 more precise debugging information using gdb.
8122 2006-09-30 Zoltan Varga <vargaz@gmail.com>
8124 * inssel-ia64.brg: Make the helper methods static.
8126 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
8128 * inssel-x86.brg: make the helper methods static.
8130 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
8132 * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
8134 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
8136 * mini.c: updates for monoburg changes.
8137 * inssel.brg: make a few helper functions static as they should.
8139 2006-09-27 Zoltan Varga <vargaz@gmail.com>
8141 * Makefile.am: Move mini-codegen.c to common_sources.
8143 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8145 * mini.h: instroduce inst_call in MonoInst for use in OUTARG
8147 * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
8148 mini-ppc.h: port to use the common local register allocator.
8150 2006-09-26 Zoltan Varga <vargaz@gmail.com>
8152 * mini.h: Remove the comment too then.
8154 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
8156 * mini.h: put back backend.data which is to be used shortly and
8157 doesn't increase the size of MonoInst. If any 64 bit arch aligned
8158 pointers on 4 byte boundaries it'd have much bigger issues running
8159 and you can ifdef it out anyway.
8161 2006-09-26 Zoltan Varga <vargaz@gmail.com>
8163 * mini.h (MonoInst): Remove backend.data field since it is unused and increases
8164 MonoInst size by 4 bytes on 64 bit machines.
8166 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
8168 * *.{c,h,brg}: long due removal of the unused field in MonoInst and
8169 replacement with more meaningful field names. Arch maintainers, please
8170 check the assigned names are good enough for your arch.
8172 2006-09-26 Zoltan Varga <vargaz@gmail.com>
8174 * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the
8175 OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
8177 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
8179 * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
8180 relocations and memory requirements, put the optimization flags
8181 definitions in their own file.
8183 2006-09-24 Zoltan Varga <vargaz@gmail.com>
8185 * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
8187 * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
8189 2006-09-22 Zoltan Varga <vargaz@gmail.com>
8191 * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
8193 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
8195 * inssel.brg: use the correct function to get the size of an item
8196 in an array, given an element class.
8197 * aot-compiler.c: do not access class->class_size directly.
8199 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
8201 * mini.h, debug-mini.c: added a debugging function to print
8202 info about local variables and arguments in a jitted method.
8204 2006-09-20 Zoltan Varga <vargaz@gmail.com>
8206 * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8208 * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
8210 2006-09-19 Zoltan Varga <vargaz@gmail.com>
8212 * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
8213 inner and outer loops when passing vtypes.
8215 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
8217 * mini-ppc.c: take into account the cpu errata for cache flushing
8218 which caused some random errors (bug #79381).
8220 2006-09-19 Zoltan Varga <vargaz@gmail.com>
8222 * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to
8223 mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
8225 2006-09-17 Zoltan Varga <vargaz@gmail.com>
8227 * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
8230 * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
8233 * mini-amd64.c (emit_call): Avoid near calls on freebsd.
8234 (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
8236 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
8239 2006-09-13 Zoltan Varga <vargaz@gmail.com>
8241 * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
8243 2006-09-12 Zoltan Varga <vargaz@gmail.com>
8245 * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this
8246 macro does not have to be changed during debugging.
8248 * 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>.
8250 * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
8252 * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
8254 * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if
8255 MONO_ARCH_NO_EMULATE_MUL is defined.
8257 * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
8259 * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
8261 * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
8263 * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
8265 2006-09-11 Zoltan Varga <vargaz@gmail.com>
8267 * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
8268 stuff to mini-exceptions.c where it is used.
8270 * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
8271 setup code, the real one is in mini-exceptions.c.
8273 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
8274 layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
8275 some changes from the freebsd ports tree.
8277 * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
8280 * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
8282 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
8284 * mini.c: on Linux, check for /proc to be mounted
8285 (bug# 79351, novell bug#201204).
8287 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
8289 * mini.c: handle cases where pthread_attr_getstack() behaves
8290 incorrectly (bug #78096).
8292 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
8294 * mini-arm.c: support larger stack frames (bug #79272).
8296 2006-09-08 Zoltan Varga <vargaz@gmail.com>
8298 * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
8300 * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef
8303 * aot-runtime.c (mono_aot_get_class_from_name): New function used by
8304 mono_class_from_name () to find a class from its name.
8306 * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
8308 2006-09-07 Zoltan Varga <vargaz@gmail.com>
8310 * mini-amd64.c (emit_call): Avoid strstr () call if possible.
8312 2006-09-05 Kornél Pál <kornelpal@gmail.com>
8314 * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
8316 2006-09-04 Zoltan Varga <vargaz@gmail.com>
8318 * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
8319 callinfo->trampoline.
8321 * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
8323 (mono_arch_patch_code): Add some debug code to help track down similar failures in the
8326 2006-09-03 Zoltan Varga <vargaz@gmail.com>
8328 * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
8330 2006-09-02 Zoltan Varga <vargaz@gmail.com>
8332 * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
8333 stats.method_trampolines, it is already done by the generic trampoline code.
8335 * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
8337 2006-09-01 Zoltan Varga <vargaz@gmail.com>
8339 * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
8341 * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
8343 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
8345 * mini.c (print_jit_stats): Print mscorlib mempool size too.
8347 * mini.c (print_jit_stats): Print new stats.
8349 * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8351 2006-08-31 Zoltan Varga <vargaz@gmail.com>
8353 * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
8354 Address on two dimensional arrays. Fixes #78729.
8356 * mini.h (MonoCompile): Add a 'skip_visibility' field.
8358 * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
8361 * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
8363 * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
8366 * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
8368 (mini_get_ldelema_ins): Ditto.
8370 2006-08-30 Zoltan Varga <vargaz@gmail.com>
8372 * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
8373 (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation.
8376 2006-08-29 Neale Ferguson <neale@sinenomine.net>
8378 * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
8379 mono_arch_get_patch_offset as a dummy entry point to allow successful link.
8381 * exceptions-s390x.c: Cosmetic change.
8383 * tramp-s390.c: Fix warning.
8385 * cpu-s390.md: Correct length of mul_imm.
8387 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
8389 * aot-compiler.c: added binary writer with ELF backend
8390 implementation (only on Linux/x86 for now).
8392 2006-08-18 Zoltan Varga <vargaz@gmail.com>
8394 * Makefile.am: Don't run net 2.0 AOT tests.
8396 * aot-compiler.c (compile_method): Skip methods with tail calls as well.
8397 (mono_compile_assembly): Skip net 2.0 assemblies as well.
8399 * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
8401 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8403 * aot-compiler.c: simplified and refactored the asm-writing code
8404 to allow different backends.
8406 2006-08-18 Zoltan Varga <vargaz@gmail.com>
8408 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8410 * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a
8411 little. Share patches of type TYPE_FROM_HANDLE as well.
8413 * mini.c (mono_patch_info_equal): New helper function.
8414 (mono_patch_info_hash): Ditto.
8416 * aot-compiler.c (emit_method_code): Fix s390 build.
8418 * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
8419 is not handled because it is stored as a flag and not as a type ctor. Fixes
8422 2006-08-17 Zoltan Varga <vargaz@gmail.com>
8424 * aot-compiler.c: Fix computation of GOT slot statistics.
8426 * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
8427 Also remove support for not PIC AOT.
8429 * mini.h: Bump AOT file format version.
8431 * objects.cs: Add a test for #78990.
8433 * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
8434 (peter.dettman@iinet.net.au). Fixes #79087.
8436 * basic-long.cs: Add a test for the above.
8438 2006-08-16 Zoltan Varga <vargaz@gmail.com>
8440 * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
8442 * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
8445 2006-08-15 Zoltan Varga <vargaz@gmail.com>
8447 * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
8450 2006-08-10 Jonathan Chambers <joncham@gmail.com>
8452 * mini.c: Don't verify COM proxy invoke calls
8455 2006-08-10 Dick Porter <dick@ximian.com>
8457 * wapihandles.c (mini_wapi_seminfo): More info, to help track down
8458 which process is holding semaphores locked.
8460 2006-08-08 Zoltan Varga <vargaz@gmail.com>
8462 * mini-ia64.c mini-amd64.c: Fix #79027.
8464 * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
8466 * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
8468 * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
8469 implicit arguments in a vararg call. Fixes #79027.
8471 2006-08-07 Zoltan Varga <vargaz@freemail.hu>
8473 * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
8474 (mono_get_array_new_va_signature): Ditto.
8476 2006-08-05 Zoltan Varga <vargaz@gmail.com>
8478 * aot-runtime.c: Call init_plt lazily.
8480 * inssel-long.brg: Fix unsigned long->int conversion.
8482 * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
8484 * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
8485 that most data is now in the .rss/.data section.
8487 2006-08-04 Zoltan Varga <vargaz@gmail.com>
8489 * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.
8491 * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
8493 * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
8495 * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
8497 * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
8498 virtual call. Fixes #79010.
8500 * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method
8501 and use the result as the this argument in the real call.
8503 * generics.2.cs: Add a new test for #79010.
8505 2006-08-03 Zoltan Varga <vargaz@gmail.com>
8507 * mini-x86.c: Fix a warning.
8509 * aot-compiler.c: Add a bunch of statistics.
8511 * mini.c (inline_method): Disable inlining in out-of-line bblocks.
8513 2006-08-02 Zoltan Varga <vargaz@gmail.com>
8515 * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
8517 2006-08-01 Zoltan Varga <vargaz@gmail.com>
8519 * 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>.
8521 2006-07-13 Miguel de Icaza <miguel@novell.com>
8523 * mini.c (mono_method_to_ir): Obtain the original method in the
8524 CIL stream and use this to perform validation.
8528 2006-07-19 Zoltan Varga <vargaz@gmail.com>
8530 * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
8531 (mono_arch_call_opcode): Ditto.
8533 * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
8536 * mini.c (mono_patch_info_dup_mp): New helper function.
8538 * aot-compiler.c (compile_method): Fix some of the memory allocated during
8539 compilation. Fixes #78827.
8541 2006-07-18 Kornél Pál <kornelpal@gmail.com>
8543 * declsec.c: Use original security informations for
8544 MONO_WRAPPER_MANAGED_TO_MANAGED.
8546 2006-07-15 Jonathan Chambers <joncham@gmail.com>
8548 * mini.c: Allow Com Interop methods/classes and
8549 don't verify COM wrapper calls
8552 2006-07-13 Zoltan Varga <vargaz@gmail.com>
8554 * inssel-long32.brg: Fix long->i4 checked conversion.
8556 * exceptions.cs: Add a test for the above.
8558 2006-07-08 Zoltan Varga <vargaz@gmail.com>
8560 * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
8562 * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown
8565 * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
8568 2006-07-03 Zoltan Varga <vargaz@gmail.com>
8570 * mini.c: Fix solaris/x86 exception handling.
8572 * Makefile.am: Get rid of $(ICU_LIBS).
8574 2006-07-02 Zoltan Varga <vargaz@gmail.com>
8576 * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
8577 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
8578 (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
8580 * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
8582 * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
8583 this function causes a SIGSEGV.
8585 2006-06-22 Zoltan Varga <vargaz@gmail.com>
8587 * mini.c: Remove unused solaris/x86 includes.
8589 2006-06-21 Zoltan Varga <vargaz@gmail.com>
8591 * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
8593 2006-06-20 Jb Evain <jbevain@gmail.com>
8595 * cpu-g4.md: fix max length of start_handler instruction.
8597 2006-06-20 Massimiliano Mantione <massi@ximian.com>
8598 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
8600 2006-06-16 Massimiliano Mantione <massi@ximian.com>
8601 * ssa.c: Fixed bug 78653 for SSA based deadce.
8602 * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
8603 MonoInst.flags, used in SSA based deadce.
8604 * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
8605 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
8607 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
8609 * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
8610 it can end up using non executable memory on ppc64 systems
8611 running ppc32 userspace (fix from Johannes Berg).
8613 2006-06-14 Dick Porter <dick@ximian.com>
8615 * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
8618 2006-06-13 Massimiliano Mantione <massi@ximian.com>
8619 * mini.c: Made so that inline is locally disabled if it would
8620 trigger a .cctor, because too many apps depend on this behavior
8621 (which seems to be also the one of the MS CLR).
8623 2006-06-13 Zoltan Varga <vargaz@gmail.com>
8625 * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
8626 No idea why this worked before.
8628 * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
8629 which branch to outer exception clauses since they could skip the
8630 inner finally clauses. Fixes #78633.
8632 * exceptions.cs: Add a test for the above.
8634 * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
8637 * iltests.il: Add a test for the above.
8639 2006-06-12 Zoltan Varga <vargaz@gmail.com>
8641 * mini.c (remove_block_if_useless): Do not remove the bblock immediately
8642 after the end of a try bblock, to prevent asserts in mini_method_compile ().
8644 * iltests.il: Add a test for the above.
8646 2006-06-10 Zoltan Varga <vargaz@gmail.com>
8648 * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
8650 * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
8651 methods as instrinsics.
8653 2006-06-09 Wade Berrier <wberrier@novell.com>
8655 * Makefile.am: Fix sources list for svn rename so that make dist succeeds
8656 (simple-cee-ops.h ssapre-mini-ops.h)
8658 2006-06-09 Neale Ferguson <neale@sinenomine.net>
8660 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
8661 * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
8663 * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
8664 * cpu-s390x.md: Fix max. length values for a couple of instructions.
8666 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
8668 * mini-exceptions.c: Minor fix for building mono in Visual Studio.
8670 2006-06-08 Massimiliano Mantione <massi@ximian.com>
8672 * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
8673 * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
8674 * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
8675 * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
8676 * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
8677 of opcodes, so that bug 78549 should not happen again.
8678 * ssapre.c: Updated to use the renamed files.
8680 2006-06-08 Zoltan Varga <vargaz@gmail.com>
8682 * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move
8683 in OP_ATOMIC_EXCHANGE_I4.
8685 2006-06-07 Wade Berrier <wberrier@novell.com>
8687 * tramp-s390.c: Fix s390 build (add missing pointer declarations
8688 in mono_debugger_create_notification_function)
8690 2006-06-06 Zoltan Varga <vargaz@gmail.com>
8692 * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
8694 * mini.c (type_from_stack_type): Disable some changes which do not
8697 * driver.c: Reenable opts.
8699 * mini.h (MonoStackSlot): New structure to keep track of the verification state
8700 of the evaluation stack.
8702 * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
8703 evaluation stack trace at entry to the bblock.
8705 * mini.c (merge_stacks): New function to perform verification of stack merges.
8706 Turned off by default.
8708 * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
8711 2006-06-06 Massimiliano Mantione <massi@ximian.com>
8713 * local-propagation.c: Fixed bug 78549.
8715 2006-06-04 Zoltan Varga <vargaz@gmail.com>
8717 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
8719 2006-06-02 Miguel de Icaza <miguel@novell.com>
8721 * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
8722 tramp-arm.c, tramp-ia64.c
8723 (mono_debugger_create_notification_function): Update signature to
8724 new signature and use new protocol for creating the notification
8727 Should fix the build.
8729 2006-06-02 Geoff Norton <gnorton@customerdna.com>
8731 * exceptions-ppc.c (mono_jit_walk_stack)
8732 (ves_icall_get_frame_info): Fix the build
8734 2006-06-02 Zoltan Varga <vargaz@gmail.com>
8736 * mini.c (mono_set_defaults): Fix the handling of -O=-all.
8738 2006-05-31 Raja R Harinath <rharinath@novell.com>
8740 * il2tests.2.il: New file for generics CIL tests. Add test for
8742 * Makefile.am: Update.
8745 * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
8748 2006-05-30 Massimiliano Mantione <massi@ximian.com>
8750 * aliasing.c: Fixed bug 78311.
8752 2006-05-29 Martin Baulig <martin@ximian.com>
8754 * mini-exceptions.c (mono_find_jit_info): When computing the
8755 native offset, check whether we're actually inside the method's
8756 code; call mono_debug_print_stack_frame() to format the frame.
8757 (ves_icall_System_Exception_get_trace): Call
8758 mono_debug_print_stack_frame() to format the stack frame.
8759 (ves_icall_get_trace): Update to the new debugging API.
8760 (mono_jit_walk_stack_from_ctx): Likewise.
8761 (ves_icall_get_frame_info): Likewise.
8763 * mini.c (get_method_from_ip): Use the new debugging API.
8764 (mono_print_method_from_ip): Likewise.
8767 (mono_jit_walk_stack): Use the new debugging API.
8768 (ves_icall_get_frame_info): Likewise.
8770 2006-05-27 Zoltan Varga <vargaz@gmail.com>
8772 * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
8774 2006-05-25 Massimiliano Mantione <massi@ximian.com>
8776 * mini.c: Added "limitator" to inline for debugging.
8778 2006-05-24 Martin Baulig <martin@ximian.com>
8780 * debug-debugger.c (mono_debugger_init): Create a private,
8781 malloc()-based code manager for the notification function and
8782 intentionally leak it on exit. This fixes the crash-on-exit race
8786 (mono_debugger_create_notification_function): Added
8787 `MonoCodeManager *' argument.
8790 (mono_debugger_create_notification_function): Added
8791 `MonoCodeManager *' argument.
8793 2006-05-23 Massimiliano Mantione <massi@ximian.com>
8795 * aliasing.c: Fixed 64 bit issue.
8796 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8797 default since all known bugs are fixed (one more time!).
8799 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8801 * mini.c: write barrier support.
8803 2006-05-23 Martin Baulig <martin@ximian.com>
8805 * debug-debugger.c: Revert Paolo's change. Add comment and #error
8806 check at the top of the file.
8808 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
8810 * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
8811 reverting changes without reason and without changelog entries.
8813 2006-05-18 Zoltan Varga <vargaz@gmail.com>
8815 * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
8816 to a few opcodes. Fixes #78439.
8818 * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
8819 consistency with other archs.
8821 * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
8823 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8825 * debug-debugger.c: fix the build.
8827 2006-05-17 Martin Baulig <martin@ximian.com>
8830 (debugger_thread_vtable): Moved here from ../metadata/threads.c.
8831 (debugger_init_threads): Formerly known as mono_debugger_init_threads().
8832 (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
8833 (debugger_attach): Call GC_mono_debugger_add_all_threads().
8835 2006-05-11 Zoltan Varga <vargaz@gmail.com>
8837 * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
8839 2006-05-10 Zoltan Varga <vargaz@gmail.com>
8841 * mini-x86.c (mono_arch_instrument_epilog): Fix handling of
8842 MONO_TYPE_GENERICINST.
8844 * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of
8845 MONO_TYPE_GENERICINST.
8847 2006-05-09 Zoltan Varga <vargaz@gmail.com>
8849 * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
8852 2006-05-08 Zoltan Varga <vargaz@gmail.com>
8854 * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
8856 (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
8858 2006-05-06 Zoltan Varga <vargaz@gmail.com>
8860 * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
8861 mono_trace_cleanup ().
8863 * iltests.il: Fix problem with the newly added test.
8865 * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
8866 due to register constraints, free up the previous hreg. Fixes #78314.
8868 * iltests.il: Add new test for #78314.
8870 * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
8871 Interlocked.Add. Fixes #78312.
8873 * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
8875 2006-05-05 Zoltan Varga <vargaz@gmail.com>
8877 * inssel.brg (mini_emit_virtual_call): Fix a warning.
8879 2006-05-05 Martin Baulig <martin@ximian.com>
8881 * debug-mini.c (mono_debug_open_block): New method.
8884 (mono_arch_output_basic_block): Call mono_debug_open_block() at
8885 the beginning of each basic block.
8888 (mono_arch_output_basic_block): Call mono_debug_open_block() at
8889 the beginning of each basic block.
8891 2006-05-04 Massimiliano Mantione <massi@ximian.com>
8893 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8894 default until I understand why they break the build on amd64.
8896 2006-05-04 Zoltan Varga <vargaz@gmail.com>
8898 * mini.c (mini_cleanup): Call mono_cleanup ().
8900 * mini.c (UNVERIFIED): New macro to make it easier to track down verification
8903 2006-05-04 Massimiliano Mantione <massi@ximian.com>
8905 * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
8906 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8907 default since all known bugs are fixed, and I cannot reproduce bug
8908 77944... I'm asking Matt Hargett to test again after this commit.
8910 2006-04-28 Massimiliano Mantione <massi@ximian.com>
8912 * mini-codegen.c: Fixed typo that thrashed inline.
8914 2006-04-28 Zoltan Varga <vargaz@gmail.com>
8916 * dominators.c (compute_dominators): Avoid using a worklist since
8917 it is not correct in some cases. Instead, iterate over all bblocks as
8918 in the original paper. Fixes --compile-all -O=all System.Xml.dll.
8920 2006-04-28 Miguel de Icaza <miguel@novell.com>
8922 * mini.c (mono_jit_compile_method_inner): Use
8923 mono_prepare_exception_from_error that resets the value
8926 2006-04-27 Miguel de Icaza <miguel@novell.com>
8928 * mini.c: Move the mini_loader_error_to_exception to metadata.
8930 2006-04-27 Massimiliano Mantione <massi@ximian.com>
8932 * aliasing.c: Fixed bug 78210.
8934 2006-04-27 Massimiliano Mantione <massi@ximian.com>
8936 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8937 default until all their problems (or the ones they trigger) are fixed.
8939 2006-04-26 Zoltan Varga <vargaz@gmail.com>
8941 * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
8943 * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
8944 as loaded only after resolving patches since that could invoke the same method.
8946 * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
8948 * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
8951 * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
8954 * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
8957 * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
8958 made from AOT code through the PLT table.
8960 * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
8961 holding the plt offset when a call is made to the aot plt trampoline.
8963 2006-04-25 Zoltan Varga <vargaz@gmail.com>
8965 * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the
8968 * Makefile.am (common_sources): Fix build breakage.
8970 * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
8971 calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
8972 intra-assembly calls if possible.
8974 * tramp-*.c: Add new functions for patching/nullifying PLT entries.
8976 * mini-trampolines.c: Handle PLT entries.
8978 * mini.c: Avoid creating a GOT var for calls.
8980 * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
8983 * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
8986 * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
8989 * mini.h: Bump AOT file format version.
8991 * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
8994 2006-04-25 Martin Baulig <martin@ximian.com>
8996 * driver.c: Disable copyprop, consprop and inline when running
8997 inside the debugger.
8999 2006-04-25 Martin Baulig <martin@ximian.com>
9001 * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
9002 with `get_current_thread' and added `detach'.
9003 (MonoDebuggerMetadataInfo): Added `thread_size',
9004 `thread_tid_offset', `thread_stack_ptr_offset' and
9005 `thread_end_stack_offset'.
9007 2006-04-25 Zoltan Varga <vargaz@gmail.com>
9009 * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and
9012 * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
9013 ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
9015 * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
9017 * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
9019 * aot.c: Add support for ADJUSTED_IID.
9021 2006-04-24 Zoltan Varga <vargaz@gmail.com>
9023 * aot.c (emit_method_order): Don't align method_order_end.
9025 * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
9026 the interface ID changes.
9028 2006-04-21 Dick Porter <dick@ximian.com>
9030 * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
9031 cleaning up a thread. Fixes the new part of bug 77470.
9033 2006-04-20 Geoff Norton <gnorton@customerdna.com>
9035 * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
9038 2006-04-19 Zoltan Varga <vargaz@gmail.com>
9040 * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
9042 * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
9043 SIGSEGV. Fixes #78072.
9045 * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
9046 unregister our SIGABRT handler.
9048 2006-04-19 Massimiliano Mantione <massi@ximian.com>
9050 * mini.c: Disabled inline where it can alter the call stack in a
9051 way visible from managed code.
9052 * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
9055 2006-04-16 Zoltan Varga <vargaz@gmail.com>
9057 * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
9058 on other platforms. Fixes #78089.
9060 2006-04-13 Martin Baulig <martin@ximian.com>
9062 * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
9063 determine whether we're inside the debugger.
9066 (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
9068 2006-04-12 Zoltan Varga <vargaz@gmail.com>
9070 * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
9071 handler clauses. Fixes #78024.
9073 * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
9074 in the CALL_MEMBASE opcodes. Fixes #78088.
9075 (mono_arch_get_vcall_slot_addr): Ditto.
9077 2006-04-10 Martin Baulig <martin@ximian.com>
9079 * debug-debugger.c: The thread handling code has now been moved
9080 into ../metadata/threads.c.
9082 2006-04-10 Zoltan Varga <vargaz@gmail.com>
9084 * driver.c (mono_main): Fix --with-gc=none build.
9086 * mini-codegen.c (mono_spillvar_offset): Improve alignment.
9087 (mono_spillvar_offset_float): Ditto.
9088 (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
9089 hreg, not when its !global, since on ia64, there is a third category: stacked
9092 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
9094 * mini.c: set MonoInst->klass for load field address and a few other
9097 2006-04-10 Zoltan Varga <vargaz@gmail.com>
9099 * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
9101 2006-04-07 Zoltan Varga <vargaz@gmail.com>
9103 * dominators.c (compute_dominators): Fix yet another bug which surfaced after
9104 the branch opt changes.
9106 2006-04-06 Dick Porter <dick@ximian.com>
9108 * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
9110 * wapihandles.c (mini_wapi_seminfo):
9111 * driver.c (mono_main): Add semaphore info option
9113 2006-04-05 Zoltan Varga <vargaz@gmail.com>
9115 * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
9116 branch optimization changes. Fixes #78009.
9118 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
9120 * mini.c: ignore accessibility of methods in managed->native wrappers.
9122 2006-04-04 Zoltan Varga <vargaz@gmail.com>
9124 * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
9126 * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
9128 2006-04-03 Zoltan Varga <vargaz@gmail.com>
9130 * mini.c: Modify the branch optimizations to preserve the invariant that
9131 the entries inside the in_bb and out_bb arrays are unique.
9132 (mono_unlink_bblock): Avoid creation of new arrays.
9134 2006-04-02 Zoltan Varga <vargaz@gmail.com>
9136 * mini.c (mono_unlink_bblock): Fix regression caused by previous
9139 2006-04-01 Zoltan Varga <vargaz@gmail.com>
9141 * mini.c (optimize_branches): Remove the "optimizations" in
9142 the cbranch1/cbranch2 -> branch cases which were causing several
9143 problems in the past. Fixes #77986.
9145 2006-03-31 Chris Toshok <toshok@ximian.com>
9147 * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
9148 default optimizations :(
9150 2006-03-31 Zoltan Varga <vargaz@gmail.com>
9152 * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
9155 2006-03-31 Massimiliano Mantione <massi@ximian.com>
9157 * local-propagation.c: Added comments to structs and removed
9158 "Mono" prefixes from local tree mover types.
9160 2006-03-30 Zoltan Varga <vargaz@gmail.com>
9162 * Makefile.am (arch_sources): Define this for each architecture so
9163 libmono_la_SOURCES is defined in one place.
9165 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
9167 * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
9170 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
9172 * driver.c: print the GC name supplied by configure.
9174 2006-03-29 Massimiliano Mantione <massi@ximian.com>
9176 * local-propagation.c: Added tree mover, and moved here all the
9177 local propagation code from mini.c
9178 * mini.c: Added support for treeprop, and moved all the local
9179 propagation code to local-propagation.c
9180 * mini.h: Added support for treeprop
9181 * driver.c: Added support for treeprop, enabled consprop, copyprop,
9182 treeprop, inline and deadce by default
9183 * Makefile.am: Added local-propagation.c
9185 2006-03-25 Zoltan Varga <vargaz@gmail.com>
9187 * exceptions-sparc.c: Applied patch from David S. Miller <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
9189 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
9191 * debug-debugger.c: make it compile without the Boehm GC.
9193 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9195 * mini.c: fixed issue with mismatch when an icall is registered
9196 with multiple names but same address.
9198 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9200 * declsec.c, mini-exceptions.c: use write barrier to set reference
9201 fields of managed objects.
9203 2006-03-19 Zoltan Varga <vargaz@gmail.com>
9205 * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
9206 (can_access_internals): Fix a warning.
9208 * mini.c (print_method_from_ip): Rename this to
9209 mono_print_method_from_ip so it gets exported.
9211 * trace.c: Deal with strings inside StringBuilder's containing garbage
9212 and fix memory leaks. Fixes #77848.
9214 2006-03-19 Zoltan Varga <vargaz@gmail.com>
9216 * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
9219 2006-03-16 Neale Ferguson <neale@sinenomine.net>
9221 * mini-s390.c: Remove OP_X86_TEST_NULL.
9223 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9225 * mini.c: use the correct GetHashCode() for the moving collector.
9227 2006-03-16 Massimiliano Mantione <massi@ximian.com>
9229 * liveness.c: Regalloc spill cost tuning.
9231 2006-03-15 Neale Ferguson <neale@sinenomine.net>
9233 * mini-s390x.h: Correct S390_LONG macro.
9235 * mini-s390x.c: Cleanup unused code.
9237 2006-03-15 Zoltan Varga <vargaz@gmail.com>
9239 * jit-icalls.h: New file.
9241 * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
9242 icalls and include that instead of including jit-icalls.c.
9244 * mini-ppc.c (mono_arch_output_basic_block): Remove references to
9247 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
9249 * mini.c: when checking for member accessibility, also check for
9250 friend assemblies and for explicit interface implementations.
9252 2006-03-14 Zoltan Varga <vargaz@gmail.com>
9254 * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
9256 * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
9258 * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9259 common cases are done first.
9261 * mini-ops.h: Only define platform specific opcodes on the given platform.
9263 * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
9266 2006-03-14 Martin Baulig <martin@ximian.com>
9268 Revert Paolo's change from r57348:
9270 * mini.h: don't use gboolean for bitfields.
9271 * mini.c: verifier changes for fields and methods accessibility.
9273 2006-03-13 Neale Ferguson <neale@sinenomine.net>
9275 * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
9277 * mini-s390x.c: Fix conv_r_un.
9279 * cpu-s390, cpu-s390x.md: Fix lengths.
9281 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
9283 * mini.c: nested types have access to all the nesting
9284 levels, not just the enclosing types.
9286 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9288 * mini.c: added a few more verification checks.
9290 2006-03-12 Zoltan Varga <vargaz@gmail.com>
9292 * liveness.c: Merge optimizations from the linear-il branch.
9294 2006-03-11 Zoltan Varga <vargaz@gmail.com>
9296 * mini-ia64.c (emit_call): Add a comment.
9298 * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
9300 * tramp-ia64.c: Fix some warnings.
9302 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
9304 * mini.h: don't use gboolean for bitfields.
9305 * mini.c: verifier changes for fields and methods accessibility.
9307 2006-03-11 Zoltan Varga <vargaz@gmail.com>
9309 * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
9310 lazy icall wrapper changes.
9312 * dominators.c: Replace all the dominator algorithms with faster
9313 ones from the linear-il branch.
9315 * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
9318 * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9319 common cases are done first.
9321 * mini-amd64.c: Fix some warnings.
9323 * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
9326 * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
9329 * mini.h: Add a missing prototype.
9331 2006-03-10 Zoltan Varga <vargaz@gmail.com>
9333 * mini.c: Compile icall wrappers lazily.
9335 * mini-codegen.c: Use printf instead of g_print since its much faster.
9337 * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
9340 * mini.c (optimize_branches): Cache the negative result from
9341 remove_block_if_useless ().
9343 * mini.c (optimize_branches): Avoid restarting the iteration after each change.
9344 Also fix some bblock linking issues.
9346 * helpers.c (mono_disassemble_code): Reduce the size of the temporary
9349 * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
9351 * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
9352 accessed fields first, for better cache behavior.
9354 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
9356 * mini.c: speedup IList<T> array accesses.
9358 2006-03-09 Zoltan Varga <vargaz@gmail.com>
9360 * mini.c (mono_method_to_ir): Handle large methods overflowing the
9361 inline_costs counter. Fixes #77190.
9363 2006-03-06 Zoltan Varga <vargaz@gmail.com>
9365 * mini-exceptions.c: Call mono_trace_is_enabled () before printing
9366 trace messages. Fixes #77706.
9368 2006-03-04 Martin Baulig <martin@ximian.com>
9370 * tramp-amd64.c, tramp-x86.c
9371 (mono_debugger_create_notification_function): Use
9372 mono_global_codeman_reserve() to allocate a buffer at runtime and
9375 * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
9377 * debug-debugger.c (mono_debugger_init): Dynamically allocate the
9378 notification function at runtime and then call `initialize' in the
9379 `MONO_DEBUGGER__debugger_info' vtable.
9381 2006-03-04 Zoltan Varga <vargaz@gmail.com>
9383 * iltests.il: Fix a visibility problem.
9385 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
9387 * driver.c, mini.c: add hooks for the counters API.
9389 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9391 * driver.c: show disabled options.
9393 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9395 * linear-scan.c: always use cost-driven selection.
9397 2006-02-28 Raja R Harinath <rharinath@novell.com>
9399 * jit-icalls.c (helper_compile_generic_method): Revert change from
9402 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
9404 * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
9406 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
9408 * inssel.brg: style fixes, mostly to force the updated monoburg
9409 to run for people using svn.
9411 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
9413 * mini.c: match monoburg changes.
9415 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9417 * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
9418 ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
9419 declaration in the header file.
9421 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
9423 * helpers.c: reduce relocations and mem usage.
9425 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
9427 * mini.h, mini-codegen.c: disable logging features if
9428 requested by configure.
9430 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
9432 * mini.c: tiny verifier changes.
9434 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9436 * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
9437 cpu-pentium.md: stack alignment changes for osx/x86,
9438 partially from Geoff Norton <gnorton@customerdna.com>.
9440 2006-02-24 Raja R Harinath <harinath@gmail.com>
9442 * jit-icalls.c (helper_compile_generic_method): Update to changes
9443 in metadata/class.c.
9445 2006-02-24 Zoltan Varga <vargaz@gmail.com>
9447 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
9449 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
9450 interface calls with large offsets.
9452 2006-02-23 Raja R Harinath <rharinath@novell.com>
9454 * jit-icalls.c (helper_compile_generic_method): Document the
9455 special-case we depend on so that we can inflate the method twice
9456 with the same context with no bad side-effects.
9458 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
9460 * mini-x86.c, mini-amd64.c: fix for case when xen support
9463 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
9465 * mini-x86.c, mini-amd64.c: generate code to access tls items
9466 in a faster way for Xen systems.
9468 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
9470 * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
9471 updates and compilation fixes for the OSX/x86 port, mostly from
9472 Geoff Norton <gnorton@customerdna.com>.
9474 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
9476 * inssel.brg: faster interface call implementation
9477 to sync with the interface_offsets MonoVTable changes.
9479 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9481 * mini.c: more verification checks.
9483 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
9485 * mini.c: added a few more verification checks.
9487 2006-02-17 Neale Ferguson <neale@sinenomine.net>
9489 * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
9490 facility on the processor and use it if available.
9492 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9494 * driver.c, aot.c, mini.c: throw exception if the IL code is
9495 invalid or unverifiable.
9497 2006-02-17 Raja R Harinath <rharinath@novell.com>
9499 * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
9502 2006-02-16 Zoltan Varga <vargaz@gmail.com>
9504 * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
9506 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9508 * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
9509 mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
9510 handling of instantiated generic valuetypes.
9512 2006-02-11 Zoltan Varga <vargaz@gmail.com>
9514 * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of
9515 MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
9518 * generics.2.cs: Revert the nullable reftypes tests.
9520 2006-02-10 Zoltan Varga <vargaz@gmail.com>
9522 * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
9523 using __builtin_frame_address (1) as it doesn't work in the presence
9524 of optimizations. Hopefully fixes #77273.
9526 * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
9527 -> generics.cs change as it doesn't work with some automake versions.
9529 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9531 * mini.c: handle systems that sue a different way to
9532 retrieve the stack address of the current thread.
9534 2006-02-09 Zoltan Varga <vargaz@gmail.com>
9536 * Makefile.am generics.2.cs: Rename this to generics.cs and handle
9537 it specially in the makefile.
9539 * generics.2.cs: Add tests for nullable reference types.
9541 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9543 * mini.c: always handle the case when mono_jit_init()
9544 is called in a thread different from the main thread,
9545 confusing libgc (bug #77309).
9547 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
9549 * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
9551 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9553 * mini.c: change optimize_branches () to use a single loop
9554 and introduce a new optimization to simplify some range checks.
9556 2006-02-03 Martin Baulig <martin@ximian.com>
9558 * debug-debugger.c (debugger_thread_manager_thread_created): Removed
9559 and merged with debugger_thread_manager_add_thread().
9560 (mono_debugger_main): Call debugger_thread_manager_add_thread() to
9561 inform the debugger about the main thread.
9563 2006-02-03 Zoltan Varga <vargaz@gmail.com>
9565 * basic.cs: Add test for div.un/rem.un constant folding.
9567 2006-02-03 Neale Ferguson <neale@sinenomine.net>
9569 * cpu-s390x.md: correct int_xor_imm length
9571 2006-02-03 Zoltan Varga <vargaz@gmail.com>
9573 * generics.2.cs: New test for #77442.
9575 * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
9578 2006-02-02 Martin Baulig <martin@ximian.com>
9580 * tramp-x86.c, tramp-amd64.c: It's now safe to #include
9581 <mono/metadata/mono-debug-debugger.h>
9583 * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
9585 2006-02-02 Martin Baulig <martin@ximian.com>
9587 * debug-debugger.h: New header file for debug-debugger.c.
9589 * debug-debugger.c: Big API cleanup; don't run the managed Main()
9590 function is a separate thread anymore; add support for attaching.
9592 2006-02-01 Zoltan Varga <vargaz@gmail.com>
9594 * tramp-x86.c: Fix a warning.
9596 2006-01-31 Zoltan Varga <vargaz@gmail.com>
9598 * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
9599 on very large methods.
9601 * aot.c (load_patch_info): Fix a warning.
9603 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
9605 * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
9606 mini-ops.h: alu membase optimizations.
9608 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
9610 * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
9611 to speedup StringBuilder.
9613 2006-01-27 Zoltan Varga <vargaz@gmail.com>
9615 * dominators.c (mono_compute_natural_loops): Fix detection of
9616 loop body start blocks.
9618 * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
9620 2006-01-26 Zoltan Varga <vargaz@gmail.com>
9622 * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
9625 2006-01-25 Massimiliano Mantione <massi@ximian.com>
9627 * aliasing.c: Fixed aliasing issue on 64 bit archs.
9629 2006-01-25 Martin Baulig <martin@ximian.com>
9631 * debug-debugger.c: Moved the `MonoDebuggerManager' and
9632 `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
9633 started to cleanup this file a little bit.
9635 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
9637 * mini.c: optimize a codepath frequently happening in generics code.
9639 2006-01-23 Martin Baulig <martin@ximian.com>
9641 * Makefile.am: Only compile debug-debugger.c on supported platforms.
9643 * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
9646 * driver.c: debug-debugger.c is only available if
9647 `MONO_DEBUGGER_SUPPORTED' is defined.
9649 2006-01-23 Martin Baulig <martin@ximian.com>
9651 * debug-debugger.c: Only enable this on platforms where the Mono
9652 Debugger is working (x86 and x86_64).
9654 2006-01-21 Martin Baulig <martin@ximian.com>
9656 The Mono Debugger is now using the normal `mono' instead of the
9657 `mono-debugger-mini-wrapper' when executing managed code.
9659 * debug-debugger.c: New file; previously known as
9660 debugger/wrapper/wrapper.c.
9662 * debug-mini.c (mono_init_debugger): Removed.
9664 * driver.c (mono_main): Added new `--inside-mdb' command line
9665 argument which is used when running inside the debugger.
9667 2006-01-20 Zoltan Varga <vargaz@gmail.com>
9669 * liveness.c (mono_analyze_liveness): Remove some unused data
9672 2006-01-17 Zoltan Varga <vargaz@gmail.com>
9674 * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
9676 2006-01-16 Zoltan Varga <vargaz@gmail.com>
9678 * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
9679 depends on implementation details of monobitset.
9681 * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
9684 2006-01-15 Zoltan Varga <vargaz@gmail.com>
9686 * liveness.c: Update after monobitset changes.
9688 2006-01-14 Zoltan Varga <vargaz@gmail.com>
9690 * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
9692 2006-01-11 Neale Ferguson <neale@sinenomine.net>
9694 * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
9696 * mini-s390x.c: Remove warning messages.
9698 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
9700 * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
9702 2006-01-10 Zoltan Varga <vargaz@gmail.com>
9704 * generics.2.cs: Add ldelem/stelem_any test.
9706 2006-01-10 Neale Ferguson <neale@sinenomine.net>
9708 * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
9710 2006-01-07 Zoltan Varga <vargaz@gmail.com>
9712 * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
9714 2006-01-06 Zoltan Varga <vargaz@gmail.com>
9716 * generics.2.cs: Reenable vtype tests.
9718 * inssel-x86.brg: Remove an icorrect valuetype rule.
9720 2006-01-06 Neale Ferguson <neale@sinenomine.net>
9722 * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
9723 initial support for OP_ABS.
9725 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9727 * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
9729 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9731 * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int
9732 conversion and implement LADD/LSUB.
9734 * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
9737 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9739 * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
9741 * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
9744 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9746 * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when
9747 localloc is encountered. Fixes crash in test-183.cs when using gmcs
9748 (stack walk problem).
9750 2006-01-04 Zoltan Varga <vargaz@gmail.com>
9752 * aot.c (mono_aot_load_method): Fix a warning.
9754 2006-01-03 Neale Ferguson <neale@sinenomine.net>
9756 * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
9758 2006-01-03 Zoltan Varga <vargaz@gmail.com>
9760 * iltests.il: Add test for #77148.
9762 * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
9765 2006-01-03 Neale Ferguson <neale@sinenomine.net>
9767 * mini-s390x.c, inssel-s390x.brg: Remove debug statements
9769 2006-01-03 Neale Ferguson <neale@sinenomine.net>
9771 * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
9772 cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
9774 * basic-long.cs: Add lconv-to-r4/r8 tests.
9776 2006-01-03 Zoltan Varga <vargaz@gmail.com>
9778 * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
9780 * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
9781 here as on other archs.
9783 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9785 * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
9787 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9789 * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
9791 * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
9793 * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
9794 instrument_prolog; Add memory_barrier instruction.
9796 2005-12-26 Zoltan Varga <vargaz@gmail.com>
9798 * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
9800 2005-12-23 Zoltan Varga <vargaz@gmail.com>
9802 * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
9804 * aliasing.c inssel.brg: Fix warnings.
9806 * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
9807 could skip initialization of some parts of memory.
9809 * mini.c mini-ia64.c: Fix warnings.
9811 * inssel-sparc.brg: Add an implementation of lneg which actually works.
9813 2005-12-22 Zoltan Varga <vargaz@gmail.com>
9815 * aliasing.c (mono_build_aliasing_information): Add a workaround for
9816 a crash seen on sparc.
9818 * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
9820 * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
9822 2005-12-21 Neale Ferguson <neale@sinenomine.net>
9824 * mini-ops.h: Add s390_backchain instruction
9826 * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
9828 * cpu-s390.md: Add s390_backchain instruction
9830 * mini-s390.c: Significant ABI changes
9832 * mini-s390.h: Cater for zero length structures
9834 2005-12-20 Neale Ferguson <neale@sinenomine.net>
9836 * mini-s390.c: ABI fixes
9838 * inssel-s390.brg: Remove debug statements
9840 * cpu-s390.md: Fix length of ATOMIC_xx operations
9842 2005-12-19 Zoltan Varga <vargaz@gmail.com>
9844 * basic-float.cs: Add float<->long conversion tests.
9846 2005-12-16 Neale Ferguson <neale@sinenomine.net>
9848 * mini-s390.c: Fix LOCALLOC processing.
9850 * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
9852 2005-12-15 Zoltan Varga <vargaz@gmail.com>
9854 * iltests.il: Add tests for some opcodes not covered by the other
9857 2005-12-15 Neale Ferguson <neale@sinenomine.net>
9859 * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct
9860 register loading for Tail processing; Correct trace output.
9862 * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
9864 * cpu-s390.md: Correct size of jmp instruction.
9866 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9868 * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
9870 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9872 * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
9873 Bring s390 up to current level.
9875 2005-12-12 Zltan Varga <vargaz@gmail.com>
9877 * generics.2.cs: Disable the newly added tests as they do not work yet.
9879 * generics.2.cs: Add valuetype tests.
9881 2005-12-09 Zoltan Varga <vargaz@gmail.com>
9883 * basic-long.cs: Add i4->u8 test.
9885 * objects.cs: Add tests for JIT intrinsic.
9887 * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
9888 optimizations lost by a mistake.
9890 2005-12-07 Zoltan Varga <vargaz@gmail.com>
9892 * basic-long.cs: Remove a test moved to objects.cs.
9894 * arrays.cs: Add more array tests.
9896 2005-12-06 Zoltan Varga <vargaz@gmail.com>
9898 * arrays.cs: Add new tests for multi-dimensional arrays.
9900 2005-12-06 Raja R Harinath <rharinath@novell.com>
9902 * Makefile.am (test_sources2): Add generics.2.cs.
9903 (EXTRA_DIST): Add test_sources2.
9905 2005-12-05 Ben Maurer <bmaurer@ximian.com>
9907 Support for boxing and unboxing nullable types as well as the
9908 isinst operation on nullables, per the CLI ammendment.
9910 * inssel.brg (CEE_ISINST): Special case for nullable
9912 * mini.c (handle_unbox_nullable): new method
9913 (handle_box): Special case for nullable types
9914 (mono_method_to_ir): Call handle_unbox_nullable in correct
9917 * generics.2.cs: New test suite
9919 * Makefile.am: Support for regression tests with generics.
9921 2005-12-03 Zoltan Varga <vargaz@gmail.com>
9923 * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
9924 allocated to registers. Fixes #76800.
9926 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
9928 * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
9930 2005-11-30 Zoltan Varga <vargaz@gmail.com>
9932 * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot
9935 2005-11-29 Zoltan Varga <vargaz@gmail.com>
9937 * objects.cs basic-calls.cs: Move a test depending on valuetypes to
9940 * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
9942 * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
9943 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
9945 * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
9946 single precision before storing to a single precision location.
9948 2005-11-28 Raja R Harinath <rharinath@novell.com>
9950 * Makefile.am (ILASM): Use profile-dependent location of ilasm.
9952 2005-11-27 Zoltan Varga <vargaz@gmail.com>
9954 * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
9957 * basic.cs: Remove test_0_byte_compares test which was moved to
9958 objects.cs a long time ago.
9960 2005-11-22 Massimiliano Mantione <massi@ximian.com>
9962 * aliasing.c: Fixed aliasing issue on 64 bit archs.
9964 2005-11-20 Zoltan Varga <vargaz@gmail.com>
9966 * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
9967 handlers are called.
9969 * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
9972 * mini-ia64.c: Add support for the throw->branch exception
9975 * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
9977 2005-11-18 Massimiliano Mantione <massi@ximian.com>
9979 * mini.c: Enabled "fastpath" deadce :-)
9981 2005-11-18 Massimiliano Mantione <massi@ximian.com>
9983 * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
9984 alias analysis pass to support it.
9987 * liveness.c: Likewise (liveness computation can use aliasing
9988 information to be more accurate).
9989 * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
9990 moreover made so that "--compile-all" uses the given optimization
9991 flags and not the default ones.
9992 * aliasing.c: Alias analysis (new file).
9993 * aliasing.h: Likewise.
9994 * Makefile.am: added "aliasing.c" and "aliasing.h".
9996 2005-11-17 Zoltan Varga <vargaz@gmail.com>
9998 * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
10001 2005-11-13 Zoltan Varga <vargaz@gmail.com>
10003 * mini-exceptions.c (mono_handle_exception_internal): Remove the
10004 fp >= end_of_stack exit condition, as it is not needed, and it might
10005 become true for fp eliminated frames.
10007 2005-11-11 Zoltan Varga <vargaz@gmail.com>
10009 * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
10012 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
10014 * mini-arm.c: fixed alignment of doubles/longs to match
10015 the C ABI (bug #76635).
10017 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
10019 * aot.c: fix compilation with --enable-minimal=aot.
10021 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
10023 * mini-arm.c: fixed compatibility with the new
10024 floating point emulator package for compares.
10026 2005-11-03 Atsushi Enomoto <atsushi@ximian.com?
10028 * mini.c : reverted sig->pinvoke changes (r51396-51397).
10030 2005-11-01 Zoltan Varga <vargaz@freemail.hu>
10032 * mini-exceptions.c (print_stack_frame): Output to stderr.
10033 (mono_handle_native_sigsegv): Ditto.
10035 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
10037 * mini-amd64.c (mono_arch_output_basic_block): Remove unused
10038 OP_LCONV_TO_OVF_I implementation.
10040 * mini-amd64.c: Add support for the throw->branch exception
10043 * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
10044 when the catch clause catches a more general exception, i.e. Object.
10046 2005-10-30 Zoltan Varga <vargaz@gmail.com>
10048 * cpu-ia64.md: Remove unused opcodes.
10050 * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
10051 specific defines for architectures defining USE_SIGACTION.
10053 * mini-ia64.c: Fix some warnings.
10055 * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
10056 version seemed to skip a frame.
10058 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
10060 * mini.c: Clean up the usage of sig->pinvoke flag. Now
10061 only calls which are made to native code use this flag.
10063 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
10065 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
10066 varargs methods as well.
10068 * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
10069 which have save_lmf set. Reorganize methods prologs a bit.
10071 * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
10072 debugger to the proper place.
10074 2005-10-29 Martin Baulig <martin@ximian.com>
10076 * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
10077 when running inside the debugger until the debugger has support
10080 2005-10-26 Zoltan Varga <vargaz@gmail.com>
10082 * mini.h: Fix a warning.
10084 2005-10-24 Miguel de Icaza <miguel@novell.com>
10086 * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
10087 we expose publicly, this returns the string.
10089 2005-10-22 Zoltan Varga <vargaz@freemail.hu>
10091 * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
10092 with fp elimination.
10094 2005-10-21 Zoltan Varga <vargaz@gmail.com>
10096 * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
10097 native stacktrace using the glibc 'backtrace' function if available.
10099 2005-10-20 Zoltan Varga <vargaz@gmail.com>
10101 * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
10103 * mini-exceptions.c (mono_handle_native_sigsegv): New function to
10104 handle SIGSEGVs received while in native code.
10106 * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
10107 code, call mono_handle_native_sigsegv which will abort the runtime
10108 after printing some diagnostics, instead of converting it into a
10109 confusing NullReferenceException.
10111 2005-10-18 Zoltan Varga <vargaz@gmail.com>
10113 * cpu-pentium.md: Remove unused opcodes.
10115 2005-10-18 Zoltan Varga <vargaz@freemail.hu>
10117 * mini-amd64.h (MonoLMF): Add rsp field.
10119 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
10122 2005-10-17 Zoltan Varga <vargaz@gmail.com>
10124 * mini-codegen.c (get_register_spilling): Fix some warnings.
10126 2005-10-16 Zoltan Varga <vargaz@freemail.hu>
10128 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
10129 elimination during exception handling. Enable fp elimination by
10132 * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
10135 2005-10-16 Martin Baulig <martin@ximian.com>
10137 * mini-exceptions.c
10138 (mono_debugger_run_finally): New public method for the debugger.
10140 2005-10-10 Zoltan Varga <vargaz@gmail.com>
10142 * debug-mini.c (mono_debug_init_method): Fix warning.
10144 * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
10145 the 'exname' parameter const to fix some warnings.
10147 2005-10-09 Zoltan Varga <vargaz@freemail.hu>
10149 * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
10150 introduced by the previous patch.
10152 2005-10-08 Zoltan Varga <vargaz@gmail.com>
10154 * basic-float.cs: Add test for precision of float arithmetic.
10156 * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
10157 when loading/storing single values from/to memory.
10159 * mini.c (mono_jit_compile_method_with_opt): Create the function
10160 pointers in the correct domain.
10162 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
10164 * mini-exceptions.c (mono_handle_exception_internal): Fix bug
10165 introduced by previous patch.
10167 * mini-exceptions.c (mono_handle_exception_internal): Handle the case
10168 when out_filter_idx is NULL.
10170 * mini-exceptions.c: Don't run filter clauses twice during exception
10171 handling. Fixes #75755.
10173 2005-10-07 Zoltan Varga <vargaz@gmail.com>
10175 * aot.c: Add support for ldflda wrappers.
10177 * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
10180 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
10182 * mini.c, mini.h: do not consider exception handlers blocks when
10183 setting up interface variables.
10185 2005-10-04 Zoltan Varga <vargaz@freemail.hu>
10187 * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
10189 2005-10-03 Zoltan Varga <vargaz@gmail.com>
10191 * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
10192 causes a regression.
10194 * mini.c (mini_thread_cleanup): Fix reading of freed memory.
10196 2005-10-02 Zoltan Varga <vargaz@freemail.hu>
10198 * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
10199 of the OP_P definitions.
10201 * TODO: Add a proposal for dealing with the CEE/OP mess.
10203 * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm
10204 optimizations from the x86 port.
10206 * cpu-amd64.md: Ditto.
10208 * basic.cs basic-long.cs: Add tests.
10210 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
10212 * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
10213 Patrik Torstensson's implementation of my exception-handling
10214 optimization idea, when the exception object is not used
10217 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
10219 * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
10220 of the mul_imm optimizations from the old jit.
10222 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
10224 * mini.c, liveness.c: patch by Patrik Torstensson and
10225 Zoltan Varga to improve performance in methods with
10228 2005-09-30 Zoltan Varga <vargaz@gmail.com>
10230 * driver.c: Remove 'Globalization' entry from --version.
10232 2005-09-28 Zoltan Varga <vargaz@gmail.com>
10234 * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
10235 there is a profiler interested in JIT events.
10237 * aot.c: Load profile files produced by the AOT profiling module, and
10238 reorder methods based on the profiling info. Add a 'method_order' table
10239 to the AOT file to make mono_aot_find_jit_info work with the reordered
10242 * mini.h: Bump AOT file version info.
10244 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
10246 * mini-arm.h: work around what looks like a gcc bug when optimizations
10249 2005-09-28 Raja R Harinath <rharinath@novell.com>
10251 * Makefile.am (AM_CFLAGS): Don't use += to append inside
10252 conditionals. Use ...
10253 (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
10255 2005-09-27 Zoltan Varga <vargaz@freemail.hu>
10257 * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
10258 to determine the amount of memory to copy when passing valuetypes.
10260 * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
10261 4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
10263 2005-09-27 Zoltan Varga <vargaz@gmail.com>
10265 * mini.h mini.c aot.c: Add infrastructure to collect pagefault
10266 information about aot.
10268 2005-09-27 Ben Maurer <bmaurer@ximian.com>
10270 * *.c: Replace the use of {Enter,Leave}CriticalSection with
10271 macros. This will allow a deadlock debugger to easily be plugged
10274 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
10276 * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
10278 2005-09-27 Raja R Harinath <rharinath@novell.com>
10280 * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
10281 (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
10282 (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
10283 ($(arch_built)) [CROSS_COMPILING]: Error out.
10285 2005-09-26 Zoltan Varga <vargaz@gmail.com>
10287 * aot.c: Add support for the no_special_static flag for classes.
10289 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
10291 * Reapply reverted patches.
10293 * *: Revert r50174 as well.
10295 * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
10297 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
10299 * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
10301 2005-09-23 Miguel de Icaza <miguel@novell.com>
10303 * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
10304 part of the SIG_HANDLER_SIGNATURE.
10306 2005-09-23 Zoltan Varga <vargaz@gmail.com>
10308 * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
10311 * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention
10312 introduced by previous patch.
10314 2005-09-21 Zoltan Varga <vargaz@gmail.com>
10316 * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
10317 saved registers too.
10319 * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based
10320 upon the information returned by get_call_info ().
10322 * mini-x86.c (add_float): Fix stack size calculation.
10323 (mono_arch_call_opcode): Rewrite this so it works based up the
10324 information returned by get_call_info ().
10325 (mono_arch_get_this_vret_args): Ditto.
10327 2005-09-21 Zoltan Varga <vargaz@freemail.hu>
10329 * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
10330 in cinfo to determine the registers which need to be used.
10332 2005-09-20 Miguel de Icaza <miguel@novell.com>
10334 * driver.c (mono_main): Add --server and --desktop flags.
10336 2005-09-16 Zoltan Varga <vargaz@gmail.com>
10338 * mini-ia64.h: Make register masks 64 bit. Don't treat argument
10339 registers as global registers.
10341 * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no
10342 longer needed with the new register allocator.
10344 * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
10346 * cpu-ia64.md: Remove unused opcodes.
10348 * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
10350 2005-09-16 Zoltan Varga <vargaz@freemail.hu>
10352 * cpu-amd64.md: Remove unused opcodes.
10354 * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
10355 needed with the new register allocator.
10357 * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
10360 2005-09-16 Raja R Harinath <rharinath@novell.com>
10362 * Makefile.am (check-local): Don't invoke semdel-wrapper.
10364 2005-09-16 Martin Baulig <martin@ximian.com>
10366 * exceptions-amd64.c
10367 (throw_exception): Don't call mono_debugger_throw_exception() if
10368 we're a rethrow - see the FIXME in the code.
10370 2005-09-15 Geoff Norton <gnorton@customerdna.com>
10372 * mini.c (mono_init_exceptions): This only works on some architectures.
10374 2005-09-15 Zoltan Varga <vargaz@gmail.com>
10376 * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
10379 * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
10381 * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
10382 now in mini-exceptions.c.
10384 2005-09-15 Zoltan Varga <vargaz@freemail.hu>
10386 * mini-amd64.h mini-am64.c: Remove the altstack support code which is
10387 now in mini-exceptions.c.
10389 2005-09-15 Zoltan Varga <vargaz@gmail.com>
10391 * exceptions-x86.c: Applied patch from Patrik Torstensson
10392 <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
10394 * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
10395 code into mini-exceptions.c. Add some assertions to it.
10397 2005-09-12 Zoltan Varga <vargaz@gmail.com>
10399 * aot.c (emit_section_change): Applied patch from "The Software Team"
10400 (<software@solmersa.com>). Fix as errors on windows.
10402 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
10404 * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
10405 method info into the LMF.
10407 2005-09-11 Zoltan Varga <vargaz@gmail.com>
10409 * mini-ia64.c: Add proper unwind info for method epilogs.
10411 * exceptions-ia64.c: Add some code to help debugging.
10413 * mini-ia64.c mini-ia64.h: Add sigaltstack support.
10415 * mini-exceptions.c: Fix warning.
10417 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
10419 * mini.c: Really fix build.
10421 * mini-x86.c mini-amd64.c: Fix build.
10423 2005-09-11 Zoltan Varga <vargaz@gmail.com>
10425 * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
10427 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
10428 some Interlocked methods as intrinsics.
10430 * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
10431 for Thread methods as well.
10433 * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
10435 * inssel.brg: Add rule for OP_MEMORY_BARRIER.
10437 * mini-ia64.c mini-x86.c mini-amd64.c
10438 cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of
10441 * mini.c (mono_init_exceptions): Fix build breakage.
10443 2005-09-10 Zoltan Varga <vargaz@gmail.com>
10445 * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
10446 of instructions. Use the new ia64_unw_op macros for emitting unwind
10449 * mini.c (mono_init_exceptions): Initialize exception handling
10450 related trampolines at startup.
10452 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
10454 * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
10456 2005-09-09 Zoltan Varga <vargaz@gmail.com>
10458 * mini.c: Handle type loading errors gracefully during compilation and
10459 throw the appropriate exception.
10461 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
10463 * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
10464 for the mono binary.
10466 2005-09-09 Martin Baulig <martin@ximian.com>
10468 * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
10471 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
10473 * mini-arm.h: use emulation for conv.r.un for the release.
10475 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
10477 * mini-arm.c, objects.cs: more fixes and tests for them.
10479 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
10481 * mini-arm.c: align structures to at least 4 bytes to be able
10482 to keep our current optimized memcpy.
10484 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
10486 * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
10488 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10490 * mini.c: ignore SIGPIPE.
10492 2005-09-04 Zoltan Varga <vargaz@gmail.com>
10494 * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
10496 * mini-ia64.h mini-ia64.c: Add some minor optimizations.
10498 2005-09-02 Zoltan Varga <vargaz@gmail.com>
10500 * mini.h: Add prototype for mono_allocate_stack_slots_full.
10502 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
10504 * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
10505 exception handling support.
10506 * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
10507 patch by Brian Koropoff <briank@marakicorp.com>).
10509 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
10511 * mini.c: revert another 'optimization' which breaks when
10512 items on the eval stack need to be saved at a basic block end
10515 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10517 * jit-icalls.c: for arrays, ensure we always provide
10520 2005-08-30 Zoltan Varga <vargaz@gmail.com>
10522 * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
10524 * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
10526 2005-08-29 Zoltan Varga <vargaz@gmail.com>
10528 * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
10529 arguments in their original register.
10531 2005-08-28 Zoltan Varga <vargaz@gmail.com>
10533 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
10536 * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
10537 when ssapre is enabled.
10539 * inssel-long.brg: Fix bug in previous patch.
10541 * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize
10542 multiplication by a constant.
10544 2005-08-27 Zoltan Varga <vargaz@gmail.com>
10546 * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
10549 * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
10552 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
10554 * inssel-arm.brg: apply changes tested by Brian Koropoff
10555 <briank@marakicorp.com>.
10557 2005-08-25 Zoltan Varga <vargaz@gmail.com>
10559 * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
10561 2005-08-24 Zoltan Varga <vargaz@gmail.com>
10563 * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
10564 to the same register if dreg is just a base register.
10565 (print_ins): Improve printing of membase opcodes.
10567 * inssel-x86.brg: Add optimized ldind(reg) rules.
10569 * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
10571 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
10573 * mini.c: when running under valgrind, set the stack bottom for
10574 the GC at the actual approximate stack for the app (fixes running
10575 mono with valgrind).
10577 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
10579 * mini.c: do no break at the first valuetype to init found
10580 (fixes bug #75791).
10582 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
10584 * cpu-arm.md, mini-arm.c: more fixes and LMF support.
10586 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
10588 * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
10590 2005-08-23 Zoltan Varga <vargaz@freemail.hu>
10592 * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
10594 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
10596 * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
10598 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
10601 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
10604 * mini.c (optimize_branches): Don't quit after 1000 iterations on large
10607 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
10609 * tramp-arm.c: allocate less memory for the trampoline and fix typo.
10611 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
10613 * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
10614 in the tail recursion optimization.
10616 * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as
10617 debug info into the assembly file.
10619 * iltests.il: Add test for filter regions.
10621 * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
10622 initial stack of filter regions. Fixes #75755.
10624 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
10626 * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
10627 stack requirements.
10629 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
10631 * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
10632 the check for an already compiled method on non-ia64 platforms.
10633 (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
10636 * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
10638 * inssel-x86.brg: Add some optimized call rules.
10640 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
10642 * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
10645 * mini.h mini-trampolines.c: Pass the trampoline argument to
10646 mono_arch_patch_delegate_trampoline.
10648 * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
10650 * mini-trampolines.c: Fix build.
10652 * mini-amd64.h: Add delegate trampolines.
10654 * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
10656 * inssel-amd64.brg: Add optimized call rules.
10658 * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
10660 * inssel-ia64.brg: Add optimized ldind(reg) rules.
10662 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
10664 * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
10667 * mini-ia64.c: Remove LMF fixmes.
10669 * mini-ia64.h: Remove most fields from LMF.
10671 * inssel-ia64.brg (stmt): Fix unaligned access errors.
10673 * mini-trampolines.c: Add support for IA64 function descriptors.
10675 * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
10676 for IA64 function descriptors.
10678 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
10680 * tramp-arm.c: patch the vtable for virtual calls. Added
10681 support code to register/unregister the LMF.
10682 * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
10685 2005-08-19 Dick Porter <dick@ximian.com>
10687 * mini.c: Use a gsize to store the thread ID, so it can hold a 64
10688 bit value if needed.
10690 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
10692 * mini.c (mini_get_method): Move handling of wrapper data here.
10694 * mini.c (mono_method_to_ir): Add support for dynamic methods.
10696 * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
10699 * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so
10700 bblock->code does not remain empty.
10702 2005-08-17 Zoltan Varga <vargaz@freemail.hu>
10704 * arrays.cs: Add regression test for #75832.
10706 * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
10707 rules. Fixes #75832.
10709 * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
10710 instruction scheduling.
10712 2005-08-12 Zoltan Varga <vargaz@freemail.hu>
10714 * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
10716 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
10718 * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
10720 * mini-codegen.c: Fix VC build.
10722 * cpu-pentium.md: Increase length of atomic_exhange_i4.
10724 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10726 * mini.h: fix signature for mono_register_opcode_emulation.
10728 2005-08-09 Zoltan Varga <vargaz@freemail.hu>
10730 * mini.c: Get rid of most of the helper_sig_... constants using
10731 mono_create_icall_signature ().
10733 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
10735 * jit-icalls.c (helper_ldstr): New helper function.
10737 * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
10739 * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
10740 throw, load the string using a helper call instead of creating a string object.
10742 * aot.c: Update after LDSTR changes.
10744 * mini.h: Bump AOT file version.
10746 * aot.c: Save class size info into the AOT file. Print more statistics during
10749 * mini.h: Bump AOT file version.
10751 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
10752 ordering of disasm cases. Fixes #74957.
10754 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
10756 * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
10757 jit-icalls.c, mini-codegen.c, Makefile.am: changes in
10758 the generic code needed for the ARM port.
10760 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
10762 * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
10763 inssel-arm.brg: more ARM features and fixes.
10765 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
10767 * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
10768 ARM port work in progress.
10770 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
10772 * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
10774 * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
10776 * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
10778 * inssel.brg (mini_emit_memset): Add support for unaligned access.
10780 * *-ia64.*: Ongoing IA64 work.
10782 * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
10784 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
10786 * TODO: Remove out-of-data todo stuff.
10788 * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
10791 * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
10793 * mini.h: Bump corlib version.
10795 2005-07-27 Martin Baulig <martin@ximian.com>
10798 (create_copy_ins): Added `const unsigned char *ip' argument; set
10799 `copy->cil_code' from it.
10801 2005-07-27 Martin Baulig <martin@ximian.com>
10803 * mini-exceptions.c (mono_handle_exception): Don't call
10804 mono_debugger_handle_exception() for filters.
10806 2005-07-27 Zoltan Varga <vargaz@freemail.hu>
10808 * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
10811 2005-07-26 Martin Baulig <martin@ximian.com>
10813 Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
10815 * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
10816 helper_compile_generic_method() if the method is actually virtual
10819 2005-07-26 Martin Baulig <martin@ximian.com>
10822 (trampoline_code): Renamed to `mono_trampoline_code' and made it
10823 public; this is now accessed directly by the debugger.
10824 (mono_generic_trampoline_code): Removed.
10827 (mono_debug_init_method): Also add interncalls and wrappers.
10829 2005-07-23 Zoltan Varga <vargaz@freemail.hu>
10831 * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
10833 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
10835 * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
10837 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
10839 * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
10841 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
10843 * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
10844 getting TLS offsets on AMD64 too.
10846 2005-07-20 Kornél Pál <kornelpal@hotmail.com>
10848 * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
10850 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
10852 * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
10853 inssel-arm.brg, mini-arm.h: ARM port work in progress.
10855 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
10857 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
10859 * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
10862 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call
10863 mono_sparc_is_virtual_call ().
10865 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
10867 * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
10868 trampoline parameters.
10870 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
10872 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
10873 to mono_arch_get_vcall_slot_addr.
10875 * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
10878 * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
10880 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
10882 * mini-ia64.h mini-ia64.c: Finish pinvoke support.
10884 2005-07-19 Martin Baulig <martin@ximian.com>
10886 * exceptions-amd64.c (throw_exception): Call
10887 mono_debugger_throw_exception() here like we're doing it on i386.
10889 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
10891 * mini-ia64.c: Add optimized TLS access support.
10893 2005-07-18 Zoltan Varga <vargaz@freemail.hu>
10895 * mini-exceptions.c: Ongoing IA64 work.
10897 * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
10899 * mini.c: Use the default optimization set when embedding. Fixes
10902 2005-07-11 Zoltan Varga <vargaz@freemail.hu>
10904 * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts
10905 of trampolines to a separate file.
10907 * mini-trampolines.c: New file.
10909 * mini.h tramp-x86.c: Move arch independent parts of trampolines to a
10912 * tramp-x86.c: Reorganize the trampoline code to be similar to the
10915 * mini-codegen.c: Fix cygwin build.
10917 2005-07-10 Zoltan Varga <vargaz@freemail.hu>
10919 * mini.c: Add some minor changes needed by the IA64 port.
10921 * *-ia64.*: Ongoing IA64 work.
10923 2005-07-09 Zoltan Varga <vargaz@freemail.hu>
10925 * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split
10926 trampolines into arch-independent and arch-dependent parts.
10928 * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
10930 2005-07-08 Zoltan Varga <vargaz@freemail.hu>
10932 * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
10934 * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
10935 the xp-regalloc-branch for amd64.
10937 * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
10938 xp-regalloc-branch for x86.
10940 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
10942 * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
10944 2005-07-06 Martin Baulig <martin@ximian.com>
10947 (mono_jit_compile_method_inner): Call mono_get_inflated_method().
10948 (mono_jit_runtime_invoke): Likewise.
10950 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
10952 * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
10955 * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
10956 without loading their metadata. Reorganize the file format so exception handling+
10957 debug info is kept separate from normal method info. Create MonoJitInfo
10958 structures for methods lazily.
10960 * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
10962 (x86_class_init_trampoline): Patch AOT class init trampolines too.
10964 * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
10966 * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
10969 * mini.h: Bump AOT file version.
10971 2005-07-04 Zoltan Varga <vargaz@freemail.hu>
10973 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10975 2005-07-01 Raja R Harinath <rharinath@novell.com>
10977 * Makefile.am (check-local): Call semdel-wrapper.
10979 2005-06-29 Zoltan Varga <vargaz@freemail.hu>
10981 * mini-x86.c: Revert the last change as it seems to break the build..
10983 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
10985 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10987 * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
10989 2005-06-27 Ben Maurer <bmaurer@ximian.com>
10991 * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
10992 outside of the macro, so strange stuff doesn't happen with gcc4
10993 (NEW_AOTCONST_TOKEN): Likewise.
10995 2005-06-28 Martin Baulig <martin@ximian.com>
10997 * mini.c (mini_class_is_system_array): New static method; use this
10998 instead of `klass->parent == mono_defaults.array_class' everywhere
10999 since this also works for the new generic array class.
11001 2005-06-26 Ben Maurer <bmaurer@ximian.com>
11003 * inssel.brg: Remove warnings.
11005 2005-06-24 Zoltan Varga <vargaz@freemail.hu>
11007 * mini-ia64.c: Ongoing IA64 work.
11009 * basic-float.cs: Add float->i1 conversion test.
11011 * iltests.il: Add conv.u4 test.
11013 2005-06-23 Zoltan Varga <vargaz@freemail.hu>
11015 * inssel-long.brg: Fix bug caused by last change.
11017 2005-06-23 Geoff Norton <gnorton@customerdna.com>
11019 * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other
11020 BSDs. Allows the x86 JIT to work on OSX86
11022 2005-06-22 Zoltan Varga <vargaz@freemail.hu>
11024 * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
11027 * mini-ia64.c: Ongoing IA64 work.
11029 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
11031 * mini-ia64.c: Ongoing IA64 work.
11033 * driver.c: Clean up jit_code_hash as well when using --regression.
11035 * inssel-long.brg: Fix long->i4/u4 conversion rules.
11037 * basic-long.cs: Add tests for long->u4 conversion.
11039 2005-06-18 Ben Maurer <bmaurer@ximian.com>
11041 * mini.c: Take mono_get_domainvar out of macros. This makes sure
11042 that we do not depend on undefined C behavior: the order stuff
11043 gets evaluated within an expression. Fixes mono when compiled on
11046 2005-06-18 Zoltan Varga <vargaz@freemail.hu>
11048 * *-ia64.*: Ongoing IA64 work.
11050 * aot.c: Lower memory usage while loading AOT methods.
11052 * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
11054 * mini.h: Bump AOT file format version.
11056 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
11058 * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
11060 2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
11062 * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
11063 not on callee assembly). Fixed some comments.
11065 2005-06-16 Zoltan Varga <vargaz@freemail.hu>
11067 * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
11068 it gets proper disassembly.
11069 (emit_method_info): Remove some dead code.
11071 * mini.c (mini_method_compile): Allways allocate the GOT var in
11072 mono_method_to_ir for emulating opcodes.
11074 2005-06-13 Zoltan Varga <vargaz@freemail.hu>
11076 * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
11077 before freeing the code memory. Fixes #74990.
11079 * objects.cs: Add regression test for #74992.
11081 * liveness.c: Extend live ranges of arguments to the beginning of the
11082 method. Fixes #74992.
11084 * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
11085 so it points into the faulting instruction.
11087 2005-06-12 Zoltan Varga <vargaz@freemail.hu>
11089 * jit-icalls.c (mono_imul_ovf): Add exception handling.
11091 * *-ia64.*: Ongoing IA64 work.
11093 * mini.c (mini_init): Fix signature of mono_delegate_ctor.
11095 2005-06-11 Zoltan Varga <vargaz@freemail.hu>
11097 * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
11099 * *-ia64.*: Ongoing IA64 work.
11101 2005-06-10 Zoltan Varga <vargaz@freemail.hu>
11103 * basic-long.cs: Add tests for add/sub.ovf.
11105 * basic.cs: Add tests for sub.ovf.
11107 * *-ia64.*: Ongoing IA64 work.
11109 2005-06-09 Zoltan Varga <vargaz@freemail.hu>
11111 * *-ia64.*: Ongoing IA64 work.
11113 * basic.cs: Add conv.ovf.i4.un test.
11115 2005-06-09 Massimiliano Mantione <massi@ximian.com>
11117 * mini.c: (remove_block_if_useless) Fixed bug 75061.
11119 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11121 * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
11123 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
11125 * *-ia64.*: Ongoing IA64 work.
11127 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11130 * mini.c: added the ability to toggle trace on/off using SIGUSR2.
11132 2005-06-04 Zoltan Varga <vargaz@freemail.hu>
11134 * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
11136 2005-06-03 Zoltan Varga <vargaz@freemail.hu>
11138 * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
11140 * mini-amd64.c (amd64_patch): Add an assert to check that the destination
11141 of a call is callable by a near call.
11143 2005-05-31 Zoltan Varga <vargaz@freemail.hu>
11145 * mini-ia64.c: Ongoing IA64 work.
11147 2005-05-29 Zoltan Varga <vargaz@freemail.hu>
11149 * genmdesc.c: Make the generated array non-static.
11151 * inssel-long.brg: Fix LSHR_IMM rule.
11153 * *-ia64.*: Ongoing IA64 work.
11155 * *-ia64.*: Ongoing IA64 work.
11157 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
11159 * *-ia64.*: Ongoing IA64 work.
11161 * *-ia64.*: Ongoing IA64 work.
11163 * mini-ia64.c: Ongoing IA64 work.
11165 * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
11167 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
11169 * objects.cs basic-calls.cs: Move some tests to objects.cs.
11171 * objects.cs basic-long.cs: Move some tests to objects.cs.
11173 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
11175 * *-ia64.*: Ongoing IA64 work.
11177 * iltests.il: Add a new test.
11179 * mini.c (mono_method_to_ir): Initialize valuetypes when created using
11180 newobj. Fixes #75042.
11182 2005-05-22 Zoltan Varga <vargaz@freemail.hu>
11184 * *-ia64.*: Ongoing IA64 work.
11186 * *-ia64.*: Ongoing IA64 work.
11188 * *-ia64.*: Ongoing IA64 work.
11190 * basic.cs objects.cs: Move tests accessing static variables as well.
11192 * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
11194 2005-05-21 Zoltan Varga <vargaz@freemail.hu>
11196 * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
11198 * driver.c: Always print failed tests.
11200 * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
11203 * *ia64*: Ongoing IA64 work.
11205 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
11207 * basic.cs: Add tests for add.ovf. Fix warnings.
11209 2005-05-18 Miguel de Icaza <miguel@novell.com>
11211 * driver.c (mono_main): Avoid crash if no argument is passed to
11212 --break; Do not use g_error, but f_printf. And fix all other
11213 ocurrences of the same crash.
11215 2005-05-17 Zoltan Varga <vargaz@freemail.hu>
11217 * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
11218 and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
11221 2005-05-14 Zoltan Varga <vargaz@freemail.hu>
11223 * *-ia64.*: Add beginnings of IA64 backend.
11225 * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.
11227 2005-05-13 Zoltan Varga <vargaz@freemail.hu>
11229 * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
11232 * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
11234 * mini-amd64.c: Fix a warning.
11236 2005-05-10 Zoltan Varga <vargaz@freemail.hu>
11238 * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
11239 in float_neg. Fixes #74897.
11241 * mini-amd64.c (emit_call): Fix another near call bug.
11243 2005-05-06 Sebastien Pouliot <sebastien@ximian.com>
11245 * declsec.c: Keep the appdomain information in the structure. Added a
11246 missing "return FALSE" for Unmanaged if FullTrust is set (or else the
11247 value gets overwritten).
11248 * declsec.h: Set the default MonoArray for the the stack to 6. Added
11249 an MonoAppDomain member to MonoSecurityFrame.
11250 * mini-exceptions.c: Do not use a glist to keep GC allocated objects
11251 used in the stack walk. Now use a MonoArray which grow (double) when
11254 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
11256 * mini.c: Re-enabled runtime cleanup, since running threads should
11257 now properly stop when exiting.
11259 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
11261 * mini-codegen.c: New file contaning the arch-independent local
11262 register allocator. Not used by any architectures yet.
11264 * mini.h linear-scan.c: Merge some changes from the
11265 mini-xp-local-regalloc branch.
11267 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
11269 * mini-amd64.c (emit_call): Fix calls to native functions when the
11270 runtime is compiled as a shared library. Fixes #74756.
11272 * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
11273 on a literal field. Fixes #74751.
11275 2005-04-25 Raja R Harinath <rharinath@novell.com>
11277 * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
11279 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
11281 * objects.cs: Add missing null casting test.
11283 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
11285 * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
11286 in wrapper methods. Also rename 'address' variable to 'offset'.
11288 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
11290 * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
11293 * Makefile.am (MCS): Use -unsafe instead of --unsafe.
11295 * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
11298 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
11300 * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
11302 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
11304 * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
11305 just the last bytes.
11307 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
11309 * aot.c (mono_compile_assembly): Fix warning.
11311 * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
11312 by the _MSC_VER stuff.
11314 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
11316 * inssel-long.brg: Fix #74588.
11318 * cpu-amd64.md: Fix #74591.
11320 * iltests.il: Add new regression tests.
11322 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
11324 * trace.c (mono_trace_enter_method): Print enums as an int, not as a
11327 2005-04-11 Zoltan Varga <vargaz@freemail.hu>
11329 * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
11331 * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches
11332 from Bill Middleton <flashdict@gmail.com>.
11334 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
11336 * arrays.cs: Add new regression test. Fix warnings.
11338 2005-04-09 Zoltan Varga <vargaz@freemail.hu>
11340 * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
11341 and leakage in CKFINITE.
11343 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
11344 this to a null op since it is called on amd64 too.
11346 * exceptions-amd64.c (get_throw_trampoline): Align stack.
11348 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
11349 body since this is not used on amd64.
11351 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
11353 * mini-amd64.c: Remove obsolete fixmes.
11355 * mini.c (print_method_from_ip): Fix debugging support.
11357 2005-2-1 Massimiliano Mantione <massi@ximian.com>
11359 * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
11360 so that expressions that don't give much gain are not reduced.
11361 * ssapre.h: Likewise.
11363 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
11365 * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
11367 * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
11369 * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
11371 2005-04-01 Zoltan Varga <vargaz@freemail.hu>
11373 * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
11375 * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
11377 2005-03-31 Zoltan Varga <vargaz@freemail.hu>
11379 * mini-x86.c: If sigaltstack support is enabled, perform win32 style
11382 * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
11384 * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
11386 * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
11388 * mini-x86.h mini-x86.c exceptions-x86.c: Add support for
11389 MONO_ARCH_USE_SIGACTION. Fixes #74252.
11391 * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
11393 * mini-x86.c: Fix up stack overflow handling.
11395 * exceptions.cs: Add new regression test.
11397 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
11399 * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
11400 mono_jit_thread_attach.
11402 * mini.c (mono_method_to_ir): Verify called method is not abstract.
11404 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
11406 * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
11407 avoid calling constructors using callvirt.
11409 * inssel.brg: Fix #74073.
11411 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
11413 * aot.c, mini.h: Added mono-compiler.h header to allow/ease
11414 compilation with non-GCC compilers.
11415 * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
11416 possible using VS.NET. Adapted from the work of J Lothian (for VC6).
11418 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
11420 * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
11421 klass->interface_offsets (will likely fix bug#74073).
11423 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
11425 * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
11427 2005-03-28 Zoltan Varga <vargaz@freemail.hu>
11429 * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
11430 to amd64_div_reg_size ().
11432 * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
11434 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
11436 * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
11438 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
11440 * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
11442 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
11444 * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
11446 * mini.c (mono_precompile_assembly): Load and precompile referenced
11447 assemblies as well. Fixes #74015.
11449 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
11451 * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
11453 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
11455 * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
11456 a lot of checks and (anyway) permissions cannot work until corlib is
11459 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
11461 * mini-ppc.c: fixed ABI issue on sysv/ppc.
11463 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
11465 * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
11466 calls (fixes bug#72824).
11468 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
11470 * mini.c: fix tail recursion elimination (see test in bug#73936).
11472 2005-03-21 Zoltan Varga <vargaz@freemail.hu>
11474 * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
11475 some fp functions in sse2 mode.
11477 2005-03-20 Zoltan Varga <vargaz@freemail.hu>
11479 * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
11481 2005-03-19 Zoltan Varga <vargaz@freemail.hu>
11483 * mini.h mini.c: Add mono_get_jit_tls_key ().
11485 * mini-x86.c: Enable fast TLS support on windows.
11487 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
11489 * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
11490 * mini.c: Check for p/invoke method when generating code. If a
11491 p/invoke method, or it's class, isn't decorated with [Suppress
11492 UnmanagedCodeSecurity] then generate code to call System.Security.
11493 UnmanagedDemand (only if the security manager is active).
11495 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
11497 * tramp-amd64.c (create_specific_trampoline): Revert parts of the
11498 last change as it seems to cause strange crashes.
11500 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11502 * *.c: handle unsafe function pointers where needed.
11504 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
11506 * mini.c (mono_jit_free_method): Remove the fixme too.
11508 2005-03-15 Miguel de Icaza <miguel@novell.com>
11510 * mini.c: As discussed, make the code actually free the delegate
11511 thunk now, to enable the debugging of delegate problems, use
11512 MONO_DEBUG=1 when running Mono.
11514 This takes also care of parts of the leaks as seen by Joe.
11516 2005-03-15 Zoltan Varga <vargaz@freemail.hu>
11518 * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable
11519 thread_tls_offset calculation.
11521 2005-03-14 Sebastien Pouliot <sebastien@ximian.com>
11523 * declsec.c: Reworked linkdemand checks for icall. The previous code
11524 was using the declaration code (untrusted) and didn't work as expected
11525 with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
11528 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
11530 * iltests.il: Add new localloc test.
11532 * mini-amd64.c: Handle large stack allocations the same way as on
11533 windows if stack overflow handling is working.
11535 * mini-amd64.c: Allocate the signal stack using mmap.
11537 * mini.c (sigsegv_signal_handler): Fix reading of context.
11539 * mini-exceptions.c: Fix up stack overflow handling.
11541 * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
11543 * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
11545 * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
11547 * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
11549 * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
11550 tramp_init functions as they are no longer needed.
11552 2005-03-12 Zoltan Varga <vargaz@freemail.hu>
11554 * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
11556 * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
11558 * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
11560 * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
11563 * mini-ops.h: Add OP_LMUL_IMM.
11565 * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
11566 long mul/div opcodes as intrinsic.
11568 * mini-amd64.c (emit_call): Handle the case when the callee might be
11571 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
11573 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
11576 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
11578 * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
11580 2005-03-09 Ben Maurer <bmaurer@ximian.com>
11582 * mini.c (mono_codegen): Don't leak here, to help people running
11585 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
11587 * mini-amd64.c (mono_arch_output_basic_block): Fix int->float
11588 conversions in sse2 mode.
11590 * basic-float.cs: Add regression test.
11592 * mini-amd64.c: Reenable sse2.
11594 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
11596 * mini-amd64.c: Disable sse2 until some regressions are fixed.
11598 2005-03-07 Joerg Rosenkranz <joergr@voelcker.com>
11600 * driver.c: Copyright text should include 2005.
11602 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
11604 * cpu-amd64.md (load_membase): Fix more max lengths.
11606 2005-03-06 Zoltan Varga <vargaz@freemail.hu>
11608 * cpu-amd64.md (load_membase): Fix max length.
11610 * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
11612 * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
11614 * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
11615 support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
11617 * basic-float.cs: Add rounding regression test.
11619 * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
11621 2005-03-04 Neale Ferguson <NealeFerguson@earthlink.net>
11623 * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
11624 structures in registers for pinvoke wrappers.
11626 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
11628 * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
11630 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
11632 * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
11633 wrapper to mono_jit_thread_attach.
11635 * mini.c (mini_jit_thread_attach): New jit icall.
11637 * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in
11638 native->managed wrappers.
11640 * exceptions.cs: Add new regression test.
11642 * mini.c (optimize_branches): Check regions in the cbranch to throw
11643 block case as well. Fixes #73242.
11645 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
11647 * mini.c: thread safety fixes.
11649 2005-02-27 Zoltan Varga <vargaz@freemail.hu>
11651 * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
11652 patching stuff, since delegates use jump trampolines so there is
11655 * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in
11658 * tramp-amd64.c: Fix build.
11660 * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
11661 it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
11663 * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
11664 Rename this to mono_arch....
11665 (mono_amd64_get_delegate_method_ptr_addr): Ditto.
11667 * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
11669 * mini-amd64.c (emit_call): If both the caller and the callee is
11670 guaranteed to have 32 bit addresses, emit a normal call.
11672 * tramp-amd64.c: Adapt to changes in mini-amd64.c.
11674 * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines.
11675 * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
11676 method_ptr inside delegates.
11678 2005-02-26 Zoltan Varga <vargaz@freemail.hu>
11680 * mini.c (mono_jit_free_method): Free the method info even if the native code is
11681 invalidated. Fixes #73001.
11683 * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
11685 * mini-x86.c: Only use stdcall for pinvokes on windows.
11687 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
11689 * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
11690 * mini-x86.c: remove unreliable __thread var offset detection,
11691 use the correct accessors and enable by default.
11693 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
11695 * mini.c (mono_jit_free_method): Fix memory leak.
11697 2005-02-22 Zoltan Varga <vargaz@freemail.hu>
11699 * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW.
11701 2005-02-21 Zoltan Varga <vargaz@freemail.hu>
11703 * cpu-amd64.md: Fix lengths of atomic opcodes.
11705 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
11707 * driver.c: try to not imply using ICU is any good.
11709 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
11711 * mini-amd64.c (mono_arch_get_inst_for_method): Implement more
11712 functions as inline ops.
11714 * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
11715 some Interlocked functions as inline ops.
11717 * mini.c (move_basic_block_to_end): Fix bug in last patch.
11719 * mini.h (MonoBasicBlock): Reorganize fields a bit.
11721 * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
11723 * mini.c: Add support for OP_NOT_TAKEN.
11725 * mini-amd64.h mini-amd64.c: Add support for passing/returning small
11726 structures in registers for pinvoke wrappers.
11728 * mini-amd64.c: Fix warnings.
11730 2005-02-19 Zoltan Varga <vargaz@freemail.hu>
11732 * mini.h (MonoCompile): Add 'ret_var_is_local' field.
11734 * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
11736 * mini.c (NEW_RETLOADA): If the ret variable is a local, use its
11737 address instead of loading the address from it.
11739 * mini-x86.c: Add support for returning small structs in registers
11740 on Win32. Fixes part of #70864.
11742 2005-02-18 Zoltan Varga <vargaz@freemail.hu>
11744 * trace.c (get_token): Improve error checking.
11746 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
11748 * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
11750 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
11752 * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
11753 it can be reused for MonoClass.
11754 * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
11757 2005-02-15 Sebastien Pouliot <sebastien@ximian.com>
11759 * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code
11760 instead of a MonoReflectionMethod. The method information wasn't used
11761 when displaying SecurityException details (but will be now).
11763 2005-02-15 Atsushi Enomoto <atsushi@ximian.com>
11765 * Makefile.am : windows build fix.
11767 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
11769 * iltests.il: Add new regression test.
11771 * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
11774 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
11776 * mini.c: Moved linkdemand check into helper function check_linkdemand
11777 to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP,
11780 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
11782 * declsec.c: Added statistics counter for different kinds of
11784 * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
11785 (and commented) declaration.
11786 * mini.c: Added statistics counter for security Demand code
11787 generation. Added display of security statistics.
11789 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
11791 * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
11792 Fix compilation errors under gcc-2.95.
11794 2005-02-12 Ben Maurer <bmaurer@ximian.com>
11796 * mini.c, driver.c: Use the new jit trampoline hashtable
11798 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11800 * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
11802 2005-02-11 Martin Baulig <martin@ximian.com>
11804 * debug-mini.c (mono_debug_close_method): Free the line number array.
11806 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
11808 * aot.c: Break up large methods into smaller ones. Share GOT slots for
11811 * mini.h: Bump AOT file format version.
11813 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
11815 * declsec.c: Added LinkDemand support and it's special cases for ECMA,
11817 * declsec.h: Added macros to get/set lazyly initialized security
11818 informations about assemblies. Added new enum for different type of
11819 possible LinkDemand violation. Added function to check LinkDemands.
11820 * mini.h: Added a field to MonoCompile to hold any security violation
11821 detected when JITting a method (so it can be thrown later).
11822 * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL
11823 and CEE_CALLVIRT. Added code to throw exception at the end of
11824 mini_method_compile (note: the exception is unhandled right now).
11826 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
11828 * mini.c, jit-icalls.c: use the managed implementation of
11829 memset for initobj and memset, to avoid managed <-> unmanaged
11832 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
11834 * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
11835 optimization if it would need a GOT var.
11837 * basic.cs: Add tests for constant propagation and switch statements.
11839 * ssa.c: Fix out-of-range constant propagation and switch statements.
11841 2005-02-09 <vargaz@freemail.hu>
11843 * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
11845 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
11847 * cpu-amd64.md (load_membase): Fix max length of load_membase.
11849 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11851 * mini.c: update to new signature of mono_class_get_allocation_ftn().
11853 2005-02-06 Neale Ferguson <NealeFerguson@earthlink.net>
11855 * cpu-s390.md, mini-s390.c: Correct bug with register usage on certain
11856 arithmetic operations.
11858 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
11860 * mini-ppc.c: add a workaround for broken user code that
11861 DllImports vararg functions with non-vararg signatures.
11863 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
11865 * mini.c (mono_jit_compile_method_inner): Add detection and a
11866 meaningfull error message for assemblies written in Managed C++.
11868 * tramp-amd64.c mini-amd64.h: Add support for
11869 create_trampoline_from_token ().
11871 * aot.c mini-x86.c abcremoval.c: Applied patch from
11872 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
11874 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
11876 * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline
11877 which takes a MonoImage/token as parameter instead of a MonoMethod.
11879 * aot.c: Use the new trampoline for initializing vtables.
11881 * aot.c: Add support for ldfld/stfld_remote wrappers.
11883 * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
11884 rules for compare <MEM>, IMM.
11886 * mini.h (MONO_AOT_FILE_VERSION): Bump it.
11888 * aot.c: Handle inherited finalizers correctly.
11890 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
11892 * inssel.brg (stmt): Add a missing _setup_... ().
11894 * aot.c: Save some parts of the class state to the AOT file and use it
11895 to recompute that state when a class is initialized.
11897 * mini.c: Install AOT hooks into the runtime.
11899 * mini.h: Bump AOT file format version.
11901 * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
11904 * iltests.il: Add new test.
11906 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
11908 * mini.c: fix typo.
11910 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
11912 * mini.c: setup the statistical profiler in the thread attach
11913 callback to cope with the new single thread code.
11915 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
11917 * mini-ppc.c: ensure we have enough room for the profiler
11918 calls (fixed bug#72084).
11920 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
11922 * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding
11925 2005-2-1 Massimiliano Mantione <massi@ximian.com>
11927 * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
11929 2005-2-1 Massimiliano Mantione <massi@ximian.com>
11931 * ssapre.c: Fixed an issue with down safety (this allows IronPython
11932 to succesfully execute parrotbench).
11933 * ssapre.h: Likewise.
11935 2005-2-1 Massimiliano Mantione <massi@ximian.com>
11937 * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
11938 variable for stores to method arguments (fixes a SSAPRE issue).
11940 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11942 * mini.c: handle value types in dup, fixes gen-112.cs.
11944 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
11946 * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
11947 sequence for calls in dynamic methods to avoid thunks.
11949 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
11951 * mini.c: correctly remove dynamic methods from the hashtable.
11953 2005-1-20 Massimiliano Mantione <massi@ximian.com>
11955 * driver.c: Disabled SSAPRE until fix the bug that appears
11956 in IronPython's parrotbench.
11958 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
11960 * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
11962 * mini.c (mono_method_to_ir): Revert the previous change.
11964 * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
11965 when AOT compiling.
11967 * tramp-x86.c (x86_magic_trampoline): Avoid calls to
11968 mono_jit_info_table_find () etc. when running under valgrind.
11970 * inssel.brg: Fix warnings.
11972 * mini-exceptions.c: Fix warnings.
11974 2005-01-31 Martin Baulig <martin@ximian.com>
11976 * driver.c (compile_all_methods_thread_main): Don't try to compile
11977 generic methods or anything which has type parameters.
11979 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
11981 * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
11983 * TestDriver.cs: Add --verbose flags.
11985 * graph.c ssa.c: Fix 64 bit warnings.
11987 * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c
11988 trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
11989 Fix 64 bit warnings.
11991 * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
11992 variable not spotted by gcc.
11994 * mini-amd64.c inssel-amd64.brg: Applied patch from
11995 Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of
11996 X86_COMPARE_MEMBASE opcodes.
11998 * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
12000 2005-01-29 Ben Maurer <bmaurer@ximian.com>
12002 * *: MonoMethod->signature might be NULL now. You *MUST* use
12003 mono_method_signature.
12005 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
12007 * driver.c (compile_all_methods_thread_main): Compile the methods
12008 without invoking cctors.
12010 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
12012 * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
12013 * basic-calls.cs: test for the above.
12015 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
12017 * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after
12018 MonoJitInfo changes.
12020 2005-01-27 Zoltan Varga <vargaz@freemail.hu>
12022 * mini-exceptions.c (mono_handle_exception): Compute the stack trace
12023 eagerly if it contains dynamic methods.
12025 * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
12027 * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
12028 trace, it is now computed by an icall from trace_ips.
12030 * mini-exceptions.c: Fix a warning.
12032 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
12034 * mini-exceptions.c: don't bother getting stack trace info if
12035 it's not going to be used.
12037 2005-01-27 Raja R Harinath <rharinath@novell.com>
12039 * Makefile.am (common_sources): Add ssapre-cee-ops.h and
12042 2005-01-26 Zoltan Varga <vargaz@freemail.hu>
12044 * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
12046 * aot.c: Avoid calling mono_method_get_header () if not needed.
12048 * mini.h: Bump AOT file format version.
12050 * mini.c (mono_emit_native_call): Allocate a GOT var here.
12052 * mini.c (mono_print_tree): Print more info for calls.
12054 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
12056 * declsec.h: Remove warning by adding missing include for marshal.h
12058 2005-01-26 Martin Baulig <martin@ximian.com>
12060 * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
12063 2005-01-25 Zoltan Varga <vargaz@freemail.hu>
12065 * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
12068 * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
12070 * aot.c (mono_compile_assembly): Fix a warning.
12072 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
12074 * declsec.c: Look for security attributes on the original MonoMethod
12075 (and not the wrapped one). This fix permissions on icalls.
12077 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
12079 * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
12081 * mini.c (mono_allocate_stack_slots): Add a fixme.
12083 * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
12085 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
12087 * inssel.brg: optimize casts of sealed types (more
12088 optimizations waiting for fixes in remoting).
12090 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
12092 * inssel.brg (stmt): Add another dummy rule.
12094 * driver.c: Fix warnings.
12096 * driver.c (mono_main): If running under valgrind, instruct glib to use
12097 the system allocation functions so valgrind can track the memory
12098 allocated by the g_... functions.
12100 * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
12102 * mini-ops.h: Add OP_DUMMY_STORE opcode.
12104 * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
12106 * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
12107 variables in try regions.
12109 * mini.c (mini_method_compile): Don't disable optimizations on large
12110 methods when AOT compiling.
12112 * mini.c (mono_allocate_stack_slots): New arch independent method to
12113 allocate stack slots. Not yet used.
12115 2005-01-22 Ben Maurer <bmaurer@ximian.com>
12117 * debug-mini.c (mono_debug_close_method): Plug some leaks.
12119 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
12121 * mini-ppc.c: make the branch info relative as the code
12122 buffer can be reallocated.
12124 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
12126 * aot.c: Allow decoding of the new MONO_PATCH_INFO_DECLSEC.
12127 * driver.c: Removed the AOT/security restriction. Now initialize the
12128 security manager (in metadata) if --security is used.
12129 * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
12130 rather than the pointer to declarative security, when AOT is used.
12132 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
12134 * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
12135 basic blocks, reduced intrinsic exception throwing code size.
12137 2005-01-22 Miguel de Icaza <miguel@ximian.com>
12139 * driver.c (mini_usage): Reorder the usage screen.
12141 2005-01-21 Zoltan Varga <vargaz@freemail.hu>
12143 * mini.c (mono_resolve_patch_target): Fix warning.
12145 2005-01-20 Zoltan Varga <vargaz@freemail.hu>
12147 * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
12150 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
12152 * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
12153 breaks the amd64 build.
12155 * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem
12156 register allocation. Fixes #71454.
12158 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
12160 * arrays.cs: Add new regression test.
12162 2005-1-20 Massimiliano Mantione <massi@ximian.com>
12164 * ssapre.c: Turned usage of snprintf to GString.
12165 * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
12166 (I left it on by mistake in my previous commit).
12168 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
12170 * mini.c, cfold.c, basic-calls.cs: preserve side effects
12171 on cond branch optimization (fixes bug# 71515).
12173 2005-1-20 Massimiliano Mantione <massi@ximian.com>
12175 * abcremoval.c: Fixed bug 71062.
12176 * abcremoval.h: Likewise.
12178 2005-1-20 Massimiliano Mantione <massi@ximian.com>
12180 * mini.c: Added a new functionality to optimize_branches, the removal
12181 of useless basic blocks, and fixed some problem in the removal of
12182 critical edges; some utility functions added for both purposes.
12183 * ssapre.c: Added complex expression support, and fixed bug 70637.
12184 * ssapre.h: Likewise.
12185 * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
12187 * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
12188 * driver.c: Re-enabled SSAPRE.
12190 2005-01-19 Martin Baulig <martin@ximian.com>
12192 * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
12193 the result of mono_get_method_constrained().
12195 2005-01-18 Neale Ferguson <NealeFerguson@earthlink.net>
12197 * exceptions-s390.c tramp-s390.c: Allocate code using the global code
12200 2005-01-18 Geoff Norton <gnorton@customerdna.com>
12202 * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
12203 be detected. Fixes #59296.
12205 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
12207 * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
12208 which can happen. Fixes #71361.
12210 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
12212 * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
12215 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
12217 * mini.c (mono_create_jump_trampoline): Revert last change as it causes
12218 appdomain-unload.exe to fail.
12220 * mini.c: Fix some memory leaks.
12222 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
12224 * inssel.brg: handle the new size of rank, idepth, max_interface_id.
12225 Fixed bug and sped up some codepaths.
12227 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
12229 * mini.c: Fix some memory leaks.
12231 * exceptions.cs basic-long.cs: Add test for checked ulong->int
12234 * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
12236 * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
12239 * iltests.il: Add regression test for #71320.
12241 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
12243 * mini.c (mono_codegen): Fix installation of profiler hooks.
12245 * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
12247 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
12249 * mini.h, mini.c, cfold.c: optimize access to enum
12250 readonly fields, too. Eval conditional branches if possible
12251 to perform unreachable code removal in more cases.
12253 2005-01-15 Zoltan Varga <vargaz@freemail.hu>
12255 * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
12257 * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
12260 * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
12261 WinXP DEP. Fixes #71244.
12263 2005-01-14 Zoltan Varga <vargaz@freemail.hu>
12265 * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
12267 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
12269 * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
12271 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
12273 * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo
12276 * mini.h: Bump AOT version.
12278 * mini.h (MonoCompile): Change exvar to a hash table.
12280 * mini.c: Allocate a separate exvar for each handler block.
12282 * mini.c: Get rid of the computation of filter_lengths, its not needed.
12284 * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
12285 ex var with the pending exception and only throw if the two are equal.
12288 * exceptions.cs: Add tests for rethrow and nested catch clauses.
12290 * mini-x86.c: Fix warnings.
12292 * Makefile.am (common_sources): Move mini-exceptions.c here as it is
12293 used by all the ports now.
12295 * aot.c: Add write-symbols and save-temps options.
12297 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
12299 * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
12301 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
12303 * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx
12306 * tramp-s390.c: Check vtable slot belongs to the domain.
12308 * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
12309 as per other platforms.
12311 * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
12313 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
12315 * driver.c: we don't run the Main() code in a subthread anymore.
12317 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
12319 * mini.c: added experimental rtc support in the statistical
12320 profiler: if the user has the permission, more accurate statistics
12321 are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
12322 The MONO_RTC value must be restricted to what the linux rtc allows:
12323 power of two from 64 to 8192 Hz.
12325 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
12327 * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
12329 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
12331 * mini-ppc.c: better icache flush for smp.
12333 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
12335 * mini-amd64.c (emit_move_return_value): Fix memory leak.
12337 * mini-x86.c (get_call_info): Add the get_call_info () code from the
12338 amd64 port, not yet used.
12340 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
12342 * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
12345 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
12347 * driver.c: Added --security option to activate the security manager.
12348 Right now this will allow code generation for declarative demands and
12349 is disabled when AOT is specified.
12350 * mini.c: Add code generation for declarative security demands.
12351 * mini.h: Add mono_use_security_manager as an extern gboolean.
12353 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
12355 * aot.c (mono_compile_assembly): Speed up compilation a bit by
12356 emitting more dense assembly code.
12358 * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
12359 exception throwing stuff.
12361 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
12363 * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
12366 * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
12367 left in by mistake.
12369 * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is
12372 * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
12374 * tramp-*.c: Only patch vtable slots if the object is in the current
12375 domain. Fixes appdomain-unload.exe.
12377 * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
12379 * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
12382 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
12384 * mini.c (reverse_branch_op): New helper function.
12386 * mini.c (optimize_branches): Run the new optimization only on
12387 platforms which support it. Also reverse all kinds of branches.
12389 * mini.h (MonoBasicBlock): Add 'out_of_line' field.
12391 * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
12394 * mini.c (optimize_branches): Reverse not-equals branches if the false
12395 bblock is a throw. This happens a lot of time with argument checking in
12398 * mini.c (mono_codegen): Add support for placing basic blocks after
12399 the function epilogue.
12401 * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
12404 2005-01-05 Miguel de Icaza <miguel@ximian.com>
12406 * mini.c (setup_stat_profiler): Only set this up if the platform
12407 supports ITIMER_PROF.
12409 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
12411 * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
12414 * inssel.brg: Fix a warning.
12416 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
12418 * mini.c: added support for statistical profiler
12419 (run with: --profile=default:stat).
12421 2005-01-04 Zoltan Varga <vargaz@freemail.hu>
12423 * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
12425 * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
12427 * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes
12428 related to global registers from the amd64 port.
12430 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
12432 * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
12434 * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
12435 with global registers.
12436 (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
12438 * aot.c (emit_method_code): Fix the 'method emitted as' messages.
12440 2004-12-31 Zoltan Varga <vargaz@freemail.hu>
12442 * debug-mini.c (encode_value): Fix off-by-one.
12444 * aot.c (encode_value): Likewise.
12446 * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
12448 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
12450 * mini.c linear-scan.c: Add a workaround for the mcs crash when using
12453 * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
12455 * aot.c (emit_method_info): Increase size of temp buffer.
12457 * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in
12460 2004-12-28 Zoltan Varga <vargaz@freemail.hu>
12462 * aot.c (emit_method_info): Fix build.
12464 * aot.c: Further rework of the AOT file format to reduce the size of
12465 the method info data.
12467 * mini.h: Bump AOT file format version.
12469 2004-12-27 Martin Baulig <martin@ximian.com>
12471 * mini.c (mini_get_method): New static method; call
12472 mono_get_method_full() and mono_get_inflated_method().
12473 (mono_method_to_ir): Use mini_get_method() instead of
12474 mono_get_method_full().
12476 2004-12-26 Patrik Torstensson <patrik.torstensson@gmail.com>
12478 * mini-x86.c (atomic ops): fixed bug interlocked bug #70784.
12480 2004-12-25 Zoltan Varga <vargaz@freemail.hu>
12482 * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
12484 * inssel-amd64.brg: Add some optimization rules.
12486 2004-12-24 Ben Maurer <bmaurer@ximian.com>
12488 * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
12489 standard not GC'd stuff is fine.
12491 2004-12-24 Zoltan Varga <vargaz@freemail.hu>
12493 * aot.c: Rework the AOT file format to get rid of most of the global
12494 symbols. This reduces the size of the mscorlib.dll.so by 1MB.
12496 * mini.h: Bump AOT file format version.
12498 2004-12-23 Zoltan Varga <vargaz@freemail.hu>
12500 * mini.h: Bump AOT file format version.
12502 * aot.c (mono_aot_is_got_entry): New function to determine if an
12503 address is inside a GOT.
12505 * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
12507 * cpu-pentium.md: Increase the maximum size of some instructions which
12508 might involve a got access.
12510 * mini.c (get_method_from_ip): Another debug helper function.
12512 * mini.c: Call mono_get_got_var () in a couple places. Handle the case
12513 when got var accesses are created during the decompose phase.
12515 * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
12517 * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
12518 argument mini_compile_method and to MonoCompile, and use this to
12519 determine whenever a given method is compiled for AOT. This allows the
12520 other methods compiled during AOT compilation to be free of AOT stuff,
12521 so the backends does not need to add special support for them by
12522 creating a fake GOT etc.
12524 * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
12527 2004-12-21 Ben Maurer <bmaurer@ximian.com>
12529 * mini.c (mono_method_to_ir): It turns out that some of the
12530 x-appdomain wrappers are lax with types, so just ignore this for
12533 * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
12534 at the vtable->klass. If it is non-shared code we can just use the
12537 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
12539 * mini-ppc.c: access MonoDomain from tls, too.
12541 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
12543 * declsec.c: Removed unused variable (and related warning ;-)
12545 2004-12-21 Ben Maurer <bmaurer@ximian.com>
12547 * iltests.il: New test for LDELEMA on an array of ref types.
12549 * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
12550 all ldelema's on reftypes.
12551 (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
12552 it was the wrong place to put it.
12554 * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
12555 register to pop to make this cleaner, at the request of Paolo.
12557 2004-12-20 Ben Maurer <bmaurer@ximian.com>
12559 * mini-ops.h (OP_GETHASHCODE): New op.
12561 * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
12563 * mini.c (mini_get_inst_for_method): Create the intrinsic hash
12566 For a microbenchmark, this reduces the cost of Hashtable.get_Item
12569 * mini-x86.c (mono_arch_output_basic_block): Rather than
12577 The first is 3 bytes while the second is 1. This saves 36 kb on
12578 mscorlib, quite a big saving. When bootstraping mcs, I was able to
12579 see a small boost because of icache locality.
12581 * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
12583 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
12585 * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
12586 started code sharing with the generic code.
12588 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
12590 * mini-ppc.c, cpu-g4.md: added code for direct access to
12593 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
12595 * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
12596 mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
12599 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
12601 * declsec.c|h: Added functions to cache the declarative stack modifiers
12602 in MonoJitInfo and to create a security frame from a MonoJitInfo
12604 * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
12605 created. Register internal calls for System.Security.SecurityFrame::
12606 _GetSecurityFrame and _GetSecurityStack.
12607 * mini.h: Added definition for new icalls (in mini-exceptions.c) and
12608 the definitions for the new stack walk/callback mechanism.
12609 * mini-exceptions.c: Added internal call GetSecurityFrame (to get the
12610 first security frame for LinkDemands and InheritanceDemands) and
12611 GetSecurityStack for Demands. Both use the new mono_walk_stack code
12613 * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
12614 walk initialization (lupus).
12616 2004-12-20 Ben Maurer <bmaurer@ximian.com>
12618 * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
12620 (handle_loaded_temps): Do not create a temporary variable for
12621 things that we know are temps. They will never be modified.
12622 (mono_spill_call): Set MONO_INST_IS_TEMP
12623 (mono_emulate_opcode): ditto
12625 (mono_method_to_ir.CEE_DUP): ditto
12627 2004-12-19 Ben Maurer <bmaurer@ximian.com>
12629 * mini.c (type_to_eval_stack_type): Make this handle the void type
12630 (mono_emit_call_args): set the call->type with type_to_eval_stack_type
12631 (emit_tree): use ip_in_bb to special case some common idioms
12632 Update all callers to pass in the IP.
12633 (mono_method_to_ir): Make CEE_CALL* do the above as well.
12635 This gives us a nice 2% speedup in mcs bootstrap.
12637 * mini-x86.c (peephole_pass): Peephole pass to make
12646 * mini.c (ip_in_bb): new method.
12647 (mono_method_to_ir): use this method rather than doing the hash
12650 * linear-scan.c (mono_linear_scan): When expiring actives, you
12651 don't need to keep around variables that expire on this
12652 instruction. This makes it so that:
12655 store (ebx add (ebx, 1))
12659 2004-12-19 Zoltan Varga <vargaz@freemail.hu>
12661 * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc
12662 combination to avoid doing two copies. Fix up problems with previous
12665 * mini.c: Fix 64 bit warnings.
12667 * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
12669 2004-12-17 Zoltan Varga <vargaz@freemail.hu>
12671 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
12672 changes from the x86 code.
12674 * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
12676 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
12678 * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
12679 throwing code to reduce its size, unify the AOT and non-aot code and
12680 get rid of relocations in the AOT case.
12682 * mini-x86.h mini.c exceptions-x86.c
12683 (mono_arch_get_throw_corlib_exception): New arch specific function to
12684 raise corlib exceptions which doesn't require relocations in the
12687 * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
12689 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
12691 * mini.c (mono_emit_method_call): Only allocate the got var when it is
12694 * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
12697 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
12699 * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
12700 with add function when used from Inc/dec atomic
12701 functions. Re-enabled optimization on x86.
12702 * mini-ops.h: renamed atomic_add functions to
12703 allow _add to match the Interlocked::Add and
12704 _add_next to match Interlocked::Inc/Dec.
12706 2004-12-15 Massimiliano Mantione <massi@ximian.com>
12708 * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
12709 linking of BBs to the end BB, and enabled SSAPRE also with
12710 consprop and copyprop (which was prevented by that bug).
12712 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
12714 * mini-x86.c: disabling the Interlocked optimizing code.
12716 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
12718 * aot.c (load_aot_module): Move reading of got_addr after the AOT
12719 file version check.
12721 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
12723 * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm
12724 interlocked optimization due lack of support on x86, rewrote
12725 exchange to take into account that base may be in eax.
12727 xsp works again; activated Interlocked optimizing code.
12729 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
12731 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
12733 2004-12-13 Zoltan Varga <vargaz@freemail.hu>
12735 * mini-ops.h: Add new opcodes.
12737 * mini.h: Add new patch types. Add got_var to MonoCompile.
12739 * mini.h mini-x86.c mini-amd64.c aot.c: Rename
12740 mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
12741 make it work with all kinds of patchable code.
12743 * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
12744 address of the GOT, and referencing entries in the GOT.
12746 * mini.c: Add code to load the GOT address if needed by an opcode.
12748 * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position
12749 independent AOT code on the x86 using an elf-style Global Offset Table.
12751 2004-12-14 Raja R Harinath <rharinath@novell.com>
12753 * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
12755 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12757 * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
12760 2004-12-13 Patrik Torstensson <patrik.torstensson@gmail.com>
12762 * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
12763 of Interlocked:Increment/Decrement/Add as inline ops.
12764 (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
12766 2004-12-12 Geoff Norton <gnorton@customerdna.com>
12768 * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
12769 * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
12771 2004-12-12 Duncan Mak <duncan@ximian.com>
12773 * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
12774 again. `patch_info->table_size' is no longer valid after Zoltan's
12777 2004-12-12 Martin Baulig <martin@ximian.com>
12779 * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
12780 if we are the "real" method, ie. not an inlined method inside it.
12782 2004-12-11 Ben Maurer <bmaurer@ximian.com>
12784 * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
12785 before we look in the special fields table. This fixes
12786 ../tests/thread-static-init.cs.
12788 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12790 * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
12791 for Array get_Rank and get_Length. Fixes bug #70465.
12793 2004-12-11 Zoltan Varga <vargaz@freemail.hu>
12795 * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
12796 separate structure to reduce the size of MonoJumpInfo.
12798 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
12800 * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
12802 2004-12-10 Patrik Torstensson <patrik.torstensson@gmail.com>
12804 * mini.c (mini_get_inst_for_method): Changed to allow ports
12805 to return a MonoInst instead of opcode
12806 (renamed mini_get_opcode_for_method to better reflect the new functionality)
12808 * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method):
12809 Allow ports to return a created MonoInst instead of op-code, will enable
12811 (renamed mini_get_opcode_for_method to better reflected the functionality)
12813 2004-12-09 Zoltan Varga <vargaz@freemail.hu>
12815 * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
12817 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
12819 * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
12822 2004-12-08 Martin Baulig <martin@ximian.com>
12824 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
12825 if we're a CEE_CONSTRAINED call. Fixes gen-118.cs.
12827 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
12829 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
12832 * exceptions.cs: Disable some tests which depend on properties of x86 fp
12835 2004-12-08 Raja R Harinath <rharinath@novell.com>
12837 * Makefile.am (CLEANFILES): Add *.exe, *.dll.
12839 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
12841 * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
12842 bug introduced by the previous patch.
12844 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12846 * mini-ppc.c, objectc.cs: handle large structs passed by value
12847 (fixes bug #69972).
12849 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
12851 * mini-ppc.c: OP_ARGLIST implementation from
12852 Geoff Norton <gnorton@customerdna.com>.
12854 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
12856 * inssel-x86.brg, inssel-ppc.brg: fix reference to register
12857 in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
12859 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12861 * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
12863 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12865 * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
12868 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
12870 * mini-sparc.c: Zero out localled-ed memory.
12872 * iltests.il: Add tests for zeroing out localloc-ed memory.
12874 2004-12-04 Martin Baulig <martin@ximian.com>
12876 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
12877 mono_method_get_signature_full().
12879 2004-12-03 Massimiliano Mantione <massi@ximian.com>
12881 * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
12882 and some utility functions (always for SSAPRE), integrated SSAPRE.
12883 * mini.h: Likewise.
12884 * driver.c: Added ssapre option.
12885 * ssa.c: Small fix on OP_ARG handling.
12886 * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
12887 * Makefile.am: Likewise.
12889 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
12891 * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
12892 now in the xp code.
12894 * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
12897 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12899 * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
12901 * cpu-s390.md : Increase instruction length of oparglist.
12903 * mini-s390.c : Implement vararg and TYPEDEBYREF support.
12905 2004-11-30 Martin Baulig <martin@ximian.com>
12907 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
12908 virtual generic methods. We call a special helper_compile_generic_method()
12909 icall to retrieve the method from the vtable, inflate and compile
12910 it and then do a CEE_CALLI. Thanks a lot to Paolo for this idea.
12912 * jit-icalls.c (helper_compile_generic_method): New JIT icall.
12914 2004-11-30 Zoltan Varga <vargaz@freemail.hu>
12916 * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
12918 2004-11-29 Zoltan Varga <vargaz@freemail.hu>
12920 * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
12923 2004-11-27 Ben Maurer <bmaurer@ximian.com>
12925 * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
12926 platforms with PIC aot.
12928 2004-11-28 Martin Baulig <martin@ximian.com>
12930 * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
12933 2004-11-28 Martin Baulig <martin@ximian.com>
12935 * mini-x86.c (mono_arch_call_opcode): Use the original type, not
12936 the result of mono_type_get_underlying_type() to check whether
12939 2004-11-26 Martin Baulig <martin@ximian.com>
12942 (mono_method_to_ir): Use `!method->signature->has_type_parameters'
12945 2004-11-26 Zoltan Varga <vargaz@freemail.hu>
12947 * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
12948 the same way as the other arguments so they won't get clobbered.
12950 * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual
12951 calls through R11 since it is clobbered by the trampoline code.
12953 2004-11-26 Raja R Harinath <rharinath@novell.com>
12955 * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
12956 pick up in-tree mscorlib.dll.
12958 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
12960 * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
12962 * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to
12963 runtime data/code are now stored in a table similar to the GOT in ELF.
12964 This allows the code itself to be position independent.
12966 * aot.c: Fix loading of referenced assemblies after the lazy assembly
12969 * aot.c: Attach ELF type (object/function) directives to all global
12972 * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
12974 * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
12976 * mini-amd64.h: Turn on PIC AOT code.
12978 * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
12979 returning the offset within an OP_AOTCONST instruction where the GOT
12980 offset needs to be added.
12982 * mini.h: Bump AOT file format version.
12984 2004-11-25 Martin Baulig <martin@ximian.com>
12986 * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
12987 uninflated generic methods.
12989 2004-11-25 Martin Baulig <martin@ximian.com>
12991 * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
12993 2004-11-24 Martin Baulig <martin@ximian.com>
12995 * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
12996 original klass (this only applies for generic instances).
12998 2004-11-24 Martin Baulig <martin@ximian.com>
13000 * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
13001 `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
13004 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
13006 * mini.c (mono_method_to_ir): Disable inlining for methods containing
13007 localloc. Fixes #69678.
13009 * iltests.il (test_0_localloc_inline): Add regression test for #69678.
13011 2004-11-23 Zoltan Varga <vargaz@freemail.hu>
13013 * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
13014 used SSE registers on pinvoke calls. Fixes #69774.
13016 2004-11-23 Geoff Norton <gnorton@customerdna.com>
13018 * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
13019 vt->inst_vtype->data.klass. This fixes generic structs and bug #69766
13021 2004-11-23 Raja R Harinath <rharinath@novell.com>
13023 * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
13024 Refer directly to the mcs/ tree.
13026 2004-11-19 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13028 * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
13029 Check if a trampoline for a synchronized method is required.
13031 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
13033 * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
13034 with localloc if needed. Throe arithmetric exception in
13035 div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
13036 Adapted from a patch by Geoff Norton <gnorton@customerdna.com>.
13038 2004-11-19 Geoff Norton <gnorton@customerdna.com>
13040 * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
13041 types before switching on type. Fixes #69622.
13043 2004-11-19 Raja R Harinath <rharinath@novell.com>
13045 * Makefile.am (check-local): New. Integrate into 'make check'.
13046 (MCS,RUNTIME): Define using in-tree mono and mcs.
13048 (%.exe): Use $(ILASM).
13050 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
13052 * mini-ppc.c: adjust initial prolog size (bug #69691).
13054 2004-11-18 Zoltan Varga <vargaz@freemail.hu>
13056 * cpu-pentium.md (localloc): Increase max instruction len. Fixes
13059 2004-11-17 Raja R Harinath <rharinath@novell.com>
13061 * Makefile.am (clean-local): Rename from 'clean'.
13063 2004-11-15 Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13065 * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
13066 to mono_arch_is_int_overflow.
13067 * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
13070 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
13072 * declsec.c|h: New files to support declarative security attributes.
13073 Added function to check if a method has (applicable) security.
13074 * mini.c|h: Add check for declarative security attributes in
13075 mono_method_check_inlining.
13076 * Makefile.am: Added declsec.c and declsec.h to the build.
13078 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
13080 * mini.c, mini.h: update to keep dynamic code info per-domain.
13082 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
13084 * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
13085 (mini_init): Get rid of it from here too.
13087 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
13089 * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
13090 implemented OP_RETHROW (patch by Geoff Norton
13091 <gnorton@customerdna.com>).
13093 2004-11-10 Geoff Norton <gnorton@customerdna.com>
13095 * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
13096 between appdomains. Fixes appdomain-unload on PPC.
13098 2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
13100 * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13101 mini-exceptions.c: handle the new wrapper types.
13102 * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
13103 token value as a MonoClass* when compiling a wrapper.
13104 mono_jit_create_remoting_trampoline now takes an additional
13105 MonoRemotingTarget parameter.
13107 2004-11-10 Martin Baulig <martin@localhost>
13109 * mini.c (mono_method_to_ir): Use `generic_container->context'
13110 rather than creating a new one.
13112 2004-11-09 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13114 * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
13116 * inssel-390.md, mini-s390.c: Correct register allocation for globals.
13118 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
13120 * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
13121 the experimental aot cache stuff.
13123 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
13125 * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13126 mini-exceptions.c: update to exception clause structure changes.
13128 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
13130 * exceptions-x86.c (throw_exception): Fix warnings.
13132 * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support
13135 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
13137 * exceptions-sparc.c (get_throw_exception): Really fix this.
13139 2004-11-07 Ben Maurer <bmaurer@ximian.com>
13141 * tramp-*.c: we no longer support icalls without wrappers, so
13142 a bit of code can be removed here
13144 2004-11-07 Zoltan Varga <vargaz@freemail.hu>
13146 * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
13149 * cpu-sparc.md: Add op_rethrow.
13151 * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
13153 * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
13155 * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
13156 * mini-ops.h: Add OP_RETHROW.
13158 * mini.c inssel.brg: Distinguish between THROW and RETHROW.
13160 * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
13162 2004-11-05 Geoff Norton <gnorton@customerdna.com>
13164 * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
13165 Makes the output much easier to read
13167 2004-11-05 Ben Maurer <bmaurer@ximian.com>
13169 * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
13170 prevents another huge leak when compiling with ssa. Secondly, the
13171 performance of doing this rather than freeing the lists is much
13172 better. GList does a lock every time you allocate a list link,
13173 so that it can use a memory pool. So, it is better to just use
13174 a memory pool of our own.
13176 * ssa.c, linear-scan.c: replace g_list_remove_link with
13177 g_list_delete. The remove one does not free the GList, so we were
13178 leaking memory. On -O=all --compile-all with corlib, this cut down
13179 3 MB of allocations.
13181 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
13183 * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
13185 * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
13187 * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
13188 into a new function mono_create_jit_trampoline ().
13190 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
13192 * trace.c (get_spec): Allow tracing of classes without a namespace.
13194 2004-11-02 Sebastien Pouliot <sebastien@ximian.com>
13196 * mini.c: Fix pointer overwrite in mini_method_compile.
13198 2004-11-2 Geoff Norton <gnorton@customerdna.com>
13200 * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
13201 The darwin ABI needs some special handling for 1 and 2 byte structs
13202 Lets use lbz/lhz instead of lwz everywhere.
13203 * mini-ppc.c (calculate_sizes): The Darwin ABI needs from special handling
13204 for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
13205 Use stb/sth for the former, and put the latter always on stack instead of in
13206 argument registers.
13208 2004-10-30 Zoltan Varga <vargaz@freemail.hu>
13210 * trace.c (is_filenamechar): Add '_'.
13212 2004-10-29 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13214 * mini-s390.c: Fix prolog length to allow for large trace requirements.
13216 * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
13218 2004-10-29 Zoltan Varga <vargaz@freemail.hu>
13220 * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
13221 depends on libmonogc. Fixes #68805.
13223 2004-10-26 Miguel de Icaza <miguel@ximian.com>
13225 * mini.c (mono_jit_free_method): Provide extra information for
13226 this error. Currently this leaks, but will be turned into a
13227 developer option in the future.
13229 2004-10-26 Zoltan Varga <vargaz@freemail.hu>
13231 * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
13233 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
13235 * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte
13236 boundary. Fixes reading of PATCH_INFO_R4 and R8.
13237 (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
13239 2004-10-24 Zoltan Varga <vargaz@freemail.hu>
13241 * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
13242 trampolines for AOT code.
13244 2004-10-22 <vargaz@freemail.hu>
13246 * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
13247 constructed types. Fixes #68136.
13249 2004-10-21 Martin Baulig <martin@ximian.com>
13251 * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
13252 if it returns true, unwind the stack to the call instruction.
13254 2004-10-21 <vargaz@freemail.hu>
13256 * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
13258 * mini.h: Bump AOT version number.
13260 * objects.cs: Add another test for unbox trampolines.
13262 * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for
13265 2004-10-20 <vargaz@freemail.hu>
13267 * driver.c: Add SHARED to the set of optimizations tested.
13269 * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
13271 * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
13272 used by CEE_NEWARR.
13274 * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
13276 2004-10-20 Martin Baulig <martin@ximian.com>
13278 * mini-exceptions.c (mono_handle_exception): Call
13279 mono_debugger_handle_exception() to tell the debugger about
13280 catch/finally clauses.
13282 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
13284 * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
13286 * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
13289 2004-10-15 Geoff Norton <gnorton@customerdna.com>
13291 * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
13292 methods as their native size, fixed bug #57543, #57545.
13293 * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
13294 This saves a temporary register and mullw call down into 1 (minor perf
13295 increase for cases like sum = sum * 5; This use to translate into:
13298 It now translates to
13301 2004-10-15 Zoltan Varga <vargaz@freemail.hu>
13303 * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
13306 2004-10-11 Martin Baulig <martin@ximian.com>
13308 * mini.c (mono_method_to_ir): If we're a generic method, get the
13309 MonoGenericContainer from our MonoMethodNormal and create a
13310 MonoGenericContext from it.
13312 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
13314 * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
13316 * basic-long.cs: Add test for checked i8->i2 cast.
13318 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13320 * inssel-ppc.brg: added a couple of speedup rules.
13322 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
13324 * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
13325 to speed up rebuilds.
13327 2004-10-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13329 * mini-s390.c: Minor fix to OP_OR_IMM.
13331 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
13333 * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
13334 better. Fixes appdomain-unload.exe on sparc.
13336 2004-10-02 Massimiliano Mantione <massi@ximian.com>
13338 * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
13339 simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
13342 2004-10-02 Zoltan Varga <vargaz@freemail.hu>
13344 * jit-icalls.c: Handle a nonexisting trunc function more correctly.
13346 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
13348 * mini.c: Always generate a field read/write wrapper for members
13349 of the class MarshalByRefObject since the actual instance could
13352 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
13354 * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
13356 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
13358 * driver.c mini.h trace.c: Move the setting of the main assembly into
13359 a separate function called mono_trace_set_assembly () and call it after
13360 actually loading the main assembly. Fixes #66872.
13362 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
13364 * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
13365 using the code manager.
13367 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
13369 * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
13371 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
13373 * cpu-amd64.md: Fix bug in previous patch.
13375 * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
13378 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
13380 * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13381 mini-exceptions.c: updates for changed stack walk interface.
13383 2004-09-21 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13385 * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
13387 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
13389 * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
13391 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
13393 * driver.c (mini_regression_list): Do not call mono_assembly_close
13394 since assemblies can't be unloaded.
13396 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
13398 * cpu-amd64.md: Fix more instruction lengths.
13400 * cpu-amd64.md: Fix lengths of some instructions.
13402 2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
13404 * inssel.brg: Make the array ldelema check aot friendly.
13406 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
13408 * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
13410 * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
13412 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
13414 * mini-x86.c: Fix build.
13416 * mini-sparc.c mini-x86.c mini-amd64.c: Use the new
13417 mono_type_get_underlying_type () helper function to simplify code.
13419 2004-09-09 Martin Baulig <martin@ximian.com>
13421 * mini-amd64.c: Don't access `type->data.klass' directly, call
13422 mono_class_from_mono_type() instead since the type may be a
13425 2004-09-09 Martin Baulig <martin@ximian.com>
13427 * mini-amd64.c (get_call_info): Fix support for generic instances.
13428 (add_valuetype): Use mono_class_from_mono_type() to get the class
13429 since we can be a generic instance.
13431 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
13433 * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
13435 2004-09-07 Ben Maurer <bmaurer@users.sourceforge.net>
13437 * liveness.c: reset spill costs on each scan: bug 62107
13439 2004-09-07 Bernie Solomon <bernard@ugsolutions.com>
13441 * exceptions-sparc.c (mono_arch_find_jit_info): remove
13442 unnecessary line that doesn't compile
13444 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
13446 * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
13447 trampolines, make them call an error function so people can fix their
13450 2004-09-06 Martin Baulig <martin@ximian.com>
13452 * mini.c (mono_method_to_ir): When initializing locals, handle a
13453 generic instances like a valuetype if it's a valuetype and like a
13454 class if it's a class.
13456 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
13458 * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
13459 stack. Fixes #64674.
13461 * exceptions.cs: Add test for unwinding of call arguments.
13463 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
13465 * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
13466 OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
13467 set the carry/borrow flag). The sparc and s390 implementations
13468 can now use optimized versions (and simplify the code). ppc bugfixes.
13470 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
13472 * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
13474 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
13476 * inssel-amd64.brg: Remove leftover 32 bit rule.
13478 * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
13480 2004-09-04 Zoltan Varga <vargaz@freemail.hu>
13482 * mini-exceptions.c (mono_find_jit_info): Refactor common code from
13483 mono_arch_find_jit_info functions into a new function. Fix a memory
13486 * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
13489 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
13491 * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
13494 * exceptions.cs: Add array size tests.
13496 * mini.c: Allocate a separate icall wrapper for each arity of
13497 mono_array_new_va. Fixes #59509.
13499 * exceptions.cs: Add testcase for 64578.
13501 * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
13503 * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
13505 2004-09-02 Martin Baulig <martin@ximian.com>
13507 * mini.c (mono_method_to_ir): When initializing the locals, call
13508 handle_initobj() on the generic instance itself, not its
13511 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
13513 * mini.h (MonoJitDynamicMethodInfo): New structure, extension of
13514 MonoJitInfo for dynamic methods.
13516 * mini.c: Rename trampoline_hash_mutex to jit_mutex.
13518 * mini.c: Add support for freeing JIT data for dynamic methods.
13520 2004-09-01 Martin Baulig <martin@ximian.com>
13522 * mini-x86.c (is_regsize_var): Added support for generic
13524 (mono_arch_emit_prolog): Make this compile again, use
13525 `x86_push_imm_template (code)'.
13527 2004-08-30 Ben Maurer <bmaurer@users.sourceforge.net>
13529 * mini-x86.c: make all push_imm instructions that get
13530 patched always emit the long form
13532 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
13534 * mini.c (mono_create_jump_trampoline): Store the jump trampolines
13535 in a per-domain hash.
13537 * mini-amd64.c (merge_argument_class_from_type): Handle generic
13540 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
13542 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
13545 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
13548 * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
13549 Beginnings of SSE2 support.
13551 * exceptions.cs: Add more tests for checked int<->uint casts.
13553 2004-08-28 Martin Baulig <martin@ximian.com>
13555 * mini-x86.c (mono_arch_instrument_epilog): Added support for
13559 (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
13560 Handle generic instances recursively.
13562 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
13564 * iltests.il: test for conv.u8 on a constant
13566 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
13568 * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
13569 LCONV_x4 (shrun_32 (membase)).
13571 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
13573 * inssel-x86.brg: c&p rules for push/setret of long
13575 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
13577 * inssel-x86.brg: c&p rules for compare (base, regvar) and
13578 compare (regvar, base)
13580 * inssel-x86.brg: more burg love
13582 * inssel.brg: more cleanup
13584 * inssel-x86.brg, inssel-long32.brg: burg cleanup.
13586 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
13588 * basic-long.cs, basic-calls.cs: new tests for optimization.
13590 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
13592 * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
13595 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
13597 * mini-amd64.c (read_tls_offset_from_method): Add another case.
13599 2004-08-25 Bernie Solomon <bernard@ugsolutions.com>
13601 * inssel.brg (mini_emit_memcpy): use
13602 NO_UNALIGNED_ACCESS to disable memcpy optimization
13604 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
13606 * mini-amd64.c: Handle generic types in various places.
13608 * mini.c (mono_method_to_ir): Handle generic types in init locals.
13610 2004-08-24 Zoltan Varga <vargaz@freemail.hu>
13612 * mini.c (handle_box): Fix warning.
13614 * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
13616 * mini-amd64.h: Enable the emit_state optimization.
13618 * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
13620 * mini-amd64.c: Add some new 64 bit peephole opts.
13622 * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
13624 * cpu-amd64.md: sreg1 of div instructions must be %rax.
13626 * mini-amd64.c: Register allocator fixes.
13628 * mini.c: Add an optimization to emit_state to avoid allocation of new
13629 registers on some platforms.
13631 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
13633 * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
13635 * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
13636 allocation. Fixes #63085.
13638 * basic-long.cs: Add new regression test.
13640 * mini-amd64.c: Register allocator improvements.
13642 2004-08-21 Zoltan Varga <vargaz@freemail.hu>
13644 * mini-amd64.c (read_tls_offset_from_method): Add another code
13647 * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
13648 instruction sequence for nullifying class init trampolines.
13650 * objects.cs: Add new regalloc test.
13652 * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
13654 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
13656 * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
13658 * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
13661 * driver.c: Fix profiling after TLS changes.
13663 * driver.c (mono_main): Set mono_stats.enabled if needed.
13665 * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
13668 2004-08-20 Ben Maurer <bmaurer@users.sourceforge.net>
13670 * mini-x86.c: use a 1 op rather than a 2 op tls access
13671 instruction -> faster.
13673 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
13675 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
13678 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
13680 * exceptions-sparc.c (throw_exception): fix typo
13682 2004-08-19 Ben Maurer <bmaurer@users.sourceforge.net>
13684 * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
13685 set tree->dreg correctly with tls. Allow any
13686 register to be used.
13688 * mini-x86.c (read_tls_offset_from_method): add new code
13689 generation pattern seen with GCC.
13692 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13694 * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
13695 exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13696 exceptions-sparc.c: fix some performance issues in exception
13697 handling and setting of the stack trace for exceptions that were
13700 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
13702 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
13705 * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible
13708 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
13710 This patch inlines tls access, when possible.
13712 * mini.h: new arch functions for TLS intrinsics.
13713 All platforms updated with a stub.
13715 * mini.c: use the new intrinsics
13717 * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
13718 arch specific intrinsic for tls variables
13720 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
13722 * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
13725 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
13727 * mini.c: thread local allocation
13729 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
13731 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
13733 * Makefile.am: Link against the static version of libmonogc.
13735 * Makefile.am: Link the static versions of the convenience libraries
13736 into the mono executable.
13738 * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
13740 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
13742 * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
13743 on integer overflow.
13745 * mini-amd64.c: Reorganize function call code.
13747 * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
13749 2004-08-14 Ben Maurer <bmaurer@ximian.com>
13751 * inssel-x86.brg: use xor eax,eax.
13753 * basic.cs: new tests
13755 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
13757 * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
13758 in exception throwing code.
13760 2004-08-14 Ben Maurer <bmaurer@ximian.com>
13762 * inssel-x86.brg: use xor esi,esi.
13764 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
13766 * driver.c (mono_main): Call mono_trace_parse_options earlier so it
13767 can trace methods compiled during mini_init () too.
13769 * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle
13772 2004-08-14 Ben Maurer <bmaurer@ximian.com>
13774 * Makefile.am: static link on x86 (r=zoltan)
13776 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
13778 * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
13779 code since it causes some programs to fail.
13781 2004-08-12 Zoltan Varga <vargaz@freemail.hu>
13783 * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
13785 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
13787 * mini.c: ovfops_op_map - add STACK_OBJ case for
13789 * basic.cs: add test_0_pin_string as test
13792 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
13794 * Makefile.am: build C# if srcdir != builddir
13796 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13798 * dominators.c, mini.h, mini-x86.c: fix loop alignment with
13799 fall-through blocks.
13801 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13803 * driver.c: enable loop by default again and include abcrem in -O=all.
13805 2004-08-08 Zoltan Varga <vargaz@freemail.hu>
13807 * iltests.il: Add some localloc tests.
13809 * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
13811 * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly.
13814 * inssel-amd64.brg: Add some optimizations.
13816 * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
13819 * Makefile.am: Statically link mono against libmono on AMD64.
13821 * mini-amd64.c inssel-amd64.brg: Optimizations.
13823 2004-08-07 Zoltan Varga <vargaz@freemail.hu>
13825 * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
13827 * tramp-amd64.c: Patch calling code in trampolines.
13829 2004-08-06 Zoltan Varga <vargaz@freemail.hu>
13831 * mini-amd64.c: pinvoke struct passing fixes.
13833 2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
13835 * mini-sparc.c: redo change, make mono_arch_cpu_init call
13836 mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
13838 2004-08-05 Duncan Mak <duncan@ximian.com>
13840 * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
13843 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
13845 * mini-amd64.c (emit_move_return_value): Move return value for normal
13848 2004-08-05 Martin Baulig <martin@ximian.com>
13850 * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
13851 `type->type'; just modify `type' itself when dealing with enums
13852 and generic instances.
13853 (check_call_signature): Make `simple_type' a `MonoType *'.
13855 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
13857 * mini.c: Use OP_PADD to add offsets to addresses.
13859 * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
13861 2004-08-04 Bernie Solomon <bernard@ugsolutions.com>
13863 * mini-sparc.c (mono_arch_emit_epilog): fix check
13864 for folding last op into restore instruction
13866 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
13868 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
13869 helper methods using the code manager.
13871 * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
13873 * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
13875 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13877 * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
13878 cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
13880 * mini-s390.c: fix tail processing
13882 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
13884 * mini-ppc.c: mul.ovf.un exception name fix.
13886 2004-08-03 Martin Baulig <martin@ximian.com>
13888 * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
13889 instances; before jumping to `handle_enum', also modify `ptype'.
13891 2004-08-02 Bernie Solomon <bernard@ugsolutions.com>
13893 * cpu-sparc.md: fcall maximal length too small.
13895 2004-08-02 Zoltan Varga <vargaz@freemail.hu>
13897 * mini-amd64.c mini.h: Add initial support for passing/returning
13898 structures to/from pinvoked methods.
13900 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
13902 * mini-ppc.c: reg allocator fix.
13904 2004-07-31 Zoltan Varga <vargaz@freemail.hu>
13906 * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
13908 * inssel.brg: Optimize memset on 64 bit machines.
13910 * mini-amd64.c: Fix some vararg cases.
13912 2004-07-30 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13914 * mini-s390.c: Corrected macro in emit_float_to_int
13916 * s390-abi.cs: Tests to exercise the s390 ABI
13918 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
13920 * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
13923 * basic.cs: Add a test for add.ovf.un.
13925 2004-07-30 Bernie Solomon <bernard@ugsolutions.com>
13927 * mini-sparc.c: add case for OP_IDIV_UN
13929 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
13931 * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
13933 * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
13935 2004-07-30 Ben Maurer <bmaurer@ximian.com>
13937 * basic.cs: regression tests.
13939 * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
13942 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
13944 * basic.cs: Add a new test.
13946 * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling
13947 and AOT. Various fixes and optimizations.
13949 * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
13951 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
13953 * mini-ppc.c: make sure temp regs are not used for global reg
13956 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
13958 * cpu-sparc.md: conv_i8 fix for 64bits
13960 * mini-sparc.c: add cases for OP_IXXX codes for 64bits
13962 2004-07-29 Ben Maurer <bmaurer@ximian.com>
13964 * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
13965 add opcode for cmp BYTE PTR [eax], imm.
13967 * inssel.brg: Make memcpy and memset takes bases.
13969 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
13971 * *-amd64.*: More AMD64 work.
13973 2004-07-28 Ben Maurer <bmaurer@ximian.com>
13975 * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
13976 add a compare-not-equal opcode.
13978 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
13980 * mini.c: Use mono_init_from_assembly instead of mono_init.
13982 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
13984 * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
13986 * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
13988 * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
13990 * inssel.brg: 64 bit fixes.
13992 * mini.h (MonoCallInst): Add some AMD64 specific data.
13994 * mini.h: Add some OP_P opcodes.
13996 2004-07-28 Ben Maurer <bmaurer@ximian.com>
13998 * basic.cs: tests for 61797 and 61740
14000 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
14002 * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
14003 numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
14005 2004-07-24 Zoltan Varga <vargaz@freemail.hu>
14007 * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
14009 * *-amd64*.*: Ongoing AMD64 work.
14011 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
14013 * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
14015 * *-amd64*: Ongoing AMD64 work.
14017 * mini-arch.h: Add AMD64 support.
14019 * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
14021 * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
14023 * mini-ops.h: Add new opcodes.
14025 * Makefile.am: Add AMD64 support.
14027 * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
14028 rules into the inssel-long*.brg files.
14030 * *-amd64.*: Add beginnings of AMD64 backend.
14032 2004-07-22 Ben Maurer <bmaurer@ximian.com>
14034 * mini.c (print_dfn): commenting out the code that prints
14035 the cil. With -O=deadce, this makes -v -v crash.
14037 * cpu-pentium.md: make checkthis have a length of 2
14039 2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
14041 * mini-sparc.h: fix implementations of __builtin
14042 functions for Sun compiler for V9.
14044 2004-07-16 Ben Maurer <bmaurer@ximain.com>
14046 * mini.c: use the new stelem.ref wrapper
14047 * exceptions.cs, arrays.cs: new stelem.ref tests
14049 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14051 * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
14052 new XSP should work with these changes).
14054 2004-07-14 Ben Maurer <bmaurer@ximain.com>
14056 * inssel-{long32,x86,}.brg: trivial optimizations.
14058 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
14060 * mini.c: load value when emitting box operation in
14063 2004-07-12 Ben Maurer <bmaurer@ximian.com>
14065 * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
14066 is one byte shorter than cmp DWORD PTR [eax], 0.
14068 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14070 * inssel-ppc.brg: arguments on the stack are always
14071 relative to the stack pointer (spotted by Neale Ferguson).
14073 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14075 * exceptions-x86.c: delay appending the method name to the trace until
14076 after mono_jit_info_table_find is called, as this gets the real
14079 2004-07-09 Ben Maurer <bmaurer@ximian.com>
14081 * aot.c: register roots
14083 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
14085 * aot.c : I could just use PLATFORM_WIN32 flag.
14087 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
14089 * aot.c : Reverting the previous fix. This time it broke linux build.
14091 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
14093 * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
14095 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
14097 * mini.c (handle_stack_args): Remove some more debugging code.
14099 * mini.c (handle_stack_args): Remove debug output left in by mistake.
14101 * driver.c mini.h aot.c: Allow additional options to be specified with
14102 --aot and pass them to mono_compile_assembly.
14104 * aot.c: Add experimental code to AOT compile all loaded assemblies
14105 on demand and save the code into a cache in the filesystem.
14107 * aot.c: Add support for more wrapper methods.
14109 * mini.c (handle_stack_args): Handle some corner cases. Fixes
14112 * cpu-*.md: Remove removed opcodes.
14114 * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
14115 CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
14116 related icalls to marshal.c.
14118 2004-07-06 Zoltan Varga <vargaz@freemail.hu>
14120 * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
14122 * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
14124 * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
14126 2004-07-06 Ben Maurer <bmaurer@ximian.com>
14127 * liveness.c: If liveness is recomputated we need to reset the information
14128 for each variable. This way, if the liveness range has been narrowed
14129 by optimizations that happened after the last computation, we can return
14132 For example, if you have
14137 // Tons of code that does not affect i
14143 i = 0 is dead code and will be removed by SSA. However, when
14144 linear scan gets to the code, i will still appear to be live
14145 throughout the entire block. This prevents good register allocation.
14147 2004-07-06 Martin Baulig <martin@ximian.com>
14149 * debug-mini.c (mono_debug_init_method): Allow
14150 MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
14151 (mono_debug_add_icall_wrapper): New method.
14153 * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
14155 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
14157 * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
14160 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
14162 * aot.c (mono_aot_load_method): Fix loading of debug info.
14164 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
14166 * aot.c: Add logging support.
14168 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
14170 * mini.h: Add prototype for mono_print_method_from_ip.
14172 * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
14174 * inssel.brg: 64 bit fixes.
14176 * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to
14179 * Makefile.am: Add SPARC64 support.
14181 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
14183 * aot.c: Fix alignment problems on 32 bit platforms.
14185 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
14187 * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
14190 * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
14193 * mini.h: Bump AOT file version. Some 64 bit fixes.
14195 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
14197 * inssel-sparc.brg: Add new rule to avoid register moves.
14199 * inssel.brg: Add ldind_to_load_membase helper function.
14201 2004-06-30 Ben Maurer <bmaurer@ximian.com>
14203 * mini.c: OffsetToStringData intrinsic.
14205 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
14207 * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
14209 * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
14212 * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
14213 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14215 * mini.c: reinstated mono_compile_get_interface_var()
14216 on x86, too, since the change breaks the Gtk# build there as well.
14218 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14220 * driver.c: remove loop from the default optimizations: it seems to
14221 interact badly with some of the other options (see bug #60613).
14223 2004-06-25 Zoltan Varga <vargaz@freemail.hu>
14225 * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
14226 (fld@informatik.uni-bremen.de): Add Solaris x86 support.
14228 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
14230 * mini-ppc.c, cpu-g4.md: small updates to be able to compile
14231 vararg-using methods.
14233 2004-06-21 Martin Baulig <martin@ximian.com>
14235 * mini/mini-exceptions.c
14236 (mono_handle_exception): Added `gpointer original_ip' argument.
14237 After calling mono_unhandled_exception(), call
14238 mono_debugger_unhandled_exception() and if that returns true,
14239 restore the context and return.
14241 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
14243 * mini-ppc.c: prefer the use of relative branches so
14244 they won't need to be patched in aot code (patch from Patrick Beard).
14246 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14248 * aot.c: patch from Patrick Beard to make the output assembly
14249 more correct for the MacOSX assembler. Small tweak to
14250 generate sane images on Linux/PPC, too.
14252 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14254 * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
14255 case until bug #59509 is fixed (shows up in #60332).
14257 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14259 * mini.c: make sure the needed wrappers are compiled, too, with
14262 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
14264 * driver.c: remove NPTL reference in --version output.
14266 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14268 * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
14269 generate valid assembly for the Mach-O assembler.
14271 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14273 * driver.c: don't include abcrem in the all optimization specifier
14274 since it slows down jit compilation too much for now.
14276 2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
14278 * mini.c: use BIGMUL only if both operands have the same signage.
14279 * iltests.il: Test for bug 60056. (errors related to signage in
14284 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
14286 * mini.c, aot.c: memory leak fixes.
14288 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14290 * inssel-long32.brg: implemented a few missing ulong cast opcodes.
14292 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
14294 * Makefile.am: remove the -static hack completely, it links in
14295 statically glib as well.
14297 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
14299 * iltests.il, mini.c: fixed bug#59580 in branch optimization.
14300 * exceptions.cs: make it compile with new mcs/csc.
14302 2004-06-03 Massimiliano Mantione <massi@ximian.com>
14303 * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
14304 and added relevant test case.
14306 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
14308 * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
14309 regressions in gtk-sharp.
14311 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
14313 * exceptions.cs: New regression tests.
14315 * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
14317 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
14319 * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
14321 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
14323 * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
14325 * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
14327 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
14329 * mini.c (mono_jit_runtime_invoke): Init class in this
14330 method instead of trusting mono_jit_compile_method to
14331 do the work (because wrappers can be in object class)
14333 2004-05-27 Zoltan Varga <vargaz@freemail.hu>
14335 * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
14337 * basic-long.cs: New regression test.
14339 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
14341 * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
14342 and div/rem checks.
14344 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
14346 * Makefile.am: fix miguel's change to build mono statically against
14347 libmono (track build dependencies).
14349 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
14351 * cfold.c: Some glib versions do not have G_MININT32.
14353 2004-05-26 Massimiliano Mantione <massi@ximian.com>
14355 * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
14356 with precision of tan, atan, sin and cos, and implemented related
14357 regressions tests (fixes bug 54467, but one new problem appeared and
14360 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
14362 * cfold.c (FOLD_BINOPZ): Avoid division by zero.
14364 * exceptions.cs: Add test for constant folding && division by zero.
14366 * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
14367 since driver.c is in libmono too, so the optimization was useless.
14369 * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
14370 variable to driver.c so the compiler can emit more efficient code to
14373 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14375 * Makefile.am: don't distribute generated inssel.[ch] files.
14377 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
14379 * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
14380 into the default appdomain. Fixes #58707.
14382 * jit-icalls.c: Remove the broken approximation for truncl, doing
14383 no conversion is better.
14385 * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
14388 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14390 * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
14391 of the mcrxr instruction which is not available on some processors
14392 even if it's documented to be. Implement add and sub overflow correctly
14393 (still not complete for long unsigned). Speed up icalls a bit.
14395 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
14397 * mini.c (mono_jit_compile_method_with_opt): Make sure that
14398 we run .cctor in the current domain instead of target_domain.
14400 Fixes bug #58558, .cctor not being called in -O=shared.
14402 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14404 * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
14406 2004-05-24 Ben Maurer <bmaurer@users.sourceforge.net>
14408 * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
14409 which can be done with an imm8, do it that way.
14410 (mono_arch_output_basic_block): ditto for a jmp
14411 (mono_arch_emit_prolog): Computate maximum offset of a label.
14413 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
14415 * mini-x86.c (mono_arch_local_regalloc): the reg allocator
14416 now tries to allocate prefered physical reg's for virtual
14417 regs. This reduces the number of emited spills/loads with
14418 20-30% on our core assemblies.
14420 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14422 * jit-icalls.c: truncl() is not needed and trunc() is
14423 the correct thing to do anyway (bug #58287).
14425 2004-05-24 Zoltan Varga <vargaz@freemail.hu>
14427 * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
14430 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
14432 * driver.c: enable loop optimizations by default.
14434 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
14436 * mini-x86.c: fix calc of max loop size when aligning loops start.
14438 2004-05-23 Zoltan Varga <vargaz@freemail.hu>
14440 * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
14443 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
14445 * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
14448 * basic-long.cs: Add tests for add/subtract of immediates with carry.
14450 * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
14452 * mini.c (inline_method): Allways inline some wrappers even if the cost
14453 is too large. Fixes #58785.
14455 * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
14457 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
14459 * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
14460 (crichton@gimp.org). Beginning of support for sparc/linux.
14462 * mini-sparc.c: Optimize retrieval of LMF address.
14464 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
14466 * exceptions-ppc.c: handle alloca in methods with clauses.
14468 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
14470 * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
14472 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
14474 * mini.c: Delegate most of the abort signal work to
14475 mono_thread_request_interruption, which also handles Stop and Suspend
14478 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
14480 * mini.c mini.h: Allow inlining of icall wrappers if the backend
14481 supports the save/restore lmf opcodes.
14483 2004-05-19 Zoltan Varga <vargaz@freemail.hu>
14485 * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
14486 by gcc-3.4 as well.
14488 * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
14490 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
14492 * mini.h mini.c (mini_method_compile): Only run abc removal pass on
14493 methods which contain array accesses.
14495 * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
14496 boundaries. Fixes #58537.
14498 * iltests.il: Add regression test for #58537.
14500 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
14502 * mini-x86.c (mono_arch_local_regalloc): Last part of
14503 fix for bug #58633 (releasing register to early).
14505 2004-05-18 Miguel de Icaza <miguel@ximian.com>
14507 * basic-long.cs: Add new regression test.
14509 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
14511 * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
14512 register too early on the chain.
14514 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
14516 * mini.c (create_helper_signature): Use a helper function to reduce
14517 the code which needs to be written. Also set the calling convention of
14518 icalls on windows. Fixes #57840.
14520 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14522 * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
14523 exceptions-ppc.c: added helper function to get the instruction address
14524 from a signal handler context.
14526 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
14528 * helpers.c: use g_get_tmp_dir. Invokes happyness
14531 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
14533 * helpers.c: Add new env variable to pass args to objdump.
14534 Specifically for those of us who love -Mintel. r=miguel, gonzalo.
14536 2004-05-17 Radek Doulik <rodo@ximian.com>
14538 * Makefile.am (common_sources): added abcremoval.h so it get
14539 disted and daily mono packages on go-mono.com will build again
14541 2004-05-17 Massimiliano Mantione <massi@ximian.com>
14543 * abcremoval.c: Fixed coding style, added copyright header.
14545 * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
14547 * mini.h: Added prototype for abc removal main function.
14549 * build_relations_propagation_table.pl: Added copyright header.
14551 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
14553 * basic-long.cs: reg test for complex ceq_long bug.
14555 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
14557 * mini-x86.c (mono_arch_local_regalloc): Correctly free
14558 reg in long and clob case (bug #58343). Fixed/added comments.
14560 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
14562 * mini.c (mono_jit_runtime_invoke): Follow new convention
14563 of calling the invoke method with an function pointer.
14565 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
14567 * ChangeLog: Fix author of memory leak patch.
14569 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
14571 * Makefile.am: fix make dist as well...
14574 2004-05-14 Massimiliano Mantione <massi@ximian.com>
14576 * cfold.c: Made so that conversions from pointer to int4 are no-ops
14577 on archs where pointers are 4 bytes long.
14579 * Makefile.am: Added abcremoval.c source file.
14581 * abcremoval.c: Added abcremoval.c.
14583 * abcremoval.h: Added abcremoval.h.
14585 * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
14587 * inssel.brg: Enabled bounds check removal.
14589 * mini.c: Added support for abcrem optimization.
14591 * mini.h: Added abcrem optimization label.
14593 * driver.c: Added support for abcrem optimization.
14595 * propagated_relations_table.def: Added propagated_relations_table.def.
14597 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
14599 * mini.c, cfold.c: fix style.
14601 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14603 * mini.c: handle issue with the low-level implementation of
14604 some long opcodes (bug #54209).
14606 2004-05-13 Ben Maurer <bmaurer@users.sourceforge.net>
14608 * basic.cs: test for my new cmov stuff.
14610 2004-05-13 Patrik Torstensson
14612 * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
14613 opt and added peephole documentation.
14615 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
14617 * tramp-ppc.c: rewrote the generic trampoline code.
14619 2004-05-11 Patrik Torstensson
14621 * mini-x86.c: optimize long shl/shr asm code (one less branch)
14623 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
14625 * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
14627 * mini.h mini.c dominators.c: Applied patch from Derek Woo
14628 (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
14630 * mini.c: Add new icalls for AsAny marshalling.
14632 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14634 * tramp-ppc.c, mini-ppc.c: more cleanups.
14636 2004-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14638 * mini.c: no warnings.
14640 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14642 * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
14644 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
14646 * mini.c: In the thread abort signal handler, if the thread is in the
14647 process of being stoped, don't throw the Abort exception, just stop the
14650 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
14652 * tramp-ppc.c: removed old code.
14654 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14656 * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
14657 do some simple speed optimizations on ppc.
14659 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14661 * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
14662 and large offsets in load/store.
14664 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
14666 * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
14667 it causes regressions.
14669 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
14671 * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
14674 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14676 * jit-icalls.c: remove warnings.
14677 * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
14678 speedups for unsafe code.
14680 2004-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
14682 * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
14684 2004-05-06 Zoltan Varga <vargaz@freemail.hu>
14686 * basic-calls.cs: Add new regression test.
14688 * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
14691 * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
14693 * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
14696 2004-05-06 Patrik Torstensson
14698 * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
14699 long reg allocation in any reg (not only eax:edx) and implemented
14700 long shl/shr ops in asm instead of helpers.
14702 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
14704 * mini-sparc.h: Fix warnings.
14706 * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
14709 * mini-exceptions.c (mono_handle_exception): Call the filter in a
14710 separate statement for clarity.
14712 * mini-sparc.c: Update status.
14714 2004-05-04 Zoltan Varga <vargaz@freemail.hu>
14716 * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
14719 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14721 * inssel-ppc.brg: another small pre-release workaround:
14722 we don't do overflow detection for long_sub_un.
14724 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14726 * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
14727 (also works around a weird ppc bug: 57957).
14729 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
14731 * tramp-ppc.c: trampoline fixes.
14733 Fri Apr 30 15:54:26 EDT 2004 Paolo Molaro <lupus@ximian.com>
14735 * mini-ppc.c: fixed typos.
14737 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14739 * mini-ppc.c, exceptions-ppc.c: more code saves registers
14740 at the top of the stack. Fixed typos. Use a frame registers
14741 for all the methods with exception clauses.
14743 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14745 * exceptions-ppc.c: restore fp registers.
14747 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14749 * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
14750 order from the stack top (moved the stack room to save the
14751 return value for trace after the param area). Fixed corruption
14752 in restoring registers on unwind.
14754 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14756 * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
14758 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14760 * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
14761 and prolog/epilog for methods that use it. Allow
14762 enough param area room for varargs methods. Fix miguel's
14763 breakage in exception handling.
14765 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14767 * Makefile.am: run genmdesc only on current arch.
14769 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14771 * exceptions-x86.c:
14772 * mini-x86.h: fix the build on windows.
14774 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
14776 * 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.
14778 * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
14780 * mini-exceptions.c: New file.
14782 * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
14783 Move some parts of the x86 exception handling code to an
14784 arch-independent file so it can be shared with other ports.
14786 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
14788 * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
14790 2004-04-26 David Waite <mass@akuma.org>
14792 * driver.c: remove comma from end of enumeration declaration
14794 2004-04-26 Jackson Harper <jackson@ximian.com>
14796 * driver.c: parse config file before loading first assembly. This
14797 allows the user gac to be enabled/disabled.
14799 2004-04-23 Miguel de Icaza <miguel@ximian.com>
14801 * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
14802 simpler mechanism: we do not care what is encoded initially
14803 (branch absolute or relative), we care about the code and its
14804 target. I kept the old code for reference for now.
14806 The new code tries first to determine if the jump is anywhere in
14807 the -/+32 absolute meg range, if it succeeds, it encodes using the
14808 absolute branch; If not, it tried to find something in the
14809 relative range, if not, it uses the handle_thunk code.
14811 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
14813 * exceptions-ppc.c: use the correct ip register on macosx.
14815 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
14817 * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
14819 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
14821 * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
14822 Raise exception on integer divide by zero by hand since the hw
14823 doesn't support it. Handle NaNs in FP compares.
14825 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
14827 * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
14828 code reducing duplication between the platforms and enabled
14829 signal exception handling (on linux for now).
14831 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
14833 * exceptions-ppc.c: more macosx support.
14835 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14837 * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
14839 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
14841 * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
14843 2004-04-19 Ben Maurer <bmaurer@users.sourceforge.net>
14845 * iltests.il: more tests.
14847 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
14849 * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
14852 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
14854 * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
14856 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
14858 * liveness.c: Mark variables as volatile in all basic blocks reachable
14859 from exception clauses.
14861 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
14863 * exceptions.cs (test_0_rethow_stacktrace): Make this work with
14866 2004-04-18 Ben Maurer <bmaurer@users.sourceforge.net>
14868 * iltests.il, basic.cs: more tests for regalloc.
14870 2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
14872 * iltests.il: Some tests for register allocation modifications
14875 2004-04-16 Zoltan Varga <vargaz@freemail.hu>
14877 * exceptions.cs: Add regression test for bug #56782.
14879 * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
14880 original stack trace if an exception is rethrown. Fixes #56782. Oh,
14881 the beauty of fixing the same thing in 5 different files...
14883 2004-04-15 Zoltan Varga <vargaz@freemail.hu>
14885 * mini.c (mono_method_to_ir): Do not compute coverage for inlined
14888 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
14890 * mini.c: Add support for STRWLPARRAY marshalling convention.
14892 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
14894 * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
14895 to init the context to setup the regs pointer).
14897 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14899 * exceptions-ppc.c: more exceptions work.
14901 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14903 * mini.c: avoid reusing the same MonoInst on multiple trees: this is
14906 2004-04-13 Miguel de Icaza <miguel@ximian.com>
14908 * inssel-x86.brg (reg): Add new rules for add, sub and mul that
14909 can use the memory directly.
14911 * cpu-pentium.md: Update documentation from a post from Zoltan.
14913 add x86_add_membase, x86_sub_membase, x86_mul_membase
14915 2004-04-13 Miguel de Icaza <miguel@ximian.com>
14917 * mini-ppc.c: Remove unused definitions FLOAT_REGS and
14918 GENERAL_REGS they were also hardcoded for all PPC ports.
14920 (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
14922 Remove hard-coded limit for floating point registers, use
14923 PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
14925 Notice that in MacOS X calling conventions you can fit a lot more
14926 floating point values in registers, so I should update the PInvoke
14927 test to excercise the passing of floating point values on the
14928 stack (currently broken).
14930 2004-04-06 Miguel de Icaza <miguel@ximian.com>
14932 * tramp-ppc.c (create_trampoline_code): Added
14933 JUMP_TRAMPOLINE_SIZE.
14934 (ppc_magic_trampoline): Follow the pattern from
14935 x86_magic_trampoline: if code is set to zero, return.
14936 (create_trampoline_code): Always pass MonoMethod to the jump
14937 trampoline, before it was passing a null.
14938 (mono_arch_create_jump_trampoline): Implement the jump stub, could
14939 share the code with mono_arch_create_jit_trampoline.
14941 * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
14943 (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
14946 * cpu-g4.md: Added length for jmp instruction, the worst case
14947 scenario is 92 bytes (4 mandatory bytes, potential 19 registers
14950 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
14952 * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
14954 2004-04-07 Zoltan Varga <vargaz@freemail.hu>
14956 * mini.c: Only set bblock->real_offset when adding a new bblock, and
14957 before each IL instruction.
14959 * mini.c (CEE_BOX): Fix warnings.
14961 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14963 * mini.c: removed a few unused vars and extra whitespace.
14965 2004-04-05 Ben Maurer <bmaurer@users.sourceforge.net>
14967 * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
14969 (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
14971 (OP_GETCHR): use the above
14972 (CEE_LDELEMA): use the above.
14974 * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
14975 version of the generic impl.
14976 (MONO_EMIT_BOUNDS_CHECK_IMM): the same
14977 (CEE_LDELEMA): use the above.
14979 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
14981 * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
14984 * iltests.il: Added new regression test for #56317.
14986 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
14988 * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
14989 under NetBSD. Fixes #56450.
14991 * liveness.c (update_gen_kill_set): Fix previous patch.
14993 2004-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14995 * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
14997 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
14999 * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
15000 ldsfld and ldsflda.
15002 * inssel-sparc.brg: Add more optimizations.
15004 * mini-sparc.c: Replace multiply/divide with shifts if possible.
15006 2004-04-01 Martin Baulig <martin@ximian.com>
15008 * mini.c (handle_box): New static function; moved the
15009 implementation of CEE_BOX here.
15010 (mono_method_to_ir): Added `constrained_call' variable.
15011 (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
15012 (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
15013 mono_method_get_constrained() to get the method.
15015 2004-04-01 Martin Baulig <martin@ximian.com>
15017 * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
15018 (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
15019 (mono_method_to_ir): We don't need these macros anymore since
15020 mono_class_get_full() already takes care of it.
15022 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15024 * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
15025 use @function (as doesn't accept #function here) and check the return
15026 value of system and stop if fails.
15028 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15030 * mini.c: set the timeout to 2s when calling mono_domain_finalize.
15032 2004-03-31 Zoltan Varga <vargaz@freemail.hu>
15034 * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
15036 * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
15038 * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
15041 * basic-long.cs: Add test for negation of Int64.MinValue.
15043 2004-03-30 Zoltan Varga <vargaz@freemail.hu>
15045 * mini-sparc.c: Update status.
15047 * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
15049 * exceptions-sparc.c: Fix return value in filters.
15051 * inssel-sparc.brg: Fix register allocation in some rules.
15053 2004-03-28 Martin Baulig <martin@ximian.com>
15055 * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
15058 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
15060 * mini-x86.c (mono_arch_patch_code): Fix warnings.
15062 * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if
15063 dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
15064 remove unused conv_u4 opcode.
15066 * mini-x86.c: Remove valgrind workaround since it slows down things
15067 even when mono is not run under valgrind.
15069 2004-03-26 Zoltan Varga <vargaz@freemail.hu>
15071 * mini-sparc.c: Update status.
15073 * inssel-sparc.brg: Add some optimizations.
15075 * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
15076 future delay slot filling. Add support for varargs, tail calls and JMP.
15078 * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of
15079 CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
15081 * inssel.brg: Fix register allocation in OP_ARGLIST.
15083 * inssel.brg: Fix warnings.
15085 2004-03-25 Martin Baulig <martin@ximian.com>
15087 * mini.c (inflate_generic_field): Removed.
15088 (mini_get_method): Removed, use mono_get_method_full(),
15089 (mini_get_class): Removed, use mono_class_get_full().
15090 (mono_method_to_ir): Pass our generic context to
15091 mono_field_from_token().
15093 2004-03-25 Martin Baulig <martin@ximian.com>
15095 * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
15096 of a `MonoMethod *'.
15097 (mini_get_method): Take a `MonoGenericContext *' instead
15098 of a `MonoMethod *'.
15099 (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
15100 a new local variable called `generic_context' which holds the
15101 current `MonoGenericContext *'; use it to lookup things.
15103 2004-03-24 Martin Baulig <martin@ximian.com>
15105 * mini.c (mini_get_class): New static method; if we're inside a
15106 generic instance, inflate the class if neccessary.
15107 (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
15109 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
15111 * iltests.il: New regression test for #55976.
15113 * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
15116 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
15118 * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
15121 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
15123 * liveness.c: Consider SSA stores as well as loads when making vars
15126 * exceptions.cs: New regression tests for register allocation.
15128 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
15130 * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
15131 * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
15132 domain lock only to protect puntual access to data structures.
15133 Added access lock for sighash, jit_icall_hash_name,
15134 jit_icall_hash_addr and domain->code_mp.
15136 2004-03-20 Zoltan Varga <vargaz@freemail.hu>
15138 * driver.c: Print SIGSEGV handling method.
15140 * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
15142 * mini.c (setup_jit_tls_data): Handle case when this is called
15143 multiple times for a thread.
15145 * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx
15146 is different from fbxx_un. Fixes #54303. Also use constants instead of
15147 magic numbers in a lot of places.
15149 2004-03-19 Zoltan Varga <vargaz@freemail.hu>
15151 * exceptions.cs: Fix cctor test when --regression is used.
15153 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
15155 * mini-ppc.c, exceptions-ppc.c: basic exceptions support
15158 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
15160 * inssel-ppc.brg: fixed register assignments for some rules.
15162 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
15164 * exceptions.cs: Add test for exceptions in static constructors.
15166 * mini.c (mono_jit_compile_method_with_out): Move the calling of
15167 static constructors outside the domain lock. Fixes #55720.
15169 2004-03-17 Martin Baulig <martin@ximian.com>
15171 * mini.c (get_generic_field_inst): Removed, this'll never happen.
15172 (inflate_generic_field): Take the `MonoMethod *' instead of the
15173 `MonoClass *' and added support for generic method.
15174 (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
15175 have a `field->parent->gen_params', only inflate the field if it's
15176 an open constructed type.
15178 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
15180 * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
15181 exception object instead of the preconstructed ones.
15183 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15185 * mini.c: reverted changed to sigsegv_signal_handler commited
15186 accidentally in the previous patch.
15188 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15191 (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
15192 running --aot with an old assembly.
15194 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
15196 * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
15199 * mini-sparc.c: Add support for v9 branches with prediction.
15201 2004-03-15 Bernie Solomon <bernard@ugsolutions.com>
15203 * mini.c (mini_init): #warning is GNUC only
15205 * mini-sparc.h: implement __builtin_frame_address
15206 and __builtin_return_address for Sun C compiler
15208 2004-03-15 Zoltan Varga <vargaz@freemail.hu>
15210 * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
15212 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
15214 * basic-calls.cs: Add test for unaligned byref long argument passing.
15216 * mini-ops.h: Add sparcv9 compare and branch instructions.
15218 * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
15219 v9 instructions if we have a v9 cpu.
15221 * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
15222 registers for global allocation.
15224 * exceptions-sparc.c: Fixes.
15226 2004-03-11 Zoltan Varga <vargaz@freemail.hu>
15228 * liveness.c (mono_analyze_liveness): Optimized version.
15230 * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
15232 * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
15235 * basic-float.cs basic-calls.cs: New regression tests.
15237 2004-03-10 Zoltan Varga <vargaz@freemail.hu>
15239 * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
15240 sigaltstack implementation.
15242 * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
15244 * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
15245 stuff if SIGSEGV_ON_ALTSTACK is not defined.
15247 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
15249 * mini.c: Fix warnings.
15251 * mini.c (mono_resolve_patch_target): New function which contains the
15252 arch independent part of the patching process.
15254 * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
15255 patching code to a separate function.
15257 2004-03-09 Bernie Solomon <bernard@ugsolutions.com>
15259 * mini.c (add_signal_handler): ifdef out on Windows
15261 2004-03-08 Zoltan Varga <vargaz@freemail.hu>
15263 * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c
15264 cpu-sparc.md: Add exception handling support + other fixes.
15266 * driver.c: Print --help output to stdout. Fixes #55261. Also fix
15267 typed GC detection in --version.
15269 * basic.cs exceptions.cs: New regression tests.
15271 * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
15272 the arch specific code can store data during a compilation.
15274 * mini-ops.h: Add OP_SETFRET.
15276 * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
15277 function, register a separate icall for each arity, so the icalls can
15280 * mini.c (mono_print_tree): Print negative offsets in a more readable
15283 * mini.c: Make signal handling work on sparc.
15285 * mini.c (mini_init): Add emulation for lconv_to_r8_un.
15287 * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
15289 * jit-icalls.c: Emulate truncl by aintl on solaris.
15291 * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
15293 2004-03-05 Zoltan Varga <vargaz@freemail.hu>
15295 * mini.c (mini_init): fconv_to_ovf can raise exceptions.
15297 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
15299 * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
15300 a MarshalByRef type, inline a method that performs the check, taking into
15301 account that the object can be a proxy. Also implemented tow new opcodes:
15302 CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
15303 * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and
15304 OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
15306 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
15308 * mini-ppc.c: if a relative branch displacement is too big
15309 but it points to and area reachable with an absolute branch,
15312 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
15314 * mini.c: optimize small copies in cpblk.
15316 2004-03-01 Zoltan Varga <vargaz@freemail.hu>
15318 * basic-calls.cs basic-float.cs: New regression tests.
15320 * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at
15321 negative offsets from %fp. Implement localloc. Fix local register
15322 allocation. Fix the case when the this argument needs to be saved to
15323 the stack. Implement some missing opcodes.
15325 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
15327 * mini.c (mini_method_compile): Reenable global regalloc in methods
15328 with exception handlers.
15330 * linear-scan.c (mono_varlist_sort): Fix warning.
15332 * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
15334 * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
15337 * liveness.c: Make all variables uses in exception clauses volatile, to
15338 prevent them from being allocated to registers. Fixes #42136.
15340 2004-02-25 Zoltan Varga <vargaz@freemail.hu>
15342 * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
15343 causes regressions.
15345 * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
15346 argument to mono_arch_regalloc_cost.
15348 * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs
15351 2004-02-24 Zoltan Varga <vargaz@freemail.hu>
15353 * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c:
15354 Make the cost of allocating a variable to a register arch dependent.
15356 * basic-calls.cs: Fix compilation of tests.
15358 * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
15359 helper function to cut back on the number of #ifdefs needed.
15361 * mini-ppc.c: Fix compilation.
15363 * basic-calls.cs: New regression tests.
15365 * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
15367 * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
15368 of l0 since that is callee saved.
15370 * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
15373 * mini-sparc.c: Ongoing work + flag virtual calls with a special kind
15374 of delay instruction.
15376 * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
15378 * mini.h (MonoCallInst): Add 'virtual' flag.
15380 * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
15382 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
15384 * *.cs: New regression tests.
15386 * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc
15389 * mini.c (mono_runtime_install_handlers): Fix build.
15391 * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
15392 'signal_stack_size' members.
15394 * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an
15395 alternate signal stack.
15397 * exceptions-x86.c: Add stack overflow handling.
15399 * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing
15400 functions to arch independent code.
15402 * mini.c (mono_print_tree): Print more detailed info for load_membase
15405 2004-02-23 Martin Baulig <martin@ximian.com>
15407 * mini.c (mini_get_method): Set `gmethod->generic_inst'.
15409 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
15411 * mini-x86.c: fixed reg allocation for div/rem.
15413 2004-02-22 Miguel de Icaza <miguel@ximian.com>
15415 * driver.c (mono_main): Report some configuratio options on --version.
15417 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
15419 * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
15420 low in the address space. Correctly flush memory in thunks where we
15421 output native code.
15423 2004-02-20 Martin Baulig <martin@ximian.com>
15425 * mini.c (mini_get_method): New static method; inflate all generic
15426 methods and methods in open generic instances.
15427 (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
15428 (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
15430 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
15432 * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
15434 * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
15436 2004-02-19 Bernie Solomon <bernard@ugsolutions.com>
15438 * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
15440 * mini-sparc.c (flushi mono_arch_output_basic_block): make
15441 it compile using Sun's compiler.
15443 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
15445 * 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.
15447 * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
15449 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
15451 * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
15453 * mini-ppc.c: handle calls outside of the allowed range with thunks
15454 allocated using the code manager.
15455 * tramp-ppc.c: use the code manager to hold generated native code.
15456 Fixed the magic trampoline to just patch vtable entries.
15458 2004-02-17 Zoltan Varga <vargaz@freemail.hu>
15460 * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
15463 2004-02-16 Zoltan Varga <vargaz@freemail.hu>
15465 * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
15468 * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
15469 if we have a working __thread implementation.
15471 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove
15472 OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
15474 2004-02-15 Zoltan Varga <vargaz@freemail.hu>
15476 * mini-x86.c: Fix compilation under gcc 2.
15478 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
15480 * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
15481 contains a call to the wrapped function.
15483 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add
15484 OP_<CALL>_IMM opcodes, and use them under X86.
15486 * mini.c (mono_jit_find_compiled_method): Fix warning.
15488 * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
15490 * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
15492 * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
15493 functionality to mini.c.
15495 * mini.c (mono_create_jump_trampoline): New function to create a jump
15496 trampoline. Return a compiled method instead of a trampoline if it
15497 exists. Add a cache for jump trampolines.
15499 * mini.c (mono_jit_find_compiled_method): New function to return a
15500 compiled method if it exists.
15502 * mini-x86.c: Call mono_create_jump_trampoline instead of
15503 mono_arch_create_jit_trampoline.
15505 * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
15506 a jump trampoline. Fixes #52092.
15508 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
15510 * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
15511 which is not up-to-date. Add check_corlib_version () instead.
15513 * mini.c (mini_init): Call mono_thread_attach () so embedders do not
15516 * mini.c (mono_runtime_install_handlers): Remove check for valgrind
15517 since newer valgrind versions do not need it.
15519 * mini.c (mono_jit_compile_method_with_opt): New helper function to
15520 compile a method with a given set of optimizations.
15522 * mini.c: Compile icall wrappers on-demand instead of at startup.
15524 * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
15525 wrapper for an icall.
15527 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
15529 * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
15532 * iltests.il: Add test for non-empty stack before switch instruction.
15534 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
15536 * mini.c: Add support for new stringbuilder marshalling conventions.
15538 * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
15540 2004-02-01 Martin Baulig <martin@ximian.com>
15542 * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
15543 in `ginst->mtype_argv'.
15545 2004-01-31 Miguel de Icaza <miguel@ximian.com>
15547 * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
15548 facilitate grepping.
15550 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
15552 * mini.c: fixed buglet in initobj generic implementation for references.
15554 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
15556 * Makefile.am: make the version script conditional.
15557 * jit-icalls.c: handle missing truncl().
15559 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
15561 * exceptions.cs: Add more tests for double->int conversion.
15563 * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
15564 we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
15566 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
15568 * driver.c: make --verbose --version emit an error
15569 if the loaded corlib doesn't match the runtime version.
15571 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
15573 * mini-ppc.h: export ppc_patch().
15574 * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
15575 * tramp-ppc.c: call convention fixes: Linux/PPC support should be
15576 on par or better than on MacOSX.
15578 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
15580 * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
15581 mono_lookup_pinvoke_call.
15583 * mini-x86.c: Under windows, the default pinvoke calling convention is
15584 stdcall. Fixes #52834.
15586 * mini.c (optimize_branches): Add an upper bound to the number of
15587 iterations to prevent infinite loops on strange loops. Fixes #53003.
15589 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
15591 * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
15592 and ISINST. Fixes #52093.
15594 * objects.cs (test_0_vector_array_cast): New tests.
15596 2004-01-15 Zoltan Varga <vargaz@freemail.hu>
15598 * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
15599 checking in Array.Set ().
15601 * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
15604 * object.cs (test_0_multi_array_cast): New regression test.
15606 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
15608 * exceptions-ppc.c: fix build on Linux/PPC.
15610 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
15612 * tramp-x86.c (x86_magic_trampoline): Disable code patching when
15613 running under valgrind.
15614 (x86_magic_trampoline): Fix build bustage.
15616 * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
15617 negative values as well. This is needed for the encoding of the line number
15618 info, since sometimes the line numbers are not in increasing order.
15620 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
15622 * cpu-pentium.md (localloc): Increase the size of the localloc
15623 instruction since it is a loop under Win32.
15625 * debug-mini.c (record_line_number): Get rid of unneccesary memory
15628 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
15630 * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c
15631 tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from
15632 Max Horn (max@quendi.de). Fix file names in comments.
15634 2004-01-03 Zoltan Varga <vargaz@freemail.hu>
15636 * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
15637 avoid stack overflow.
15638 (replace_usage): Avoid uninitialized variable warnings.
15640 * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
15641 and taking the address of valuetype variables.
15643 2004-01-03 Patrik Torstensson
15645 * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
15646 for other purposes than FP later on.
15648 2004-01-02 Zoltan Varga <vargaz@freemail.hu>
15650 * mini.c (mono_method_to_ir): Prevent register allocation for arguments
15653 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
15655 * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
15657 2003-12-30 Patrik Torstensson <p@rxc.se>
15659 * mini-x86.h: Decreased number of availiable fp regs.
15660 Solves corner cases with FP spilling.
15662 2003-12-23 Patrik Torstensson <p@rxc.se>
15664 * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
15665 for floating point stack tracking / spilling on x86.
15668 * basic-float.cs: added float mul overflow test.
15670 2003-12-23 Zoltan Varga <vargaz@freemail.hu>
15672 * mini.c (mono_method_to_ir): Add workaround for bug #51126.
15674 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15676 * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
15677 supports for cond branches that overflow the immediate
15678 overflow offset. mcs can compile simple programs.
15680 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15682 * exceptions-ppc.c: exception handling support wip:
15683 finally handlers get run on exception.
15685 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
15687 * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while
15690 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15692 * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
15693 initial support for stack walking and unwinding.
15695 2003-12-18 Zoltan Varga <vargaz@freemail.hu>
15697 * driver.c (mono_main): Make corlib-out-of-sync message more
15698 descriptive. Also remove verify_corlib call.
15700 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15702 * mini.c: make CEE_NEWARR calls and other emulated opcodes
15703 not overlap with other call's arguments, too.
15705 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
15707 * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c:
15708 move to arch-specific code the choice of arch-specific
15709 intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
15710 * mini.c: ensure emulation calls will not interleave
15713 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
15715 * tramp-ppc.c, basic-calls.cs: rework trampolines so that
15716 the magic trampoline stack frame is dropped before executing
15719 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15721 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
15722 and integer to fp conversions. Added support for overflowing
15723 arguments on the stack. Reserve a couple more registers as temps.
15724 Added support for aot compilation (as output still needs to be
15727 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15729 * mini-ppc.c, basic-long.cs: fix jumps to known labels.
15730 Don't overwrite return register in some corner cases.
15732 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
15734 * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
15735 static constructors when AOT compiling.
15737 * driver.c (mono_main): Call mono_check_corlib_version.
15739 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15741 * cpu-g4.md, basic.cs: fixed div target register.
15743 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
15745 * mini-ppc.c, basic.cs: shl_imm fix with test.
15747 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15749 * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing
15750 structures by value. Misc fixes.
15751 * objects.cs: more tests.
15753 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
15755 * mini-ppc.c: lconv.ovf.i implemented.
15757 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15760 (mini_init): don't error out if someone already called g_thread_init.
15762 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15764 * exceptions-x86.c, exceptions-ppc.c: allow the exception object
15765 to be any type per the spec. Fix abnormal memory usage when
15766 the same object is repeatedly thrown.
15768 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
15770 * mini.c: check for overruns in IL code.
15772 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
15774 * TODO: Add/remove some todo entries.
15776 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
15778 * driver.c (mono_main): Call mono_verify_corlib.
15780 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
15782 * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy.
15783 This has been moved to mini.c
15784 * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
15785 type being casted is marshalbyref it could be a proxy, so instead of
15786 emitting the type check code, emit a call to a runtime method that will
15787 perform the check by calling CanCastTo if needed.
15789 2003-12-06 Zoltan Varga <vargaz@freemail.hu>
15791 * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
15792 methods with large stack frames under Win32.
15794 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
15796 * Makefile.am: Distribute regression tests.
15798 * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
15799 at the end instead of inserting each variable into the sorted list.
15801 * linear-scan.c (mono_varlist_sort): New helper function.
15803 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15805 * mini.c: ensure arguments and locals are within bounds.
15807 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15809 * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and
15812 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
15814 * mini.c (mono_cprop_copy_values): Fix crash.
15816 * aot.c: Set verbosity back to 0.
15818 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15820 * regalloc.c: complete memory leak fix by Laurent Morichetti
15823 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
15825 * driver.c (main_thread_handler): Revert the previous patch.
15827 * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
15830 * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
15831 memory from the memory pool.
15833 * driver.c (main_thread_handler): Turn on all optimizations when
15836 * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
15837 an array for better performance.
15839 * regalloc.c (mono_regstate_assign): Fix memory leak.
15841 * debug-mini.c (mono_debug_serialize_debug_info): New function to
15842 serialize the debug info.
15844 * debug-mini.c (mono_debug_add_aot_method): New function to load the
15845 debug info from the serialized representation.
15847 * aot.c: Save debug info into the generated file and load it when
15850 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15852 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15854 * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
15855 More FP-related fixes.
15857 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15859 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
15860 and register allocation buglet. Hello world now runs.
15862 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15864 * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
15865 * tramp-ppc.c: fixed class init trampoline.
15866 * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
15868 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15870 * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
15871 mini.c: more ppc changes/fixes.
15873 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
15875 * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
15876 Also optimize the case when the arguments are the same in the caller
15879 * iltests.il: Add tests for tail calls with valuetype arguments.
15881 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15883 * mini-ppc.c: fixes for struct return type.
15885 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
15887 * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move
15888 mono_spillvar_offset() to arch-specific code.
15890 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15892 * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
15894 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
15896 * exceptions-x86.c: Fix stack space leaks.
15898 * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
15899 registers from the lmf if the method has save_lmf set.
15901 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
15903 * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
15904 of icall wrappers into InvokeInDomain, since these are now per-domain.
15906 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
15908 * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
15909 make some opcode emulation and intrinsic ops enabled/disabled
15910 according to the architecture. More fixes.
15912 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15914 * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
15916 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15918 * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
15919 arch-specific handling for 'this' and struct return type to
15920 arch-specific code.
15922 2003-11-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15924 * aot.c: prevent divide by zero error when reporting (it happened with
15925 Accessibility.dll).
15927 2003-11-25 Zoltan Varga <vargaz@freemail.hu>
15929 * mini.h (inst_switch): Remove unused macro.
15931 2003-11-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15934 (load_aot_module): free 'info->methods' and 'info' properly. No more
15935 "free(): invalid pointer blah" messages when you have an old aot
15938 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
15940 * jit-icalls.c, mini.c: Added support for context static fields.
15942 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
15944 * mini.c (mono_method_blittable): Methods which set LastError are not
15945 blittable either. Fixes #51108.
15947 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15949 * mini.c: flush icache.
15950 * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
15952 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
15954 * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
15956 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
15958 * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
15961 * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with
15964 * inssel.brg (CEE_MKREFANY): Fix AOT case.
15966 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
15968 * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div
15969 instruction when the result is discarded.
15971 * iltests.il (test_0_div_regalloc): New regression test.
15973 * arrays.cs: Fix compilation error.
15975 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
15977 * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
15978 float rules to inssel-x86.brg: sane architectures with FP registers
15979 don't need to implement these rules.
15981 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15983 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
15985 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15987 * mini.h, inssel-long32.brg: fixed endianess issues in int64
15988 implementation of 32 bit systems.
15990 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15992 * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
15993 (Jeroen Zwartepoorte).
15995 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
15997 * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
15998 the caller and the callee matches.
16000 * mini.c (mono_method_to_ir): Add comment.
16002 * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
16003 signbit is missing on some platforms.
16005 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
16007 * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
16009 * mini.c (setup_jit_tls_data): Call the new function.
16011 * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
16013 * mini-x86.c: Add experimental support for fast access to the lmf
16014 structure under NPTL/Linux 2.6.x.
16016 2003-11-06 Martin Baulig <martin@ximian.com>
16018 * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
16019 `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
16022 2003-11-02 Martin Baulig <martin@ximian.com>
16024 * mini.c (inflate_generic_field): New static method.
16025 (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
16026 generic instance and the field is declared in a generic type, call
16027 inflate_generic_field() to inflate it. Fixes gen-28.cs.
16029 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
16031 * mini.h mini.c (mono_method_same_domain): New function to return
16032 whenever the caller and the callee are in the same domain.
16034 * tramp-x86.c (x86_magic_trampoline): Use the new function.
16036 2003-10-30 Martin Baulig <martin@ximian.com>
16038 * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
16039 similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
16041 (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
16042 MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS().
16044 2003-10-29 Zoltan Varga <vargaz@freemail.hu>
16046 * mini.c mini-ops.h inssel.brg: Implement undeniable exception
16049 * mini.c (sigusr1_signal_handler): Move creation of the thread abort
16050 object here, so it is in the correct appdomain etc.
16052 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
16054 * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
16056 (mono_method_to_ir): Avoid freeing the type created returned from
16057 mono_type_create_from_typespec, since it is put into an internal cache
16058 by the function. Fixes pointer.exe.
16060 * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal
16061 trampolines for icalls and pinvokes as well. Fixes #33569.
16063 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
16065 * mini.c: Update after appdomain changes.
16067 * mini.c (mono_jit_compile_method_inner): Allways compile native
16068 method wrappers in the root domain, since there can only be one
16069 instance of them, whose address is stored in method->info.
16071 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
16073 * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
16074 environment variable. Instead detect automatically whenever running
16075 under valgrind using the magic macro RUNNING_ON_VALGRIND from
16078 2003-10-16 Miguel de Icaza <miguel@ximian.com>
16080 * trace.c, trace.h: New files that implement the new trace option
16083 * driver.c: Document new --trace options.
16085 * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
16088 - if (mono_jit_trace_calls)
16089 + if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
16091 * mini.h: prototypes.
16093 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
16095 * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
16097 * mini.c inssel.brg: Implement typedefbyref opcodes.
16099 * mini.c (mono_jit_compile_method): Remove unused local variable.
16101 * mini.c (mono_jit_compile_method_inner): Ditto.
16103 2003-10-12 Zoltan Varga <vargaz@freemail.hu>
16105 * tramp-x86.c (x86_class_init_trampoline): Fix build.
16107 * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
16109 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
16111 * mini.c (mono_no_aot): Remove unused global variable.
16113 * mini.c: Thread safety fixes.
16115 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
16117 * mini.c (mono_create_class_init_trampoline): Add a lock around
16118 class_init_hash_addr.
16120 * arrays.cs (test_0_newarr_emulation): Add new regression test for
16123 * mini.c: Decompose the NEWARR instruction before decomposing its
16124 arguments. Fixes #30073.
16126 2003-10-08 Zoltan Varga <vargaz@freemail.hu>
16128 * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
16131 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
16133 * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
16135 * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
16137 * driver.c: Add support for compiling icall wrappers to --compile.
16139 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
16141 * inssel.brg: The empty value in class->interface_offsets is -1, not
16144 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
16146 * objects.cs: New test for 'is' operator on an array of interfaces.
16148 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16150 * tramp-ppc.c: update trampoline code to support jumps
16151 and class initialization.
16153 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
16155 * mini.c (mono_jit_compile_method): Fix reading of freed memory.
16157 * inssel.brg (OP_UNBOXCAST): Fix #46027.
16159 * inssel.brg (OP_UNBOX): Remove unused rule.
16161 * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
16162 region instead of one for each method. Fixes #47813.
16164 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
16166 * exceptions.cs (test_0_nested_finally): New regression test for
16167 nested exception handlers.
16169 * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
16171 * mini.c (mono_method_to_ir): Avoid inlining tail calls.
16173 * mini.c (mono_method_to_ir): Fix tail recursion in the presence of
16176 * mini.c (mono_method_check_inlining): Make the inlining limit
16177 configurable by an environment variable.
16179 * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
16181 * mini.h: Bump AOT file version.
16183 * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a
16184 token, store the image along with the token, since the token might not
16185 refer to the same image as the method containing the relocation,
16186 because of inlining.
16188 2003-09-27 Zoltan Varga <vargaz@freemail.hu>
16190 * mini.c (mono_precompile_assemblies): New function to compile
16191 all methods in all loaded assemblies.
16193 * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
16195 * regalloc.h regalloc.c (MonoRegState): Change the type of
16196 iassign and fassign to int*, since they can contain large negative
16197 values if the register is spilled. Also added some comments. Fixes
16200 * exceptions-x86.c (seh_handler): Fix handling of system exceptions
16201 under Win32. Fixes #42964.
16203 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
16205 * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
16207 * aot.c: Added support for AOT compiling methods which contain calls
16208 to wrappers. Currently, only remoting-invoke-with-check wrappers are
16211 * driver.c (compile_all_methods): Run the compilation in a thread
16212 managed by mono. Fixes #44023.
16214 * mini.c (mono_codegen): Print full method name in verbose output.
16216 * mini-x86.c (mono_arch_patch_code): Fix warning.
16218 * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
16219 jumps, since the method we are jumping to might be domain-specific.
16221 * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
16223 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16225 * inssel.brg: string chars are unsigned.
16227 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
16229 * TODO: New todo item.
16231 * tramp-x86.c (x86_class_init_trampoline): New trampoline function
16232 which calls mono_runtime_class_init and patches the call site to
16233 avoid further calls.
16234 (mono_arch_create_class_init_trampoline): New arch specific function
16235 to create a class init trampoline.
16236 (create_trampoline_code): Generalized so it can create
16237 class init trampolines as well.
16239 * mini.c (helper_sig_class_init_trampoline): New helper variable.
16240 (mono_create_class_init_trampoline): New function to create and cache
16241 class init trampolines.
16242 (mono_find_class_init_trampoline_by_addr): New function to lookup the
16243 vtable given the address of a class init trampoline. Used by the
16245 (mono_codegen): Generate a call to a trampoline instead of
16246 mono_runtime_class_init in LDSFLD[A].
16247 (mono_codegen): Add relocations for the new trampoline.
16249 * mini.h mini-x86.c aot.c: Added a new relocation type:
16250 MONO_PATCH_INFO_CLASS_INIT.
16252 * mini.h: Bump AOT version number.
16254 * aot.c: Create a copy of the loaded code instead of using the original
16255 so methods which call each other will be close in memory, improving
16258 * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
16259 patch since it breaks the regression tests.
16261 * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
16262 for the register saving instruction sequence since the
16263 frame_state_for function in glibc 2.3.2 don't seem to detect it.
16265 2003-09-14 Zoltan Varga <vargaz@freemail.hu>
16267 * TODO: Fix todo item && remove another.
16269 2003-09-12 Zoltan Varga <vargaz@freemail.hu>
16271 * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
16274 * aot.c: Moved the check for MONO_LASTAOT into the initialization
16275 function of the module.
16277 * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
16278 turning on/off the usage of AOT code. Got rid of mono_no_aot and the
16279 --no-aot command line option.
16281 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
16283 * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
16284 by Bernie Solomon (bernard@ugsolutions.com).
16286 * inssel.brg: Refactor the interface offset table related code into
16287 its separate functions and add support for the AOT case.
16289 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
16291 * aot.c (mono_aot_get_method_inner): Fix memory leak.
16293 * aot.c: Added mono_aot_verbose variable and made all debugging
16294 output depend on the value of this variable.
16296 * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
16297 method_label and info_label.
16299 * mini.h mini-x86.c aot.c: Added a new relocation type
16300 MONO_PATCH_INFO_IID for klass->interface_id.
16302 * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
16303 the MonoJitInfo structure.
16305 * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
16306 a non-root appdomain in shared mode.
16308 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
16310 * aot.c: make aot loader less verbose. Remove free of unused variable.
16312 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
16314 * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
16316 * .cvsignore: Added *.dll.
16318 * mini.c (mono_print_tree_nl): New function callable while debugging.
16320 * mini.c (mono_print_code): Export this.
16322 * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
16325 2003-09-05 Zoltan Varga <vargaz@freemail.hu>
16327 * mini.h (MonoCompile): Added 'jit_info' field.
16329 * mini.c (mini_method_compile): Save the generated MonoJitInfo into
16330 the cfg structure, since it is needed by the AOT compiler.
16332 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
16334 * aot.c: A major rewrite. Changes include:
16335 - save exception tables for methods which have them.
16336 - cache failed lookups in aot_get_method () to avoid the (slow) calls
16337 to g_module_symbol.
16338 - reworked the file format so it is now much smaller and needs
16339 fewer relocation entries.
16341 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
16343 * aot.c (load_aot_module): Fix build bustage on platforms without
16346 2003-09-04 Martin Baulig <martin@ximian.com>
16348 * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
16350 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
16352 * TODO: Some new optimization ideas.
16354 * aot.c: Move AOT module loading logic here from mono_assembly_open.
16356 * aot.c: Save the optimization flags used to compile the code into
16359 * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
16360 support emitting domain specific code.
16362 * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is
16363 no longer domain neutral. It can be made domain neutral by compiling
16364 with --optimize=shared.
16366 * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
16367 between appdomains.
16369 * driver.c mini.h mini.c: New --no-aot debugging option which disables
16370 loading of AOT code.
16372 * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
16374 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
16375 if there is no domain neutrality information.
16377 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
16379 * aot.c (mono_compile_assembly): Emit a symbol containing the file
16380 format version into the generated library.
16382 * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
16383 callee method into the caller since one of them could be shared.
16385 * mini.h mini-x86.c aot.c: Added two new relocations so throwing
16386 system exceptions from AOT code now works.
16388 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling
16389 method if it is domain neutral and the callee is not.
16391 * graph.c (cfg_emit_one_loop_level): Fix warning.
16393 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
16395 * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
16398 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
16400 * mini.c (mini_init): Call mono_marshal_init () explicitly since it
16401 is needed by code which is executed before mono_runtime_init ().
16402 Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
16404 * mini.c (mono_thread_abort): Fix warning.
16405 (mono_jit_compile_method): Call static constructor in the AOT case too.
16407 * aot.c (mono_compile_assembly): Fix warning.
16409 2003-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16411 * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
16413 2003-08-28 Zoltan Varga <vargaz@freemail.hu>
16415 * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
16417 * cpu-pentium.md: Fix the length of call opcodes so they include the
16418 ESP restoring instruction. Fixes #47968.
16420 2003-08-28 Martin Baulig <martin@ximian.com>
16422 * mini-x86.c (mono_arch_call_opcode): Added support for
16423 MONO_TYPE_GENERICINST.
16425 * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.
16427 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
16429 * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
16430 a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
16432 * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
16435 2003-08-26 Martin Baulig <martin@ximian.com>
16437 * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
16438 when reporting an error, set this to the actual error location.
16439 (mono_method_to_ir): Report the correct error location if
16440 get_basic_blocks() returned an error.
16442 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
16444 * mini.c (mono_type_blittable): OBJECT is not blittable.
16445 (mono_method_blittable): Methods which have marshalling descriptors
16446 are not blittable either. Fixes #47842.
16448 2003-08-22 Zoltan Varga <vargaz@freemail.hu>
16450 * driver.c mini.c: Use an environment variable instead of a global
16451 variable. Also fix the build.
16453 * mini.c (mini_init): Call g_thread_init () to make glib thread-safe.
16454 Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
16457 * driver.c mini.c: Added --with-valgrind option to turn off some
16458 code which prevents mono from running under valgrind.
16460 * mini.c (mono_emit_call_args): Fixed warning.
16462 * mini.c (mono_emulate_opcode): Fixed warning.
16464 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16466 * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
16467 * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
16468 regalloc.c, regalloc.h: specify available registers in arch-specific
16469 code and support floats in the regallocator (patch by Laurent Morichetti
16472 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16474 * mini.c: mono_thread_current() can be called only after
16475 mono_runtime_init(): rearrange code to not call it early on.
16477 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16479 * mini.c: allocate jump tables in the code mempools.
16481 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16483 * mini.c, mini.h: make sure per-thread data allocated by the jit is
16486 2003-08-10 Miguel de Icaza <miguel@ximian.com>
16488 * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
16489 12 to 16. This fixes bug #47453.
16492 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
16494 * mini-ppc.c: fixed indexed load and unsigned compares.
16496 2003-08-06 Lluis Sanchez Gual <lluis@ximian.com>
16498 * mini.c: reenabled installation of handler for
16499 thread abort signal.
16501 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16503 * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
16504 by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
16505 until it's fixed and actually useful.
16507 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16509 * inssel-long32.brg: couple more opcodes implemented.
16511 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
16513 * mini-sparc.c: Even more opcodes implemeted.
16515 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
16517 * mini-sparc.c: More opcodes implemented.
16519 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
16521 * mini-sparc.c: More opcodes implemented.
16523 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
16525 * inssel-sparc.brg: Add some needed rules. Direct
16527 * Makefile.am: Use inssel-sparc.brg
16528 * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
16529 an assert happy for now.
16531 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
16533 * mini-sparc.c: Fixed compile errors.
16534 * exceptions-sparc.c: Same. We now produce a mono binary
16535 on sparc-linux. Yea.
16537 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
16539 * mini-sparc.c: Renamed registers. Also some macro cleanups.
16540 * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
16541 They compile, but do not work.
16543 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16545 * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
16546 mini-sparc.h, tramp-sparc.c: Beginning of sparc support
16547 from Mark Crichton <crichton@gimp.org> and Christopher Taylor
16550 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16552 * mini.c: more opcodes implemented and better support for generics.
16554 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16556 * cpu-g4.md, cpu-pentium.md: updates for new instructions.
16557 * mini.c, mini.h: first cut at generics support: some new instructions
16558 added and changed the behaviour of some of the existing ones.
16560 2003-07-21 Miguel de Icaza <miguel@ximian.com>
16562 * mini.c: Removed definition of metadata_shared mutex here.
16564 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16566 * mini-x86.c: make vararg calls work for instance methods.
16568 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
16570 * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
16571 returns the arguments in a separte list, now.
16573 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16575 * aot.c, mini.c: updates for array type representation changes.
16577 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
16579 * mini.c: register function to perform jit shutdown.
16581 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16583 * mini.c: use a faster allocator if possible.
16585 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16587 * aot.c: some cleanups and portability changes.
16589 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16591 * mini.c: use faster allocation for CEE_BOX if possible.
16593 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16595 * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
16596 Moved inlined mempcy code to its own function so that is can be
16597 reused. Added an inline memset function as well (optimized initobj).
16598 * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
16600 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16602 * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
16604 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
16606 * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
16607 arch code can setup the cpu for CLR execution, if needed.
16608 We use it on x86 to set the precision of FP operations.
16610 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
16612 * mini.c: disable some optimizations if we can guess they'll cost too
16613 much for a given method.
16615 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
16617 * mini.h mini.c: Rework last patch based on suggestions by Paolo.
16619 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
16620 * mini.h mini.c mini-x86.c: Added instruction level coverage
16621 info collection support.
16623 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16625 * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
16626 is now implemented in the profiling API. Get rid of a couple of
16627 unnecessary global variables.
16629 2003-06-15 Nick Drochak <ndrochak@gol.com>
16631 * basic-long.cs: tests for negative values for bigmul, and unsigned.
16632 * cpu-g4.md: add op_bigmul and op_bigmul_un
16633 * cpu_pentium.md: add op_bigmul_un
16634 * inssel-long32.brg: add rule for unsigned bigmul
16635 * mini-ops.h: define OP_BIGMUL_UN
16636 * mini-x86.c: THE BUG: handle (un)signed properly
16637 * mini.c: choose unsigned opcode if needed.
16638 This set of patches fixes bug #44291
16640 2003-06-13 Dietmar Maurer <dietmar@ximian.com>
16642 * mini.c (optimize_branches): improved to handle all kinds of
16643 conditional branches.
16645 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16647 * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
16648 don't raise exceptions.
16650 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16652 * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
16653 to arch-specific files.
16655 2003-06-09 Martin Baulig <martin@ximian.com>
16657 * Makefile.am (libs): Added $(LIBGC_LIBS).
16659 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
16661 * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
16662 and OP_ATAN (fixes bug#44293).
16664 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
16666 * Makefile.am, mini-x86.c: rename cpu description array to
16667 pentium_desc, since some compilers define the 'pentium' preprocessor
16670 2003-05-28 Dietmar Maurer <dietmar@ximian.com>
16672 * mini.c (mini_select_instructions): add explicit branch if the
16673 following block is not the false target of a conditional branch -
16674 we need this with any optimization that reorder or remove bblocks
16676 * mini.c (optimize_branches): bug fixes
16678 2003-06-06 Dietmar Maurer <dietmar@ximian.com>
16680 * mini.c (mono_method_to_ir): inline static readonly fields
16682 * ssa.c (fold_tree): start cfold support for long (very simple
16685 * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
16687 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16689 * inssel.brg: fixed memcpy (bug #44219).
16691 2003-06-05 Dick Porter <dick@ximian.com>
16693 * driver.c: Set the glib log levels to not abort if g_message
16696 g_set_prgname() has to happen before mini_init() so that the
16697 process handle gets the info.
16699 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16701 * driver.c: add intrins to the default optimizations to get wider
16704 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16706 * mini.h: some large basic blocks will overflow a 16-bit
16707 integers for symbolic registers.
16709 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
16711 * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
16712 (mono_arch_output_basic_block): fix bug 43499
16714 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16716 * mini.c: kill duplicated definition of mono_debug_format.
16718 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
16720 * mini-x86.c, arrays.cs: fixed register allocation bug.
16722 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
16724 * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
16726 * mini.c (mini_get_opcode_for_method): inline IEEERemainder
16728 2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16731 (print_method_from_ip): also print source location information if
16734 2003-06-02 Dietmar Maurer <dietmar@ximian.com>
16736 * mini.c (mono_find_block_region): bug fix in region code
16737 (mini_method_compile): enable removing unreachable code again, but
16738 only in methods without exception clauses.
16740 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16742 * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
16743 Implemented arglist opcode and handling of TypedReference type.
16744 Fixed x86 call convention when a structure is returned.
16745 Minimal support for calling static vararg methods.
16747 2003-05-30 Dietmar Maurer <dietmar@ximian.com>
16749 * mini.c (mini_method_compile): always remove unreachable code,
16750 because the code in them may be inconsistent (access to dead
16751 variables for example).
16753 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16755 * driver.c, debug-mini.c: warning fixes.
16757 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
16759 * Makefile.am, jit.h, mini.h: install header for embedding mono.
16761 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
16763 * mini.c: thread-static fields are registered in mono_class_vtable(),
16764 so ensure the function is called before checking for them.
16766 2003-05-27 Dietmar Maurer <dietmar@ximian.com>
16768 * mini.c (optimize_branches): fix for bug 43586
16770 * jit-icalls.c (mono_llmult_ovf): added an additional check for
16771 overflow (fixes Bug #43639)
16773 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16775 * mini.c, objects.cs: allow the use of stobj for primitive types.
16777 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16779 * mini.c: be less strict about argument checking until we support
16780 running the verifier.
16782 2003-05-27 Nick Drochak <ndrochak@gol.com>
16784 * basic-long.cs: tests for (ulong)int * (ulong)int also
16785 * mini.c: use the same trick for (ulong)int * (ulong)int
16787 2003-05-27 Nick Drochak <ndrochak@gol.com>
16789 * basic-long.cs: add regression test for (long)int * (long)int
16790 * cpu-pentium.md: add op_bigmul specification
16791 * inssel-long32.brg: add OP_BIGMUL rule
16792 * mini-ops.h: add OP_BIGMUL
16793 * mini-x86.c: register allocator: handle case where src1 needs to be
16795 * mini.c: substitute special BIGMUL opcode in the tree for
16796 (long)int * (long)int
16798 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
16800 * jit-icalls.c: call the type ctor on field access if needed.
16802 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16804 * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
16805 to a method (including results of ldelema, bug#43207).
16807 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
16809 * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
16810 colors to show exception handler blocks.
16812 * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
16813 (fix for pinvoke7.cs).
16815 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16817 * mini.h, mini.c: ensure correct initialization order for types that
16818 require it. Prepare for lazy compilation of jit icall wrappers.
16819 Provide a name for opcode emulation to reduce unneeded mallocing.
16821 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
16823 * mini-x86.c: better register restoring code and profiling
16824 support for tail calls.
16826 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16828 * mini.h, driver.c: prepare for leaf methods optimization.
16830 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16832 * mini.c: get targets of branches before converting a method.
16834 2003-05-23 Dietmar Maurer <dietmar@ximian.com>
16836 * mini.c (optimize_branches): added some experimental code (disbaled)
16838 2003-05-22 Dietmar Maurer <dietmar@ximian.com>
16840 * mini.c (optimize_branches): fix branch to branch optimization
16842 * exceptions-x86.c (mono_arch_handle_exception): bug fix.
16844 * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
16846 * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
16848 * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
16851 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
16853 * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
16854 enable use of interface variables again.
16856 * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
16857 I1 to registers because there is no simply way to sign extend 8bit
16858 quantities in caller saved registers on x86.
16860 * inssel-float.brg: set costs of some rules to 2 so
16861 that monobure always select the arch. specific ones if supplied,
16862 regardless of the order we pass the files to monoburg.
16864 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16866 * mini.c, mini-x86.c: since the magic trampoline for jumps
16867 can't patch the code directly, we do it as soon as the
16868 method gets compiled.
16870 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16872 * mini-x86.c, mini.h: introduce a new patching method
16873 to support CEE_JMP and tail calls.
16874 * mini.c: obey tail.call. Don't precompile methods target
16876 * tramp-x86.c: new trampoline code to handle methods
16877 reached through a jump.
16879 2003-05-20 Dietmar Maurer <dietmar@ximian.com>
16881 * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
16882 bit values to registers
16884 2003-05-19 Dietmar Maurer <dietmar@ximian.com>
16886 * mini.c (mono_compile_get_interface_var): share interface
16887 variables if possible.
16889 2003-05-16 Martin Baulig <martin@ximian.com>
16891 * debug-mini.c (mono_init_debugger): New function to initialize
16892 the debugger. This is not in the debugger since it needs to
16893 access some of mini's internals.
16895 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
16897 * mini.c (mono_method_to_ir): inlining fixes/cleanups
16899 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
16901 * mini.c, mini-opts.h, inssel.brg: inline small memcpy
16902 for value type handling.
16904 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
16906 * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
16907 (mono_method_check_inlining): enable inlining of all kinds of wrappers
16909 2003-05-15 Lluis Sanchez Gual <lluis@ideary.com>
16911 * mini.c: fixed little bug in CEE_NEWOBJ case when calling
16912 the constructor through a proxy.
16914 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16916 * jit-icalls.c, inssel.brg: fixes to array element address
16919 2003-05-15 Dietmar Maurer <dietmar@ximian.com>
16921 * mini-x86.c (is_regsize_var): allocate pointer to registers
16923 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16925 * driver.c: fixed typo, added intrins to the set of optimizations
16926 tested with regressions.
16928 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
16930 * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
16931 * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
16934 2003-05-14 Dietmar Maurer <dietmar@ximian.com>
16936 * inssel.brg: remove some common pop instructions without side effects
16938 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16940 * inssel-x86.brg: fixed thinko in int to double conversions.
16942 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
16944 * mini.c, jit-icalls.c: added runtime thread-static variable support.
16946 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16948 * inssel-long32.brg: two more missing instructions.
16950 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
16952 * mini.c (mono_emit_call_args): set the cil_code for all arguments
16953 if not already set.
16955 2003-05-12 Zoltan Varga <vargaz@freemail.hu>
16957 * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
16960 * basic-float.cs: Added tests for negative zero.
16962 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16964 * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
16965 a couple of missing operations for long casts, with test cases.
16967 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16969 * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
16971 2003-05-09 Dietmar Maurer <dietmar@ximian.com>
16973 * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
16974 code size estimation.
16976 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
16978 * mini.c (mono_jit_create_remoting_trampoline): make it work with
16979 abstract methods (fix bug 42542)
16981 * aot.c: add ability to handle array types
16983 2003-05-08 Zoltan Varga <vargaz@freemail.hu>
16985 * mini.c: Call the _specific versions of the object allocation
16986 functions if possible.
16988 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16990 * driver.c: call setlocale ().
16992 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16994 * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
16997 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
16999 * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
17001 * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
17002 wrappers (fix bug 42122)
17004 2003-05-04 Martin Baulig <martin@ximian.com>
17006 * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
17008 * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
17009 s/mini_set_defaults/mono_set_defaults/g.
17011 2003-05-04 Martin Baulig <martin@ximian.com>
17013 * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
17015 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
17017 * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
17018 (reported by Don Roberts).
17020 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
17022 * mini.c: temporarily work around two bugs for this release.
17024 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
17026 * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
17027 that contains -export-dynamic and it makes using the ld script
17029 * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
17031 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
17033 * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
17036 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
17038 * mini.c: make sure leave calls all the needed finally blocks,
17039 even when the target jumps out of multiple exception clauses.
17041 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17043 * ldscript, Makefile.am: add linker script to reduce the number of
17044 exported symbols (should also fix the issues with libwine defining
17045 some of the same symbols in io-layer).
17047 2003-05-01 Zoltan Varga <vargaz@freemail.hu>
17049 * driver.c (mini_main): Avoid assertion when no file name is given on
17052 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
17054 * driver.c: added --version/-V command line option.
17055 Added the inline optimization in the regression tests.
17057 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17059 * mini.c, basic-calls.cs: when inlining, save arguments to locals according
17060 to the type in the method signature (fixes bug#42134).
17062 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
17064 * mini.c: when inlining, check this is not null only when needed (bug #42135).
17066 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
17068 * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
17070 2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17072 * driver.c: fixed bug #42100.
17074 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
17076 * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
17078 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
17080 * mini.c: moved most of the code required to do inlining to its own
17081 function so it can be reused. Inline also ctors if appropriate.
17083 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
17085 * Makefile.am: Link with -export-dynamic so shared libs loaded by
17086 the runtime can call mono API functions.
17088 2003-04-27 Martin Baulig <martin@ximian.com>
17090 * debug-mini.c (mono_debug_init_method): Added
17091 `guint32 breakpoint_id' argument; if the method has a breakpoint,
17092 send a notification to the debugger.
17094 * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
17095 running in the Mono Debugger, just pass the breakpoint number to
17096 mono_debug_init_method().
17098 * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
17100 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
17102 * mini.c: allow some more unsafe compares.
17104 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17106 * mini-x86.c, Makefile.am: make distcheck works (partially from
17107 a patch by Richard Lee <r.h.lee@attbi.com>).
17108 * regset.c, regset.h: removed, they are unused.
17110 2003-04-25 Dick Porter <dick@ximian.com>
17112 * driver.c: Usage reports the name as 'mono' not 'mini'
17113 * exceptions-x86.c: Build and run on freebsd
17115 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
17117 * Makefile.am: install the program with the 'mono' name and
17118 the library as libmono instead of mini and libmini.
17120 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17122 * driver.c: provide the APIs for the embedding interface of the old jit.
17124 2003-04-23 Dietmar Maurer <dietmar@ximian.com>
17126 * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
17128 2003-04-23 Martin Baulig <martin@ximian.com>
17130 * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
17132 * driver.c: Added `--debug' command line argument to enable
17135 2003-04-23 Martin Baulig <martin@ximian.com>
17137 * debug.[ch]: Removed. The code is now in
17138 ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
17140 * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
17143 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
17145 * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
17147 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17150 (mini_cleanup): moved mono_runtime_cleanup call after the call to
17151 mono_domain_finalize.
17152 (mini_method_compile): use mono_method_profile* if the the option is
17155 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
17157 * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
17158 methods with their wrapper.
17160 * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
17161 methods with their wrapper.
17163 * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
17166 * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
17169 * mini.c (mono_method_check_inlining): Avoid inlining synchronized
17172 2003-04-17 Dietmar Maurer <dietmar@ximian.com>
17174 * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
17176 2003-04-16 Dietmar Maurer <dietmar@ximian.com>
17178 * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
17179 of the mempool. This is slightly faster and uses less memory
17181 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
17183 * mini.c: avoid O(n) allocation for variables.
17185 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17187 * mini.c: handle items on the stack after inlining methods.
17189 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
17191 * mini.c: make the method->opcode optimization dependent
17192 on MONO_OPT_INSTRINS and do it lazily.
17194 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
17196 * driver.c: print overall results at the end of regression run.
17198 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
17200 * inssel.brg: don't overwrite symbolic registers.
17202 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17204 * inssel-x86.brg: fix conversion from long to float.
17206 2003-04-11 Dietmar Maurer <dietmar@ximian.com>
17208 * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
17210 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
17212 * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
17214 * driver.c: Added --print-vtable option as in the old JIT.
17216 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
17218 * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
17220 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
17222 * inssel.brg, basic.cs: fixed checked conversions to byte and short.
17224 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
17226 * mini.c regalloc.c regalloc.h: Fix memory leak.
17228 2003-04-09 Dietmar Maurer <dietmar@ximian.com>
17230 * aot.c (mono_aot_get_method): register all used strings
17232 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
17234 * mini.c: always intern strings references with ldstr at compile time.
17236 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17238 * Makefile.am: add BUILT_SOURCES.
17240 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17242 * driver.c: give a better error message when the assembly to execute
17243 doesn't have an entry point.
17245 2003-04-07 Dietmar Maurer <dietmar@ximian.com>
17247 * Makefile.am: added hack for automake
17249 * mono/mini/mini.c (mono_save_args): always copy arguments to keep
17252 * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
17254 22003-04-07 Martin Baulig <martin@ximian.com>
17256 * Makefile.am: Added Makefile.am.
17258 * debugger-main.c: Removed, this is now in the debugger where it
17261 * mini.pc.in: Call this package `mini' for the moment.