1 2008-11-15 Zoltan Varga <vargaz@gmail.com>
3 * unwind.h: New file, contains definitions for stack unwinding.
5 * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
8 * aot-compiler.c: Generalize the emitting of unwind information to use the
9 information in cfg->unwind_ops.
11 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
13 * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
14 AOT method frames. Enable writing symbols for methods by default.
16 2008-11-14 Rodrigo Kumpera <rkumpera@novell.com>
18 * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
19 and make it work with vectors of element sizes 1, 2 and 4.
21 * simd-intrinsics.c: Enable getter for all vectors with element size
24 * simd-methods.h: Add the names of other getters.
26 * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
32 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
34 * mini-ppc.h: portability fix.
36 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
38 * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
39 buggy and will overwrite it.
41 2008-11-14 Zoltan Varga <vargaz@gmail.com>
43 * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
44 Use it to emit local symbols for all methods so AOTed methods show up with
45 their full name in gdb/valgrind output.
47 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
49 * mini-ppc.c: portability fixes.
51 2008-11-14 Zoltan Varga <vargaz@gmail.com>
53 * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
54 entries out of the if (!generic_shared...) code so it is always done.
55 (mono_class_init_trampoline): Do the patching when running under valgrind
56 too, newer versions of valgrind have no problems with it.
58 2008-11-13 Zoltan Varga <vargaz@gmail.com>
60 * aot-compiler.c (emit_writeout): Rework this to make it easier to add
63 2008-11-13 Mark Probst <mark.probst@gmail.com>
65 * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
68 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
70 * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui.
72 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
74 * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
80 * simd-intrinsics.c: Same.
82 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
84 * simd-intrinsics.c: Enable constructor intrinsics for all types.
86 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
88 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
89 to work with more Vector types.
91 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
93 * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
94 store the elemens directly instead of using and intermediate.
96 2008-11-13 Zoltan Varga <vargaz@gmail.com>
98 * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
100 * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
101 to preserve %eax for aot plt trampolines.
103 * aot-compiler.c (compile_method): Don't skip synchronized methods.
104 (encode_method_ref): Flag synchronized methods so they won't go through
107 * aot-compiler.c: Additional work to support AOTing synchronized methods/
110 * cpu-ia64.md (jmp): Increase max length.
112 2008-11-12 Zoltan Varga <vargaz@gmail.com>
114 * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
115 open generic classes.
117 * aot-compiler.c: Enable the ELF writer on ELF platforms.
119 * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
120 box+brtrue optimization since it causes test failures on x86.
122 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
124 * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
130 * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
131 for simd ctor values.
133 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
134 instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
136 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
138 * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
141 * simd-instrincs.c: Same.
143 * basic-simd.cs: Same.
145 2008-11-12 Zoltan Varga <vargaz@gmail.com>
147 * ratests.cs: Add more tests.
149 * regalloc2.c (add_spill_code): Handle more corner cases.
151 2008-11-11 Zoltan Varga <vargaz@gmail.com>
153 * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
154 (update_liveness): Avoid holes in the liveness ranges of hregs if they are
155 both the source an destination of an instruction.
157 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
159 * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
160 wapihandles.c: more portability changes.
162 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
164 * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
165 * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
166 safe to execute in a signal handler and the kernel provides better
167 the info in /proc/self/smaps. Avoid the assert on sigaction during
170 2008-11-11 Zoltan Varga <vargaz@gmail.com>
172 * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
173 do the bblock linking hack if it is actually needed.
175 * Makefile.am (patch-libtool): New helper target to patch libtool to speed
178 * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
179 crash problem is fixed.
181 * branch-opts.c (mono_remove_critical_edges): Link up newly added
184 * mini.c (mini_method_compile): Compute unreachable bblocks properly even
186 (mini_method_compile): Set the starting value of next_vreg to
187 MAX_IREGS + MAX_FREGS when using globalra.
189 * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
190 filter clauses with BB_EXCEPTION_HANDLER.
192 * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
194 2008-11-10 Mark Probst <mark.probst@gmail.com>
196 * mini-x86.c (mono_arch_get_argument_info): Don't align argument
197 space for stdcall. Fixes regressions on Win32.
199 2008-11-10 Zoltan Varga <vargaz@gmail.com>
201 * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
203 (linear_scan): Remove an assert which doesn't seem to be needed.
205 * local-propagation.c (mono_local_deadce): Avoid a call to
206 MONO_DELETE_INS which would screw up the instruction linking.
208 * mini.c (mono_decompose_op_imm): Make this work with globalra.
210 * regalloc2.c: Upgrade to work the current JIT code.
212 2008-11-09 Zoltan Varga <vargaz@gmail.com>
214 * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
217 * aot-runtime.c: Remove some dead code.
219 * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
221 (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
223 * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
224 trampolines using sscanf since atoi doesn't work on large unsigned values.
226 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full):
227 Initialize code_size.
229 2008-11-08 Mark Probst <mark.probst@gmail.com>
231 * method-to-ir.c (mini_emit_inst_for_method): Make
232 Interlocked.CompareExchange work for Int arguments on 32 bit
235 2008-11-07 Mark Probst <mark.probst@gmail.com>
237 * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
239 2008-11-06 Bill Holmes <billholmes54@gmail.com>
241 * main.c Fix MSVC build.
243 Contributed under MIT/X11 license.
245 2008-11-06 Mark Probst <mark.probst@gmail.com>
247 * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
248 alignment larger than 8 bytes are aligned correctly, too.
250 * mini.c: Honor the min_align field of MonoClass when laying out
253 2008-11-06 Zoltan Varga <vargaz@gmail.com>
255 * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
257 * aot-compiler.c (emit_plt): Fix a warning.
259 * aot-compiler.c: Implement ARM support in the binary writer.
261 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
263 * basic-simd.cs: Add test for getter with byref arg.
264 Fix the naming of a few tests.
265 Add missing checks to a test.
267 2008-11-05 Zoltan Varga <vargaz@gmail.com>
269 * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
271 * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
272 most of the full-aot support for monitor enter/exit trampolines.
274 * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
275 enter/exit trampoline creation functions.
277 * Makefile.am: Fix the generation of buildver.h so it is not invoked during
280 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
282 * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
283 incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
284 implement the needed functionality without adding crap to the runtime.
286 2008-11-05 Zoltan Varga <vargaz@gmail.com>
288 * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
291 * mini.c (mono_build_date): New global version holding the build date in
294 * Makefile.am (buildver.c): Generate a file containing the build date.
296 * main.c: Set the build date from the generated file.
298 * mini.c (mono_get_runtime_build_info): New helper function returning build
299 information in a string format.
301 * driver.c (mono_main): Print the build date in --version.
303 * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
304 file when the bind-to-runtime-version option is used.
306 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
308 * simd-intrinsics.c: Fix bug when using getters and byref args.
310 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
312 * simd-methods.h: Rename prefetch methods.
314 * simd-intrinsics.c: Same.
316 2008-11-05 Mark Probst <mark.probst@gmail.com>
318 * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
321 2008-11-04 Zoltan Varga <vargaz@gmail.com>
323 * aot-compiler.c: Use the bundled elf header files instead of depending on
326 * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
329 * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
332 2008-11-04 Rodrigo Kumpera <rkumpera@novell.com>
334 * cpu-x86.md: Add store nta ops.
340 * mini.h: Add an enum for simd prefetch modes.
342 * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
343 of store. Use the changed code to support store nta.
345 * simd-intrinsics.c: Add prefetch ops for all vector types.
347 2008-11-04 Zoltan Varga <vargaz@gmail.com>
349 * aot-compiler.c: Add an option for JIT compiling the methods by multiple
352 * aot-compiler.c: Use statically allocated buffers for constructing symbol
355 * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
358 2008-11-04 Mark Probst <mark.probst@gmail.com>
360 * mini-x86.c: Fixed commit.
362 2008-11-04 Zoltan Varga <vargaz@gmail.com>
364 * aot-compiler.c (emit_plt): Align the plt section only on x86.
366 2008-11-04 Mark Probst <mark.probst@gmail.com>
368 * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
369 and MONITOR_EXIT, for the ASM fastpaths.
371 * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
374 * mini.c, patch-info.h: Signature and patch infos for
375 Monitor.Enter/Exit trampolines.
377 * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
379 * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
380 Monitor.Enter/Exit ASM fastpath for Linux.
382 2008-11-04 Zoltan Varga <vargaz@gmail.com>
384 * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
386 * objects.cs: Add a new test.
388 * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
390 * aot-runtime.c (load_method): Run class initialization in the PLT case even
391 if MONO_LOG_LEVEL is set.
393 * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
395 * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
397 * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
399 * aot-compiler.c: Change the relocation code to use virtual addresses instead
400 of file offsets. Align the sections belonging to the data segment to
403 2008-11-03 Zoltan Varga <vargaz@gmail.com>
405 * aot-compiler.c: Simplify the elf writer by depending on the definitions in
406 elf.h. Port it to amd64.
408 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
410 * driver.c: Enable SIMD by default.
412 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
414 * cpu-x86.md: Add prefetch op.
420 * mini.h: Add an enum for simd prefetch modes.
422 * simd-methods.h: Add prefetch function names.
424 * simd-intrinsics.c: Add prefetch ops for all vector types.
426 2008-11-03 Zoltan Varga <vargaz@gmail.com>
428 * aot-compiler.c (emit_bytes): Speed this up a little.
430 2008-11-02 Zoltan Varga <vargaz@gmail.com>
432 * aot-compiler.c: Add JIT time etc. statistics.
434 * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
436 * mini.h (MonoCompile): Add 'got_offset' field.
438 * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
439 method_got_offsets array.
441 * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
444 * aot-compiler.c (compile_method): Add generic method instances referenced
445 by the method to the list of methods to be compiled, this is required so if
446 A<T> references B<T>, and another assembly references A<int>, then it will
447 also get a copy of B<int>.
449 * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
450 when checking for monitor enter/exit.
452 2008-10-30 Mark Probst <mark.probst@gmail.com>
454 * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
455 for Monitor.Enter and Monitor.Exit if enabled.
457 * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
460 2008-10-30 Zoltan Varga <vargaz@gmail.com>
462 * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
463 of an OP_MOVE. Fixes #440046.
465 * basic-long.cs: Add a new test.
467 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
469 * mini.h: Add synchronization note for the managed counter-part.
471 * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
472 returns the simd caps of the current cpu.
474 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
476 * basic-simd.cs: Remove Console.WriteLine.
478 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
480 * basic-simd.cs: New tests for Vector2ul.
482 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
484 * simd-intrinsics.c: Add new vector type Vector2ul.
486 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
488 * basic-simd.cs: New tests for Vector2l.
490 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
492 * cpu-x86.md: Add long version of most packed int ops.
498 * simd-intrinsics.c: Add new vector type Vector2l.
500 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
502 * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
504 * simd-methods.h: Remove SN_op_BitwiseXor.
506 2008-10-28 Zoltan Varga <vargaz@gmail.com>
508 * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
511 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
513 * basic-simd.cs: Test for Vector2d.
515 * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
518 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
520 * cpu-x86.md: Add double version of all packed float ops.
526 * simd-intrinsics.c: Add new vector type Vector2d.
528 * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
530 * simd-methods.h: Add Duplicate.
532 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
534 * basic-simd.cs: Test for packing with signed saturation.
536 2008-10-28 Zoltan Varga <vargaz@gmail.com>
538 * aot-compiler.c (add_generic_instances): Add all methods of generic instances
539 found in the TYPESPEC table.
541 2008-10-26 Zoltan Varga <vargaz@gmail.com>
543 * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
546 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
548 * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
549 instead of the RVA, since the RVA can be changed by tools like the cil
552 * method-to-ir.c (mono_method_to_ir2): Ditto.
554 * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
555 (deserialize_variable): Ditto.
557 2008-10-25 Martin Baulig <martin@ximian.com>
559 * debug-mini.c (write_variable): Use
560 `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
562 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
564 * cpu-x86.md: Add unsigned variants of packd and packw.
568 * mini-x86.h: Emit the right instruction for packd and packw.
569 Add unsigned variants of packd and packw.
571 * simd-intrinsics.c: Packd and packw were used in place of their
572 unsigned variants. Change that.
573 Add intrinsics for (Signed)PackWithSignedSaturation.
575 * simd-methods.h: Add (Signed)PackWithSignedSaturation.
577 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
579 * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
581 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
583 * mini-ops.h: Remove dword packed add/sub with saturation ops.
585 * cpu-x86.md: Remove dword packed add/sub with saturation ops.
587 * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
590 * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
592 2008-10-24 Mark Probst <mark.probst@gmail.com>
594 * method-to-ir.c, mini.c: Special casing for the synchronized
595 wrapper for the ldtoken+GetTypeFromHandle case.
597 2008-10-24 Zoltan Varga <vargaz@gmail.com>
599 * mini.c (mono_replace_ins): Move this to branch-opts.c.
601 * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
602 created/split bblocks.
604 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
606 * mini-ops.h: Add packed signed mul high.
610 * mini-x86.c (mono_arch_output_basic_block): Same.
612 * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
614 * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
616 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
618 * basic-simd.cs: Tests for Vector16sb.
620 2008-10-24 Zoltan Varga <vargaz@gmail.com>
622 * inssel.brg (stmt): Fix OP_HARD_NOP rule.
624 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
626 * mini-ops.h: Add packed signed min, max and compare greater.
630 * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
633 * simd-methods.h: Add CompareGreaterThan.
635 * simd-methods.h: Remove CompareEquals.
637 * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
639 * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
641 * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
644 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
646 * basic-simd.cs: Fix tests due to change in the API.
648 2008-10-21 Zoltan Varga <vargaz@gmail.com>
650 * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
652 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
654 * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
656 * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
657 inst_offset as this has invalid values for LDADDR.
659 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
661 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
663 * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
665 2008-10-21 Zoltan Varga <vargaz@gmail.com>
667 * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
668 for accessing field->data.
670 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
672 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
674 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
676 * simd-methods.h: Add SignedPackWithUnsignedSaturation.
678 * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
680 2008-10-21 Zoltan Varga <vargaz@gmail.com>
682 * dominators.c (mono_compute_natural_loops): Allocate GList enties
683 from the cfg mempool.
685 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
687 * basic-simd.cs: Tests for new methods in Vector8us.
689 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
691 * mini-ops.h: Add multiply and store high.
695 * mini-x86.c (mono_arch_output_basic_block): Same.
697 * simd-methods.h: Same.
699 * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
702 2008-10-19 Zoltan Varga <vargaz@gmail.com>
704 * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
705 mono_class_setup_vtable ().
707 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
708 mono_class_get_vtable_entry () for accessing klass->vtable.
710 * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
712 * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
715 * method-to-ir.c (mono_save_token_info): Don't save references made from
718 * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
719 of generic instances.
721 * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
723 2008-10-19 Mark Probst <mark.probst@gmail.com>
725 * cpu-ppc.md, mini-ppc.c: The length of the code generated for
726 OP_JMP depends on the method signature. Calculate it properly.
728 2008-10-19 Zoltan Varga <vargaz@gmail.com>
730 * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
733 * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
735 (emit_extra_methods): Add another table mapping method indexes to
736 offsets in the extra_method_info table.
738 * mini.h: Bump AOT file format version.
740 * aot-runtime.c: Merge most of the code from mono_aot_get_method
741 and mono_aot_get_method_from_token () into one function.
743 2008-10-19 Mark Probst <mark.probst@gmail.com>
745 * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
748 2008-10-18 Zoltan Varga <vargaz@gmail.com>
750 * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
753 * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
756 * mini.c (mono_patch_info_equal): Compare the generic context as well.
758 * mini.h: Bump aot file format version.
760 * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
761 AOT file can contain native code for methods which are not in the METHOD
762 table. Generate code for non-sharable generic instances of generic methods
763 found in the METHODSPEC table.
765 * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
766 encoding generic type handles.
768 * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
769 (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
771 * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
772 macros + MONO_ADD_INS.
774 * mini.c (mono_jump_info_token_new2): New function which takes a generic
777 * mini.h (MonoJumpInfoToken): Include fields for a generic context.
779 * mini.h: Bump aot file format version.
781 * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
783 2008-10-17 Mark Probst <mark.probst@gmail.com>
785 * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
786 platforms, with definable stack alignment value. Set to 16 now
789 * mini.c, mini.h, driver.c: Command line option for disabling
792 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
794 * basic-simd.cs: Tests for new methods in Vector4ui.
796 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
798 * mini-ops.h: Add packed int shuffle.
802 * mini-x86.c (mono_arch_output_basic_block): Same.
804 * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
805 extract mask, max, min, shuffle.
807 * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
809 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
811 * basic-simd.cs: Tests for new methods in Vector8us.
813 2008-10-17 Mark Probst <mark.probst@gmail.com>
815 * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
816 RuntimeTypeHandle, not a TypedReference.
818 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
820 * simd-intrinsics.c: remove relocations.
822 2008-10-17 Zoltan Varga <vargaz@gmail.com>
824 * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM
825 optimizations from the x86 backend.
827 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
829 * simd-methods.h, simd-intrinsics.c: debloat method names and
830 prepare for no relocations.
832 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
834 * mini-ops.h: Add packed min/equal and sum of absolute differences.
838 * mini-x86.c (mono_arch_output_basic_block): Same.
840 * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
841 extract mask, max, min and sum of absolute differences.
843 * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
846 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
848 * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
849 Renamed one test for consistency.
851 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
853 * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
854 fix to the code that deal with other blocks.
856 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
858 * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
860 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
862 * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
863 that deals with vreg interference. Explicitly check for OP_LDADDR to be
864 able to process the source reg.
866 2008-10-16 Martin Baulig <martin@ximian.com>
868 * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
870 * inssel.brg: Add `OP_HARD_NOP'.
872 * mini.h (MonoCompile): Added `keep_cil_nops' flag.
874 * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
875 `OP_HARD_NOP' instruction when running inside the debugger.
877 * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
878 `OP_HARD_NOP' instruction when running inside the debugger.
880 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
882 * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
883 now works. The issue with the regalloc tripping up no longer
886 * simd-intrinsics.c (load_simd_vreg): Same.
888 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
890 * basic-simd.cs: Tests for new Vector8ui methods.
892 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
894 * simd-intrinsics.c (get_simd_vreg): Simplify code and test
895 only for type. This fixes crashes where MonoInst::klass is checked
896 for ops of type != VTYPE or OBJ.
898 * simd-intrinsics.c (load_simd_vreg): Same.
900 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
902 * mini-ops.h: Add ops for packed shuffle/max/avg and
907 * mini-x86.c (mono_arch_output_basic_block): Same.
909 * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
912 * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
913 to emit extract mask op.
915 * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
916 to emit word shuffles.
918 2008-10-15 Mark Probst <mark.probst@gmail.com>
920 * mini.c (mono_allocate_stack_slots_full): Align stack frame to
921 the largest alignment needed by a variable, but at least
924 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
926 * basic-simd.cs: Tests for the fixes in the last commit.
928 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
930 * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
931 no longer handles STACK_PTR input.
933 * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
935 * simd-intrinsics.c (load_simd_vreg): New function that works like
936 get_simd_vreg but handles STACK_PTR input.
938 * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
939 as the input can be an arbitrary pointer.
941 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
942 LDADDR local optimization directly otherwise use a store op.
944 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
946 * basic-simd.cs: Tests for dup low and dup high.
948 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
950 * mini-ops.h: Add dup low and dup high ops.
954 * mini-x86.c (mono_arch_output_basic_block): Same.
956 * simd-intrinsics.c (vector4f_intrinsics): Same.
958 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
960 * basic-simd.cs: Tests for recently added functionality.
962 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
964 * mini-ops.h: Add remaining sse1 fp ops.
966 * cpu-x86.md: Add remaining sse1 fp ops.
968 * mini-x86.c (mono_arch_output_basic_block): Same.
970 * mini.h: Add enum for simd FP compare conditions.
972 * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
974 * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
975 so the backed can generate the appropriate op.
977 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
978 This patch squeese one more byte from the SimdIntrinsc struct.
980 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
981 a a shift amount intead of simply or'ing it.
983 * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
985 * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
986 byte so we can have an aditional flags field without increasing struct size.
988 * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
989 against the simd_supported_versions bitmask.
991 * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
993 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
995 * mini.c: remove rawbuffer code (the only use here is unsafe because
996 it takes locks during signal handling and the kernel now provides much
997 better info in proc/pid/smaps these days).
999 2008-10-13 Zoltan Varga <vargaz@gmail.com>
1001 * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
1002 OP_X86_PUSH_OBJ. Fixes #434620.
1004 * objects.cs: Add a test.
1006 2008-10-12 Rodrigo Kumpera <rkumpera@novell.com>
1008 * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
1009 that the packuswb/packusdw don't work with unsigned numbers for what
1010 would be negative numbers in signed format.
1012 * cpu-x86.md: Add doubleword forms of many ops and packing ones.
1013 Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
1015 * mini-ops.h: Add doubleword forms of many ops and packing ones.
1017 * mini-x86.c: Emit doubleword forms of many ops and packing ones.
1019 * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
1021 * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
1023 * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
1026 * simd-intrinsics.c (simd_version_name): New function, returns the name of the
1027 version as the enum in mini.h.
1029 * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
1030 for sse3 ops, check the simd_version field if present. This way the code
1031 works with all versions of sse.
1033 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1035 * simd-intrinsics.c: Fixed intrinsic name typo.
1037 * mini.h: Added missing simd exported function.
1039 * basic-simd.cs: Added tests for Vector4ui.
1040 Fixed broken test for Vector16b.
1042 2008-10-10 Zoltan Varga <vargaz@gmail.com>
1044 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
1045 the max length to 64.
1047 2008-10-10 Mark Probst <mark.probst@gmail.com>
1049 * method-to-ir.c: Only do the fast virtual generic method call for
1050 non-wrapper methods.
1052 * mini.h, mini-trampolines.c: The new generic virtual remoting
1053 trampoline handles virtual method calls via the vtable (as done by
1054 the fast virtual generic method calls) to remoting proxies.
1056 * mini.c (mono_jit_create_remoting_trampoline): For generic
1057 methods reate a generic virtual remoting trampoline.
1059 * mini-amd64.h: Enable fast virtual generic method calls again.
1061 2008-10-10 Mark Probst <mark.probst@gmail.com>
1063 * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
1064 restore registers when doing tail calls.
1066 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1068 * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
1071 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1073 * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
1075 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1077 * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
1079 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1081 * basic-simd.cs: Retrofit for API changes.
1083 2008-10-10 Mark Probst <mark.probst@gmail.com>
1085 * mini-ppc.c: Handle integer stack arguments for tail calls.
1087 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1089 * optflags-def.h: Removed sse3 optimization.
1093 * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
1096 * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
1098 * mini.h: Added enumeration with simd versions.
1100 * simd-intrinsics.c (emit_intrinsics): Use the new static var
1103 * simd-intrinsics.c: Added mono_simd_intrinsics_init.
1105 * mini.c (mini_init): Call mono_simd_intrinsics_init.
1107 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
1109 * basic-simd.cs: Added tests for Vector8u and Vector16u.
1111 * basic-simd.cs: Fixed test naming.
1113 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
1115 * mini-ops.h: Added ops for packed and saturated math, shifts
1116 and packing/unpacking.
1118 * cpu-x86.md: Added descriptors for the above ops.
1120 * mini-x86.c: Added code to emmit the above ops.
1122 * simd-intrinsics.c: Added support for Vector16u and Vector8u.
1124 2008-10-08 Zoltan Varga <vargaz@gmail.com>
1126 * aot-compiler.c (compile_method): Enable AOT for generic code.
1128 * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
1130 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
1132 * mini.c: add a workaround for a common screwup that ends up blamed
1133 to mono (other processes blocking signal delivery).
1135 2008-10-07 Zoltan Varga <vargaz@gmail.com>
1137 * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
1138 in the LDFLD/STFLD opcodes. Fixes #432673.
1140 * iltests.il.in: Add a new test.
1142 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
1144 * mini-arm.c: attach the thread in unmanaged->managed transitions
1145 using delegates (bug #433148).
1147 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
1149 * basic-simd.cs: Use new ShuffleSel constants.
1151 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
1153 * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
1155 * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
1156 only disable simd intrinsics if no sse2 is detected.
1158 * optflags-def.h: Added sse3.
1160 * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
1163 2008-10-07 Zoltan Varga <vargaz@gmail.com>
1165 * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
1166 when adding delegate-invoke wrappers.
1168 2008-10-07 Zoltan Varga <vargaz@gmail.com>
1170 * Makefile.am: Reenable the simd tests.
1172 2008-10-07 Bill Holmes <billholmes54@gmail.com>
1174 * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
1175 add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
1176 other vreg is allocated to that hreg.
1178 Contributed under MIT/X11 license.
1180 2008-10-07 Zoltan Varga <vargaz@gmail.com>
1182 * Makefile.am: Disable the simd tests for now as Mono.Simd is not
1185 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
1187 * basic-simd.cs: New test suite for SIMD intrinsics.
1189 * Makefile.am: Added new tests.
1191 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
1193 * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
1197 * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
1199 * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
1200 using SSE2 aware opcodes.
1202 * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
1203 is enabled, this code path is only reachable if conversion ops are emmited after
1206 * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
1208 This optimization saves 6 bytes per conversion against the old version.
1210 2008-10-06 Zoltan Varga <vargaz@gmail.com>
1212 * aot-compiler.c (compile_method): Don't skip methods referencing
1213 generic methods without a corresponding entry in token_info_hash, since
1214 encode_method_ref () can handle all generic methods now.
1216 * method-to-ir.c (mono_save_token_info): Don't save the token info if a
1217 generic context is set.
1219 * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
1220 generic sharing of LDTOKEN.
1222 2008-10-06 Mark Probst <mark.probst@gmail.com>
1224 * mini-amd64.h: Temporarily disabled fast virtual generic method
1225 calls because it breaks the System.Runtime.Remoting tests.
1227 2008-10-06 Zoltan Varga <vargaz@gmail.com>
1229 * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
1231 * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
1232 so inlining actually works.
1233 (check_inline_caller_method_name_limit): Ditto.
1235 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
1237 * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
1238 64 bit safety (from Olaf Hering and Andreas Färber).
1240 2008-10-06 Zoltan Varga <vargaz@gmail.com>
1242 * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
1243 mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
1244 unused virtual call support code.
1246 * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
1248 * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
1249 which can't use aot trampolines.
1250 (decode_patch): Don't create aot trampolines for methods which can't use
1253 * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
1254 use aot trampolines.
1256 * mini.h: Bump AOT image format version.
1258 2008-10-05 Zoltan Varga <vargaz@gmail.com>
1260 * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
1261 to save_token_info () since cmethod is inflated for constrained calls.
1263 * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
1265 2008-10-04 Andreas Färber <andreas.faerber@web.de>
1267 * Makefile.am: Add build rules for ppc64.
1268 This avoids the build failing at pedump with unresolved symbols
1269 due to lack of arch_sources. Instead it will now fail earlier
1270 due to lack of cpu-ppc64.md.
1272 Contributed under MIT/X11 license.
1274 2008-10-04 Mark Probst <mark.probst@gmail.com>
1276 * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
1279 * iltests.il.in: Add test case for tail call with many arguments.
1281 2008-10-03 Zoltan Varga <vargaz@gmail.com>
1283 * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
1284 to the fast virtual generic method code until the aot case is fixed.
1286 2008-10-03 Mark Probst <mark.probst@gmail.com>
1288 * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
1290 2008-10-03 Mark Probst <mark.probst@gmail.com>
1292 * mini-amd64.c, mini-amd64.h: Implement generic virtual method
1295 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
1297 * simd-intrinsics.c: Forgot to add this one.
1299 * mini-codegen.c: Fix macro in case SIMD is not supported.
1301 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
1303 This patch land initial JIT support for simd intrinsics.
1305 * mini-x86.h: Added new define to make --enable_minimal work on x86.
1307 * Makefile.am: Added simd-intrinsics.c
1309 * simd-intrinsics.c: New file with simd instrinsic related
1312 * cfold.c (mono_constant_fold_ins2): Fold XZERO.
1314 * cpu-x86.md: Add simd related instructions.
1316 * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
1318 * driver.c: Added two new --regression variants.
1320 * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
1322 * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
1324 * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
1325 extract some complicated logic to helper functions.
1327 * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
1329 * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
1331 * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
1332 the specialized simplification pass.
1334 * method-to-ir.c (mono_spill_global_vars): Use new macro.
1336 * mini-codegen.c: Added SIMD constants to all regbanks arrays.
1338 * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
1341 * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
1342 if MONO_ARCH_NEED_SIMD_BANK is defined.
1344 * mini-ops.h: Added the new simd ops.
1346 * mini-x86.c: Added mono_arch_xregname.
1348 * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
1350 * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
1352 * mini-x86.h: Define simd related MONO_ARCH macros.
1354 * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
1356 * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
1358 * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
1359 MONO_CLASS_IS_SIMD to deal with simd related IR.
1361 * mini.h (MonoInst): Added spill_var to the backend union.
1363 * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
1365 * mini.h: Added forward declarations of the new simd fuctions.
1367 * optflags-def.h: Added new optimization names SIMD.
1369 * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
1371 * regalloc.h: Added support for working with 3 register banks.
1373 * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
1375 * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
1377 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
1379 * mini-exceptions.c: remove 64 bit related ifdef clutter.
1381 2008-10-03 Zoltan Varga <vargaz@gmail.com>
1383 * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
1384 instead of one on 64 bit systems.
1386 * method-to-ir.c: Remove unused includes.
1388 2008-10-02 Zoltan Varga <vargaz@gmail.com>
1390 * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
1391 cfg->used_int_regs, since the two are different on arm.
1393 2008-10-02 Mark Probst <mark.probst@gmail.com>
1395 * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
1396 mono_method_get_vtable_index() to get the vtable index.
1398 2008-10-02 Mark Probst <mark.probst@gmail.com>
1400 * method-to-ir.c (mono_method_to_ir2): Don't create native
1401 wrappers for array methods, because they're never called (and if
1402 they were called they wouldn't work).
1404 2008-10-02 Mark Probst <mark.probst@gmail.com>
1406 * method-to-ir.c (mono_method_to_ir2): Array methods are
1407 special-cased and must not be invoked indirectly via the (M)RGCTX
1408 when generic sharing is turned on. Fixes #431413.
1410 2008-10-01 Mark Probst <mark.probst@gmail.com>
1412 * method-to-ir.c: When generic sharing is active, call
1413 non-interface virtual generic methods via the standard trampoline.
1415 * mini-trampolines.c: Handle virtual generic shared methods.
1417 * mini.h, mini-x86.c, mini-x86.h: New argument for
1418 mono_arch_build_imt_thunk() which is non-NULL for virtual generic
1419 method thunks and which is the trampoline to call if the lookup
1420 fails. Enable the virtual generic method thunk for x86.
1422 * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
1423 mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
1424 argument but assert that it's NULL, because these archs don't yet
1425 implement the virtual generic method thunk. Changes in the IMT
1426 thunk data structures.
1428 2008-10-01 Zoltan Varga <vargaz@gmail.com>
1430 * aot-compiler.c (emit_globals): Avoid invalid characters in
1431 the static linking symbol.
1433 * objects.cs: Add a test for the range check optimization. Fix warnings.
1435 * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
1436 optimization from the current JIT.
1438 * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
1439 later in decompose_array_access_opts () to allow more optimizations.
1441 * method-to-ir.c (mono_handle_soft_float): Rename this to
1442 mono_decompose_soft_float () for consistency.
1444 * mini-ops.h: Fix arguments of OP_STRLEN.
1446 * method-to-ir.c (save_cast_details): Extract the cast details saving code
1447 into a separate function.
1448 (reset_cast_details): Ditto.
1449 (handle_unbox): Save cast details. Fixes #431254.
1451 * method-to-ir.c: Remove some obsolete FIXMEs.
1453 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1455 * ir-emit.h (alloc_dreg): Write a warning before crashing.
1457 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1459 * mini-codegen.c: More work on macros to make them
1460 ready for multiple regbanks.
1462 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1464 * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
1466 * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
1468 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1470 * mini-codegen.c (mono_spillvar_offset): Proper support for
1473 2008-09-30 Zoltan Varga <vargaz@gmail.com>
1475 * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
1476 the stack overflow changes.
1478 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1480 * mini-codegen.c: Make all bank macros depend on reg_bank.
1482 * mini-codegen.c (mono_local_regalloc): Make free mask
1483 initialization regbank aware.
1485 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1487 * mini-codegen.c (mono_local_regalloc): Extract callee
1488 mask selection to a function and make it regbank aware.
1490 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1492 * mini-codegen.c (mono_local_regalloc): Changed the cloberring
1493 code to deal with many regbanks.
1495 2008-09-30 Zoltan Varga <vargaz@gmail.com>
1497 * mini-codegen.c: More fp->regbank changes.
1499 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
1501 * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
1502 of a hardcoded constant.
1504 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
1506 * method-to-ir.c (type_from_stack_type): Fix typo.
1508 2008-09-29 Zoltan Varga <vargaz@gmail.com>
1510 * mini-ia64.c (emit_move_return_value): Convert float return values to
1513 * objects.cs: Add a new test.
1515 * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
1516 VARARG methods to fix an assert later.
1518 * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
1519 end so it at least compiles.
1521 2008-09-28 Zoltan Varga <vargaz@gmail.com>
1523 * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
1525 2008-09-28 Rodrigo Kumpera <rkumpera@novell.com>
1527 * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
1528 optimization to a new function (emit_optimized_ldloca_ir) and enable
1529 it for both ldloca and ldloca_s.
1531 2008-09-28 Zoltan Varga <vargaz@gmail.com>
1533 * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
1534 gshared CASTCLASS code.
1536 * driver.c (mono_main): Add a workaround for shutdown crashes seen on
1537 amd64, where the libc stack unwinder encounters stack frames referring to
1538 native code in unmapped memory.
1540 * method-to-ir.c (mini_emit_check_array_type): Add support for generic
1543 * generics.cs: Add new test.
1545 2008-09-27 Zoltan Varga <vargaz@gmail.com>
1547 * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
1548 add a check that one of the ARM_FPU_ constants is defined.
1550 * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
1552 * mini-exceptions.c: Fix build on non-altstack platforms.
1554 * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
1557 * ir-emit.h: Add a comment to NEW_PCONST.
1559 * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
1561 * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
1563 * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
1564 after the changes to MonoJitDomainInfo.
1566 2008-09-27 Mark Probst <mark.probst@gmail.com>
1568 * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
1570 2008-09-27 Mark Probst <mark.probst@gmail.com>
1572 * mini-ppc.c: Compiler warning fixes.
1574 2008-09-27 Mark Probst <mark.probst@gmail.com>
1576 * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
1579 2008-09-27 Mark Probst <mark.probst@gmail.com>
1581 * exceptions-ppc.c, mini-ppc.h: Compile
1582 mono_arch_handle_altstack_exception() on Darwin, too.
1584 2008-09-27 Mark Probst <mark.probst@gmail.com>
1586 * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
1587 work on archs which don't have generic sharing implemented, only
1588 without the vtable_arg.
1590 2008-09-26 Mark Probst <mark.probst@gmail.com>
1592 * mini.c: Added comment explaining why delegate ctor icall
1593 wrappers are compiled.
1595 2008-09-26 Mark Probst <mark.probst@gmail.com>
1597 * mini.c: Don't produce trampolines to delegate ctor icall
1598 wrappers but compile them upfront.
1600 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
1602 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
1603 runtime-set function when going back to managed code. Currently this
1604 is used to set back the protection on the soft ovf pages and/or to
1605 throw the stack overflow exception that happened in unmanaged code.
1607 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
1609 * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
1610 runtime-set function when going back to managed code. Currently this
1611 is used to set back the protection on the soft ovf pages and/or to
1612 throw the stack overflow exception that happened in unmanaged code.
1614 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1616 * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
1617 the support code for restoring stack protection after stack overflows
1618 that happen in unmanaged code. Don't set the exec permission on the
1621 2008-09-26 Zoltan Varga <vargaz@gmail.com>
1623 * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
1624 delegate->method_ptr is set. Fixes #428054.
1626 2008-09-25 Zoltan Varga <vargaz@gmail.com>
1628 * tests.cs: Rename to ratests.cs.
1630 * method-to-ir.c: Merge the emit_get_rgctx () calls into the
1631 emit_get_rgctx_... functions.
1633 2008-09-25 Mark Probst <mark.probst@gmail.com>
1635 * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
1637 2008-09-25 Mark Probst <mark.probst@gmail.com>
1639 * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
1640 before asserting that method is sharable.
1642 2008-09-25 Mark Probst <mark.probst@gmail.com>
1644 * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
1645 whether method needs a static RGCTX wrapper used instead of
1648 * generic-sharing.c, mini.h: A few functions moved to
1649 metadata/generic-sharing.c.
1651 2008-09-25 Mark Probst <mark.probst@gmail.com>
1653 * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
1654 Generic code sharing for value types, which essentially means
1655 treating value type methods like static methods. The RGCTX is
1656 passed in the same way.
1658 2008-09-25 Zoltan Varga <vargaz@gmail.com>
1660 * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
1661 opcode when creating multi-dimensional arrays of open types.
1663 * generic-sharing.c (mono_method_check_context_used): Handle arrays of
1666 * generics.cs: Add a test.
1668 * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
1670 2008-09-24 Zoltan Varga <vargaz@gmail.com>
1672 * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
1674 * mini.c (mini_method_compile): Set it when running under the debugger.
1676 * method-to-ir.c (mono_handle_global_vregs): Disable global->local
1677 vreg optimization if the flag is set.
1679 * driver.c (mono_main): Add --attach= option to pass options to
1682 * mini.c (sigquit_signal_handler): Start the attach agent.
1684 * ssapre.c: Disable this to save space since it is not yet ported to
1687 * regalloc2.c: Disable this to save space.
1689 * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
1691 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
1693 * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
1694 the -v option useful again.
1696 2008-09-24 Zoltan Varga <vargaz@gmail.com>
1698 * mini-amd64.c (mono_arch_output_basic_block): Add support for
1701 * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
1702 arrays of arrays. Fixes #428406.
1704 * method-to-ir.c (mini_emit_castclass): Ditto.
1706 * objects.cs: Add new test.
1708 2008-09-23 Rodrigo Kumpera <rkumpera@novell.com>
1710 * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
1711 was wrong at it choked against target_type_is_incompatible for byref types.
1713 2008-09-23 Zoltan Varga <vargaz@gmail.com>
1715 * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most
1718 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
1720 * mini-exceptions.c: update a few more exceptions-related counters.
1722 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
1724 * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
1725 new functions to allocate from persistent mempools.
1727 2008-09-23 Zoltan Varga <vargaz@gmail.com>
1729 * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow
1730 multiple register banks in the future.
1732 * mini-codegen.c (mono_local_regalloc): Fix a warning.
1734 2008-09-22 Rodrigo Kumpera <rkumpera@novell.com>
1736 * mini.c (type_to_eval_stack_type): Remove duplicated function.
1738 * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
1740 * mini.h: Export type_to_eval_stack_type.
1742 This function was nearly duplicated in method-to-ir.c and mini.c. The difference
1743 is only ins->klass of byref types.
1745 2008-09-22 Zoltan Varga <vargaz@gmail.com>
1747 * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
1748 (mini_emit_memcpy2): Ditto.
1750 * mini-amd64.c: Fix a warning.
1752 2008-09-21 Mark Probst <mark.probst@gmail.com>
1754 * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
1757 2008-09-19 Rodrigo Kumpera <rkumpera@novell.com>
1759 * method-to-ir.c: Extract stloc micro-optimization to a
1760 function and apply it to all cases.
1762 2008-09-19 Mark Probst <mark.probst@gmail.com>
1764 * method-to-ir.c: Don't fail generic code sharing in cases we
1767 2008-09-18 Mark Probst <mark.probst@gmail.com>
1769 * mini-ppc.c: Handle structs in tailcalls on Darwin.
1771 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
1773 * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
1776 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
1778 * trace.c: make tracing more useful and correct, with per-thread
1781 2008-09-15 Mark Probst <mark.probst@gmail.com>
1783 * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
1784 doing a method call and the argument is an R4.
1786 2008-09-14 Zoltan Varga <vargaz@gmail.com>
1788 * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
1791 2008-09-13 Mark Probst <mark.probst@gmail.com>
1793 * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
1795 2008-09-12 Zoltan Varga <vargaz@gmail.com>
1797 * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
1798 (MONO_JUMP_TABLE_FROM_INS): Ditto.
1800 2008-09-11 Zoltan Varga <vargaz@gmail.com>
1802 * driver.c: Add a --agent argument (not supported yet) to load managed
1803 agent assemblies before loading the main assembly, similarly to how the
1804 Java VM handles agents.
1806 2008-09-11 Mark Probst <mark.probst@gmail.com>
1808 * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
1809 function to do stack layout of local variables.
1811 2008-09-11 Mark Probst <mark.probst@gmail.com>
1813 * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
1816 2008-09-11 Zoltan Varga <vargaz@gmail.com>
1818 * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
1819 abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
1820 JIT if DISABLE_JIT is defined.
1822 * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
1825 2008-09-10 Mark Probst <mark.probst@gmail.com>
1827 * iltests.il.in: Disable the fconv test on PPC (the result is
1828 undefined according to ECMA).
1830 2008-09-10 Mark Probst <mark.probst@gmail.com>
1832 * iltests.il.in: Enable tail call tests for PPC.
1834 * mini.h: Add variable for storing incoming valuetype argument
1835 addresses for tail calls.
1837 * mini-ppc.c: Implement valuetype arguments and return values for
1840 2008-09-09 Mark Probst <mark.probst@gmail.com>
1842 * mini-ppc.c: Partially implement tail calls (struct arguments and
1843 return values not supported).
1845 * method-to-ir.c: Enable tail calls on PPC.
1847 2008-09-08 Zoltan Varga <vargaz@gmail.com>
1849 * aot-compiler.c (emit_wrapper_info): Omit the klass name from
1850 runtime-invoke wrappers to work around the problem of them getting
1851 assigned to a random class.
1853 * aot-runtime.c (mono_aot_get_method): Ditto.
1855 2008-09-07 Zoltan Varga <vargaz@gmail.com>
1857 * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
1858 the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
1860 2008-09-07 Mark Probst <mark.probst@gmail.com>
1862 * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
1863 until they're implemented properly.
1865 * exceptions-ppc.c: Use arch-independent exception-handling code
1866 instead of custom one.
1868 * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
1871 * tramp-ppc.c, mini-ppc.c: Fixed warnings.
1873 * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
1874 applies when __powerpc__ is defined.
1876 2008-09-06 Zoltan Varga <vargaz@gmail.com>
1878 * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
1879 methods to their code to avoid computing the full name of wrappers and
1880 doing a lookup in a string hash table.
1882 2008-09-05 Zoltan Varga <vargaz@gmail.com>
1884 * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
1885 we identify bblocks before method_to_ir () is ran.
1887 * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
1888 Also avoid optimizing branches pointing to themselves.
1890 * mini.c (mini_method_compile): Ditto. Fixes #422947.
1892 2008-09-05 Rodrigo Kumpera <rkumpera@novell.com>
1894 * driver.c (mono_main): Enable the new verifier under core-clr and cas.
1896 2008-09-05 Zoltan Varga <vargaz@gmail.com>
1898 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
1899 (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
1900 (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
1903 * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all
1904 jumped to the same entry in plt_jump_table.
1906 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
1908 * method-to-ir.c (initialize_array_data): Handle field with RVA from
1911 2008-08-31 Zoltan Varga <vargaz@gmail.com>
1913 * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
1914 other assignment can be if converted. Saves 1.5% on corlib size and fixes
1917 2008-08-29 Geoff Norton <gnorton@novell.com>
1919 * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
1920 segment, and doesn't properly handle .space as .text. Fixes
1923 2008-08-29 Geoff Norton <gnorton@novell.com>
1925 * mini.c: Disable the mach exception handler when running on
1928 2008-08-29 Geoff Norton <gnorton@novell.com>
1930 * aot-compiler.c: Patch from Renaldas Zioma to properly register
1931 globals on Darwin/ARM
1933 2008-08-28 Zoltan Varga <vargaz@gmail.com>
1935 * mini.c: Avoid not initializing the runtime when doing AOT compilation,
1936 since too many things depend on it. Instead, call
1937 mono_runtime_set_no_exec ().
1939 * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
1942 * aot-compiler.c: Add an 'asm-only' AOT option.
1944 * mini.c: Avoid initializing the runtime when doing AOT compilation.
1946 * aot-compiler.c (compile_method): Disable gshared support for now as it
1949 2008-08-27 Bill Holmes <billholmes54@gmail.com>
1951 * mini-amd64.h : Fix a compiler warning.
1953 * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
1954 Changed to use a callback function to retrieve the unwind info.
1955 This avoids problems observed when code blocks were removed by
1956 unloading an app domain.
1958 * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole
1959 and branch excludes for Winx64. The fix in exceptions-amd64.c allows them
1962 Contributed under MIT/X11 license.
1964 2008-08-27 Bill Holmes <billholmes54@gmail.com>
1966 * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
1967 case to keep the stack aligned to 8.
1969 Contributed under MIT/X11 license.
1971 2008-08-26 Zoltan Varga <vargaz@gmail.com>
1973 * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
1974 avoid repeated linear searches.
1976 2008-08-25 Zoltan Varga <vargaz@gmail.com>
1978 * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
1979 methods it can't handle.
1981 * aot-compiler.c (add_method): Avoid adding a method twice.
1982 (add_wrappers): Add runtime invoke wrappers for all methods.
1984 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
1985 function to create an aot-compatible version of this trampoline.
1987 * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
1989 2008-08-24 Zoltan Varga <vargaz@gmail.com>
1991 * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
1993 * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
1994 with a generic sharing failure.
1996 * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
1998 * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
1999 CEE_RETHROW. Fixes #419634.
2001 * mini.c (mono_method_to_ir): Ditto.
2003 * exceptions.cs: Add a new test.
2005 * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
2006 to mono_type_stack_size_internal () since some callers might not pass in
2009 * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
2010 instrument_prolog. Fixes #419878.
2012 * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
2013 doubles in soft float mode volatile.
2015 2008-08-23 Zoltan Varga <vargaz@gmail.com>
2017 * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
2019 * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
2020 to handle soft float correctly.
2022 * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
2025 * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
2027 * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
2028 to sp, since the generics catch code requires it.
2030 * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
2033 * method-to-ir.c (emit_imt_argument): Pass imt_arg to
2034 mono_arch_emit_imt_argument ().
2036 * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
2038 * mini-arm.c tramp-arm.c: Generic sharing updates.
2040 2008-08-22 Zoltan Varga <vargaz@gmail.com>
2042 * mini-arm.c: Fix the arm build.
2044 * generic-sharing.c (mini_type_get_underlying_type): New helper function
2045 handling enums, generic instances and generic sharing.
2046 (mini_type_stack_size_full): Ditto.
2048 * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
2050 * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
2052 * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
2054 * tramp-arm.c: Implement the rgctx fetch and the generic class init
2057 * mini-arm.c: Various small generic sharing changes.
2059 * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
2061 (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
2064 * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
2065 helper function to return a generic class init trampoline.
2067 * method-to-ir.c mini.c: Use it.
2069 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
2070 arch-specfic function to return a generic class init trampoline.
2072 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
2073 the GENERIC_CLASS_INIT custom code.
2075 * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
2076 a fatal error, not a sharing failure.
2078 * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
2081 * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
2082 trampoline argument from MONO_ARCH_VTABLE_REG.
2084 * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
2085 order of the arguments to the C trampoline: pass 'slot' as the trampoline
2086 argument, and pass the vtable in VTABLE_REG.
2088 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
2089 order of the arguments to the C trampoline: pass 'slot' as the trampoline
2090 argument, and pass the vtable in VTABLE_REG.
2091 (mono_arch_create_trampoline_code_full): Remove some special casing for
2092 the rgctx fetch trampoline.
2094 * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
2097 * iltests.il: Add a test for it.
2099 2008-08-21 Zoltan Varga <vargaz@gmail.com>
2101 * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
2103 * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
2106 * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
2107 use mono_jit_info_table_find () to avoid recursion.
2108 (mono_delegate_trampoline): Add a sync wrapper here.
2110 * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
2113 * mini.c (mono_method_to_ir): Ditto.
2115 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
2116 add_sync_wrapper argument. Don't add a sync wrapper here.
2117 (mono_create_jump_trampoline): Don't add a sync wrapper here.
2119 * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
2121 2008-08-20 Bill Holmes <billholmes54@gmail.com>
2123 * exceptions-amd64.c (seh_handler): For Winx64 adding missing copy
2124 of nonvolatile registers back from MonoContext to CONTEXT.
2126 Contributed under MIT/X11 license.
2128 2008-08-20 Bill Holmes <billholmes54@gmail.com>
2130 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): When shifting the
2131 arguments on Winx64 there are only 4 argument registers. For this
2132 logic to work the last argument must be pulled from the stack.
2134 Contributed under MIT/X11 license.
2136 2008-08-20 Zoltan Varga <vargaz@gmail.com>
2138 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2140 * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
2141 MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
2142 encode/decode_method_ref ().
2144 * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
2146 * aot-runtime.c (decode_patch): Ditto.
2148 * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
2149 MONO_PATCH_INFO_METHOD.
2151 * aot-runtime.c (decode_exception_debug_info): Decode the contents of
2154 * aot-compiler.c (emit_exception_debug_info): Emit the contents of
2157 * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
2159 * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
2160 one from the caller.
2162 * aot-runtime.c (decode_generic_inst): New function to decode and
2163 return a interned generic inst.
2164 (decode_klass_ref): Use it.
2165 (decode_method_ref): Ditto.
2167 * aot-compiler.c (emit_exception_debug_info): Save
2168 jinfo->has_generic_jit_info too.
2170 2008-08-19 Zoltan Varga <vargaz@gmail.com>
2172 * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
2174 * iltests.il.in: Add a test for fconv_to_i.
2176 * liveness.c: Disable the liveness2 pass for now to save space.
2178 * regalloc2.c: Include mempool-internals.h to fix warnings.
2180 * aot-compiler.c (encode_method_ref): Encode the context of generic
2183 * aot-runtime.c (decode_method_ref): Inflate generic methods using
2184 the context saved in the aot file.
2186 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2188 * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
2190 * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
2191 volatile so they won't be optimized away.
2193 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
2199 * dominators.c: Remove duplicated functions that now are in
2200 mempool-internals.h.
2202 2008-08-19 Zoltan Varga <vargaz@gmail.com>
2204 * aot-compiler.c: Fix warnings.
2206 * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
2208 * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
2210 * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
2213 * mini.c (mono_resolve_patch_target): Ditto.
2215 * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
2216 (encode_klass_ref): Add support for encoding VARs/MVARs.
2218 * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
2220 * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
2221 the handling of the got entries into a separate 'decode_got_entry' function.
2222 Add support for RGCTX_FETCH.
2224 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
2225 clobbered by the trampoline code.
2227 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
2228 not clobbered by the indirect calling code.
2230 2008-08-18 Zoltan Varga <vargaz@gmail.com>
2232 * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
2235 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
2237 * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
2238 signature using the compilation mempool otherwise we would leak it.
2240 2008-08-18 Zoltan Varga <vargaz@gmail.com>
2242 * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
2243 mono_emit_abs_call ().
2245 * patch-info.h: Add GENERIC_CLASS_INIT.
2247 * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
2249 * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
2250 as their target as a near call.
2252 * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
2254 (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
2256 * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
2257 call to a runtime function described by a patch.
2259 * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
2260 mono_emit_abs_call, this has the advantage that the ABS handling code in
2261 mono_codegen () can handle them both, and can handle other stuff in the
2262 future without additional code.
2264 * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
2266 (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
2269 * mini.h: Add missing bblock related prototypes.
2271 * mini.h (MonoCompile): Remove unused reverse_inst_list and
2272 reverse_inst_list_len fields.
2274 * mini.c: Refactor this file a bit by moving branch optimizations to
2277 * method-to-ir.c: Merge generic sharing changes missed earlier.
2279 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
2281 * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
2282 shared patches. Process METHODCONST as a shared patch.
2284 * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
2285 as it crashes on the 2.0 mscorlib.
2287 * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
2290 * aot-compiler.c: Use is_plt_patch () in a few additional places.
2291 (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
2294 * aot-compiler.c: Reorganize the got handling code to be a bit more
2297 2008-08-17 Zoltan Varga <vargaz@gmail.com>
2299 * aot-compiler.c: Make the patch_to_plt_offset hash table use
2300 mono_patch_info_equals/hash, and use it to massively simplify
2303 * mini.c (mono_patch_info_hash): Simplify this and add support for
2306 * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
2308 * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
2309 handling code, since an offset is not enough to identify a trampoline.
2311 * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
2313 2008-08-17 Mark Probst <mark.probst@gmail.com>
2315 * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
2317 * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
2319 * mini-ops.h: Argument and result types for OVF_CARRY ops.
2321 * decompose.c: PPC decompositions for various ops.
2323 * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
2325 2008-08-17 Zoltan Varga <vargaz@gmail.com>
2327 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
2328 call the generic trampoline code using a call, instead of a jump, to
2329 remove some special casing from the generic trampoline code.
2331 * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
2332 (mono_codegen): Ditto.
2334 * aot-compiler.c aot-runtime.c: Ditto.
2336 * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
2338 * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
2339 helper function to find the offset corresponding to a lazy fetch trampoline.
2341 * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
2342 when doing generic sharing.
2344 * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
2347 * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
2348 mini-trampolines.c to be with the other trampoline creation functions.
2350 * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
2351 as it is equal to method->signature in most cases, add a
2352 mono_emit_method_call_full variant which takes a signature and an imt
2355 2008-08-16 Zoltan Varga <vargaz@gmail.com>
2357 * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
2358 to this function, since it could be computed easily from the method
2360 (mono_helper_compile_generic_method_wo_context): Removed, not needed any
2363 * method-to-ir.c mini.c: Remove references to
2364 compile_generic_method_wo_context.
2366 * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
2367 generic method calls.
2369 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
2370 dimensional non-szarrays.
2372 * mini.c (mini_init): Register mono_array_new_1.
2374 * jit-icalls.c (mono_array_new_1): New jit icall.
2376 * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
2377 pointing to the method.
2379 * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
2380 method addresses belonging to METHOD_JUMP patches in the
2381 jump_target_got_slot_hash.
2382 (mono_aot_load_method): Ditto.
2384 * aot-compiler.c (compile_method): Allow AOT compilation of methods with
2385 METHOD_JUMP patches.
2387 * mini.c (mini_create_jit_domain_info): New helper function which
2388 initializes/frees domain->runtime_info.
2389 (mini_free_jit_domain_info): Ditto.
2390 (mini_init): Install the domain hook functions with the runtime.
2392 * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
2393 information maintained by the JIT.
2395 * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
2396 insertion into jump_table_hash into mono_codegen (), also implement proper
2399 * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
2400 tail calls, it is already done by the aot code.
2402 * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
2405 * iltests.il.in: Make the jmp test a bit more complex.
2407 * aot-compiler.c (encode_method_ref): Handle references to normal methods of
2408 generic instances which doesn't have a token.
2410 * aot-runtime.c (decode_method_ref): Ditto.
2412 * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
2413 can handle this case now.
2414 (handle_box): Ditto.
2416 2008-08-15 Geoff Norton <gnorton@novell.com>
2418 * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
2421 2008-08-15 Zoltan Varga <vargaz@gmail.com>
2423 * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
2424 calling generic methods.
2426 * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
2428 * aot-runtime.c (decode_patch_info): Ditto.
2430 * mini.c (mono_resolve_patch_target): Ditto.
2432 * patch-info.h: Add METHOD_RGCTX.
2434 * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
2436 2008-08-14 Zoltan Varga <vargaz@gmail.com>
2438 * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
2439 arguments in registers.
2441 * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
2442 OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
2444 * mini.c (mini_method_compile): Abort aot compilation for generic
2445 methods if generic sharing is disabled.
2447 * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
2450 * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls
2451 requiring an mrgctx.
2453 * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
2454 store instructions when converting a vcall to a normal call.
2456 * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
2457 mono_arch_find_jit_info.
2459 2008-08-13 Zoltan Varga <vargaz@gmail.com>
2461 * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
2462 avoid calling mono_method_full_name () for every method even if the
2464 (check_inline_caller_method_name_limit): Ditto.
2466 2008-08-12 Zoltan Varga <vargaz@gmail.com>
2468 * driver.c (main_thread_handler): Allow AOT compilation of multiple
2469 assemblies in one run.
2471 * aot-compiler.c (mono_compile_assembly): Only print out a count of
2472 skipped methods if it is not 0.
2474 * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
2476 2008-08-12 Bill Holmes <billholmes54@gmail.com>
2478 * mini.c (mono_codegen): Changing a preprocessor check from WIN64 to
2479 MONO_ARCH_HAVE_UNWIND_TABLE.
2481 Contributed under MIT/X11 license.
2483 2008-08-12 Bill Holmes <billholmes54@gmail.com>
2485 * mini-amd64.c (mono_arch_cpu_optimizazions): Remove peephole and branch
2486 from default optimizaton list on Winx64.
2488 * mini-amd64.c (emit_tls_get): Added Winx64 specific implementation for GetTLS.
2490 * mini-amd64.c (mono_arch_emit_prolog): Adding an offset on Winx64 to get
2491 the LMF from the MonoJitTlsData structure.
2493 * mini-amd64.c (mono_arch_setup_jit_tls_data): Added Winx64 implementation.
2495 Contributed under MIT/X11 license.
2497 2008-08-12 Zoltan Varga <vargaz@gmail.com>
2499 * mini.c (sigsegv_signal_handler): Fix the build.
2501 * mini-amd64.c (emit_call_body): Use image->aot_module instead of
2502 assembly->aot_module.
2504 * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
2505 hash table. This simplifies and speeds up a lot of code, and fixes support
2508 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
2511 * mini-exceptions.c: Ditto.
2513 * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
2514 'native_offset' argument, since these are computed in the
2515 mono_find_jit_info () function.
2517 * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
2518 is used by exceptions-ppc.c.
2520 * exceptions-ppc.c: Call mono_find_jit_info () instead of
2521 mono_arch_find_jit_info ().
2523 * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
2524 mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
2525 generic code in mini-exceptions.c.
2527 2008-08-11 Zoltan Varga <vargaz@gmail.com>
2529 * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
2531 * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
2533 * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
2534 the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
2535 called while holding the loader lock. Fixes #415608.
2536 (mono_aot_get_method_from_token_inner): Ditto.
2538 2008-08-09 Zoltan Varga <vargaz@gmail.com>
2540 * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
2541 to reduce differences between this and the generic implementation in
2543 (ves_icall_get_frame_info): Ditto.
2545 * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
2547 * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
2550 * exceptions-ppc.c (arch_get_call_filter): Rename this to
2551 mono_arch_get_call_filter () and make it non-static, for consistency with the
2552 other architectures.
2554 2008-08-09 Rodrigo Kumpera <rkumpera@novell.com>
2557 * local-propagation.c:
2558 * mini-x86.c: Correct the name of arch defines.
2560 2008-08-09 Zoltan Varga <vargaz@gmail.com>
2562 * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
2563 NO_EMULATE_LONG_SHIFT_OPS define.
2565 2008-08-08 Zoltan Varga <vargaz@gmail.com>
2567 * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
2568 now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
2570 * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
2571 MACH fixes. Merged from the 2.0 branch.
2573 * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
2575 * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
2576 (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
2578 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
2580 * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
2581 mono_marshal_get_native_wrapper () signature changes.
2583 2008-08-07 Rodrigo Kumpera <rkumpera@novell.com>
2585 * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
2586 conversion bug under arm.
2588 2008-08-06 Rodrigo Kumpera <rkumpera@novell.com>
2590 * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
2592 * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
2593 with overflow checking.
2595 2008-08-05 Marek Habersack <mhabersack@novell.com>
2597 * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
2598 to the genmdesc.pl file
2600 2008-08-05 Zoltan Varga <vargaz@gmail.com>
2602 * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
2603 arg_array in the soft-float versions of the LOAD/STORE macros.
2605 * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
2608 * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
2610 2008-08-02 Zoltan Varga <vargaz@gmail.com>
2612 * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
2613 a float HFA. Fixes #413621.
2615 2008-08-02 Gert Driesen <drieseng@users.sourceforge.net>
2617 * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
2618 frame_size to args_size. Fixes build.
2620 2008-08-02 Zoltan Varga <vargaz@gmail.com>
2622 * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
2623 and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
2625 * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
2626 the stack are not unaligned. Fixes #413247.
2628 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
2630 * mini.c: update jitted methods performance counters.
2632 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
2634 * mini-exceptions.c: increase the exceptions thrown performance
2635 counter in mono_handle_exception ().
2637 2008-07-29 Zoltan Varga <vargaz@gmail.com>
2639 * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
2640 can work with netmodules.
2642 2008-07-28 Geoff Norton <gnorton@novell.com>
2644 * mini-x86.h: Correct the frame alignment on OSX. Fixes the jit
2647 2008-07-28 Zoltan Varga <vargaz@gmail.com>
2649 * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
2652 2008-07-28 Bill Holmes <billholmes54@gmail.com>
2654 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2655 The float param registers and other param registers must be the
2656 same index on Windows x64.
2658 * mini-amd64.c (mono_arch_allocate_vars) : Implementing the
2659 ArgValuetypeAddrInIReg argument case. Setting the argument
2660 op to OP_VTARG_ADDR (OP_REGOFFSET)).
2662 * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix. Use the size
2663 variable computed above as the copy length for arguments of storage
2664 type ArgValuetypeAddrInIReg.
2666 * mini-amd64.c (mono_arch_emit_call) : Implementing the
2667 ArgValuetypeAddrInIReg argument case. This case will rely on
2668 mono_arch_emit_outarg_vt to emit the correct code later in the process.
2670 * mini-amd64.c (mono_arch_emit_call) : On Winx64 there always needs to be
2671 a 32 byte stack allocation for all calls. We will omit the adjustment for
2672 jump and tail call instructoins as they do not follow the typical call behavior.
2674 * mini-amd64.c (mono_arch_emit_outarg_vt) : Implementing the case for
2675 ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
2676 local variable and pass the local variable by reference to the called method.
2678 * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
2679 Implementing the ArgValuetypeAddrInIReg argument case. When the address
2680 of a struct is passed in a register it must be saved with the other
2681 volatile argument on the stack.
2683 * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix. When omitting the
2684 frame pointer the stack adjustment value must be saved to the unwind
2687 Contributed under MIT/X11 license.
2689 2008-07-28 Zoltan Varga <vargaz@gmail.com>
2691 * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
2692 which got lost in the merge.
2694 2008-07-27 Zoltan Varga <vargaz@gmail.com>
2696 * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
2699 * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
2701 * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
2702 icalls, since they won't be patched.
2704 * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
2705 different code sequence when running under valgrind to prevent some valgrind
2708 * iltests.il.in: Add new regression test.
2710 * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
2713 * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
2714 accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
2716 * iltests.il.in: Add new test.
2718 * aot-compiler.c: Fix some warnings.
2720 * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
2723 2008-07-27 Zoltan Varga <vargaz@gmail.com>
2725 * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
2726 (mini_usage_jitdeveloper): Add a missing --wapi option.
2728 2008-07-25 Zoltan Varga <vargaz@gmail.com>
2730 * mini-codegen.c: Simplify the is_fp macros.
2731 (free_up_ireg): Remove, use free_up_reg instead.
2732 (free_up_reg): Fix the fp case.
2734 2008-07-26 Zoltan Varga <vargaz@gmail.com>
2736 * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
2739 * exceptions-x86.c: Merge some changes which seemed to have got lost
2740 in the linear-ir merge.
2742 * liveness.c: Disable the liveness2 pass on 32 bit platforms.
2744 * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
2745 long vreg volatile even if the variable was already created.
2747 * liveness.c (update_liveness2): Avoid eliminating dead definitions of
2750 2008-07-26 Zoltan Varga <vargaz@gmail.com>
2752 * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
2754 * mini.c (mono_jit_compile_method_inner): Add support for
2755 MONO_EXCEPTION_BAD_IMAGE.
2757 * method-to-ir.c (mono_method_to_ir2): Avoid a crash if
2758 mini_method_get_context () returns NULL. Fixes #356531.
2760 * mini.c (mono_method_to_ir): Ditto.
2762 * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
2763 accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
2765 2008-07-25 Zoltan Varga <vargaz@gmail.com>
2767 * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
2768 in the LDFTN implementation.
2770 2008-07-25 Mark Probst <mark.probst@gmail.com>
2772 * mini-trampolines.c (mono_magic_trampoline): When sharing generic
2773 code, patch calls to icalls, too, even if they're not in the
2774 shared generic code hash. Fixes #411962.
2776 2008-07-25 Zoltan Varga <vargaz@gmail.com>
2778 * cpu-x86.md: Increase the length of the fcall opcodes.
2780 * mini-x86.c (emit_move_return_value): Avoid some precision issues for
2781 calls returning floats.
2783 * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
2786 * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
2789 * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
2790 into the domain->method_code_hash.
2792 * aot-compiler.c: Fix win32 build.
2794 * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
2796 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
2797 gshared NEWARR implementation.
2799 * cpu-sparc.md: Remove duplicate localloc_imm opcode.
2801 * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
2802 can be used outside of method_to_ir.
2804 * mini.h (MonoCompile): Add arg_types field.
2806 * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
2808 * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
2809 the values of the local arg_array and param_types array.
2811 2008-07-24 Zoltan Varga <vargaz@gmail.com>
2813 * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
2814 got accesses might only get generated later when NEWOBJ is decomposed.
2816 * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
2817 looking up the native code of the target method when a delegate is called
2820 * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
2823 * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
2825 * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
2826 AOT work on platforms without a working dlsym implementation.
2828 * mini.h: Bump AOT image format version.
2830 2008-07-24 Mark Probst <mark.probst@gmail.com>
2832 * mini-exceptions.c: Free a MonoType with
2833 mono_metadata_free_type() instead of g_free().
2835 * aot-runtime.c: Free a MonoType.
2837 2008-07-24 Zoltan Varga <vargaz@gmail.com>
2839 * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
2842 * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
2845 2008-07-23 Massimiliano Mantione <massi@ximian.com>
2846 * mini.c (sigprof_signal_handler): call the new "runtime initialized"
2849 2008-07-23 Zoltan Varga <vargaz@gmail.com>
2851 * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
2852 NEWOBJ calls on valuetypes.
2854 * iltests.il.in: Add new test.
2856 * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
2858 2008-07-22 Zoltan Varga <vargaz@gmail.com>
2860 * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
2861 is no longer needed.
2863 * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
2864 non register sized integer arguments.
2865 (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
2866 (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to
2869 * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
2872 * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
2873 two a binop with different sized arguments is emitted.
2875 * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
2876 instruction in the ins==NULL case.
2878 2008-07-23 Zoltan Varga <vargaz@gmail.com>
2880 * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
2882 * mini-x86.c: Fix osx build.
2884 * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
2887 * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
2888 instruction for non int sized variables.
2890 * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
2893 2008-07-23 Robert Jordan <robertj@gmx.net>
2895 * method-to-ir.c: Fix MSVC build.
2897 2008-07-22 Zoltan Varga <vargaz@gmail.com>
2899 * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
2900 a non int sized type, widen it to an int since newer versions of gcc seem to
2901 generate code which needs this.
2903 * ssa2.c abcremoval2.c: Fix warnings.
2905 * *: Merge the Linear IR branch.
2907 The original branch is at trunk/branches/vargaz/mini-linear-il, and
2908 the ChangeLog file there describes all the changes done over the years.
2909 Further documentation can be found at www.mono-project.com/Linear_IL.
2911 2008-07-21 Bill Holmes <billholmes54@gmail.com>
2913 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2914 The float param registers and other param registers must be the
2915 same index on Windows x64.
2917 Contributed under MIT/X11 license.
2919 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
2921 * mini.c: Make the previous fix GC safe.
2923 2008-07-21 Raja R Harinath <harinath@hurrynot.org>
2925 * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
2927 2008-07-21 Bill Holmes <billholmes54@gmail.com>
2929 * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
2930 on Winx64. This type will not be passed on the stack (ArgOnStack), but
2931 ArgValuetypeAddrInIReg instead.
2933 Contributed under MIT/X11 license.
2935 2008-07-21 Zoltan Varga <vargaz@gmail.com>
2937 * mini-codegen.c (get_register_spilling): Fix a warning.
2939 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
2941 * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
2942 for types which the initialization fails. Raises the provided exception
2943 at the right stop after cleanup.
2945 2008-07-16 Zoltan Varga <vargaz@gmail.com>
2947 * aot-compiler.c: Free most of the memory allocated during compilation.
2949 * mini.c (mini_parse_debug_options): Fix a leak.
2951 * mini.c (mini_method_compile): Don't add the method to the jit info tables
2952 during aot compilation.
2954 2008-07-14 Zoltan Varga <vargaz@gmail.com>
2956 * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as
2957 it has too much register pressure.
2959 2008-07-13 Zoltan Varga <vargaz@gmail.com>
2961 * inssel.brg (CEE_CASTCLASS): Remove some dead code.
2963 2008-07-12 Zoltan Varga <vargaz@gmail.com>
2965 * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2968 * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2969 on amd64 similar to the way it is done on arm.
2971 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2973 * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for
2974 consistency, normalize error messages, avoid loading aot-only modules in
2977 * driver.c (mono_main): Rename --aot-only command line option to --full-aot
2980 * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
2982 2008-07-11 Martin Baulig <martin@ximian.com>
2985 (MonoDebuggerInfo): Add `interruption_request'.
2987 2008-07-12 Zoltan Varga <vargaz@gmail.com>
2989 * aot-compiler.c (emit_plt): Remove some dead code.
2991 * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
2993 * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
2994 return the plt info offset belonging to a given plt entry.
2996 * mini-trampolines.c (mono_aot_plt_trampoline): Use
2997 mono_aot_get_plt_info_offset.
2999 * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
3000 similar to the amd64 code by makeing jumps through a separate jump table
3001 instead of embedding the jump addresses into the code.
3003 2008-07-11 Zoltan Varga <vargaz@gmail.com>
3005 * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
3008 2008-07-10 Martin Baulig <martin@ximian.com>
3010 * mini.c (mini_method_compile): Disable generics sharing when
3011 running in the debugger.
3013 2008-07-10 Zoltan Varga <vargaz@gmail.com>
3015 * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
3017 * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
3018 the local register allocator from running out of registers on x86 when
3021 2008-07-10 Bill Holmes <billholmes54@gmail.com>
3023 * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when
3024 expressing IntMin for the VS Compiler. See Compiler Warning (level 2)
3027 Contributed under MIT/X11 license.
3029 2008-07-10 Zoltan Varga <vargaz@gmail.com>
3031 * aot-compiler.c: Get rid of whitespace in the generated assembly file to
3032 speed up the assembler.
3034 2008-07-09 Zoltan Varga <vargaz@gmail.com>
3036 * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
3039 * mini.c: Move the soft float handling macros a bit earlier, add
3040 NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
3043 * mini.h: Add prototype for mono_arch_fixup_jinfo.
3045 * mini.c (mini_init): In aot-only mode, set the root domain code manager to
3046 read-only to help catch code allocation requests.
3048 * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
3049 and turn it off when using --aot-only or when compiling with --aot=full.
3051 * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
3052 jump table for switches from the normal domain mempool, not the code
3055 * mini-trampolines.c (get_unbox_trampoline): New function to return an
3056 unbox trampoline which handles aot-only mode too.
3058 * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
3059 an AOTed unbox trampoline.
3061 * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
3063 2008-07-09 Bill Holmes <billholmes54@gmail.com>
3065 * wapihandles.c: Fixing MSVC builds. Include statement changed from <> to
3068 Contributed under MIT/X11 license.
3070 2008-07-09 Bill Holmes <billholmes54@gmail.com>
3072 * mini.c (mono_codegen): Allocate space at the end of the code block and store
3073 the unwind information for the method at the end of the allocated block.
3075 * mini-amd64.h: Added declarations for the unwind routines and adding field to
3076 MonoCompileArch to hold the unwind info for SEH on Winx64
3078 * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
3079 frame pointer info for the method being compiled.
3081 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
3082 the call to mono_exception_from_token.
3084 * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations. This code is responsible
3085 storing the method prolog information in a format that the Winx64 SEH can understand. This
3086 information is stored a the end of the method block because it is all 32-bit offset based.
3088 Contributed under MIT/X11 license.
3090 2008-07-09 Zoltan Varga <vargaz@gmail.com>
3092 * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
3094 * wapihandles.c: Fix warnings.
3096 * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
3099 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling
3100 mono_jit_compile_method in aot-only mode since that calls the type
3103 * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
3104 get_delegate_invoke_impl in aot-only mode.
3106 * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
3108 2008-07-08 Zoltan Varga <vargaz@gmail.com>
3110 * trace.c (mono_trace_enter_method): Fix printing of Type instances.
3112 * aot-compiler.c (compile_method): Disable the check for GSHARED since it
3115 * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
3117 * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
3118 init trampoline from the AOT file as well.
3120 * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
3121 mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
3124 * mini.c (mini_init): Move the call to mono_exceptions_init () after
3127 * exceptions-amd64.c: Add _full variants for the remaining exception code
3128 creation functions as well, allow emission of relocatable code, remove
3129 caching since that is now done by the caller.
3131 * mini-exceptions.c: Add _full variants for the remaining exception code
3132 creation functions as well, add aot-only support.
3134 * aot-compiler.c (compile_method): Allow calls to methods of constructed types
3135 if we can determine a proper token for them.
3136 (add_wrappers): Add a few more wrappers.
3137 (emit_method_code): Remove some dead code.
3138 (emit_trampolines): Emit exception code too.
3140 * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
3142 * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
3143 mono_array_new_va which avoids varargs.
3145 * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
3147 * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
3148 mono_arch_create_specific_trampoline () in all places.
3150 * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
3151 a bit so it can be used for other things as well.
3153 * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
3156 * exceptions-amd64.c: Rename the caching from the exception code creation
3157 functions, it is done by the caller instead.
3159 * exceptions-amd64.c: Change the signature of the exception code creation
3160 functions to allow the creation of relocatable code later.
3162 * mini-exceptions.c: Add a set of functions to query the various
3163 runtime-generated exception functions.
3165 * mini.c mini-exceptions.c: Use the newly added functions instead of the
3166 mono_arch_.. () functions.
3168 2008-07-07 Zoltan Varga <vargaz@gmail.com>
3170 * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
3172 * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
3174 * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
3175 (mini_get_vtable_trampoline): Ditto.
3177 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
3178 code in the AOT case by returning the code size and a list of relocations to
3181 * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
3183 2008-07-07 Bill Holmes <billholmes54@gmail.com>
3185 * mini-amd64.c: On Winx64 the calling convention always requires the caller to
3188 Contributed under MIT/X11 license.
3190 2008-07-07 Zoltan Varga <vargaz@gmail.com>
3192 * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
3193 so the buffer size can be computed correctly. Fixes #404735.
3195 * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
3196 normally as cfg->debug_info is already freed.
3198 2008-07-06 Zoltan Varga <vargaz@gmail.com>
3200 * mini-amd64.c: For calls returning vtypes in registers, don't store
3201 the return address on the stack, instead allocate a separate local for
3204 2008-07-05 Mark Probst <mark.probst@gmail.com>
3206 * mini-trampolines.c, mini.h: Add an argument to
3207 mono_create_jit_trampoline_in_domain() for turning off the adding
3208 of the sync wrapper.
3210 * mini.c: Use the JIT trampoline without sync instead of
3211 ldftn_nosync in static RGCTX invoke wrappers so that the call can
3214 2008-07-04 Mark Probst <mark.probst@gmail.com>
3216 * driver.c: Turn on GSHARED optimization by default.
3218 2008-07-04 Zoltan Varga <vargaz@gmail.com>
3220 * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
3221 to MONO_TRAMPOLINE_JIT since it better reflects what it does.
3223 * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
3224 create a variant of the generic trampoline code callable from AOTed trampolines.
3226 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
3227 trampoline code callable from AOTed trampolines.
3229 * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
3231 2008-07-04 Mark Probst <mark.probst@gmail.com>
3233 * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
3234 pass-through manner.
3236 * mini.c: Generic method sharing. Pass MRGCTX to generic methods
3237 and don't fail sharing for them anymore.
3239 * mini-exceptions.c: Handle exceptions in shared generic methods.
3241 * generic-sharing.c: When checking the context of a generic
3242 method, also check its class's context. Don't treat wrappers as
3245 * mini-trampolines.c: Some code factored out to
3246 metadata/generic-sharing.c. Handle the MRGCTX case.
3248 * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
3249 we must deal with the method being of another instantiation of the
3250 class. Add static rgctx invoke wrappers to generic methods.
3252 2008-07-04 Mark Probst <mark.probst@gmail.com>
3254 * mini.c: Provide all jit infos of generic shared methods with a
3257 * mini-exceptions.c: Handle the new situation that a generic info
3258 might be available, but not info about the this/vtable/mrgctx
3261 2008-07-03 Mark Probst <mark.probst@gmail.com>
3263 * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
3266 2008-07-03 Zoltan Varga <vargaz@gmail.com>
3268 * dominators.c (check_dominance_frontier): Fix a warning.
3270 * mini.h: Add some missing prototypes.
3272 * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
3274 * driver.c (mono_jit_init_version): Correct the comments since the first
3275 argument should be the name of the root domain, not a filename.
3277 * aot-runtime.c (make_writable): Error out if this is called while running
3279 (load_aot_module): Ditto.
3281 * aot-compiler.c: Really fix the computation of method indexes.
3283 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous
3284 optimizations as this is no longer called frequently.
3286 * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
3287 method and the invoke impl code and pass it to the delegate trampoline instead of
3288 just the delegate class.
3290 2008-07-02 Zoltan Varga <vargaz@gmail.com>
3292 * aot-compiler.c: Fixup the computation of method indexes.
3293 (add_wrappers): Create the base methods of the runtime invoke wrappers using
3294 the method builder infrastructure.
3296 * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
3299 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
3300 mode, load the method right away instead of creating a trampoline.
3302 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
3304 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
3307 2008-07-01 Zoltan Varga <vargaz@gmail.com>
3309 * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
3310 (mono_aot_load_method): Use method_index instead of method->token.
3312 * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
3313 can handle icalls etc. properly.
3315 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3317 * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
3319 * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
3320 (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
3321 JIT_ICALL_ADDR patch type.
3323 * patch-info.h: Add JIT_ICALL_ADDR patch type.
3325 * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
3327 (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
3329 * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
3331 2008-06-30 Zoltan Varga <vargaz@gmail.com>
3333 * mini.c: Use domain->jit_code_hash_lock for controlling access to
3334 domain->jit_code_hash.
3336 2008-06-29 Zoltan Varga <vargaz@gmail.com>
3338 * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
3340 2008-06-27 Zoltan Varga <vargaz@gmail.com>
3342 * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
3343 get_this_arg_from_call, let it compute it when needed.
3345 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
3346 gsctx from code only when needed.
3348 * mini-trampolines.c (get_generic_context): Rename this to
3349 mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
3350 it can be called by the arch backends.
3352 * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
3354 2008-06-26 Zoltan Varga <vargaz@gmail.com>
3356 * driver.c (mono_main): Add experimental --aot-only command line option.
3358 * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
3361 2008-06-26 Kornél Pál <kornelpal@gmail.com>
3363 * driver.c (DllMain): Remove mono_module_handle.
3365 Contributed under MIT/X11 license.
3367 2008-06-25 Zoltan Varga <vargaz@gmail.com>
3369 * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
3370 for emitting methods which are not in the source assembly. Detect and report
3371 failure of assembling+linking.
3373 * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
3375 * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
3377 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
3379 * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
3381 2008-06-24 Zoltan Varga <vargaz@gmail.com>
3383 * mini.h: Remove some obsolete prototypes.
3385 * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
3387 2008-06-24 Mark Probst <mark.probst@gmail.com>
3389 * mini.c (get_object_generic_inst): Variable-sized arrays are not
3390 supported by Visual Studio, so use alloca().
3392 2008-06-23 Zoltan Varga <vargaz@gmail.com>
3394 * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
3397 2008-06-23 Mark Probst <mark.probst@gmail.com>
3399 * mini.c: Fail sharing of a generic method if it contains an open
3400 catch clause (because we don't pass MRGCTXs yet).
3402 2008-06-23 Mark Probst <mark.probst@gmail.com>
3404 * mini.c: When compiling a method with generic sharing, insert the
3405 method instantiated with an all-Object generic context into the
3406 jit info table, instead of the context of the first instantiation
3407 of the method we happen to compile.
3409 2008-06-18 Martin Baulig <martin@ximian.com>
3411 * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
3412 `major_version' and `minor_version'.
3414 2008-06-17 Mark Probst <mark.probst@gmail.com>
3416 * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
3417 mono_method_is_generic_sharable_impl() takes an additional
3418 argument specifying whether to treat type variables as reference
3421 2008-06-17 Mark Probst <mark.probst@gmail.com>
3423 * mini.h: Removed obsolete prototypes.
3425 2008-06-17 Mark Probst <mark.probst@gmail.com>
3427 * mini.c: Don't fail generic sharing for initobj and sizeof - we
3428 already handle them.
3430 2008-06-17 Mark Probst <mark.probst@gmail.com>
3432 * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
3433 tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
3434 tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
3435 tramp-x86.c: Added a MonoGenericContext* argument to
3436 mono_arch_get_unbox_trampoline() so that it can call other
3437 functions which require it.
3439 2008-06-17 Mark Probst <mark.probst@gmail.com>
3441 * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
3442 mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
3443 mono_arch_get_this_arg_from_call() takes a
3444 MonoGenericSharingContext* as well.
3446 2008-06-17 Mark Probst <mark.probst@gmail.com>
3448 * mini.c: Factor out code for emitting unbox into emit_unbox() and
3449 implement generic sharing of unbox.
3451 2008-06-17 Mark Probst <mark.probst@gmail.com>
3453 * mini.c: Don't compute the vtable to determine whether a field is
3454 special static, because it might not work for open types.
3456 2008-06-17 Mark Probst <mark.probst@gmail.com>
3458 * mini.c: Removed the unused token_type and token_source arguments
3459 from get_runtime_generic_context_ptr().
3461 2008-06-17 Marek Habersack <mhabersack@novell.com>
3463 * mini.c (ADD_BINOP): fix the build
3465 2008-06-16 Zoltan Varga <vargaz@gmail.com>
3467 * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
3470 2008-06-16 Mark Probst <mark.probst@gmail.com>
3472 * mini.h: Removed class relations enum that's not used anymore.
3474 2008-06-16 Mark Probst <mark.probst@gmail.com>
3476 * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
3478 * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
3479 the lazy fetch trampoline access code.
3481 2008-06-15 Zoltan Varga <vargaz@gmail.com>
3483 * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
3485 2008-06-14 Zoltan Varga <vargaz@gmail.com>
3487 * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
3489 * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
3491 * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
3493 2008-06-13 Zoltan Varga <vargaz@gmail.com>
3495 * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
3498 * mini-ops.h: Add MIN/MAX_UN opcodes.
3500 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
3503 * basic-math.cs: Add more min/max tests.
3505 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
3507 2008-06-13 Mark Probst <mark.probst@gmail.com>
3509 * mini.c: Small fix in the prologue of emit_castclass.
3511 2008-06-13 Zoltan Varga <vargaz@gmail.com>
3513 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
3515 * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
3516 do not work even for unsigned types. Fixes #400014.
3518 * basic-math.cs: Add regression tests for unsigned Min/Max.
3520 2008-06-13 Mark Probst <mark.probst@gmail.com>
3522 * mini.c: Added additional context_used argument to several
3523 functions, which will be needed for sharing generic methods. Use
3524 GET_RGCTX macro wherever appropriate. Declare only one
3525 context_used in mono_method_to_ir().
3527 2008-06-13 Mark Probst <mark.probst@gmail.com>
3529 * mini.c, generic-sharing.c: Removed generic class relations.
3531 * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
3532 functions due to MRGCTX changes.
3534 2008-06-13 Mark Probst <mark.probst@gmail.com>
3536 * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
3537 graph.c, local-propagation.c, aliasing.c: New opcodes for calls
3538 with calculated IMT.
3540 * mini.c: Generic sharing of calls via generic interfaces.
3542 * jit-icalls.c, jit-icalls.h: Helper function for compiling a
3543 generic method with non-constant MonoGenericContext*. Instead,
3544 the context is taken out of the method itself.
3546 2008-06-13 Mark Probst <mark.probst@gmail.com>
3548 * mini.c: Generic sharing of ldvirtftn.
3550 2008-06-13 Mark Probst <mark.probst@gmail.com>
3552 * mini.c: Generic sharing of ldftn.
3554 2008-06-13 Mark Probst <mark.probst@gmail.com>
3556 * mini.c: Do pass VTable/RGCTX argument to static generic methods.
3558 2008-06-13 Mark Probst <mark.probst@gmail.com>
3560 * mini.c: Generic sharing of the special case of ldtoken followed
3561 by a call to GetTypeFromHandle.
3563 2008-06-13 Mark Probst <mark.probst@gmail.com>
3565 * mini.c: Generic sharing of box for nullable types.
3567 2008-06-13 Zoltan Varga <vargaz@gmail.com>
3569 * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
3570 are passed on the stack. Fixes #324807.
3572 2008-06-12 Bill Holmes <billholmes54@gmail.com>
3574 * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
3575 for the ArgValuetypeAddrInIReg case.
3577 * mini-amd64.c:mono_arch_allocate_vars: Adding a case for
3578 ArgValuetypeAddrInIReg to avoid asserts. Code needs to be added here.
3580 * mini-amd64.c: mono_arch_call_opcode: Adding Winx64 code for an ArgInfo of
3581 type ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
3582 local variable and pass the local variable by reference to the called method.
3584 * mini-amd64.c: mono_arch_emit_prolog: Adjust the stack for calls to
3585 mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
3587 Contributed under MIT/X11 license.
3589 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3591 * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
3593 * debug-mini.c (mono_debug_print_vars): Release memory after printing
3596 2008-06-10 Martin Baulig <martin@ximian.com>
3599 (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
3601 2008-06-09 Kornél Pál <kornelpal@gmail.com>
3603 * main.c: Add and set argv [argc] to NULL to match C specification that fixes
3604 possible error when no arguments are passed.
3606 Contributed under MIT/X11 license.
3608 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
3610 * mini-exceptions.c (ves_icall_get_trace): Skip source locations
3611 where the file name is NULL.
3613 2008-06-09 Zoltan Varga <vargaz@gmail.com>
3615 * mini.c: Fix s390 build.
3617 2008-06-08 Zoltan Varga <vargaz@gmail.com>
3619 * trace.c (mono_trace_parse_options): Fix warnings.
3621 * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
3623 2008-06-07 Zoltan Varga <vargaz@gmail.com>
3625 * mini.c (remove_block_if_useless): Avoid printing the method name.
3627 * mini.c: Remove needless setting of ins->cil_code which is now done by
3630 * mini-amd64.c: Add some code to avoid saving callee saved registers in the
3633 * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
3634 translated code after it has been patched.
3636 2008-06-06 Zoltan Varga <vargaz@gmail.com>
3638 * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
3639 avoid problems during code patching on SMP systems.
3640 (emit_call): Avoid adding a patch info which is already added by
3642 (mono_arch_emit_exceptions): Ditto.
3644 2008-06-05 Zoltan Varga <vargaz@gmail.com>
3646 * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
3647 MONO_TYPE_ISSTRUCT already checks for it.
3649 2008-06-05 Bill Holmes <billholmes54@gmail.com>
3651 * mini-amd64.c:merge_argument_class_from_type: When marshaling
3652 structs with floats on Winx64 the float registers are not used.
3653 The integer registers are always used..
3654 * mini-amd64.c:add_valuetype: When marshaling structs on Winx64
3655 only one register will be used and only if the size of the struct
3656 is 1,2,4, or 8 bytes.
3658 * tramp-amd64.c : Adjusting size used for mono_global_codeman_reserve
3661 Contributed under MIT/X11 license.
3663 2008-06-05 Martin Baulig <martin@ximian.com>
3665 * debug-debugger.c (debugger_lookup_class): Also call
3666 mono_class_setup_methods() here; we're only called from RTI.
3668 2008-06-05 Andreas Färber <andreas.faerber@web.de>
3670 * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
3671 (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
3672 * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
3673 Post-process object files and add dtrace-generated object, if necessary.
3675 Contributed under MIT/X11 license.
3677 2008-06-04 Mark Probst <mark.probst@gmail.com>
3679 * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
3682 * mini.c: Generic sharing for unbox.any and castclass.
3684 2008-06-04 Mark Probst <mark.probst@gmail.com>
3686 * mini.c: Ignore tailcall prefix in shared generic code and when
3687 doing calls which require a vtable/rgctx argument.
3689 2008-06-04 Mark Probst <mark.probst@gmail.com>
3691 * mini.c: Don't free the JIT info.
3693 * driver.c: Changes in the JIT info table testing code.
3695 2008-06-03 Zoltan Varga <vargaz@gmail.com>
3697 * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread
3698 interruption. Fix some warnings.
3700 * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
3701 interruption_checkpoint.
3703 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
3705 * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
3706 from embedding applications.
3708 2008-06-02 William Holmes <billholmes54@gmail.com>
3710 * mini-amd64.c : Correcting some of the issues for Winx64 dealing with
3711 reserving 32 bytes on the stack when making calls.
3713 Contributed under MIT/X11 license.
3715 2008-06-01 Zoltan Varga <vargaz@gmail.com>
3717 * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
3718 the linear IL branch.
3720 * driver.c: Print out more information for --version on arm.
3722 2008-05-30 Zoltan Varga <vargaz@gmail.com>
3724 * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
3725 bb_exit instead, since out of line bblocks might not actually be emitted
3728 * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
3729 maximum epilog size for out of line bblocks if tracing is enabled.
3731 * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
3733 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
3735 * arrays.cs: Regression tests for allocating arrays with negative sizes.
3737 2008-05-28 Zoltan Varga <vargaz@gmail.com>
3739 * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
3740 CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE
3743 2008-05-27 Zoltan Varga <vargaz@gmail.com>
3745 * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
3746 the 'value' to store is a constant.
3748 * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
3750 * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
3751 of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
3753 2008-05-26 Zoltan Varga <vargaz@gmail.com>
3755 * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
3756 for accessing method->generic_container.
3758 2008-05-24 Zoltan Varga <vargaz@gmail.com>
3760 * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
3762 * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
3764 * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
3766 * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
3769 2008-05-23 Zoltan Varga <vargaz@gmail.com>
3771 * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
3773 * mini.c: Handle the case when mono_class_vtable () fails.
3775 2008-05-23 Massimiliano Mantione <massi@ximian.com>
3776 * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
3779 2008-05-22 Mark Probst <mark.probst@gmail.com>
3781 * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
3782 together with domain sharing.
3784 2008-05-22 Mark Probst <mark.probst@gmail.com>
3786 * mini.c: Treat callvirts to final methods like non-virtual calls
3787 when doing generic sharing, i.e. look them up in the runtime
3790 2008-05-22 Mark Probst <mark.probst@gmail.com>
3792 * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
3793 with computed types (for generic sharing).
3795 * mini.c: Generic sharing for mkrefany and refanyval.
3797 2008-05-22 Zoltan Varga <vargaz@gmail.com>
3799 * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
3802 * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
3803 the generic sharing code.
3805 * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
3808 2008-05-21 Zoltan Varga <vargaz@gmail.com>
3810 * mini.h: Remove the declaration of mono_aot_init_vtable ().
3812 2008-05-21 C.J. Adams-collier <cjac@colliertech.org>
3814 * driver.c: updated copyright date
3816 2008-05-21 Zoltan Varga <vargaz@gmail.com>
3818 * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
3821 2008-05-19 Martin Baulig <martin@ximian.com>
3823 * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
3824 pointing to the new `_mono_debug_using_mono_debugger' variable.
3827 (mono_main): Check mono_debug_using_mono_debugger() rather than
3828 the `MONO_INSIDE_MDB' environment variable to check whether we're
3829 inside the debugger.
3831 2008-05-19 Zoltan Varga <vargaz@gmail.com>
3833 * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
3836 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
3838 * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
3840 * mini.c: Added mini_assembly_can_skip_verification. This
3841 function checks if the assembly requested to skip verification.
3842 Fixes part of #387274.
3844 2008-05-07 Zoltan Varga <vargaz@gmail.com>
3846 * mini.c (mini_get_method): Disable the check for open generic classes when
3847 using generic sharing.
3849 * generics.cs: Add a test for #387034.
3851 * mini.c (mini_get_method): Check whenever the method class is an open generic
3852 type, and return NULL in that case, causing a verification error. Fixes
3855 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
3857 * driver.c (mono_main): Revert r102623. The right
3858 thing to do is to enable the verifier under verifiable
3859 unless a --security flag was passed.
3861 We need this non-trivial behavior for --verify-all otherwise
3862 mcs-compileall won't be able to use it. As it needs everything to
3863 be verified under validil.
3865 2008-05-06 Martin Baulig <martin@ximian.com>
3869 * debug-mini.c (mono_debugger_thread_created): Add proper locking.
3870 (mono_debugger_thread_cleanup): Likewise.
3871 (mono_debugger_extended_notification): Likewise.
3873 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
3875 * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
3876 against both inflated and non-inflated methods. We need to check against the
3877 generic definition for cases where the instantiated method is not visible.
3878 We need to check against the inflated types for cases where the instantiation
3879 changes any super type. This fixes #382986.
3881 Note that this doesn't need to be applied to other parts of mono_method_to_ir
3882 that check for visibiliy as generic params only appears as the type subject
3883 of tokens on call opcodes. Field manipulation and ldftn must always
3884 target an exact type.
3886 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
3888 * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
3889 if no related --security flag is passed.
3891 2008-05-05 Andreas Färber <andreas.faerber@web.de>
3893 * mini-arch.h: Prepare support for ppc64.
3895 Contributed under MIT/X11 license.
3897 2008-05-05 Andreas Färber <andreas.faerber@web.de>
3899 * aot-runtime.c: Prepare support for ppc64.
3901 Contributed under MIT/X11 license.
3903 2008-05-05 Andreas Färber <andreas.faerber@web.de>
3905 * mini-ops.h: Prepare support for ppc64.
3907 Contributed under MIT/X11 license.
3909 2008-05-04 Andreas Färber <andreas.faerber@web.de>
3911 * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
3913 Contributed under MIT/X11 license.
3915 2008-05-03 Zoltan Varga <vargaz@gmail.com>
3917 * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
3918 assemblies, since aot_name is not a full path, causing us to load MS.NET
3919 assemblies on windows.
3921 2008-04-28 Kornél Pál <kornelpal@gmail.com>
3923 * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
3924 for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
3925 * main.c: Use UTF-8 encoded command line instead of Windows default code
3926 page on Windows to support Unicode.
3927 * driver.c (DllMain): New function for mixed-mode assembly support.
3928 * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
3929 export __stdcall functions without decoration.
3931 Contributed under MIT/X11 license.
3933 2008-04-28 Mark Probst <mark.probst@gmail.com>
3935 * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
3936 saving it very early.
3938 2008-04-28 Mark Probst <mark.probst@gmail.com>
3940 * mini.h, mini.c: Lots of code for accessing the old RGCTX
3941 deleted. The only way to access the new RGCTX is via the
3944 * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
3945 vtable instead of the RGCTX to static methods.
3947 * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
3948 accessing the new RGCTX.
3950 * generic-sharing.c: There is no separation between self, type
3951 arguments and other types in the RGCTX anymore.
3953 2008-04-25 Jonathan Chambers <joncham@gmail.com>
3955 * mini-amd64.c (add_general): Remove previous stack adjustment.
3956 (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
3957 adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
3958 for 32 bytes of stack space reserved for all calls.
3960 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
3961 (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack
3964 Code contributed under MIT/X11 license.
3966 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
3968 * mini.c (mini_method_verify): Only verify non-inflated methods, check
3969 against the root definition, peeling out method and type instantiations.
3970 Cache verify success results, code that fails verification is still
3971 checked multiple times.
3973 2008-04-23 Zoltan Varga <vargaz@gmail.com>
3975 * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
3977 2008-04-23 Jonathan Chambers <joncham@gmail.com>
3979 * mini-amd64.c (add_general): Always increment stack on Win64.
3980 (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
3983 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for
3984 stack based argument handling on Win64.
3986 Code contributed under MIT/X11 license.
3988 2008-04-23 Raja R Harinath <harinath@hurrynot.org>
3990 * Makefile.am (version.h): Add support for git-svn.
3992 2008-04-22 Zoltan Varga <vargaz@gmail.com>
3994 * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
3995 so instead of calling g_spawn_command_line_sync, we do everything by hand,
3996 avoiding allocations and libc functions which might deadlock.
3998 * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
3999 'no-gdb-backtrace' option is set.
4001 * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
4003 * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
4005 2008-04-21 Martin Baulig <martin@ximian.com>
4007 * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
4008 and `get_lmf_addr'; `notification_address' is no longer a pointer.
4010 2008-04-21 Martin Baulig <martin@ximian.com>
4012 * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
4013 `thread_vtable', `event_handler_ptr' and `event_handler'.
4015 2008-04-21 Martin Baulig <martin@ximian.com>
4017 * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
4018 allows delayed initialization of the `executable_code_buffer' when
4021 2008-04-21 Martin Baulig <martin@ximian.com>
4023 * mini.h (mono_debugger_create_notification_function): Removed.
4024 * tramp-*.c (mono_debugger_create_notification_function): Removed.
4026 * mdb-debug-info64.s
4027 (MONO_DEBUGGER__notification_function): Added this in the .text section.
4029 * mdb-debug-info32.s
4030 (MONO_DEBUGGER__notification_function): Added this in the .text section.
4032 * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
4033 currently only works on x86 and x86_64, so don't create it on ppc.
4035 2008-04-21 Martin Baulig <martin@ximian.com>
4037 * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
4040 (mini_method_compile): In the fp elimination check, check
4041 `debug_options.mdb_optimizations' in addition to
4042 mono_debug_using_mono_debugger().
4044 * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
4045 disable some JIT optimizations which are only disabled when
4046 running inside the debugger.
4047 Added `--help-debug' option to describe the debugging options.
4048 (parse_debug_options): New static function to parse the `--debug'
4049 options, so we can easily add more stuff in future.
4051 2008-04-20 Zoltan Varga <vargaz@gmail.com>
4053 * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
4054 the method has no body.
4056 2008-04-19 Jonathan Chambers <joncham@gmail.com>
4058 * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
4059 assembly is not allowed in MSVC 64-bit compiler.
4060 (mono_arch_cpu_init): Don't set floating point precision on MSVC build
4061 as we get floating point exceptions everywhere.
4063 * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
4064 correctly align arguments for call to throw_exception.
4065 (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
4067 Code contributed under MIT/X11 license.
4069 2008-04-19 Zoltan Varga <vargaz@gmail.com>
4071 * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
4073 2008-04-17 Zoltan Varga <vargaz@gmail.com>
4075 * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
4077 * mini-amd64.c (NEW_INS): Set cil_code.
4079 * mini.c (mini_method_compile): Move the disabling of fp elimination to here
4080 from mini-amd64.c so all debugger related logic is in one place.
4082 * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
4083 later won't have a random ip assigned to them.
4085 2008-04-16 Zoltan Varga <vargaz@gmail.com>
4087 * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
4088 the arch specific function initializes code_size.
4089 (mono_create_delegate_trampoline): Ditto.
4091 * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
4092 tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
4095 * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if
4096 running under the debugger.
4098 * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
4101 * mini.c (mini_method_compile): Set a few flags in cfg if running under the
4102 debugger. Also move the disabling of optimizations here from driver.c.
4103 (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
4106 * mini.h (MonoCompile): Add a few new flags.
4108 2008-04-15 Zoltan Varga <vargaz@gmail.com>
4110 * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
4111 so the cil_code field of created MonoInst's is properly set.
4112 (mini_select_instructions): Ditto.
4114 * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
4115 (MONO_INST_NEW_CALL): Ditto.
4117 * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
4118 in many places so the ins->cil_code field is properly initialized.
4120 * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
4123 2008-04-14 Zoltan Varga <vargaz@gmail.com>
4125 * mini.c (mini_method_compile): Print a different message when compiling a
4128 * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
4131 2008-04-11 Zoltan Varga <vargaz@gmail.com>
4133 * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
4136 * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
4138 2008-04-11 Zoltan Varga <vargaz@gmail.com>
4140 * mini.c (handle_stack_args): Make this return void since its return value was
4141 never used. Also set cfg->unverifiable for invalid IL instead of calling
4144 2008-04-10 Mark Probst <mark.probst@gmail.com>
4146 * mini.c: Make sure "this" is live in catch clauses with type
4147 variables in shared generic code.
4149 2008-04-08 Mark Probst <mark.probst@gmail.com>
4151 * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
4152 generic_class_is_reference_type() to ensure the proper behaviour
4153 when sharing generic code and the type in question is a type
4156 2008-04-08 Zoltan Varga <vargaz@gmail.com>
4158 * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
4159 race conditions when printing thread dumps. Fixes #377738.
4161 2008-04-08 Massimiliano Mantione <massi@ximian.com>
4163 aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
4164 shows up when both MonoInst arguments can cause aliasig.
4165 There is likely no way in the current JIT to trigger this problem, but
4166 it showed up in the development of generics sharing, when in a new
4167 opcode both args of an OP_GROUP can be aliases (addresses of a local).
4168 When the generics sharing code will be committed, its tests will be
4169 valid also for this bug.
4171 2008-04-08 Zoltan Varga <vargaz@gmail.com>
4173 * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
4176 * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
4179 2008-04-07 Zoltan Varga <vargaz@gmail.com>
4181 * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
4182 use a more detailed exception message for InvalidCastException.
4184 * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
4186 * driver.c (mono_main): Add --debug=casts option to turn on better
4187 InvalidCastException message details.
4189 * mini.c (mini_get_debug_options): New helper function to return the address of
4190 the debug_options variable.
4192 * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
4193 the jit_tls TLS variable.
4195 * mini.c (mono_jit_tls): New TLS variable.
4197 * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
4200 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
4202 * mini.h: Removed verifer related stuff. This code was moved to verify.c
4204 * mini.c: Removed verifer related stuff, code moved to verify.c.
4206 * driver.c: Using code from verify.c instead of mini.c.
4208 2008-04-05 Zoltan Varga <vargaz@gmail.com>
4210 * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
4213 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
4215 * mini.c (check_for_method_verify): Enabling verification of
4216 corlib if mono_verify_all is set. Bugs in the verifier preventing that
4219 2008-04-04 Zoltan Varga <vargaz@gmail.com>
4221 * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
4222 caller saved registers as well.
4224 * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
4225 saved registers as well.
4227 2008-03-30 Zoltan Varga <vargaz@gmail.com>
4229 * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
4231 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
4234 2008-03-27 Zoltan Varga <vargaz@gmail.com>
4236 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
4238 (get_call_info): Take a gsctx argument instead of 'cfg'.
4240 2008-03-26 Zoltan Varga <vargaz@gmail.com>
4242 * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
4243 mono_verify_all is set.
4245 * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
4247 * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
4249 2008-03-25 Zoltan Varga <vargaz@gmail.com>
4251 * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
4254 * driver.c mini.c mini.h: Add a --verify-all development option to test the
4255 verifier and the code generated by the compiler.
4257 2008-03-25 Mark Probst <mark.probst@gmail.com>
4259 * mini.c: Generic sharing of the non-nullable case of the box
4262 2008-03-24 Zoltan Varga <vargaz@gmail.com>
4264 * inssel.brg: Fix the build.
4266 * iltests.il.in: Add a test for lconv.ovf.u8.un.
4268 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
4270 * mini.c (mono_method_to_ir): Implement readonly for ldelema and
4271 Array:Address. Fixes #372410.
4273 * iltests.il.in: New tests for readonly prefix.
4275 2008-03-23 Zoltan Varga <vargaz@gmail.com>
4277 * mini.h mini.c mini-trampolines.c: Move trampoline related code to
4280 * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to
4283 * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
4285 * mini.c (mono_decompose_op_imm): New helper function.
4287 * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
4288 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
4291 * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
4292 mono_arch_output_basic_block. Fix warnings.
4294 * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
4297 2008-03-22 Zoltan Varga <vargaz@gmail.com>
4299 * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
4300 since the extra frame is now detected automatically inside the loop.
4302 * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole
4303 opts which are now in mono_peephole_ins ().
4305 * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
4307 * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
4308 frames and skip duplicate managed-to-native frames. Fixes #367665.
4310 * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
4311 opts which are now in mono_peephole_ins ().
4312 (mono_arch_peephole_pass_2): Ditto.
4314 * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
4316 * mini-codegen.c (mono_peephole_ins): New helper function containing the
4317 arch independent peephole optimizations.
4319 * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
4320 opts which are now in mono_peephole_ins ().
4322 * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
4324 * mini-s390.c (mono_arch_output_basic_block): Fix build.
4326 * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
4329 * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
4330 CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
4333 2008-03-21 Zoltan Varga <vargaz@gmail.com>
4335 * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
4336 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
4339 * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
4340 mono_arch_output_basic_block. Fix warnings.
4342 2008-03-20 Zoltan Varga <vargaz@gmail.com>
4344 * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
4347 2008-03-20 Zoltan Varga <vargaz@gmail.com>
4349 * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
4352 * iltests.il: Add new tests.
4354 2008-03-20 Kornél Pál <kornelpal@gmail.com>
4356 * mini.c: Removed Windows version macros.
4358 2008-03-20 Mark Probst <mark.probst@gmail.com>
4360 * generic-sharing.c: Put reflection types in the extensible part
4361 of the runtime generic context.
4363 * mini.c: Generic sharing of the GetTypeHandle special case of the
4364 ldtoken instruction.
4366 2008-03-20 Zoltan Varga <vargaz@gmail.com>
4368 * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
4370 * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
4372 * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for
4373 consistency with the other version on the linear IR branch.
4375 * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
4377 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
4379 * iltests.il.in: Add new tests.
4381 2008-03-19 Zoltan Varga <vargaz@gmail.com>
4383 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
4385 * iltests.il.in: Add new tests.
4387 2008-03-19 Mark Probst <mark.probst@gmail.com>
4389 * mini.c: Two variables with the same name were declared in
4390 nesting contexts and one wasn't initialized. Fixed.
4392 2008-03-19 Mark Probst <mark.probst@gmail.com>
4394 * mini.c: Generic sharing of the initobj instruction.
4396 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
4398 * mini.c: make the test to optimize ldtoken from typeof() more
4401 2008-03-18 Mark Probst <mark.probst@gmail.com>
4403 * mini.c: Generic sharing of the initobj instruction for reference
4406 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
4408 * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
4409 the mono_breakpoint_clean_code() code to perform bound checks.
4411 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
4413 * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
4414 mono_arch_patch_callsite() to include the start of the managed method
4415 to be able to perform bound checks.
4417 2008-03-17 Mark Probst <mark.probst@gmail.com>
4419 * mini.c: Generic sharing for the isinst instruction.
4421 2008-03-17 Mark Probst <mark.probst@gmail.com>
4423 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
4424 inssel-long32-mips.brg: Added opcodes for doing indirect calls
4425 with the runtime generic context argument.
4427 * mini.c: Share calls to several types of unsharable methods by
4428 putting the address of the method code in the runtime generic
4429 context and doing an indirect call.
4431 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
4434 2008-03-16 Mark Probst <mark.probst@gmail.com>
4436 * generic-sharing.c: Change due to a change in the runtime genric
4439 2008-03-15 Martin Baulig <martin@ximian.com>
4442 (mono_arch_nullify_class_init_trampoline): Add call to
4443 mono_breakpoint_clean_code() to make things work when running
4444 inside the debugger.
4447 (mono_arch_nullify_class_init_trampoline): Add call to
4448 mono_breakpoint_clean_code() to make things work when running
4449 inside the debugger.
4451 2008-03-14 Zoltan Varga <vargaz@gmail.com>
4453 * inssel-long.brg (reg): Fix 64 bit build.
4455 2008-03-14 Mark Probst <mark.probst@gmail.com>
4457 * mini.c, mini.h: Share static generic code by passing it an
4458 implicit argument pointing to the runtime generic context.
4460 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
4461 inssel-long32-mips.brg: New opcodes for calling shared static,
4462 which need to be passed the runtime generic context.
4464 * mini-amd64.c, mini-x86.c: Save the runtime generic context
4465 argument on the stack in the prologue if needed. New function for
4466 finding the runtime generic context argument from the registers
4467 saved by the trampoline.
4469 * mini-amd64.h, mini-x86.h: Specify which register to use for the
4470 runtime generic context argument.
4472 * tramp-amd64.c: Also restore the register used for the runtime
4473 generic context argument.
4475 * mini-trampoline.c: Resolve shared static calls by consulting the
4476 runtime generic context via the new argument.
4478 * generic-sharing.c: Add an argument to sharability-checking
4479 functions that specifies whether type variables should be treated
4480 as sharable type arguments.
4482 * inssel-x86.brg: Removed a superfluous, buggy rule.
4484 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
4487 2008-03-14 Martin Baulig <martin@ximian.com>
4489 * debug-debugger.c (main_thread_handler): Call
4490 mono_runtime_run_main() without sending any notifications.
4492 * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
4494 2008-03-14 Zoltan Varga <vargaz@gmail.com>
4496 * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
4498 2008-03-14 Mark Probst <mark.probst@gmail.com>
4500 * tramp-x86.c: Fixed register restore offsets in the trampoline
4501 code for ECX and EDX.
4503 2008-03-12 Geoff Norton <gnorton@novell.com>
4505 * mini-arm.h: Add some #defines for locating sp, pc, r4 with
4506 different ucontext_t implementations.
4507 * exceptions-arm.c: Use the above defines to get exceptions working on
4508 iPhone (based on a patch by Luke Howard lukeh@padl.com)
4509 * mini-arm.c: Implement iPhone icache support (based on a patch by
4510 Luke Howard lukeh@padl.com)
4512 2008-03-12 Mark Probst <mark.probst@gmail.com>
4514 * mini.c: Enable generic sharing of calls to non-static
4515 non-interface non-generic non-value-type methods.
4517 * mini-trampolines.c: Resolve calls from shared generic code.
4519 2008-03-11 Zoltan Varga <vargaz@gmail.com>
4521 * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
4523 * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
4525 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
4527 * mini.c: some fixes for the AOT compiler.
4529 2008-03-07 Zoltan Varga <vargaz@gmail.com>
4531 * cpu-amd64.md: Add clob:1 to some float opcodes.
4533 2008-03-07 Rodrigo Kumpera <rkumpera@novell.com>
4535 * mini.h: Added MiniVerifierMode enumeration.
4537 * mini.c: Added mini_verifier_set_mode to control
4538 the usage of the new verifier.
4540 * mini.c (mono_method): Integrated the new verifier.
4542 * driver.c: Extended --security option with validil and
4543 verifiable options to activate the new verifier.
4545 2008-03-07 Zoltan Varga <vargaz@gmail.com>
4547 * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation
4548 optimization to ctors taking 0 or 2 arguments too.
4550 * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
4553 * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
4555 * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
4557 2008-03-06 Zoltan Varga <vargaz@gmail.com>
4559 * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
4560 non-aot case as well.
4562 * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
4564 * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
4567 * aot-compiler.c (encode_patch): Ditto.
4569 * mini.h (G_MININT32): Fix the definition of this.
4571 2008-03-05 Zoltan Varga <vargaz@gmail.com>
4573 * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
4575 * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
4577 2008-03-04 Zoltan Varga <vargaz@gmail.com>
4579 * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for
4580 methods returning vtypes in registers.
4581 (mono_arch_allocate_vars): Ditto.
4583 * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
4585 * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().
4587 * generics.cs: Add a test from the linear IR branch.
4589 * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
4591 * mini.c (inline_method): Cache failed inline attempts.
4593 2008-03-04 Mark Probst <mark.probst@gmail.com>
4595 * mini.c: For shared methods of generic classes put the location
4596 of "this" into the MonoGenericJitInfo.
4598 * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
4599 register out of a MonoContext by register number. Add the generic
4600 sharing context as an argument to mono_arch_find_this_argument().
4602 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
4603 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
4604 for new arch function.
4606 * mini-exception.c: Handle open exception clauses in shared
4609 * mini-trampolines.c: Supply additional argument to
4610 mono_arch_find_this_argument().
4612 2008-03-04 Zoltan Varga <vargaz@gmail.com>
4614 * Makefile.am (regtests): Run the bench.exe tests last.
4616 2008-03-03 Zoltan Varga <vargaz@gmail.com>
4618 * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
4621 2008-03-02 Zoltan Varga <vargaz@gmail.com>
4623 * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
4626 * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
4628 * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
4630 * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
4631 whose class has no cctor.
4633 * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
4635 2008-03-01 Zoltan Varga <vargaz@gmail.com>
4637 * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
4640 2008-02-29 Zoltan Varga <vargaz@gmail.com>
4642 * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
4643 to be in sync with the code on the linear IR branch.
4645 * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
4647 * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
4649 2008-02-27 Zoltan Varga <vargaz@gmail.com>
4651 * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
4653 * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
4655 * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
4657 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
4659 * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
4661 * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
4664 2007-11-14 Yoichi NAKAYAMA <nakayama@pixela.co.jp>
4666 * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
4667 OP_LOADR4_MEMBASE emission.
4669 * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
4670 (mono_spillvar_offset_float): Ditto.
4672 * mini-mips.c (mono_arch_emit_prolog): Ditto.
4674 * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
4677 * basic-long.cs: Add regression tests for them.
4679 * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
4681 (mono_arch_allocate_vars): Fix representation of single-precision float
4683 (mono_arch_output_basic_block): Ditto.
4685 * inssel-mips.brg: Ditto, remove duplicate items.
4687 * mini-mips.c (emit_load_volatile_arguments): New function to handle
4688 arguments of tail calls as on other platforms.
4689 (mono_arch_output_basic_block): Handle tail calls.
4691 * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
4694 * objects.cs (test_5_pass_static_struct): Add test for it.
4696 Contributed under MIT/X11 license.
4698 2008-02-26 Zoltan Varga <vargaz@gmail.com>
4700 * Makefile.am: Use gmcs for compiling the regression tests.
4702 * *.2.cs *.2.il: Rename to *.cs and *.il.
4704 2008-02-24 Zoltan Varga <vargaz@gmail.com>
4706 * regalloc.h: Make the vassign array smaller.
4708 * mini.c (mini_method_compile): Remove an unused field in cfg.
4710 * mini-codegen.c: Add a bunch of micro optimizations.
4712 2008-02-23 Zoltan Varga <vargaz@gmail.com>
4714 * regalloc.h: Remove some unused fields.
4716 2008-02-22 Zoltan Varga <vargaz@gmail.com>
4718 * mini-amd64.c (mono_arch_patch_code): Fix a warning.
4720 * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
4722 2008-02-22 Mark Probst <mark.probst@gmail.com>
4724 * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
4726 * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
4727 trampoline: Fetch an entry from the runtime generic context. If
4728 it's NULL, jump to the actual trampoline to fill the runtime
4729 generic context. Otherwise, return it.
4731 * mini.c: Call the lazy fetch trampoline to get entries out of the
4732 runtime generic context.
4734 * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
4735 tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
4736 tramp-sparc.c: Stubs for the lazy fetch trampoline.
4738 2008-02-21 Mark Probst <mark.probst@gmail.com>
4740 * mini.c: Fetch data out of the extensible part of the runtime
4741 generic context instead of calling a helper function.
4743 * generic-sharing.c: Some functions moved into
4744 metadata/generic-sharing.c. Helper function for fetching other
4745 types now checks and asserts against extensible rgctx (just for
4746 debugging purposes - the helper function isn't called anymore
4747 unless for debugging).
4749 2008-02-21 Zoltan Varga <vargaz@gmail.com>
4751 * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
4752 for tail calls up to the point that the tests in iltests.exe run. Also add a
4753 dummy CKFINITE implementation.
4754 (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
4755 needed for trampoline LMF frames.
4757 * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for
4758 trampoline LMF frames.
4760 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
4762 * mini.c (inline_method): clean any pending loader error when inlining fail.
4763 Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
4765 2008-02-21 Zoltan Varga <vargaz@gmail.com>
4767 * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
4769 * aot-runtime.c (decode_patch_info): Ditto.
4771 * mini.c (mono_resolve_patch_target): Ditto.
4773 * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
4776 * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
4778 * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
4779 if it references an icall address.
4781 2008-02-20 Zoltan Varga <vargaz@gmail.com>
4783 * cpu-s390x.md: Remove some more unused opcodes.
4785 * cpu-s390x.md: Remove some unused opcodes.
4787 * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
4788 mono_op_imm_to_op ().
4790 * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
4791 instead of a switch statement.
4793 * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
4794 the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
4796 * mini-codegen.c: Eliminate rassign macro which is no longer needed.
4798 * mini-codegen.c: Remove unused mono_regstate2_... functions.
4800 * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
4803 2008-02-19 Zoltan Varga <vargaz@gmail.com>
4805 * driver.c (mono_main): Improve error reporting when an assembly cannot be
4806 opened. Fixes #362607.
4808 * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
4810 * iltests.il.in: Add a test for static methods in interfaces.
4812 2008-02-18 Zoltan Varga <vargaz@gmail.com>
4814 * genmdesc.c (build_table): Fix a crash on older glib versions.
4816 * cpu-sparc.md: Remove some unused opcodes.
4818 * genmdesc.c: Error out if the .md contains CEE_ opcodes if
4819 MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
4821 * cpu-amd64.md: Remove some unused opcodes.
4823 * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
4824 like the other opcodes.
4826 2008-02-17 Zoltan Varga <vargaz@gmail.com>
4828 * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
4830 * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
4832 * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
4833 variables 'cfg' instead of 'm' for consistency.
4835 * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
4837 * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
4838 argument holding the vtype return address, to avoid the ambigious use of
4839 cfg->ret for this purpose.
4841 * mini.c (NEW_RETLOADA): Use vret_addr if set.
4843 * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
4845 * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
4846 new mono_print_ins () function which only takes one argument.
4848 2008-02-15 Zoltan Varga <vargaz@gmail.com>
4850 * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
4853 2008-02-14 Zoltan Varga <vargaz@gmail.com>
4855 * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
4857 * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
4859 * mini-x86.c: Sync with the version on the linear IR branch by adding new
4860 opcodes and other small changes.
4862 * mini-ops.h: Add some new opcodes from the linear IR branch.
4864 * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
4866 * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
4867 opcodes, use the REG_MEMBASE opcodes instead.
4869 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
4870 opcodes, use the REG_MEMBASE opcodes instead.
4872 * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
4875 * mini.c (mono_op_imm_to_op): New helper function.
4877 * mini-ops.h: Add some opcodes from linear IR branch.
4879 2008-02-13 Zoltan Varga <vargaz@gmail.com>
4881 * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov
4884 2008-02-12 Zoltan Varga <vargaz@gmail.com>
4886 * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to
4889 * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
4891 2008-02-09 Zoltan Varga <vargaz@gmail.com>
4893 * aot-compiler.c (emit_method_code): Add an assert.
4895 * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
4896 the IMT code so it is AOT friendly. Enable AOT for methods which call interface
4899 2008-02-08 Zoltan Varga <vargaz@gmail.com>
4901 * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for
4902 some load/store opcodes so they are consistent.
4903 (mono_arch_emit_prolog): Simplify some code.
4905 * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
4907 * objects.cs: Add tests for large argument offsets on ARM.
4909 * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large
4910 stack offsets. Fixes #359651.
4912 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
4914 * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
4916 * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
4918 * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
4920 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
4922 * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
4923 rid of CEE_CONV_R_UN.
4925 * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
4927 2008-02-07 Zoltan Varga <vargaz@gmail.com>
4929 * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
4931 * mini.c (mono_normalize_opcodes): Add some more opcodes.
4933 * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
4935 * cpu-amd64.md: Remove some unused opcodes.
4937 * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
4939 * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
4941 * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make
4942 arch specific functions for its parts. Call the peephole pass after local
4943 regalloc so the prolog can compute a more accurate max_offset.
4945 * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
4946 the corresponding OP_I/OP_L opcodes.
4948 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
4950 * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
4952 2008-02-06 Zoltan Varga <vargaz@gmail.com>
4954 * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
4955 as they are handled in mini.c.
4957 * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
4959 * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
4960 case since it is handled in mini.c.
4962 * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
4964 * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
4966 * *.c: Use the new opcodes in the IR and back end code.
4968 * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
4970 * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
4972 2008-02-06 Mark Probst <mark.probst@gmail.com>
4974 * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
4975 an assert because it has a race condition.
4977 2008-02-06 Zoltan Varga <vargaz@gmail.com>
4979 * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
4981 * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
4983 * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
4985 * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
4986 use OP_MOVE/OP_FMOVE/OP_ICONST instead.
4988 2008-02-05 Zoltan Varga <vargaz@gmail.com>
4990 * cpu-amd64.md (move): Correct the maximum size of move.
4992 2008-02-05 Mark Probst <mark.probst@gmail.com>
4994 * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
4995 the generic class init trampoline to return quickly if the class
4998 2008-02-04 Zoltan Varga <vargaz@gmail.com>
5000 * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
5001 issues where an 32 bit callsite cannot be patched by a 64 bit address.
5003 2008-02-03 Zoltan Varga <vargaz@gmail.com>
5005 * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
5008 2008-01-31 Zoltan Varga <vargaz@gmail.com>
5010 * objects.cs: Add some soft-float tests.
5012 * mini.c: Fix a couple more soft-float issues.
5014 * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
5016 * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
5019 2008-01-30 Zoltan Varga <vargaz@gmail.com>
5021 * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
5022 exception happens while compiling a virtual method.
5024 2008-01-29 Zoltan Varga <vargaz@gmail.com>
5026 * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
5028 * mini-sparc.c: Fix build.
5030 * mini-sparc.c (get_call_info): Add support for generic sharing.
5032 * mini-exceptions.c: Add a FIXME.
5034 2008-01-27 Zoltan Varga <vargaz@gmail.com>
5036 * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
5037 altstack handling code.
5039 * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
5041 * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
5043 * mini-s390.c: Add support for generic sharing.
5045 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
5047 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
5049 * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
5051 * mini-s390x.c: Add support for generic sharing.
5053 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
5055 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
5057 * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
5058 can be used since it takes a 16 bit signed immediate.
5060 * inssel-s390x.brg: Fix OP_SETRET.
5062 * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
5064 * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
5066 * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
5068 * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
5070 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
5073 * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
5076 * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
5077 of the unused mono_arch_patch_delegate_trampoline stuff.
5079 2008-01-26 Zoltan Varga <vargaz@gmail.com>
5081 * basic-long.cs: Move the fp related tests to basic-float.cs.
5083 * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
5085 * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
5087 * basic-calls.cs: Add a test for proper float argument passing.
5089 * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
5090 if the context corresponds to an exception received through a signal.
5092 * exceptions.cs: Add a test for nullref handling at the start of a try
5095 * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
5097 * jit-icalls.c (mono_break): New JIT icall.
5099 * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
5101 * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
5103 2008-01-25 Zoltan Varga <vargaz@gmail.com>
5105 * cpu-*.md: Get rid of unused opcodes.
5107 * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
5109 * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
5112 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
5115 * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
5116 the arch independent trampoline code in mini-trampolines.c.
5118 * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
5120 * mini.c (get_runtime_generic_context_ptr): Fix a warning.
5122 * mini-s390.h: Remove an unused define.
5124 * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
5125 the arch independent trampoline code in mini-trampolines.c.
5127 * mini-arm.c (mono_arch_emit_prolog): Fix build.
5129 2008-01-24 Zoltan Varga <vargaz@gmail.com>
5131 * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
5133 * mini-s390.c (mono_arch_emit_prolog): Fix build.
5135 * mini-s390x.c (mono_arch_emit_prolog): Fix build.
5137 * mini-ppc.c (mono_arch_emit_prolog): Fix build.
5139 * cpu-amd64.md: Use smaller sizes for int opcodes.
5141 * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
5143 * *.cs: Add some tests from the linear-ir branch. Move structs tests to
5146 * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
5149 * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
5150 instead of though a pointer to save an indirection when accessing elements of
5153 * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
5155 (NOT_IMPLEMENTED): New helper macro.
5156 (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
5159 * *.c: Use the new helper macro.
5161 2008-01-21 Zoltan Varga <vargaz@gmail.com>
5163 * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
5165 2008-01-20 Zoltan Varga <vargaz@gmail.com>
5167 * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
5170 2008-01-18 Zoltan Varga <vargaz@gmail.com>
5172 * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
5173 profiling is enabled.
5175 * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
5177 (mono_arch_emit_prolog): Add more first bblock optimizations.
5179 * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
5180 in order if possible.
5181 (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
5182 bblock, since the arguments are still in their original registers.
5184 * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
5186 2008-01-17 Zoltan Varga <vargaz@gmail.com>
5188 * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
5191 * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
5194 * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
5196 * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
5197 process async exceptions received while in unmanaged code.
5199 * mini.c (mini_init): Install a callback with the runtime which will be called
5200 when a thread receives an async exception while in unmanaged code.
5202 * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
5204 * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
5206 2008-01-16 Wade Berrier <wberrier@novell.com>
5213 2008-01-16 Zoltan Varga <vargaz@gmail.com>
5215 * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
5216 compilation with sun cc.
5218 * cpu-*.md: Fix the build.
5220 * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
5222 * mini-amd64.h: Add some comments to the MonoLMF structure.
5224 * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
5226 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
5227 in the LMF structure if possible. This saves two instructions in the
5228 managed->native wrappers.
5230 * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
5232 2008-01-16 Mark Probst <mark.probst@gmail.com>
5234 * generic-sharing.c: New type argument lookup code which uses the
5235 runtime generic context template.
5237 2008-01-15 Zoltan Varga <vargaz@gmail.com>
5239 * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
5241 * mini-arm.c (add_general): Fix arm eabi parameter passing.
5242 (mono_arch_output_basic_block): Fix localloc implementation.
5244 * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
5246 * mini-ia64.c (peephole_pass): Fix ia64 build.
5248 * mini-amd64.c (peephole_pass): Fix a warning.
5250 * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
5251 at a constant offset from sp/fp.
5253 * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
5254 instead of obtaining it from *lmf in the managed method case.
5256 2008-01-14 Zoltan Varga <vargaz@gmail.com>
5258 * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
5260 Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
5262 * mini.h (MonoInstList): New type.
5263 (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
5264 __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
5265 MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
5266 __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
5267 MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
5268 MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
5269 MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
5270 MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
5271 MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
5272 MONO_INST_LIST_FOR_EACH_PREV_SAFE,
5273 MONO_INST_LIST_FOR_EACH_ENTRY,
5274 MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
5275 MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
5276 mono_inst_list_first, mono_inst_list_last,
5277 mono_inst_list_next, mono_inst_list_prev): New instruction
5278 list handling interfaces.
5279 (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
5280 list head 'ins_list'.
5281 (MonoInst): Replace next pointer with list head 'node'.
5282 (MonoCallInst): Make 'out_args' a MonoInstList.
5283 (MONO_INST_NEW_CALL): Explicitly init ->out_args.
5284 (MonoCompile): Delete reverse_inst_list and
5285 reverse_inst_list_len.
5286 * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
5287 mono_arch_lowering_pass, mono_arch_local_regalloc,
5288 mono_arch_output_basic_block, mono_arch_emit_prolog):
5289 Convert to new instruction lists.
5290 (insert_after_ins): Delete.
5291 * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
5293 * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
5294 * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
5295 split_bblock, mono_add_ins_to_end, mono_emit_call_args,
5296 mono_emulate_opcode, mono_emit_load_got_addr,
5297 inline_method, mono_method_to_ir, mono_print_bb_code,
5298 print_dfn, decompose_pass, nullify_basic_block,
5299 replace_out_block_in_code, remove_block_if_useless,
5300 merge_basic_blocks, move_basic_block_to_end,
5301 try_unsigned_compare, optimize_branches, mono_print_code,
5302 mini_select_instructions, remove_critical_edges): Likewise.
5303 * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
5304 peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
5305 mono_arch_output_basic_block, mono_arch_emit_prolog):
5307 * mini-mips.c (mono_arch_call_opcode, peephole_pass,
5308 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5309 mono_arch_output_basic_block): Likewise.
5310 (inst_list_prepend, insert_after_ins): Delete.
5311 * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
5312 MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
5314 * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
5315 peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
5316 mono_arch_emit_prolog): Likewise.
5317 * cfold.c (mono_constant_fold): Likewise.
5318 * liveness.c (visit_bb, mono_analyze_liveness,
5319 optimize_initlocals): Likewise.
5320 * ssapre.c (dump_code, process_bb, code_motion): Likewise.
5321 * graph.c (mono_draw_code_cfg): Likewise.
5322 * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
5323 mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
5324 mono_ssa_cprop): Likewise.
5325 * abcremoval (get_relations_from_previous_bb, process_block):
5327 * local-propagation (mono_cprop_invalidate_values,
5328 mono_local_cprop_bb): Likewise.
5329 * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
5330 peephole_pass, mono_arch_output_basic_block,
5331 mono_arch_emit_prolog): Likewise.
5332 * mini-arm.c (mono_arch_call_opcode, peephole_pass,
5333 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5334 mono_arch_emit_prolog): Likewise.
5335 (insert_after_ins): Delete.
5336 * aliasing.c (print_code_with_aliasing_information,
5337 mono_build_aliasing_information, mono_aliasing_deadce):
5338 Convert to new instruction lists.
5339 * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
5340 peephole_pass, NEW_INS, mono_arch_lowering_pass,
5341 mono_arch_local_regalloc, mono_arch_output_basic_block):
5343 (insert_after_ins): Delete.
5344 * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
5345 peephole_pass, mono_arch_output_basic_block): Convert to
5346 new instruction lists.
5347 * mini-codegen (InstList, inst_list_prepend,
5348 insert_after_ins): Delete.
5349 (insert_before_ins, get_register_force_spilling,
5350 get_register_spilling, free_up_ireg, free_up_reg,
5351 create_copy_ins, create_spilled_store, alloc_int_reg,
5352 alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
5353 to new instruction lists.
5354 * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
5355 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5356 mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
5357 (insert_after_ins): Delete.
5358 * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
5359 mono_arch_local_regalloc, mono_arch_output_basic_block,
5360 mono_arch_call_opcode): Convert to new instruction lists.
5361 (insert_after_ins): Delete.
5362 * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
5363 peephole_pass, mono_arch_output_basic_block,
5364 mono_arch_emit_prolog): Convert to new instruction lists.
5366 2008-01-11 Zoltan Varga <vargaz@gmail.com>
5368 * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
5370 * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
5373 * Makefile.am (version.h): Make this work with non-bash shells.
5375 2008-01-10 Zoltan Varga <vargaz@gmail.com>
5377 * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
5379 2008-01-08 Zoltan Varga <vargaz@gmail.com>
5381 * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
5382 the InitializeArray optimization.
5384 2008-01-06 Zoltan Varga <vargaz@gmail.com>
5386 * mini.c driver.c: Don't include os/gc_wrapper.h.
5388 2008-01-05 Zoltan Varga <vargaz@gmail.com>
5390 * mini.c (print_jit_stats): Print GC statistics if available.
5392 2008-01-04 Zoltan Varga <vargaz@gmail.com>
5394 * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
5396 2007-12-29 Zoltan Varga <vargaz@gmail.com>
5398 * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
5400 2007-12-26 Zoltan Varga <vargaz@gmail.com>
5402 * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
5404 * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
5406 * driver.c (mono_main): Ditto.
5408 2007-12-23 Zoltan Varga <vargaz@gmail.com>
5410 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
5412 * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
5413 in the vtable can't be encoded.
5414 (compile_method): Ditto.
5416 2007-12-21 Zoltan Varga <vargaz@gmail.com>
5418 * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
5421 * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
5424 * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
5425 the top LMF entry belongs to the current method.
5427 * mini.c: Update after renaming of mono_thread_get_pending_exception ().
5429 2007-12-20 Zoltan Varga <vargaz@gmail.com>
5431 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
5433 * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
5435 * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
5437 * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
5439 * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
5441 * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
5444 * basic-float.cs: Add an ulong->double cast test.
5446 2007-12-15 Zoltan Varga <vargaz@gmail.com>
5448 * mini.c (mono_method_to_ir): Fix a warning.
5450 2007-12-14 Zoltan Varga <vargaz@gmail.com>
5452 * mini-ops.h: Add OP_SWITCH.
5454 * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
5455 CEE_SWITCH in back-end code, use OP_SWITCH instead.
5457 2007-12-11 Geoff Norton <gnorton@novell.com>
5459 * mini-s390x.c: Minor change to the MAX() define to allow
5460 it to compile with other gcc versions.
5462 2007-12-11 Geoff Norton <gnorton@novell.com>
5465 * mini-s390x.c: Implement sext_i4 to fix the build on s390x
5467 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
5469 exceptions-arm.c (mono_arch_get_restore_context): Restore
5472 exceptions-arm.c (throw_exception): Save the frame pointer.
5473 This is a partial fix for #323747. Only the client side is
5476 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
5478 * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
5479 was using an unrelated variable to log the class which
5480 needed the cctor to be called. This was crashing on arm.
5482 2007-12-09 Robert Jordan <robertj@gmx.net>
5484 * mini-x86.c (mono_arch_emit_epilog):
5485 Consider all kinds of 64-bit types. Fixes #323114.
5487 2007-12-08 Zoltan Varga <vargaz@gmail.com>
5489 * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
5491 2007-12-07 Zoltan Varga <vargaz@gmail.com>
5493 * mini-amd64.c (peephole_pass): Add a missing instruction check.
5495 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
5497 * mini.c: run type ctor before allocating an object, not only
5498 when running it's constructor method (fixes at least part of bug #342507).
5500 2007-12-07 Zoltan Varga <vargaz@gmail.com>
5502 * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
5504 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
5505 * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
5508 * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
5509 mono_generic_class_init_trampoline () the same as it is done with the other
5512 * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
5513 aot-runtime.c aot-compiler.c: Implement AOT support.
5515 2007-12-07 Mark Probst <mark.probst@gmail.com>
5517 * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
5518 build for archs which don't have the vtable trampoline defined
5521 2007-12-07 Zoltan Varga <vargaz@gmail.com>
5523 * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
5525 * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
5527 * mini-trampolines.c (mono_get_trampoline_func): New helper function.
5529 * tramp-<ARCH>.c: Use the new helper function.
5531 2007-12-07 Mark Probst <mark.probst@gmail.com>
5533 * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
5534 trampoline call, which takes a vtable argument.
5536 * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
5537 OP_TRAMPCALL_VTABLEs like other calls.
5539 * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
5540 register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
5541 call. Implemented a support function which fetches the vtable
5542 from a register set.
5544 * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
5545 Implemented a generic class init trampoline, using the
5546 OP_TRAMPCALL_VTABLE opcode.
5548 * mini.c: Implemented static field access when sharing generic
5549 code. This implies initing the class using the new
5550 OP_TRAMPCALL_VTABLE call.
5552 2007-12-07 Mark Probst <mark.probst@gmail.com>
5554 * mini.c: Don't compile methods with sharing enabled if their
5555 classes are disabled for sharing.
5557 2007-12-06 Zoltan Varga <vargaz@gmail.com>
5559 * inssel.brg: Add a missing sign extension to the GETCHR and array access
5560 opcodes. Fixes #346563.
5562 * objects.cs: Add a new test.
5564 * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
5566 * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
5567 HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
5569 2007-12-06 Zoltan Varga <vargaz@gmail.com>
5571 * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
5573 2007-12-03 Zoltan Varga <vargaz@gmail.com>
5575 * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
5578 2007-12-02 Zoltan Varga <vargaz@gmail.com>
5580 * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
5582 * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
5583 optimization in the AOT case.
5585 2007-11-30 Zoltan Varga <vargaz@gmail.com>
5587 * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
5589 * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
5591 * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
5593 * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
5595 * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
5596 is created by the inlined delegate ctor.
5598 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
5600 * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
5602 2007-11-29 Zoltan Varga <vargaz@gmail.com>
5604 * cpu-x86.md: Fix the length of ckfinite.
5606 2007-11-28 Zoltan Varga <vargaz@gmail.com>
5608 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
5610 * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
5611 (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
5613 * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
5615 * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
5616 OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
5618 2007-11-28 Martin Baulig <martin@ximian.com>
5621 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
5622 after creating the trampoline.
5624 2007-11-27 Zoltan Varga <vargaz@gmail.com>
5626 * aot-runtime.c (load_aot_module): Check runtime version if needed.
5628 * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
5631 * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
5632 instead of the calling method to help AOT.
5634 * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
5636 2007-11-26 Zoltan Varga <vargaz@gmail.com>
5638 * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
5641 2007-11-23 Zoltan Varga <vargaz@gmail.com>
5643 * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
5645 * aot-compiler.c (compile_method): Correct check for generic method definitions.
5646 (encode_method_ref): No need to handle generic method definitions specially.
5648 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5650 * aot-runtime.c (decode_klass_ref): Clean this up and rename from
5653 * aot-compiler.c (encode_klass_ref): Clean this up and rename from
5655 (compile_method): Enable generic sharing.
5657 2007-11-22 Zoltan Varga <vargaz@gmail.com>
5659 * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
5660 (mini_method_compile): Add preliminary support for AOTing shared generic code.
5662 * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
5665 * mini-trampolines.c: Fix a warning.
5667 * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
5669 (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
5670 (generic_class_is_reference_type): Remove unused function.
5672 * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
5673 in the generic vtable trampoline case.
5675 * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
5677 * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
5678 return an AOT method based on a vtable slot.
5680 * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
5682 * mini.c (mini_get_vtable_trampoline): Export this.
5684 2007-11-22 Martin Baulig <martin@ximian.com>
5687 (MonoDebuggerInfo): Move `debugger_version' up.
5689 2007-11-22 Martin Baulig <martin@ximian.com>
5692 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
5694 * mini-trampolines.c
5695 (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
5696 after compiling the method.
5698 2007-11-20 Martin Baulig <martin@ximian.com>
5701 (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
5702 (mono_debugger_remove_breakpoint): Likewise.
5703 (mono_debugger_check_breakpoints): Likewise.
5705 * debug-debugger.c: Implement the new breakpoint interface here.
5707 2007-11-18 Zoltan Varga <vargaz@gmail.com>
5709 * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
5710 CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
5712 * mini-x86.c (mono_arch_output_basic_block): Ditto.
5714 2007-11-17 Zoltan Varga <vargaz@gmail.com>
5716 * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
5718 * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
5721 * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
5724 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
5725 returning a vtype in a register.
5727 * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
5728 here from the arch specific code.
5730 * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
5733 * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
5734 (mono_arch_emit_prolog): Increment maximum prolog size.
5736 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
5737 START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
5739 * mini-x86.c (get_call_info): Receive a MonoCompile instead of a
5740 MonoGenericSharingContext.
5742 * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
5743 MonoGenericSharingContext. Allocate memory from the cfg mempool.
5745 2007-11-15 Mark Probst <mark.probst@gmail.com>
5747 * mini.c, mini.h, generic-sharing.c: Functions for producing code
5748 which extract fields out of the runtime generic context. Full
5749 sharing of the NEWARR opcode.
5751 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
5753 * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
5754 --enable-minimal=ssa.
5756 2007-11-13 Zoltan Varga <vargaz@gmail.com>
5758 * mini-trampolines.c (mono_delegate_trampoline): Update after
5759 mono_marshal_get_delegate_invoke () signature change.
5761 2007-11-13 Mark Probst <mark.probst@gmail.com>
5763 * mini.c: Removed the shared context in favor of the generic
5764 sharing context. Allocate the MonoJitInfo structure with room for
5765 the generic sharing context if it's needed.
5767 * mini.h: Remove MonoGenericSharingContext declaration. It's in
5768 domain-internals.h now.
5770 * mini-x86.c: Pass the generic sharing context to get_call_info ().
5772 * generic-sharing.c: Several changes for working without a shared
5773 context and instead operating on open types instead.
5775 2007-11-12 David S. Miller <davem@davemloft.net>
5777 * inssel-sparc.brg: Fix double instruction emit.
5779 2007-11-12 Zoltan Varga <vargaz@gmail.com>
5781 * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
5782 Get/Set/Address methods.
5784 * mini.c debug-debugger.c mini-trampolines.c: Update after
5785 mono_marshal_get_delegate_invoke signature change.
5787 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
5789 * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
5790 This can happens with dynamic methods. Fixes the other bug in #322722.
5792 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
5794 * tramp-arm.c (mono_arch_patch_callsite): Support patching
5797 * mini-arm.c (arm_patch): Implement patching of BX call
5798 sequence. Fixes one of the bugs in #322722.
5800 2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
5802 * mini-sparc.c (mono_arch_flush_icache): Make more efficient
5803 under Linux. We only need to flush every 32-byte cache line.
5805 2007-11-07 Massimiliano Mantione <massi@ximian.com>
5808 move_basic_block_to_end: Add branches when needed, eventually creating
5810 optimize_branches: added a parameter that tells if it's ok to create
5811 new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
5812 and avoid calling move_basic_block_to_end when it's not ok.
5815 2007-11-07 Mark Probst <mark.probst@gmail.com>
5817 * mini.c: Abort inlining call to InitializeArray if something
5818 looks wrong. Let the icall handle it, which now has proper safety
5821 2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
5823 * mini.c (mono_spill_call): add support for soft-float.
5825 * mini.c (mono_method_to_ir): add support for soft-float
5826 to inlined functions that return float.
5828 * mini.c (mono_method_to_ir): add support for soft-float
5829 to cee_stsfld opcode on float fields.
5831 2007-11-05 Geoff Norton <gnorton@novell.com>
5833 * mini-x86.h: Fix the structure access for X86 Leopard.
5836 2007-11-05 Martin Baulig <martin@ximian.com>
5838 * mini-trampolines.c
5839 (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
5840 after compiling the method to notify the debugger.
5842 2007-11-05 Martin Baulig <martin@ximian.com>
5844 * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
5846 2007-11-02 Zoltan Varga <vargaz@gmail.com>
5848 * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
5849 David Miller <davem@davemloft.net>. Allow larger offsets in branches.
5851 2007-11-01 Zoltan Varga <vargaz@gmail.com>
5853 * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
5854 native-to-managed wrappers.
5856 2007-11-01 Geoff Norton <gnorton@novell.com>
5858 * mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
5861 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
5863 * mini.c, mini-x86.c: when getting back from unmanaged code
5864 to managed via a marshaled delegate we also need to set the
5867 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5869 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
5872 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
5874 * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
5875 let the debugger or other external agents to tell the JIT when
5876 a sw breakpoint has been inserted in the code that the JIT needs
5877 to be able to inspect.
5879 2007-10-31 Martin Baulig <martin@ximian.com>
5882 (MonoDebuggerInfo): Remove `runtime_class_init'.
5884 2007-10-30 Martin Baulig <martin@ximian.com>
5887 (mono_debugger_thread_created): Added `MonoThread *' argument.
5888 (mono_debugger_extended_notification): New public method.
5889 (mono_debugger_trampoline_compiled): New public method.
5892 (MonoDebuggerThreadInfo): Added `thread' and
5893 `extended_notifications' fields.
5896 (debugger_executable_code_buffer): New static variable.
5899 (MonoDebuggerInfo): Added `executable_code_buffer',
5900 `executable_code_buffer_size', `breakpoint_info_area',
5901 `breakpoint_table' and `breakpoint_table_size'.
5903 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
5905 * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
5906 that IP either is an unused value or the vtable pointer. IMT
5907 calls use vtable + offset now. Reduced by almost half the size
5910 2007-10-26 Jonathan Chambers <joncham@gmail.com>
5912 * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
5913 defines to access param registers. Replace long usage with
5914 gsize as sizeof(long) != sizeof(void*) on Win64.
5916 * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
5917 on Win64. Fix intrinsic, use _AddressOfReturnAddress
5918 instead of non-existant _GetAddressOfReturnAddress.
5920 * tramp-amd64.c: Use AMD64_ARG_REG# defines to access
5921 param registers. Save/restore %rdi and %rsi in MonoLMF.
5923 * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
5924 param registers. Modify (throw_exception) signature to take
5925 %rdi and %rsi on Win64.
5927 Code is contributed under MIT/X11 license.
5929 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5931 * helpers.c: unlink debugging output files.
5933 2007-10-25 Zoltan Varga <vargaz@gmail.com>
5935 * mini.c: Move mono_create_ftnptr () to object.c.
5937 2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5939 * helpers.c (mono_disassemble_code): MonoCompile parameter is now
5940 optional. This function can now be used to disassemble code generated
5941 outside the JIT such as trampolines and IMT thunks.
5943 * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
5945 * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
5946 vtable pointer from a ldr instruction.
5948 * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
5949 new IMT call sequence.
5951 * mini-arm.c (mono_arch_output_basic_block): emit the IMT
5952 call sequence for interface invocations.
5954 * mini-arm.c (mono_arch_emit_imt_argument): added, required
5955 for imt support. This function is empty since IMT on ARM requires no
5956 special handling on the IR side.
5958 * mini-arm.c (mono_arch_find_imt_method): added, required for
5961 * mini-arm.c (mono_arch_find_this_argument): added, required
5964 * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
5965 a ldr instruction to load a value stored in the code stream.
5967 * mini-arm.c (mono_arch_build_imt_thunk):added, required
5971 2007-10-23 Zoltan Varga <vargaz@gmail.com>
5973 * mini.c (mini_init): Install the jump trampoline callback.
5975 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5977 * mini-trampolines.c: handle synchronized methods with the common
5978 vtable trampoline (bug #335601).
5980 2007-10-17 Zoltan Varga <vargaz@gmail.com>
5982 * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
5984 * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
5987 * mini-ia64.h mini-ia64.c: Add support for IMT.
5989 * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
5990 prolog. Fixes #331958.
5992 2007-10-15 Zoltan Varga <vargaz@gmail.com>
5994 * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
5996 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5998 * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
6001 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6003 * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
6006 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
6008 * mini-x86.c, mini-x86.h: x86 support for the common vtable
6011 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6013 * mini-trampolines.c: changed the magic rampoline to understand
6014 the common vtable trampoline method: the method to invoke is
6015 determined by the vtable displacement of the call.
6017 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6019 * mini.c, mini.h: register the common vtable trampoline if the
6020 architecture supports it.
6022 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6024 * cpu-amd64.md: use the correct max length for tls_get.
6026 2007-10-14 Zoltan Varga <vargaz@gmail.com>
6028 * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
6029 CEE_STELEM_ANY. Fixes #333696.
6031 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6033 * exceptions-x86.c: provide more graceful handling of the case where
6034 we followed a bogus function pointer from managed code (bug #332866).
6036 2007-10-11 Mark Probst <mark.probst@gmail.com>
6038 * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
6039 replaces the generic_shared flag and will carry more information
6042 * generic-sharing.c: Added mini_type_stack_size() which allows
6043 allows open types if given a generic sharing context.
6044 mini_get_basic_type_from_generic() takes a
6045 MonoGenericSharingContext* instead of a MonoCompile* now.
6047 * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
6048 mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
6049 mini-sparc.c, mini-x86.c: Trivial changes required by the two
6050 changes above. Just passing arguments through to the right
6053 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6055 * mini-arm.c: unify the call emission to emit_code_seq().
6057 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
6059 * tramp-arm.c: reduced the trampoline size.
6061 2007-10-10 Mark Probst <mark.probst@gmail.com>
6063 * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
6064 variable handling out of arch-specific code.
6066 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
6068 * mini-arm.c: implemented fast delegate dispatch.
6070 2007-10-09 Zoltan Varga <vargaz@gmail.com>
6072 * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
6073 that fp elimination is turned off if the space required by locals is too
6076 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6078 * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
6079 ARM to the new style trampoline.
6081 2007-10-09 Zoltan Varga <vargaz@gmail.com>
6083 * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
6085 * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
6087 2007-10-09 Martin Baulig <martin@ximian.com>
6090 (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
6091 `field_info_offset_offset'.
6093 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
6095 * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
6096 removed more internal usage of the r11 register and made it available
6097 to the register allocator.
6099 2007-10-08 Mark Probst <mark.probst@gmail.com>
6101 * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
6102 when sharing generics and treat type variables as references.
6104 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6106 * mini-ppc.c: started removing the internal uses of register r11
6107 to eventually allow the register allocator to manage it as an
6108 additional available register.
6110 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6112 * tramp-amd64.c: fixed memory corruption in the trampoline generation.
6114 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
6116 * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
6117 specific trampolines as they are not performance critical as a jump
6118 target (maybe align as before only for AOT code?). This saves about
6119 200 KB of native code on x86 for monodevelop startup.
6121 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
6123 * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
6124 monodevelop startup.
6126 2007-10-06 Zoltan Varga <vargaz@gmail.com>
6128 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
6130 * mini-sparc.h mini-sparc.c: Implement IMT support.
6132 * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
6133 its smaller and doesn't clobber sparc_g1.
6135 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
6137 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6139 * mini-ppc.c: optimized the size of the IMT thunks a bit.
6141 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6143 * mini-ppc.c: implemented fast delegate invocation.
6145 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
6147 * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
6149 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6151 * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
6152 code to the new style trampoline in preparation for IMT support.
6154 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
6156 * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
6157 systems already. This also reduces the specific trampiline sizes and
6158 prepares for the use of r12 as the IMT identifier register.
6160 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6162 * mini-mips.h: endianess fix (simplified from a patch by
6163 Thomas Kunze <thommy@tabao.de>, bug #323737).
6165 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6167 * exceptions-ppc.c, mini-ppc.h: refactor to use macros
6168 to access ucontext fields and enable netbsd support
6169 (partially from Magnus Henoch <mange@freemail.hu>).
6171 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6173 * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
6174 use the preprocessor from the CPP env var if it is set.
6176 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6178 * mini-trampolines.c: fixed an assertion and moved it earlier in the
6179 code, before interface_offset gets used.
6181 2007-10-02 Zoltan Varga <vargaz@gmail.com>
6183 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
6184 mono_class_setup_vtable () before accessing klass->vtable.
6186 2007-10-01 Zoltan Varga <vargaz@gmail.com>
6188 * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
6191 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6193 * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
6194 IMT slots (this saves hundreds of KB of memory in programs like
6195 IronPython and Monodevelop).
6197 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6199 * mini.c: print the delegate counter.
6201 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
6203 * mini-x86.c: make it easier to enable the debugging code for IMT
6206 2007-09-28 Martin Baulig <martin@ximian.com>
6209 (MonoDebuggerMetadataInfo): Add `klass_image_offset',
6210 `mono_method_klass_offset' and `mono_method_token_offset'.
6212 2007-09-20 Mark Probst <mark.probst@gmail.com>
6214 * mini.c: First generics sharing implementation. Can only share
6215 in very simple cases. If sharing doesn't work it falls back to
6216 dedicated compilation.
6218 * mini.h: Flag in MonoCompile to specify whether generic
6219 compilation is shared. Flags enum for marking which generic inst
6220 of a context is used. Prototypes for helper functions.
6222 * generic-sharing.c: Helper functions for generic method sharing.
6224 * optflags-def.h: Optimization flag (gshared) for enabling generic
6225 method sharing added.
6227 * Makefile.am: generic-sharing.c added.
6229 2007-09-19 Daniel Nauck <dna@mono-project.de>
6231 * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
6233 2007-09-19 Massimiliano Mantione <massi@ximian.com>
6234 * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
6237 2007-09-19 Martin Baulig <martin@ximian.com>
6239 * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
6240 mono_debug_cleanup() is now part of mono_cleanup().
6242 2007-09-18 Zoltan Varga <vargaz@gmail.com>
6244 * driver.c (mono_main): Fix a warning.
6246 2007-09-17 Zoltan Varga <vargaz@gmail.com>
6248 * aot-compiler.c: Optimize various parts when processing large assemblies.
6251 * mini.c (mono_patch_info_hash): Improve hash function.
6253 2007-09-14 Jonathan Chambers <joncham@gmail.com>
6255 * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
6257 Code is contributed under MIT/X11 license.
6259 2007-09-14 Zoltan Varga <vargaz@gmail.com>
6261 * mini.c (mini_init): Fix a leak.
6263 * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
6265 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6267 * mini.c: redirect string.InternalAllocStr() to the managed allocator.
6269 2007-09-14 Zoltan Varga <vargaz@gmail.com>
6271 * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
6273 2007-09-13 Zoltan Varga <vargaz@gmail.com>
6275 * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
6278 * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
6280 * mini.c (handle_alloc): Enable managed allocators in AOT code.
6282 * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
6284 * aot-runtime.c (decode_patch_info): Ditto.
6286 2007-09-12 Jonathan Chambers <joncham@gmail.com>
6288 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
6289 static case. Cache delegates in architecture specific code,
6290 based on number of parameters.
6292 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
6293 in architecture specific code, based on number of parameters.
6295 * mini-trampolines.c (mono_delegate_trampoline): Architecture specific
6296 caching happen in architecture specific code now.
6298 Code is contributed under MIT/X11 license.
6300 2007-09-12 Jonathan Chambers <joncham@gmail.com>
6302 * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
6303 mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
6304 mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
6306 Code is contributed under MIT/X11 license.
6308 2007-05-15 Massimiliano Mantione <massi@ximian.com>
6309 * mini.c: (mono_thread_abort) Fixed bug #82416.
6311 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6313 * mini.: hook the new managed GC allocation feature into the JIT.
6315 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6317 * mini.c: implementation for the new runtime tls opcode.
6319 2007-09-11 Martin Baulig <martin@ximian.com>
6322 (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
6323 `mono_method_inflated_offset'.
6325 2007-09-07 Zoltan Varga <vargaz@gmail.com>
6327 * driver.c mini.h mini.c: Add a new devel command line option for injecting
6328 async exceptions into a method.
6330 * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
6331 purpose of testing whenever the unwinder works at every instruction.
6333 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
6335 * mini.c: check accessibility of method used in ldftn (fixes
6338 2007-09-04 Zoltan Varga <vargaz@gmail.com>
6340 * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
6342 * inssel.brg: Fix a warning.
6344 2007-09-03 Martin Baulig <martin@ximian.com>
6346 * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
6347 now takes the `main_method' as argument.
6349 2007-09-02 Zoltan Varga <vargaz@gmail.com>
6351 * cpu-sparc.md (endfilter): Add missing src1:i argument.
6353 2007-08-30 Jonathan Chambers <joncham@gmail.com>
6355 * driver.c: include the cil-coff.h header on Windows.
6357 Code is contributed under MIT/X11 license.
6359 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6361 * mini.c, driver.c: don't include the cil-coff.h header.
6363 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6365 * mini.c: flag places that needs fixes fo soft-float support.
6367 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
6369 * mini.h, inssel-float.brg: fix soft-float constant loads on big
6370 endian systems (partially from Dean Jenkins, bug #81924).
6372 2007-08-28 Mark Probst <mark.probst@gmail.com>
6374 * mini.c (check_linkdemand): Remove embedded reference object in
6375 call to LinkDemandSecurityException.
6376 (mono_jit_compile_method_inner): Call LinkDemandSecurityException
6377 with an IntPtr instead of a reference object.
6379 2007-08-28 Zoltan Varga <vargaz@gmail.com>
6381 * mini.c (handle_initobj): Handle alignment properly.
6383 * inssel.brg (mini_emit_memset): Ditto.
6385 * inssel.brg (mini_emit_memcpy): Ditto.
6387 * inssel-sparc.brg: Ditto.
6389 * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
6391 2007-08-26 Zoltan Varga <vargaz@gmail.com>
6393 * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
6394 exceptions raised in unmanaged code. Fixes part of #82594.
6396 2007-08-24 Mark Probst <mark.probst@gmail.com>
6398 * mini.c (mono_method_to_ir), declsec.c
6399 (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
6401 2007-08-22 Martin Baulig <martin@ximian.com>
6404 (MonoDebuggerThreadInfo): New typedef.
6405 (mono_debugger_thread_table): New global variable.
6406 (mono_debugger_thread_created): New public function.
6407 (mono_debugger_thread_cleanup): New public function.
6411 - removed `get_current_thread' and `lookup_assembly'.
6412 - removed `data_table'.
6413 - added `thread_table'.
6416 (mono_thread_start_cb): Call mono_debugger_thread_created().
6417 (mono_thread_attach_cb): Likewise.
6418 (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
6419 (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
6422 * driver.c (mono_main): Move mono_debug_init() up, before calling
6423 mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
6425 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6427 * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
6428 together when passing several arguments of type double (gives a small
6429 speedup and saves a few bytes of generated code).
6431 2007-08-20 Jb Evain <jbevain@novell.com>
6433 * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
6435 2007-08-20 Jb Evain <jbevain@novell.com>
6437 * mini.c (mono_method_to_ir): throw MethodAccessException
6438 and FieldAccessException instead of InvalidProgramException.
6440 2007-08-20 Mark Probst <mark.probst@gmail.com>
6442 * mini.c: CoreCLR security checks.
6444 * mini.h: Removed MonoSecurityMode (moved to
6445 metadata/security-manager.h) and mono_security_mode global var
6446 (replaced by set/get functions in security-manager.h).
6448 * driver.c: Added "core-clr-test" security mode for testing. Used
6449 set-function for setting security mode.
6451 2007-08-17 Mark Probst <mark.probst@gmail.com>
6453 * mini.c: MonoJitInfo's are freed hazardously now. Statistics for
6454 the new jit_info_table.
6456 * driver.c: Test code for the new jit_info_table (enabled by the
6457 define MONO_JIT_INFO_TABLE_TEST).
6459 2007-08-14 Zoltan Varga <vargaz@gmail.com>
6461 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
6462 detection of call <REG> instruction sequence. Fixes build on freebsd.
6464 2007-08-13 Zoltan Varga <vargaz@gmail.com>
6466 * mini-exceptions.c: Fix a warning.
6468 2007-08-11 Zoltan Varga <vargaz@gmail.com>
6470 * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
6471 stack overflow handling code on amd64 too.
6473 * mini-exceptions.c (mono_setup_altstack): Make this use
6474 mono_thread_get_stack_bounds ().
6476 * mini-x86.h: Disable sigaltstack on solaris x86.
6478 2007-08-10 Zoltan Varga <vargaz@gmail.com>
6480 * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
6482 2007-08-10 Geoff Norton <gnorton@customerdna.com>
6484 * tramp-x86.c: Remove some unneeded alignment changes on Apple. Fixes #82387.
6486 2007-08-08 Zoltan Varga <vargaz@gmail.com>
6488 * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
6490 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
6492 2007-08-03 Neale Ferguson <neale@sinenomine.net>
6494 * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
6497 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6499 * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
6500 to be emitted (bug #82281).
6502 2007-08-01 Martin Baulig <martin@ximian.com>
6504 Merged the `debugger-dublin' branch.
6506 * debug-debugger.h (MonoDebuggerInfo):
6507 Removed the `old_*' compatibility entries.
6508 Added `debugger_version' and `data_table'.
6509 Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
6510 Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
6513 (MiniDebugMethodBreakpointInfo): Add `address_list'.
6514 (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
6515 instead of a `gconstpointer'.
6516 (mono_debugger_insert_method_breakpoint): Return a
6517 `MonoDebugMethodAddressList *'.
6519 2007-06-28 Martin Baulig <martin@ximian.com>
6521 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6523 2007-08-01 Zoltan Varga <vargaz@gmail.com>
6525 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using
6526 __builtin_frame_address () since it is broken on older gcc versions.
6528 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6530 * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
6531 on the stack overflow handling and made the managed stack overflows
6532 catchable in most cases using soft guard pages.
6533 * exceptions-x86.c: added code to restore the protection in the soft
6534 guard pages at the end of exception handling.
6536 2007-07-31 Zoltan Varga <vargaz@gmail.com>
6538 * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
6540 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6542 * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
6545 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6547 * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
6548 signal handling support until it has been ported to the new mechanism.
6549 * mini.c: fixed stack overflow detection and use the new
6550 architecture code to handle signals on the altstack.
6552 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
6554 * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
6555 stack overflows on the alt stack.
6557 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
6559 * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
6560 stack overflows on the alt stack.
6562 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
6564 * exceptions-ppc.c: cleanup preparing for altstack support.
6566 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6568 * exceptions-arm.c: cleanup preparing for altstack support.
6570 2007-07-27 Mark Probst <mark.probst@gmail.com>
6572 * mini.c (print_jit_stats): Output hazard pointer stats.
6574 2007-07-26 Mark Probst <mark.probst@gmail.com>
6576 * driver.c, mini.c: Replaced security mode flags with a single
6579 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6581 * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
6583 2007-07-25 Mark Probst <mark.probst@gmail.com>
6585 * mini.c, mini.h, driver.c (mono_main): Added command-line flag
6586 (which doesn't do anything yet) for activating Core CLR
6587 (Silverlight) security.
6589 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
6591 * mini-codegen.c: work around a possible gcc bug on arm.
6593 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6595 * driver.c, mini-x86.h, mini-amd64.h: print a nice error
6596 message for platforms that don't support AOT compilation.
6598 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6600 * mini.h, mini.c, driver.c: temporary smcs hack.
6602 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
6604 * mini-arm.h, mini-arm.c: arm EABI fixes.
6606 2007-07-22 Zoltan Varga <vargaz@gmail.com>
6608 * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
6611 * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
6612 trampolines taking a method argument.
6614 * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
6616 * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
6617 * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
6619 * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
6620 JIT compilation throws an exception. Fixes #82050.
6622 2007-07-19 Mark Probst <mark.probst@gmail.com>
6624 * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
6625 with the MONO_EXCEPTION_ defines.
6627 2007-07-17 Zoltan Varga <vargaz@gmail.com>
6629 * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
6632 * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
6633 the cause of an assertion.
6635 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
6637 * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
6640 2007-07-15 Zoltan Varga <vargaz@gmail.com>
6642 * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
6643 assert. Should fix #82103.
6645 2007-07-14 Zoltan Varga <vargaz@gmail.com>
6647 * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
6648 here too. Fixes #82095.
6650 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
6653 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
6655 * mini-amd64.h: Enable IMT for amd64.
6657 * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
6659 2007-07-12 Zoltan Varga <vargaz@gmail.com>
6661 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
6663 2007-07-12 Mark Probst <mark.probst@gmail.com>
6665 * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
6666 as soon as check_linkdemand sets an exception_type.
6668 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6670 * mini-x86.c: fixed offsets for IMT call sequence.
6671 * mini-x86.h: enable IMT again.
6673 2007-07-11 Zoltan Varga <vargaz@gmail.com>
6675 * trace.c (mono_trace_enter_method): Decode MonoType too.
6677 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
6679 * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
6681 * mini-amd64.c: Add preliminary IMT implementation.
6683 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6685 * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
6686 understand the new IMT-base interface invocation (thanks to
6687 Daniel Nauck for the report and the remote debugging session).
6689 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6691 * mini-x86.c: size and speed optimizations for the IMT bsearch.
6693 2007-07-11 Zoltan Varga <vargaz@gmail.com>
6695 * Makefile.am (aotcheck): Make this actually use the AOTed code.
6697 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
6699 * mini-trampolines.c: implement AOT IMT support.
6700 * mini-x86.h: enable IMT support for wider testing.
6702 2007-07-10 Zoltan Varga <vargaz@gmail.com>
6704 * inssel.brg (emit_imt_argument): Add aot support here.
6706 * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
6708 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6710 * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
6711 of the IMT implementation, partially from massi, with my
6712 implementation of the bsearch sequence. Disabled by default until
6713 the AOT code is implemented.
6715 2007-07-10 Zoltan Varga <vargaz@gmail.com>
6717 * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
6719 * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
6721 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6723 * inssel.brg, mini.c, mini.h, mini-trampolines.c:
6724 arch-independent IMT JIT code from Massimiliano
6725 Mantione (massi@ximian.com) with small cleanups from me.
6727 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6729 * Makefile.am: fix svn invocation to get the svn revision to be
6730 independent of the local language (build fix).
6732 2007-07-09 Mark Probst <mark.probst@gmail.com>
6734 * mini.c (inline_method): Reset cfg->exception_type if the
6735 inlining is aborted. Fixes: 82049.
6737 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
6739 * mini.c: remove assert from exception handling code when exception_ptr
6742 2007-07-05 Zoltan Varga <vargaz@gmail.com>
6744 * mini.c (mono_codegen): Add an assert.
6746 * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method
6747 enter and leave code.
6748 * mini-amd64.c (mono_arch_emit_prolog): Likewise.
6750 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6752 * mini-ppc.c: fixed memory corruption for localloc(0)
6755 2007-07-05 Zoltan Varga <vargaz@gmail.com>
6757 * mini.c: Fix warnings.
6759 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
6761 * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
6762 to emit better double->int conversions.
6764 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6766 * mini.c: the provided Min/Max optimizations are valid for unisgned
6769 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
6771 * 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
6773 2007-06-28 Miguel de Icaza <miguel@novell.com>
6775 * mini.c (mono_running_on_valgrind): Add support for reporting the
6776 method and its boundaries to valgrind.
6778 2007-06-28 Martin Baulig <martin@ximian.com>
6780 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6782 2007-06-25 Zoltan Varga <vargaz@gmail.com>
6784 * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
6786 * generic.2.cs: Add new test case.
6788 2007-06-25 Martin Baulig <martin@ximian.com>
6790 Merged the `debugger-dublin' branch.
6793 (mono_debugger_insert_method_breakpoint): New public method.
6794 (mono_debugger_remove_method_breakpoint): Likewise.
6795 (mono_debugger_check_breakpoints): New static method.
6796 (mono_debug_close_method): Call mono_debugger_check_breakpoints().
6798 * debug-debugger.h (MonoDebuggerInfo):
6799 Renamed (to keep backward compatibility in the vtable):
6800 `insert_breakpoint' -> `old_insert_breakpoint'.
6801 `remove_breakpoint' -> `old_remove_breakpoint'.
6802 `create_string' -> `old_create_string'.
6803 `lookup_class' -> `old_lookup_class'.
6804 `lookup_type' -> removed; changed into a dummy field.
6805 `lookup_assembly' -> `old_lookup_assembly'.
6806 Added (same functionality, but different signature):
6807 `create_string', `lookup_class', `lookup_assembly'
6809 `get_method_addr_or_bpt', `remove_method_breakpoint',
6810 `runtime_class_init'.
6812 * debug-debugger.c: Merged the `debugger-dublin' branch.
6814 2007-06-23 Zoltan Varga <vargaz@gmail.com>
6816 * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
6818 (peephole_pass): Likewise.
6820 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
6822 * driver.c: hopefully make setaffinity work also for ancient
6825 2007-06-22 Atsushi Enomoto <atsushi@ximian.com>
6827 * driver.c : win32 build fix.
6829 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6831 * driver.c: check for the MONO_NO_SMP env var and bind to a single
6832 processor if it is set.
6834 2007-06-21 Martin Baulig <martin@ximian.com>
6836 * debug-mini.h: New file.
6839 (mono_debugger_insert_breakpoint_full): Moved here from
6840 ../metadata/mono-debug-debugger.c.
6841 (mono_debugger_remove_breakpoint): Likewise.
6842 (mono_debugger_breakpoint_callback): Likewise.
6844 2007-06-15 Raja R Harinath <rharinath@novell.com>
6846 * jit-icalls.c (mono_helper_compile_generic_method): Update to
6847 changes in MonoGenericClass.
6849 2007-06-14 Zoltan Varga <vargaz@gmail.com>
6851 * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
6853 2007-06-14 Raja R Harinath <rharinath@novell.com>
6855 * jit-icalls.c (mono_helper_compile_generic_method): Update to
6856 removal of MonoGenericMethod.
6858 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6860 * mini-exceptions.c: hooks for the exception events profiling API.
6862 2007-06-14 Randolph Chung <tausq@debian.org>
6864 * Makefile.ma: Add hppa target.
6865 * mini-arch.h: Include mini-hppa.h
6866 * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
6867 mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
6868 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6870 2007-06-14 Randolph Chung <tausq@debian.org>
6872 * inssel.brg: Add rules for "chained" compare-branch operations so that
6873 a single compare op can affect multiple branches. Adjust cost for
6874 OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
6875 * inssel-long32.brg: Update rules to use compare-branch macros. Adjust
6876 cost for some rules so that they can more easily be overridden by
6877 per-arch rules (with fixes from lupus).
6878 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6880 2007-06-13 Randolph Chung <tausq@debian.org>
6882 * mini-ops.h: Reorder branch ops so that they match the order of the
6883 corresponding CEE_* ops. The code expects them this way.
6884 Add new ops for HPPA target.
6885 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6887 2007-06-13 Randolph Chung <tausq@debian.org>
6889 * mini-exceptions.c: Handle cases where the stack grows towards
6891 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6893 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6895 * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
6897 * driver.c: explain where a non-matching corlib is found.
6899 2007-06-13 Mark Probst <mark.probst@gmail.com>
6901 * mini.c (print_jit_stats): Output dynamic code allocation stats.
6903 2007-06-10 Sanghyeon Seo <sanxiyn@gmail.com>
6905 * mini-exceptions.c: Generate a method profile leave event during
6906 an exception to ensure that the profiler gets notified.
6908 2007-06-07 Zoltan Varga <vargaz@gmail.com>
6910 * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir
6913 * cpu-amd64.md: Add long_and/or/xor opcodes.
6915 2007-06-06 Wade Berrier <wberrier@novell.com>
6917 * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
6918 (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction
6919 length of instruction shr_imm (expected 8, got 10)
6921 2007-06-06 Zoltan Varga <vargaz@gmail.com>
6923 * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
6925 2007-06-06 Mark Probst <mark.probst@gmail.com>
6927 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6928 MonoInternalHashTable again (fixed bug in the internal hash table
6931 2007-06-06 Mark Probst <mark.probst@gmail.com>
6933 * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
6934 Have to figure out what makes it crash the SWF regression.
6936 2007-06-05 Zoltan Varga <vargaz@gmail.com>
6938 * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
6940 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6942 * mini.c: optimize out the type check when storing null in a
6945 2007-06-04 Mark Probst <mark.probst@gmail.com>
6947 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6948 MonoInternalHashTable.
6950 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
6952 * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
6953 signed integer methods.
6955 2007-06-02 Zoltan Varga <vargaz@gmail.com>
6957 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case
6958 permanently since the current approach doesn't work.
6960 2007-06-02 Zoltan Varga <vargaz@gmail.com>
6962 * inssel.brg (stmt): Only call delegate->invoke_impl if
6963 MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
6965 2007-06-01 Zoltan Varga <vargaz@gmail.com>
6967 * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
6968 the sreg2==rdx case.
6970 * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
6971 account if it contains a rex prefix.
6972 (peephole_pass): Handle OP_FMOVE as well.
6974 2007-06-01 Zoltan Varga <vargaz@gmail.com>
6976 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
6977 as it causes regressions.
6979 2007-05-31 Zoltan Varga <vargaz@gmail.com>
6981 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
6982 static case as well.
6984 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
6986 * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6987 (mono_arch_get_this_arg_from_call): Ditto.
6989 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
6991 * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
6994 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6995 (mono_arch_get_this_arg_from_call): Ditto.
6997 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
6999 * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
7000 try to create optimized invoke code and use that for further invocations.
7001 Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
7003 * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
7005 2007-05-29 Rodrigo Kumpera <kumpera@gmail.com>
7007 * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
7008 sealed classes or methods.
7009 *devirtualization.cs: tests for the new optimization
7011 2007-05-29 Zoltan Varga <vargaz@gmail.com>
7013 * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
7014 by the update_volatile () function.
7016 2007-05-27 Zoltan Varga <vargaz@gmail.com>
7018 * driver.c (mono_main): Call g_thread_init () early since newer glib versions
7021 * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
7023 2007-05-24 Jonathan Chambers <joncham@gmail.com>
7025 * mini.c: Add configure checks for header files.
7026 * mini-x86.c: Add configure checks for header files.
7027 * trace.c: Add configure checks for header files.
7028 * aot-runtime.c: Add configure checks for header files.
7029 * aot-compiler.c: Add configure checks for header files.
7030 * driver.c: Add configure checks for header files.
7031 * mini-codegen.c: Add configure checks for header files.
7033 Code is contributed under MIT/X11 license.
7035 2007-05-22 Zoltan Varga <vargaz@gmail.com>
7037 * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
7038 icompare_imm -128 + op_iclt. Fixes #81703.
7040 2007-05-19 Zoltan Varga <vargaz@gmail.com>
7042 * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
7044 2007-05-15 Massimiliano Mantione <massi@ximian.com>
7046 * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
7047 inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
7048 so that all isinst checks now use "interface_bitmap".
7050 2007-05-15 Zoltan Varga <vargaz@gmail.com>
7052 * cpu-amd64.md (jmp): Fix a warning.
7054 * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
7056 * basic.cs: Add new regression test.
7058 * basic.cs: Remove test which is now in basic-long.cs.
7060 * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
7062 * basic-long.cs: Add new test.
7064 2007-05-13 Zoltan Varga <vargaz@gmail.com>
7066 * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
7068 2007-05-12 Zoltan Varga <vargaz@gmail.com>
7070 * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
7072 * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
7075 * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception
7076 throwing code a bit.
7078 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of
7079 the exception throwing code a bit.
7081 * mini-x86.c (get_call_info): Allocate result from a mempool.
7083 2007-05-11 Zoltan Varga <vargaz@gmail.com>
7085 * aot-compiler.c (find_typespec_for_class): Fix the assert.
7087 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
7089 * mini.h (MonoCompile): Add 'token_info_hash' field.
7091 * mini.c: Save token->method associations during compilation so the AOT
7092 compiler can use it.
7094 * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
7095 which reference generic classes and methods.
7097 2007-05-10 Zoltan Varga <vargaz@gmail.com>
7099 * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
7101 * aot-compiler.c (compile_method): Fix a typo in a comment.
7103 * aot-runtime.c (decode_cached_class_info): Skip generic types.
7105 * aot-compiler.c: Add minimal support for AOTing generic code by skipping
7108 * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
7110 2007-05-09 Zoltan Varga <vargaz@gmail.com>
7112 * mini.h (MonoCompile): Add 'args' field.
7114 * mini.c (mono_compile_create_vars): Store variables representing the arguments
7117 * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
7119 2007-05-08 Zoltan Varga <vargaz@gmail.com>
7121 * mini.c (mono_compile_get_interface_var): Remove this unused function.
7123 * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
7125 * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
7126 opcodes for some opcodes.
7128 * mini.h *.brg *.c: Use the new opcodes.
7130 2007-05-08 Massimiliano Mantione <massi@ximian.com>
7132 * mini.h: Bumped aot revision.
7134 * inssel.brg: modified code generation of type checks for interfaces
7135 to use the new "MonoClass.interface_bitmap" instead of the old
7136 "MonoClass.interface_offsets".
7138 2007-04-30 Zoltan Varga <vargaz@gmail.com>
7140 * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
7142 2007-04-29 Zoltan Varga <vargaz@gmail.com>
7144 * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
7147 2007-04-27 Neale Ferguson <neale@sinenomine.net>
7149 * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
7151 2007-04-27 Wade Berrier <wberrier@novell.com>
7153 * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in
7154 mini.h) to fix build.
7156 2007-04-26 Zoltan Varga <vargaz@gmail.com>
7158 * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
7160 * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
7161 causes the corlib unit tests to fail.
7163 2007-04-25 Zoltan Varga <vargaz@gmail.com>
7165 * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
7167 * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
7169 * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional
7170 opcodes to the comparison relations.
7172 * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional
7173 opcodes to their types.
7175 * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
7177 * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache
7178 it in cfg->arch.cinfo.
7180 * local-propagation.c (mono_local_cprop_bb): Fix a warning.
7182 * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in
7183 cfg->cil_offset_to_bb.
7185 2007-04-24 Zoltan Varga <vargaz@gmail.com>
7187 * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
7188 created becase of initlocals.
7190 2007-04-23 Zoltan Varga <vargaz@gmail.com>
7192 * mini-alpha.c cpu-alpha.md: More alpha port work from
7193 Sergey Tikhonov <tsv@solvo.ru>.
7195 2007-04-21 Andreas Faerber <andreas.faerber@web.de>
7197 * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
7199 2007-04-19 Zoltan Varga <vargaz@gmail.com>
7201 * cpu-s390.md (break): Correct the length of break instruction.
7203 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7205 * mini.c: fix a couple of soft-float issues and comments.
7207 2007-04-15 Miguel de Icaza <miguel@novell.com>
7209 * trace.c (is_filenamechar): - is also a filename char.
7211 2007-04-15 Neale Ferguson <neale@sinenomine.net>
7213 * mini-s390.c: Correct checking for enum type in return value processing.
7215 2007-04-14 Raja R Harinath <rharinath@novell.com>
7217 * Makefile.am (BUILT_SOURCES): Add 'version.h'.
7218 (version.h): Makefile is in the build directory.
7220 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
7222 * mini-amd64.h: fix for assertion failure on Solaris/amd64
7224 2007-04-11 Martin Baulig <martin@ximian.com>
7226 * mini.c (can_access_member): Fix handling of generic classes;
7229 2007-04-10 Zoltan Varga <vargaz@gmail.com>
7231 * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
7233 2007-04-05 Zoltan Varga <vargaz@gmail.com>
7235 * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
7237 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7239 * mini-codegen.c: make sure the right spill amount is
7240 used for fp or integer registers (fixes the float_sub_spill() on ppc).
7242 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
7244 * mini-ppc.c: fixes for the fp_branch_nan test.
7246 2007-03-23 Zoltan Varga <vargaz@gmail.com>
7248 * basic.cs: Comment out new test which still fails on ia64.
7250 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7252 * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
7254 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7256 * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
7258 2007-03-22 Zoltan Varga <vargaz@gmail.com>
7260 * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
7261 on 64 bit machines. Fixes part of #80738.
7263 * basic.cs: Add regression test.
7265 2007-03-17 Zoltan Varga <vargaz@gmail.com>
7267 * inssel.brg basic.cs: Revert previous change to fix build.
7269 * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
7272 * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
7274 * basic.cs: Add new regression test.
7276 2007-03-17 Zoltan Varga <vargaz@gmail.com>
7278 * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
7281 2007-03-16 Neale Ferguson <neale@sinenomine.net>
7283 * cpu-s390x.md: Correct length of break instruction.
7285 2007-03-16 Neale Ferguson <neale@sinenomine.net>
7287 * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
7288 * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
7290 2007-03-15 Jonathan Chambers <joncham@gmail.com>
7292 * *.c: Begin WIN64 port.
7293 * mini.c: Use correct register in profiler.
7294 * mini-amd64.c: No inline assembly on Win64.
7295 * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
7296 Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
7297 * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
7298 is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
7299 mono_arch_ip_from_context for Win64.
7301 Contributed under MIT/X11 license.
7303 2007-03-15 Zoltan Varga <vargaz@gmail.com>
7305 * exceptions-amd64.c (seh_handler): Ditto.
7307 * exceptions-x86.c (seh_handler): Fix a memory leak.
7309 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
7311 * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
7312 mini-s390x.c: fixed peephole optimizations to deal
7313 correctly with 1 and 2 byte reload avoidance.
7315 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
7317 * cpu-s390.md, cpu-s390x.md: update localloc length.
7319 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
7321 * cpu-g4.md: added missing descriptions.
7323 2007-03-14 Miguel de Icaza <miguel@novell.com>
7325 * Makefile.am: Add support so the tail tests are not executed on
7326 PowerPC as that is a known limitation of the PowerPC port.
7328 2007-03-13 Jonathan Chambers <joncham@gmail.com>
7330 * runmdesc.bat: Move to msvc directory.
7332 2007-03-13 Jonathan Chambers <joncham@gmail.com>
7334 * runmdesc.bat: Run executable that was produced by the current
7335 target and sent via an argument.
7337 2007-03-11 Zoltan Varga <vargaz@gmail.com>
7339 * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
7342 * generics.2.cs: Add regression test.
7344 2007-03-09 Wade berrier <wberrier@novell.com>
7346 * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
7348 2007-03-09 Zoltan Varga <vargaz@gmail.com>
7350 * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
7351 AOT code depends on this.
7353 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7355 * mini.c: more precise tracking of types in the eval stack
7356 (part of fix for bug #81044).
7358 2007-03-07 Zoltan Varga <vargaz@gmail.com>
7360 * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
7362 * aot-compiler.c (encode_patch): Remove an obsolete comment.
7364 2007-03-06 Zoltan Varga <vargaz@gmail.com>
7366 * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
7368 * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
7370 2007-02-22 Zoltan Varga <vargaz@gmail.com>
7372 * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
7373 a pointer on 64 bit systems. Fixes #80190.
7375 * iltests.il: Add new regression test.
7377 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7379 * mini.c: inline a constant for Environment.IsRunningOnWindows.
7381 2007-02-19 Geoff Norton <gnorton@customerdna.com>
7383 * trace.c: Remove an erroneous alignemnt check when tracing.
7384 Fixes --trace on OSX86.
7386 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7388 * mini-$(arch).h: initialize SP in context for all the archs.
7390 2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
7392 * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
7393 regressions in the thread tests.
7395 2007-02-14 Zoltan Varga <vargaz@gmail.com>
7397 * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
7398 - fixed implementation of LOCALLOC opcode
7399 - implemented non-un compare for floats
7401 - implementation of FDIV and CKFINITE opcodes
7402 - fixes for latest mono updates
7403 - additional arch opcodes
7405 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7407 * Makefile.am: simplify and merge rules for cross-compilation.
7409 2007-02-07 Massimiliano Mantione <massi@ximian.com>
7411 * local-propagation.c: Actually *apply* the fix for bug 80591...
7413 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
7415 * mini-exceptions.c: backuot part of the last change
7416 (fixes cas tests on amd64 related to GetExecutingAssembly ()).
7418 2007-02-06 Massimiliano Mantione <massi@ximian.com>
7419 * inssel.brg: Fix bug 59286.
7422 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
7424 * mini-exceptions.c: patch from Zoltan to correctly check for
7425 stack boundaries (using the stack register, not the frame register),
7426 fixes bugs #80724, #79717.
7428 2007-02-03 Zoltan Varga <vargaz@gmail.com>
7430 * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
7431 OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
7433 * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
7434 presence of frame pointer elimination.
7436 2007-02-01 Geoff Norton <gnorton@customerdna.com>
7438 * mini-x86.h: NetBSD UCONTEX_REG defines.
7440 2007-02-01 Zoltan Varga <vargaz@gmail.com>
7442 * inssel-amd64.brg: Fix amd64 build.
7444 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
7446 * mini.h: remove extern to workaround what looks likes gcc bug 26905
7449 2007-01-31 Zoltan Varga <vargaz@gmail.com>
7451 * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
7454 * mini-<ARCH>.c: Use mono_is_regsize_var ().
7456 2007-01-30 Mark Mason <mason@broadcom.com>
7458 * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
7459 * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
7460 * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
7461 beginning support for CEE_JMP [not quite working yet]
7462 * tramp-mips.c: LMF handling now works
7464 2007-01-30 Zoltan Varga <vargaz@gmail.com>
7466 * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
7468 * mini.h (NULLIFY_INS): New macro.
7470 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7472 * mini.c: statistical profiler fix for windows, patch
7473 from Tor Lillqvist (tml@novell.com).
7475 2007-01-30 Massimiliano Mantione <massi@ximian.com>
7476 * local-propagation.c: Fix bug 80591.
7478 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7480 * Makefile.am: put back the --export-dynamic option as with
7481 the previous gmodule flags (thanks to Robert Jordan).
7483 2007-01-28 Zoltan Varga <vargaz@gmail.com>
7485 * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
7487 mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
7488 simplify and speed up the local register allocator. Also rename some fields
7489 like iassign->vassign.
7491 * regalloc.c: Remove some functions which are no longer used since their
7492 inlined version is in mini-codegen.c.
7494 * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
7496 * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
7498 2007-01-27 Zoltan Varga <vargaz@gmail.com>
7500 * mini-amd64.c (peephole_pass): Remove optimizations which omit a
7501 narrowing. Fixes #80622.
7503 * iltests.il: Add new regresssion test.
7505 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7507 * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
7508 debug-debugger.c, debug-debugger.h: warning fixes.
7509 * driver.c: updated copyright year and made it fit in one line.
7511 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
7513 * aot-runtime.c: updated to use mono-dl instead of gmodule.
7515 2007-01-25 Zoltan Varga <vargaz@gmail.com>
7517 * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
7519 * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
7521 * iltests.il: Add new test for bug #80507.
7523 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7525 * mini-arm.h: use soft-float also on vfp for now.
7527 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7529 * mini.c: fix some more soft-float issues.
7531 2007-01-24 Zoltan Varga <vargaz@gmail.com>
7533 * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
7535 2007-01-24 Massimiliano Mantione <massi@ximian.com>
7536 * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
7537 mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
7538 MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
7540 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
7542 * mini-arm.c: typo fix.
7544 2007-01-23 Neale Ferguson <neale@sinenomine.net>
7546 * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
7548 2007-01-21 Zoltan Varga <vargaz@gmail.com>
7550 * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
7551 Share stack slots for scalar types. Avoid expensive g_list_free () calls.
7553 * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
7555 * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto.
7557 * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
7559 * inssel.brg: Fix a warning.
7561 * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
7563 * abcremoval.c ssa.c ssapre.c: Update after this change.
7565 * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
7567 * dominators.c (df_set): Use mono_bitset_union_fast.
7569 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7571 * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
7572 mini-codegen.c: reduce relocations and memory usage for the cpu
7575 2007-01-20 Zoltan Varga <vargaz@gmail.com>
7577 * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
7579 * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
7580 to reduce their size.
7582 2007-01-19 Mark Mason <mason@broadcom.com>
7584 * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
7585 * mini-mips.c: more configuration macros, support long conditional branches, additional
7586 asserts, fix epilog instrumentation.
7587 * mini-mips.h: use standard stack walk
7588 * cpu-mips.md: increase size of div, rem and conditional branches
7590 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
7592 * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
7595 2007-01-19 Zoltan Varga <vargaz@gmail.com>
7597 * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
7598 (compile_method): Ditto.
7600 * aot-runtime.c (decode_klass_info): Ditto.
7602 * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
7603 needed by the code generated by inssel.brg. Also fix a warning.
7605 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
7607 * mini.c: deal with enums that become genericinsts by
7608 being nested in a generic class (bug #79956).
7610 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7612 * mini.c: match the generic definition to check for
7613 private access with generic types (bug #78431).
7615 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7617 * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
7618 to make life easier for people cross-compiling that insist on not
7621 2007-01-17 Mark Mason <mason@broadcom.com>
7623 * inssel-long.brg: patch to deal with mips missing flags
7624 * inssel-long32-mips.brg: implement overflow checks
7625 * insset-mips.brg: implement overflow checks
7626 * mini-mips.h: implement conditional exception handling
7627 * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
7628 Remove unused code, minor cleanups.
7629 * exceptions-mips.c: minor cleanups
7630 * mini-ops.h: add mips conditional exception ops
7631 * cpu-mips.md: add mips conditional exception ops
7634 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7636 * inssel.brg: patch from Mark Mason <mason@broadcom.com>
7637 to deal with mips missing of flags.
7639 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7641 * exceptions-ppc.c: execute fault handlers.
7643 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
7645 * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
7647 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7649 * mini.c: handle also floating point values in initialize_array.
7651 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7653 * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
7654 array initialization and make it conditional on the intrins option.
7656 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7658 * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
7659 relocations and put the patch info names close to the enum definition.
7661 2007-01-15 Mark Mason <mason@broadcom.com>
7663 * basic.cs, exceptions.cs: break up large tests to increase debugability.
7665 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7667 * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
7669 2007-01-12 Raja R Harinath <rharinath@novell.com>
7671 * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
7673 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
7675 * Makefile.am: distribute the mips sources.
7677 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7679 * mini-codegen.h: handle bug #80489 here, by excluding ecx
7682 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
7684 * cpu-x86.md: back out for now as this triggers other regressions.
7686 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7688 * cpu-x86.md: force src1 and dest regpair for long shift instructions
7689 to eax:edx, so ecx can't get allocated to them (bug #80489).
7691 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
7693 * mini.c, mini-exceptions.c: enabled running fault handlers
7696 2007-01-03 Miguel de Icaza <miguel@novell.com>
7698 * driver.c: If nothing fail, do not use the string "failed",
7699 because it makes it very annoying to view test result logs on the
7702 2006-12-30 Miguel de Icaza <miguel@novell.com>
7704 * debug-debugger.c (mono_debugger_main): Rename "main" to
7705 "main_method" to prevent a warning.
7707 Remove a warning for unused field.
7709 2006-12-28 Martin Baulig <martin@ximian.com>
7712 (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
7714 2006-12-22 Martin Baulig <martin@ximian.com>
7716 * mdb-debug-info32.s, mdb-debug-info64.s: New files.
7717 Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
7718 seperate `.mdb_debug_info' section, so we can access it from the
7719 debugger even if the binary is stripped.
7721 * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
7722 from the `.mdb_debug_info' here to prevent the linker from
7723 removing that section.
7725 * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
7728 2006-12-19 Robert Jordan <robertj@gmx.net>
7730 * mini-x86: enable the code to return small structures in
7731 registers for FreeBSD as well. Fixes bug #80278.
7732 * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
7734 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7736 * mini-x86.c: align the stack when calling the profiler
7737 function instrumenting the prolog (on OSX).
7739 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
7741 * mini.c: emit a break opcode where Debugger.Break () is called.
7743 2006-12-13 Miguel de Icaza <miguel@novell.com>
7745 * mini.c (mono_method_to_ir): Provide useful information on this
7746 assert, to prevent others from debugging like I did.
7748 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7750 * mini.c: enable code which was incorrectly commented
7753 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7755 * mini-x86.c: enable on OSX, too, the code to return small
7756 structures in registers.
7758 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7760 * mini-x86.c: remove the use of the dynamic code manager here, too.
7762 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
7764 * mini.h, debug-debugger.c, tramp-*.c: fixed
7765 mono_debugger_create_notification_function() to use
7766 mono_global_codeman_reserve () instead of a dynamic code manager.
7768 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
7770 * mini.c, jit-icalls.h, jit-icalls.c: remove the
7771 ves_array_element_address() jit icall and use a generated
7772 managed method instead (which is about 4 times faster for a rank 3
7775 2006-11-29 Mark Mason <mason@broadcom.com>
7777 * basic-calls.cs: additional tests for passing
7778 structures as function arguments.
7780 2006-11-29 Mark Mason <mason@broadcom.com>
7782 * mini-mips.h: disable custom exception handling
7783 * mini-mips.c: throw/rethrow should use jalr to call
7784 exception stubs. Fixed bug with passing structures
7785 by value. More support for tracing floating point
7788 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7790 * mini.c: fixed typo in the soft-float ldind.r4 handling
7793 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7795 * mini.c, mini.h, driver.c: added --runtime command line
7796 option to select a different runtime than the autodetected one.
7797 * jit.h: added API for embedders to initialize with a specific
7800 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
7802 * mini.c: handle also boxing of r4 values (bug #80024).
7804 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
7806 * mini-ppc.c: force indirect calls until we reserve
7807 enough address space for all the generated code.
7809 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
7811 * exceptions-arm.c: workaround bugs in the libc definition
7814 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
7816 * inssel.brg: fixes from me and Mark Mason.
7818 2006-11-23 Dick Porter <dick@ximian.com>
7820 * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
7821 semaphore display now we've fixed the initial value
7823 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7825 * inssel.brg: partially revert the last change to fix the build.
7827 2006-11-21 Mark Mason <mason@broadcom.com>
7829 * inssel.brg: Add and use compare-and-branch macros to support
7830 architectures that do not have condition code registers (ie. MIPS).
7831 * *-mips.{c,brg,md}: Fix copyright statements
7833 2006-11-20 Mark Mason <mason@broadcom.com>
7835 * Makefile.am: remove mini-codegen.c from list of MIPS sources
7836 * mini.c: Allow GET_CONTEXT to be specified by the arch port
7837 * mini.h: Added declaration for mono_print_ins()
7838 * mini-codegen.c: added ins_spec initializer for MIPS
7839 * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
7840 vreg to be virtual and hreg to be non-virtual.
7841 * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
7842 is not yet working/implemented correctly.
7843 * mini-codegen.c (print_ins): rename to mono_print_ins(), make
7844 non-static, fixup calls to print_ins() from other parts in the file.
7846 2006-11-20 Mark Mason <mason@broadcom.com>
7848 * basic-calls.cs: added tests for passing structures as arguments
7851 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7853 * inssel-long32.brg: optimize signed division by power of two.
7855 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
7857 * mini-arm.c: added support for interworking with thumb code
7858 (mono must be still be built using the ARM instruction encoding).
7860 2006-11-19 Miguel de Icaza <miguel@novell.com>
7862 * mini.c (type_from_op): Separate the conditions for OP_EQ as the
7863 verifier has different rules for it. Fixes a few verifier issues
7866 * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
7867 at the end, so people know what happened.
7869 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7871 * brach-opts.c: in optimize_exception_target() make sure we
7872 are in a catch clause (fixes bug #79871).
7874 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7876 * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
7877 more soft-float support fixes.
7879 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
7881 * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
7882 that are passed half on the stack and half in registers.
7884 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
7886 * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
7887 more mips integration work from Mark E Mason
7888 <mark.e.mason@broadcom.com>.
7890 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7892 * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
7893 cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
7894 tramp-mips.c: added sources for the mips port, not
7895 integrated in the build yet. Contributed by
7896 Mark E Mason <mark.e.mason@broadcom.com>.
7898 2006-11-14 Neale Ferguson <neale@sinenomine.net>
7900 * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
7902 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7904 * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
7905 put the soft-float rules in its own file since it seems to
7906 break s390 compilation.
7908 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7910 * mini-arm.c: fixed wrnings.
7912 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
7914 * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
7915 inssel-arm.brg: ARM support for soft-float.
7917 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7919 * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
7920 loads and stores of 32 bit fp values.
7922 2006-11-10 Zoltan Varga <vargaz@gmail.com>
7924 * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
7926 * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
7927 works. Fixes #79852 and #79463.
7929 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7931 * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
7932 more soft-float support WIP and fixes.
7934 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
7936 * mini-arm.c: some VFP updates.
7938 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
7940 * mini-exceptions.c: 0 is a valid local var offset in some
7941 architectures, don't assert (bug #78508).
7943 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
7945 * exceptions-arm.c: fixed off by one error in stack walk code.
7947 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
7949 * mini.h, mini.c: more precise tracking of type load exceptions.
7951 2006-11-03 Robert Jordan <robertj@gmx.net>
7953 * Makefile.am: [WIN32] Add monow.exe target.
7954 * driver.c: [WIN32] Don't detach the console when debugging.
7957 2006-10-30 Miguel de Icaza <miguel@novell.com>
7959 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
7961 2006-10-23 Zoltan Varga <vargaz@gmail.com>
7963 * aot-compiler.c (emit_method_info): Add a case missed earlier.
7965 * driver.c (mini_regression): Fix --regression with AOT.
7967 * aot-compiler.c (emit_method_info): Fix AOT on amd64.
7969 2006-10-17 Zoltan Varga <vargaz@gmail.com>
7971 * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
7973 * mini-sparc.h: Don't use sigaction on sparc/linux.
7975 * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
7977 * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
7979 * mini-exceptions.c: Add proper include files for getpid ().
7981 2006-10-16 Zoltan Varga <vargaz@gmail.com>
7983 * aot-runtime.c (mono_aot_get_method): Change this to return the native code
7984 address instead of a MonoJitInfo* to avoid decoding the exception info for the
7987 * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
7988 name cache to reduce its size.
7990 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7992 2006-10-15 Zoltan Varga <vargaz@gmail.com>
7994 * mini-x86.c: Save/restore the current LMF structure more efficiently using
7995 the mono_lmf TLS variable.
7997 * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in
7998 trampoline lmf frames.
8000 * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
8002 2006-10-14 Zoltan Varga <vargaz@gmail.com>
8004 * mini-amd64.c: Save/restore the current LMF structure more efficiently using
8005 the mono_lmf TLS variable.
8007 * mini-exceptions.c: Access the LMF structure through accessors.
8009 * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS
8010 variable instead of in jit_tls->lmf.
8012 * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
8014 * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in
8015 trampoline lmf frames.
8017 * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
8019 2006-10-12 Zoltan Varga <vargaz@gmail.com>
8021 * mini.c trace.c mini-x86.c: Revert these too.
8023 * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
8026 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
8028 * genmdesc.c: removed now dead code.
8030 2006-10-09 Robert Jordan <robertj@gmx.net>
8032 * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
8034 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
8036 * mini.h: do not leave gaps in the opcode values.
8038 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
8040 * jit-icalls.h: flag functions as internal here, too.
8042 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
8044 * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
8045 functions with the internal attribute.
8047 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
8049 * aot-compiler.c: fclose the file descriptor in the profile read loop.
8051 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
8053 * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
8056 2006-10-05 Zoltan Varga <vargaz@gmail.com>
8058 * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
8059 tail calls as on other platforms.
8061 * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
8063 * iltests.il: Add a few tailcall tests.
8065 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8067 * driver.c: fix loop for old compilers (bug #79521).
8069 2006-10-02 Zoltan Varga <vargaz@gmail.com>
8071 * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
8073 * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
8075 * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
8076 metadata without any code.
8078 * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
8079 more precise debugging information using gdb.
8081 2006-09-30 Zoltan Varga <vargaz@gmail.com>
8083 * inssel-ia64.brg: Make the helper methods static.
8085 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
8087 * inssel-x86.brg: make the helper methods static.
8089 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
8091 * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
8093 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
8095 * mini.c: updates for monoburg changes.
8096 * inssel.brg: make a few helper functions static as they should.
8098 2006-09-27 Zoltan Varga <vargaz@gmail.com>
8100 * Makefile.am: Move mini-codegen.c to common_sources.
8102 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8104 * mini.h: instroduce inst_call in MonoInst for use in OUTARG
8106 * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
8107 mini-ppc.h: port to use the common local register allocator.
8109 2006-09-26 Zoltan Varga <vargaz@gmail.com>
8111 * mini.h: Remove the comment too then.
8113 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
8115 * mini.h: put back backend.data which is to be used shortly and
8116 doesn't increase the size of MonoInst. If any 64 bit arch aligned
8117 pointers on 4 byte boundaries it'd have much bigger issues running
8118 and you can ifdef it out anyway.
8120 2006-09-26 Zoltan Varga <vargaz@gmail.com>
8122 * mini.h (MonoInst): Remove backend.data field since it is unused and increases
8123 MonoInst size by 4 bytes on 64 bit machines.
8125 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
8127 * *.{c,h,brg}: long due removal of the unused field in MonoInst and
8128 replacement with more meaningful field names. Arch maintainers, please
8129 check the assigned names are good enough for your arch.
8131 2006-09-26 Zoltan Varga <vargaz@gmail.com>
8133 * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the
8134 OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
8136 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
8138 * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
8139 relocations and memory requirements, put the optimization flags
8140 definitions in their own file.
8142 2006-09-24 Zoltan Varga <vargaz@gmail.com>
8144 * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
8146 * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
8148 2006-09-22 Zoltan Varga <vargaz@gmail.com>
8150 * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
8152 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
8154 * inssel.brg: use the correct function to get the size of an item
8155 in an array, given an element class.
8156 * aot-compiler.c: do not access class->class_size directly.
8158 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
8160 * mini.h, debug-mini.c: added a debugging function to print
8161 info about local variables and arguments in a jitted method.
8163 2006-09-20 Zoltan Varga <vargaz@gmail.com>
8165 * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8167 * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
8169 2006-09-19 Zoltan Varga <vargaz@gmail.com>
8171 * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
8172 inner and outer loops when passing vtypes.
8174 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
8176 * mini-ppc.c: take into account the cpu errata for cache flushing
8177 which caused some random errors (bug #79381).
8179 2006-09-19 Zoltan Varga <vargaz@gmail.com>
8181 * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to
8182 mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
8184 2006-09-17 Zoltan Varga <vargaz@gmail.com>
8186 * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
8189 * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
8192 * mini-amd64.c (emit_call): Avoid near calls on freebsd.
8193 (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
8195 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
8198 2006-09-13 Zoltan Varga <vargaz@gmail.com>
8200 * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
8202 2006-09-12 Zoltan Varga <vargaz@gmail.com>
8204 * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this
8205 macro does not have to be changed during debugging.
8207 * 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>.
8209 * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
8211 * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
8213 * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if
8214 MONO_ARCH_NO_EMULATE_MUL is defined.
8216 * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
8218 * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
8220 * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
8222 * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
8224 2006-09-11 Zoltan Varga <vargaz@gmail.com>
8226 * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
8227 stuff to mini-exceptions.c where it is used.
8229 * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
8230 setup code, the real one is in mini-exceptions.c.
8232 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
8233 layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
8234 some changes from the freebsd ports tree.
8236 * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
8239 * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
8241 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
8243 * mini.c: on Linux, check for /proc to be mounted
8244 (bug# 79351, novell bug#201204).
8246 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
8248 * mini.c: handle cases where pthread_attr_getstack() behaves
8249 incorrectly (bug #78096).
8251 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
8253 * mini-arm.c: support larger stack frames (bug #79272).
8255 2006-09-08 Zoltan Varga <vargaz@gmail.com>
8257 * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
8259 * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef
8262 * aot-runtime.c (mono_aot_get_class_from_name): New function used by
8263 mono_class_from_name () to find a class from its name.
8265 * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
8267 2006-09-07 Zoltan Varga <vargaz@gmail.com>
8269 * mini-amd64.c (emit_call): Avoid strstr () call if possible.
8271 2006-09-05 Kornél Pál <kornelpal@gmail.com>
8273 * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
8275 2006-09-04 Zoltan Varga <vargaz@gmail.com>
8277 * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
8278 callinfo->trampoline.
8280 * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
8282 (mono_arch_patch_code): Add some debug code to help track down similar failures in the
8285 2006-09-03 Zoltan Varga <vargaz@gmail.com>
8287 * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
8289 2006-09-02 Zoltan Varga <vargaz@gmail.com>
8291 * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
8292 stats.method_trampolines, it is already done by the generic trampoline code.
8294 * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
8296 2006-09-01 Zoltan Varga <vargaz@gmail.com>
8298 * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
8300 * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
8302 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
8304 * mini.c (print_jit_stats): Print mscorlib mempool size too.
8306 * mini.c (print_jit_stats): Print new stats.
8308 * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8310 2006-08-31 Zoltan Varga <vargaz@gmail.com>
8312 * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
8313 Address on two dimensional arrays. Fixes #78729.
8315 * mini.h (MonoCompile): Add a 'skip_visibility' field.
8317 * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
8320 * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
8322 * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
8325 * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
8327 (mini_get_ldelema_ins): Ditto.
8329 2006-08-30 Zoltan Varga <vargaz@gmail.com>
8331 * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
8332 (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation.
8335 2006-08-29 Neale Ferguson <neale@sinenomine.net>
8337 * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
8338 mono_arch_get_patch_offset as a dummy entry point to allow successful link.
8340 * exceptions-s390x.c: Cosmetic change.
8342 * tramp-s390.c: Fix warning.
8344 * cpu-s390.md: Correct length of mul_imm.
8346 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
8348 * aot-compiler.c: added binary writer with ELF backend
8349 implementation (only on Linux/x86 for now).
8351 2006-08-18 Zoltan Varga <vargaz@gmail.com>
8353 * Makefile.am: Don't run net 2.0 AOT tests.
8355 * aot-compiler.c (compile_method): Skip methods with tail calls as well.
8356 (mono_compile_assembly): Skip net 2.0 assemblies as well.
8358 * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
8360 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8362 * aot-compiler.c: simplified and refactored the asm-writing code
8363 to allow different backends.
8365 2006-08-18 Zoltan Varga <vargaz@gmail.com>
8367 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8369 * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a
8370 little. Share patches of type TYPE_FROM_HANDLE as well.
8372 * mini.c (mono_patch_info_equal): New helper function.
8373 (mono_patch_info_hash): Ditto.
8375 * aot-compiler.c (emit_method_code): Fix s390 build.
8377 * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
8378 is not handled because it is stored as a flag and not as a type ctor. Fixes
8381 2006-08-17 Zoltan Varga <vargaz@gmail.com>
8383 * aot-compiler.c: Fix computation of GOT slot statistics.
8385 * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
8386 Also remove support for not PIC AOT.
8388 * mini.h: Bump AOT file format version.
8390 * objects.cs: Add a test for #78990.
8392 * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
8393 (peter.dettman@iinet.net.au). Fixes #79087.
8395 * basic-long.cs: Add a test for the above.
8397 2006-08-16 Zoltan Varga <vargaz@gmail.com>
8399 * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
8401 * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
8404 2006-08-15 Zoltan Varga <vargaz@gmail.com>
8406 * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
8409 2006-08-10 Jonathan Chambers <joncham@gmail.com>
8411 * mini.c: Don't verify COM proxy invoke calls
8414 2006-08-10 Dick Porter <dick@ximian.com>
8416 * wapihandles.c (mini_wapi_seminfo): More info, to help track down
8417 which process is holding semaphores locked.
8419 2006-08-08 Zoltan Varga <vargaz@gmail.com>
8421 * mini-ia64.c mini-amd64.c: Fix #79027.
8423 * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
8425 * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
8427 * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
8428 implicit arguments in a vararg call. Fixes #79027.
8430 2006-08-07 Zoltan Varga <vargaz@freemail.hu>
8432 * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
8433 (mono_get_array_new_va_signature): Ditto.
8435 2006-08-05 Zoltan Varga <vargaz@gmail.com>
8437 * aot-runtime.c: Call init_plt lazily.
8439 * inssel-long.brg: Fix unsigned long->int conversion.
8441 * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
8443 * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
8444 that most data is now in the .rss/.data section.
8446 2006-08-04 Zoltan Varga <vargaz@gmail.com>
8448 * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.
8450 * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
8452 * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
8454 * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
8456 * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
8457 virtual call. Fixes #79010.
8459 * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method
8460 and use the result as the this argument in the real call.
8462 * generics.2.cs: Add a new test for #79010.
8464 2006-08-03 Zoltan Varga <vargaz@gmail.com>
8466 * mini-x86.c: Fix a warning.
8468 * aot-compiler.c: Add a bunch of statistics.
8470 * mini.c (inline_method): Disable inlining in out-of-line bblocks.
8472 2006-08-02 Zoltan Varga <vargaz@gmail.com>
8474 * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
8476 2006-08-01 Zoltan Varga <vargaz@gmail.com>
8478 * 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>.
8480 2006-07-13 Miguel de Icaza <miguel@novell.com>
8482 * mini.c (mono_method_to_ir): Obtain the original method in the
8483 CIL stream and use this to perform validation.
8487 2006-07-19 Zoltan Varga <vargaz@gmail.com>
8489 * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
8490 (mono_arch_call_opcode): Ditto.
8492 * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
8495 * mini.c (mono_patch_info_dup_mp): New helper function.
8497 * aot-compiler.c (compile_method): Fix some of the memory allocated during
8498 compilation. Fixes #78827.
8500 2006-07-18 Kornél Pál <kornelpal@gmail.com>
8502 * declsec.c: Use original security informations for
8503 MONO_WRAPPER_MANAGED_TO_MANAGED.
8505 2006-07-15 Jonathan Chambers <joncham@gmail.com>
8507 * mini.c: Allow Com Interop methods/classes and
8508 don't verify COM wrapper calls
8511 2006-07-13 Zoltan Varga <vargaz@gmail.com>
8513 * inssel-long32.brg: Fix long->i4 checked conversion.
8515 * exceptions.cs: Add a test for the above.
8517 2006-07-08 Zoltan Varga <vargaz@gmail.com>
8519 * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
8521 * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown
8524 * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
8527 2006-07-03 Zoltan Varga <vargaz@gmail.com>
8529 * mini.c: Fix solaris/x86 exception handling.
8531 * Makefile.am: Get rid of $(ICU_LIBS).
8533 2006-07-02 Zoltan Varga <vargaz@gmail.com>
8535 * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
8536 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
8537 (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
8539 * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
8541 * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
8542 this function causes a SIGSEGV.
8544 2006-06-22 Zoltan Varga <vargaz@gmail.com>
8546 * mini.c: Remove unused solaris/x86 includes.
8548 2006-06-21 Zoltan Varga <vargaz@gmail.com>
8550 * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
8552 2006-06-20 Jb Evain <jbevain@gmail.com>
8554 * cpu-g4.md: fix max length of start_handler instruction.
8556 2006-06-20 Massimiliano Mantione <massi@ximian.com>
8557 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
8559 2006-06-16 Massimiliano Mantione <massi@ximian.com>
8560 * ssa.c: Fixed bug 78653 for SSA based deadce.
8561 * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
8562 MonoInst.flags, used in SSA based deadce.
8563 * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
8564 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
8566 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
8568 * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
8569 it can end up using non executable memory on ppc64 systems
8570 running ppc32 userspace (fix from Johannes Berg).
8572 2006-06-14 Dick Porter <dick@ximian.com>
8574 * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
8577 2006-06-13 Massimiliano Mantione <massi@ximian.com>
8578 * mini.c: Made so that inline is locally disabled if it would
8579 trigger a .cctor, because too many apps depend on this behavior
8580 (which seems to be also the one of the MS CLR).
8582 2006-06-13 Zoltan Varga <vargaz@gmail.com>
8584 * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
8585 No idea why this worked before.
8587 * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
8588 which branch to outer exception clauses since they could skip the
8589 inner finally clauses. Fixes #78633.
8591 * exceptions.cs: Add a test for the above.
8593 * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
8596 * iltests.il: Add a test for the above.
8598 2006-06-12 Zoltan Varga <vargaz@gmail.com>
8600 * mini.c (remove_block_if_useless): Do not remove the bblock immediately
8601 after the end of a try bblock, to prevent asserts in mini_method_compile ().
8603 * iltests.il: Add a test for the above.
8605 2006-06-10 Zoltan Varga <vargaz@gmail.com>
8607 * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
8609 * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
8610 methods as instrinsics.
8612 2006-06-09 Wade Berrier <wberrier@novell.com>
8614 * Makefile.am: Fix sources list for svn rename so that make dist succeeds
8615 (simple-cee-ops.h ssapre-mini-ops.h)
8617 2006-06-09 Neale Ferguson <neale@sinenomine.net>
8619 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
8620 * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
8622 * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
8623 * cpu-s390x.md: Fix max. length values for a couple of instructions.
8625 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
8627 * mini-exceptions.c: Minor fix for building mono in Visual Studio.
8629 2006-06-08 Massimiliano Mantione <massi@ximian.com>
8631 * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
8632 * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
8633 * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
8634 * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
8635 * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
8636 of opcodes, so that bug 78549 should not happen again.
8637 * ssapre.c: Updated to use the renamed files.
8639 2006-06-08 Zoltan Varga <vargaz@gmail.com>
8641 * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move
8642 in OP_ATOMIC_EXCHANGE_I4.
8644 2006-06-07 Wade Berrier <wberrier@novell.com>
8646 * tramp-s390.c: Fix s390 build (add missing pointer declarations
8647 in mono_debugger_create_notification_function)
8649 2006-06-06 Zoltan Varga <vargaz@gmail.com>
8651 * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
8653 * mini.c (type_from_stack_type): Disable some changes which do not
8656 * driver.c: Reenable opts.
8658 * mini.h (MonoStackSlot): New structure to keep track of the verification state
8659 of the evaluation stack.
8661 * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
8662 evaluation stack trace at entry to the bblock.
8664 * mini.c (merge_stacks): New function to perform verification of stack merges.
8665 Turned off by default.
8667 * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
8670 2006-06-06 Massimiliano Mantione <massi@ximian.com>
8672 * local-propagation.c: Fixed bug 78549.
8674 2006-06-04 Zoltan Varga <vargaz@gmail.com>
8676 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
8678 2006-06-02 Miguel de Icaza <miguel@novell.com>
8680 * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
8681 tramp-arm.c, tramp-ia64.c
8682 (mono_debugger_create_notification_function): Update signature to
8683 new signature and use new protocol for creating the notification
8686 Should fix the build.
8688 2006-06-02 Geoff Norton <gnorton@customerdna.com>
8690 * exceptions-ppc.c (mono_jit_walk_stack)
8691 (ves_icall_get_frame_info): Fix the build
8693 2006-06-02 Zoltan Varga <vargaz@gmail.com>
8695 * mini.c (mono_set_defaults): Fix the handling of -O=-all.
8697 2006-05-31 Raja R Harinath <rharinath@novell.com>
8699 * il2tests.2.il: New file for generics CIL tests. Add test for
8701 * Makefile.am: Update.
8704 * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
8707 2006-05-30 Massimiliano Mantione <massi@ximian.com>
8709 * aliasing.c: Fixed bug 78311.
8711 2006-05-29 Martin Baulig <martin@ximian.com>
8713 * mini-exceptions.c (mono_find_jit_info): When computing the
8714 native offset, check whether we're actually inside the method's
8715 code; call mono_debug_print_stack_frame() to format the frame.
8716 (ves_icall_System_Exception_get_trace): Call
8717 mono_debug_print_stack_frame() to format the stack frame.
8718 (ves_icall_get_trace): Update to the new debugging API.
8719 (mono_jit_walk_stack_from_ctx): Likewise.
8720 (ves_icall_get_frame_info): Likewise.
8722 * mini.c (get_method_from_ip): Use the new debugging API.
8723 (mono_print_method_from_ip): Likewise.
8726 (mono_jit_walk_stack): Use the new debugging API.
8727 (ves_icall_get_frame_info): Likewise.
8729 2006-05-27 Zoltan Varga <vargaz@gmail.com>
8731 * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
8733 2006-05-25 Massimiliano Mantione <massi@ximian.com>
8735 * mini.c: Added "limitator" to inline for debugging.
8737 2006-05-24 Martin Baulig <martin@ximian.com>
8739 * debug-debugger.c (mono_debugger_init): Create a private,
8740 malloc()-based code manager for the notification function and
8741 intentionally leak it on exit. This fixes the crash-on-exit race
8745 (mono_debugger_create_notification_function): Added
8746 `MonoCodeManager *' argument.
8749 (mono_debugger_create_notification_function): Added
8750 `MonoCodeManager *' argument.
8752 2006-05-23 Massimiliano Mantione <massi@ximian.com>
8754 * aliasing.c: Fixed 64 bit issue.
8755 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8756 default since all known bugs are fixed (one more time!).
8758 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8760 * mini.c: write barrier support.
8762 2006-05-23 Martin Baulig <martin@ximian.com>
8764 * debug-debugger.c: Revert Paolo's change. Add comment and #error
8765 check at the top of the file.
8767 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
8769 * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
8770 reverting changes without reason and without changelog entries.
8772 2006-05-18 Zoltan Varga <vargaz@gmail.com>
8774 * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
8775 to a few opcodes. Fixes #78439.
8777 * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
8778 consistency with other archs.
8780 * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
8782 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8784 * debug-debugger.c: fix the build.
8786 2006-05-17 Martin Baulig <martin@ximian.com>
8789 (debugger_thread_vtable): Moved here from ../metadata/threads.c.
8790 (debugger_init_threads): Formerly known as mono_debugger_init_threads().
8791 (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
8792 (debugger_attach): Call GC_mono_debugger_add_all_threads().
8794 2006-05-11 Zoltan Varga <vargaz@gmail.com>
8796 * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
8798 2006-05-10 Zoltan Varga <vargaz@gmail.com>
8800 * mini-x86.c (mono_arch_instrument_epilog): Fix handling of
8801 MONO_TYPE_GENERICINST.
8803 * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of
8804 MONO_TYPE_GENERICINST.
8806 2006-05-09 Zoltan Varga <vargaz@gmail.com>
8808 * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
8811 2006-05-08 Zoltan Varga <vargaz@gmail.com>
8813 * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
8815 (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
8817 2006-05-06 Zoltan Varga <vargaz@gmail.com>
8819 * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
8820 mono_trace_cleanup ().
8822 * iltests.il: Fix problem with the newly added test.
8824 * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
8825 due to register constraints, free up the previous hreg. Fixes #78314.
8827 * iltests.il: Add new test for #78314.
8829 * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
8830 Interlocked.Add. Fixes #78312.
8832 * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
8834 2006-05-05 Zoltan Varga <vargaz@gmail.com>
8836 * inssel.brg (mini_emit_virtual_call): Fix a warning.
8838 2006-05-05 Martin Baulig <martin@ximian.com>
8840 * debug-mini.c (mono_debug_open_block): New method.
8843 (mono_arch_output_basic_block): Call mono_debug_open_block() at
8844 the beginning of each basic block.
8847 (mono_arch_output_basic_block): Call mono_debug_open_block() at
8848 the beginning of each basic block.
8850 2006-05-04 Massimiliano Mantione <massi@ximian.com>
8852 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8853 default until I understand why they break the build on amd64.
8855 2006-05-04 Zoltan Varga <vargaz@gmail.com>
8857 * mini.c (mini_cleanup): Call mono_cleanup ().
8859 * mini.c (UNVERIFIED): New macro to make it easier to track down verification
8862 2006-05-04 Massimiliano Mantione <massi@ximian.com>
8864 * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
8865 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8866 default since all known bugs are fixed, and I cannot reproduce bug
8867 77944... I'm asking Matt Hargett to test again after this commit.
8869 2006-04-28 Massimiliano Mantione <massi@ximian.com>
8871 * mini-codegen.c: Fixed typo that thrashed inline.
8873 2006-04-28 Zoltan Varga <vargaz@gmail.com>
8875 * dominators.c (compute_dominators): Avoid using a worklist since
8876 it is not correct in some cases. Instead, iterate over all bblocks as
8877 in the original paper. Fixes --compile-all -O=all System.Xml.dll.
8879 2006-04-28 Miguel de Icaza <miguel@novell.com>
8881 * mini.c (mono_jit_compile_method_inner): Use
8882 mono_prepare_exception_from_error that resets the value
8885 2006-04-27 Miguel de Icaza <miguel@novell.com>
8887 * mini.c: Move the mini_loader_error_to_exception to metadata.
8889 2006-04-27 Massimiliano Mantione <massi@ximian.com>
8891 * aliasing.c: Fixed bug 78210.
8893 2006-04-27 Massimiliano Mantione <massi@ximian.com>
8895 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8896 default until all their problems (or the ones they trigger) are fixed.
8898 2006-04-26 Zoltan Varga <vargaz@gmail.com>
8900 * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
8902 * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
8903 as loaded only after resolving patches since that could invoke the same method.
8905 * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
8907 * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
8910 * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
8913 * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
8916 * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
8917 made from AOT code through the PLT table.
8919 * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
8920 holding the plt offset when a call is made to the aot plt trampoline.
8922 2006-04-25 Zoltan Varga <vargaz@gmail.com>
8924 * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the
8927 * Makefile.am (common_sources): Fix build breakage.
8929 * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
8930 calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
8931 intra-assembly calls if possible.
8933 * tramp-*.c: Add new functions for patching/nullifying PLT entries.
8935 * mini-trampolines.c: Handle PLT entries.
8937 * mini.c: Avoid creating a GOT var for calls.
8939 * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
8942 * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
8945 * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
8948 * mini.h: Bump AOT file format version.
8950 * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
8953 2006-04-25 Martin Baulig <martin@ximian.com>
8955 * driver.c: Disable copyprop, consprop and inline when running
8956 inside the debugger.
8958 2006-04-25 Martin Baulig <martin@ximian.com>
8960 * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
8961 with `get_current_thread' and added `detach'.
8962 (MonoDebuggerMetadataInfo): Added `thread_size',
8963 `thread_tid_offset', `thread_stack_ptr_offset' and
8964 `thread_end_stack_offset'.
8966 2006-04-25 Zoltan Varga <vargaz@gmail.com>
8968 * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and
8971 * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
8972 ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
8974 * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
8976 * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
8978 * aot.c: Add support for ADJUSTED_IID.
8980 2006-04-24 Zoltan Varga <vargaz@gmail.com>
8982 * aot.c (emit_method_order): Don't align method_order_end.
8984 * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
8985 the interface ID changes.
8987 2006-04-21 Dick Porter <dick@ximian.com>
8989 * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
8990 cleaning up a thread. Fixes the new part of bug 77470.
8992 2006-04-20 Geoff Norton <gnorton@customerdna.com>
8994 * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
8997 2006-04-19 Zoltan Varga <vargaz@gmail.com>
8999 * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
9001 * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
9002 SIGSEGV. Fixes #78072.
9004 * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
9005 unregister our SIGABRT handler.
9007 2006-04-19 Massimiliano Mantione <massi@ximian.com>
9009 * mini.c: Disabled inline where it can alter the call stack in a
9010 way visible from managed code.
9011 * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
9014 2006-04-16 Zoltan Varga <vargaz@gmail.com>
9016 * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
9017 on other platforms. Fixes #78089.
9019 2006-04-13 Martin Baulig <martin@ximian.com>
9021 * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
9022 determine whether we're inside the debugger.
9025 (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
9027 2006-04-12 Zoltan Varga <vargaz@gmail.com>
9029 * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
9030 handler clauses. Fixes #78024.
9032 * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
9033 in the CALL_MEMBASE opcodes. Fixes #78088.
9034 (mono_arch_get_vcall_slot_addr): Ditto.
9036 2006-04-10 Martin Baulig <martin@ximian.com>
9038 * debug-debugger.c: The thread handling code has now been moved
9039 into ../metadata/threads.c.
9041 2006-04-10 Zoltan Varga <vargaz@gmail.com>
9043 * driver.c (mono_main): Fix --with-gc=none build.
9045 * mini-codegen.c (mono_spillvar_offset): Improve alignment.
9046 (mono_spillvar_offset_float): Ditto.
9047 (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
9048 hreg, not when its !global, since on ia64, there is a third category: stacked
9051 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
9053 * mini.c: set MonoInst->klass for load field address and a few other
9056 2006-04-10 Zoltan Varga <vargaz@gmail.com>
9058 * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
9060 2006-04-07 Zoltan Varga <vargaz@gmail.com>
9062 * dominators.c (compute_dominators): Fix yet another bug which surfaced after
9063 the branch opt changes.
9065 2006-04-06 Dick Porter <dick@ximian.com>
9067 * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
9069 * wapihandles.c (mini_wapi_seminfo):
9070 * driver.c (mono_main): Add semaphore info option
9072 2006-04-05 Zoltan Varga <vargaz@gmail.com>
9074 * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
9075 branch optimization changes. Fixes #78009.
9077 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
9079 * mini.c: ignore accessibility of methods in managed->native wrappers.
9081 2006-04-04 Zoltan Varga <vargaz@gmail.com>
9083 * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
9085 * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
9087 2006-04-03 Zoltan Varga <vargaz@gmail.com>
9089 * mini.c: Modify the branch optimizations to preserve the invariant that
9090 the entries inside the in_bb and out_bb arrays are unique.
9091 (mono_unlink_bblock): Avoid creation of new arrays.
9093 2006-04-02 Zoltan Varga <vargaz@gmail.com>
9095 * mini.c (mono_unlink_bblock): Fix regression caused by previous
9098 2006-04-01 Zoltan Varga <vargaz@gmail.com>
9100 * mini.c (optimize_branches): Remove the "optimizations" in
9101 the cbranch1/cbranch2 -> branch cases which were causing several
9102 problems in the past. Fixes #77986.
9104 2006-03-31 Chris Toshok <toshok@ximian.com>
9106 * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
9107 default optimizations :(
9109 2006-03-31 Zoltan Varga <vargaz@gmail.com>
9111 * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
9114 2006-03-31 Massimiliano Mantione <massi@ximian.com>
9116 * local-propagation.c: Added comments to structs and removed
9117 "Mono" prefixes from local tree mover types.
9119 2006-03-30 Zoltan Varga <vargaz@gmail.com>
9121 * Makefile.am (arch_sources): Define this for each architecture so
9122 libmono_la_SOURCES is defined in one place.
9124 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
9126 * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
9129 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
9131 * driver.c: print the GC name supplied by configure.
9133 2006-03-29 Massimiliano Mantione <massi@ximian.com>
9135 * local-propagation.c: Added tree mover, and moved here all the
9136 local propagation code from mini.c
9137 * mini.c: Added support for treeprop, and moved all the local
9138 propagation code to local-propagation.c
9139 * mini.h: Added support for treeprop
9140 * driver.c: Added support for treeprop, enabled consprop, copyprop,
9141 treeprop, inline and deadce by default
9142 * Makefile.am: Added local-propagation.c
9144 2006-03-25 Zoltan Varga <vargaz@gmail.com>
9146 * exceptions-sparc.c: Applied patch from David S. Miller <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
9148 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
9150 * debug-debugger.c: make it compile without the Boehm GC.
9152 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9154 * mini.c: fixed issue with mismatch when an icall is registered
9155 with multiple names but same address.
9157 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9159 * declsec.c, mini-exceptions.c: use write barrier to set reference
9160 fields of managed objects.
9162 2006-03-19 Zoltan Varga <vargaz@gmail.com>
9164 * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
9165 (can_access_internals): Fix a warning.
9167 * mini.c (print_method_from_ip): Rename this to
9168 mono_print_method_from_ip so it gets exported.
9170 * trace.c: Deal with strings inside StringBuilder's containing garbage
9171 and fix memory leaks. Fixes #77848.
9173 2006-03-19 Zoltan Varga <vargaz@gmail.com>
9175 * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
9178 2006-03-16 Neale Ferguson <neale@sinenomine.net>
9180 * mini-s390.c: Remove OP_X86_TEST_NULL.
9182 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9184 * mini.c: use the correct GetHashCode() for the moving collector.
9186 2006-03-16 Massimiliano Mantione <massi@ximian.com>
9188 * liveness.c: Regalloc spill cost tuning.
9190 2006-03-15 Neale Ferguson <neale@sinenomine.net>
9192 * mini-s390x.h: Correct S390_LONG macro.
9194 * mini-s390x.c: Cleanup unused code.
9196 2006-03-15 Zoltan Varga <vargaz@gmail.com>
9198 * jit-icalls.h: New file.
9200 * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
9201 icalls and include that instead of including jit-icalls.c.
9203 * mini-ppc.c (mono_arch_output_basic_block): Remove references to
9206 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
9208 * mini.c: when checking for member accessibility, also check for
9209 friend assemblies and for explicit interface implementations.
9211 2006-03-14 Zoltan Varga <vargaz@gmail.com>
9213 * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
9215 * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
9217 * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9218 common cases are done first.
9220 * mini-ops.h: Only define platform specific opcodes on the given platform.
9222 * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
9225 2006-03-14 Martin Baulig <martin@ximian.com>
9227 Revert Paolo's change from r57348:
9229 * mini.h: don't use gboolean for bitfields.
9230 * mini.c: verifier changes for fields and methods accessibility.
9232 2006-03-13 Neale Ferguson <neale@sinenomine.net>
9234 * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
9236 * mini-s390x.c: Fix conv_r_un.
9238 * cpu-s390, cpu-s390x.md: Fix lengths.
9240 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
9242 * mini.c: nested types have access to all the nesting
9243 levels, not just the enclosing types.
9245 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9247 * mini.c: added a few more verification checks.
9249 2006-03-12 Zoltan Varga <vargaz@gmail.com>
9251 * liveness.c: Merge optimizations from the linear-il branch.
9253 2006-03-11 Zoltan Varga <vargaz@gmail.com>
9255 * mini-ia64.c (emit_call): Add a comment.
9257 * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
9259 * tramp-ia64.c: Fix some warnings.
9261 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
9263 * mini.h: don't use gboolean for bitfields.
9264 * mini.c: verifier changes for fields and methods accessibility.
9266 2006-03-11 Zoltan Varga <vargaz@gmail.com>
9268 * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
9269 lazy icall wrapper changes.
9271 * dominators.c: Replace all the dominator algorithms with faster
9272 ones from the linear-il branch.
9274 * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
9277 * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9278 common cases are done first.
9280 * mini-amd64.c: Fix some warnings.
9282 * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
9285 * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
9288 * mini.h: Add a missing prototype.
9290 2006-03-10 Zoltan Varga <vargaz@gmail.com>
9292 * mini.c: Compile icall wrappers lazily.
9294 * mini-codegen.c: Use printf instead of g_print since its much faster.
9296 * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
9299 * mini.c (optimize_branches): Cache the negative result from
9300 remove_block_if_useless ().
9302 * mini.c (optimize_branches): Avoid restarting the iteration after each change.
9303 Also fix some bblock linking issues.
9305 * helpers.c (mono_disassemble_code): Reduce the size of the temporary
9308 * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
9310 * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
9311 accessed fields first, for better cache behavior.
9313 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
9315 * mini.c: speedup IList<T> array accesses.
9317 2006-03-09 Zoltan Varga <vargaz@gmail.com>
9319 * mini.c (mono_method_to_ir): Handle large methods overflowing the
9320 inline_costs counter. Fixes #77190.
9322 2006-03-06 Zoltan Varga <vargaz@gmail.com>
9324 * mini-exceptions.c: Call mono_trace_is_enabled () before printing
9325 trace messages. Fixes #77706.
9327 2006-03-04 Martin Baulig <martin@ximian.com>
9329 * tramp-amd64.c, tramp-x86.c
9330 (mono_debugger_create_notification_function): Use
9331 mono_global_codeman_reserve() to allocate a buffer at runtime and
9334 * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
9336 * debug-debugger.c (mono_debugger_init): Dynamically allocate the
9337 notification function at runtime and then call `initialize' in the
9338 `MONO_DEBUGGER__debugger_info' vtable.
9340 2006-03-04 Zoltan Varga <vargaz@gmail.com>
9342 * iltests.il: Fix a visibility problem.
9344 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
9346 * driver.c, mini.c: add hooks for the counters API.
9348 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9350 * driver.c: show disabled options.
9352 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9354 * linear-scan.c: always use cost-driven selection.
9356 2006-02-28 Raja R Harinath <rharinath@novell.com>
9358 * jit-icalls.c (helper_compile_generic_method): Revert change from
9361 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
9363 * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
9365 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
9367 * inssel.brg: style fixes, mostly to force the updated monoburg
9368 to run for people using svn.
9370 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
9372 * mini.c: match monoburg changes.
9374 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9376 * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
9377 ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
9378 declaration in the header file.
9380 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
9382 * helpers.c: reduce relocations and mem usage.
9384 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
9386 * mini.h, mini-codegen.c: disable logging features if
9387 requested by configure.
9389 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
9391 * mini.c: tiny verifier changes.
9393 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9395 * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
9396 cpu-pentium.md: stack alignment changes for osx/x86,
9397 partially from Geoff Norton <gnorton@customerdna.com>.
9399 2006-02-24 Raja R Harinath <harinath@gmail.com>
9401 * jit-icalls.c (helper_compile_generic_method): Update to changes
9402 in metadata/class.c.
9404 2006-02-24 Zoltan Varga <vargaz@gmail.com>
9406 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
9408 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
9409 interface calls with large offsets.
9411 2006-02-23 Raja R Harinath <rharinath@novell.com>
9413 * jit-icalls.c (helper_compile_generic_method): Document the
9414 special-case we depend on so that we can inflate the method twice
9415 with the same context with no bad side-effects.
9417 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
9419 * mini-x86.c, mini-amd64.c: fix for case when xen support
9422 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
9424 * mini-x86.c, mini-amd64.c: generate code to access tls items
9425 in a faster way for Xen systems.
9427 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
9429 * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
9430 updates and compilation fixes for the OSX/x86 port, mostly from
9431 Geoff Norton <gnorton@customerdna.com>.
9433 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
9435 * inssel.brg: faster interface call implementation
9436 to sync with the interface_offsets MonoVTable changes.
9438 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9440 * mini.c: more verification checks.
9442 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
9444 * mini.c: added a few more verification checks.
9446 2006-02-17 Neale Ferguson <neale@sinenomine.net>
9448 * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
9449 facility on the processor and use it if available.
9451 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9453 * driver.c, aot.c, mini.c: throw exception if the IL code is
9454 invalid or unverifiable.
9456 2006-02-17 Raja R Harinath <rharinath@novell.com>
9458 * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
9461 2006-02-16 Zoltan Varga <vargaz@gmail.com>
9463 * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
9465 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9467 * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
9468 mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
9469 handling of instantiated generic valuetypes.
9471 2006-02-11 Zoltan Varga <vargaz@gmail.com>
9473 * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of
9474 MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
9477 * generics.2.cs: Revert the nullable reftypes tests.
9479 2006-02-10 Zoltan Varga <vargaz@gmail.com>
9481 * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
9482 using __builtin_frame_address (1) as it doesn't work in the presence
9483 of optimizations. Hopefully fixes #77273.
9485 * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
9486 -> generics.cs change as it doesn't work with some automake versions.
9488 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9490 * mini.c: handle systems that sue a different way to
9491 retrieve the stack address of the current thread.
9493 2006-02-09 Zoltan Varga <vargaz@gmail.com>
9495 * Makefile.am generics.2.cs: Rename this to generics.cs and handle
9496 it specially in the makefile.
9498 * generics.2.cs: Add tests for nullable reference types.
9500 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9502 * mini.c: always handle the case when mono_jit_init()
9503 is called in a thread different from the main thread,
9504 confusing libgc (bug #77309).
9506 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
9508 * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
9510 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9512 * mini.c: change optimize_branches () to use a single loop
9513 and introduce a new optimization to simplify some range checks.
9515 2006-02-03 Martin Baulig <martin@ximian.com>
9517 * debug-debugger.c (debugger_thread_manager_thread_created): Removed
9518 and merged with debugger_thread_manager_add_thread().
9519 (mono_debugger_main): Call debugger_thread_manager_add_thread() to
9520 inform the debugger about the main thread.
9522 2006-02-03 Zoltan Varga <vargaz@gmail.com>
9524 * basic.cs: Add test for div.un/rem.un constant folding.
9526 2006-02-03 Neale Ferguson <neale@sinenomine.net>
9528 * cpu-s390x.md: correct int_xor_imm length
9530 2006-02-03 Zoltan Varga <vargaz@gmail.com>
9532 * generics.2.cs: New test for #77442.
9534 * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
9537 2006-02-02 Martin Baulig <martin@ximian.com>
9539 * tramp-x86.c, tramp-amd64.c: It's now safe to #include
9540 <mono/metadata/mono-debug-debugger.h>
9542 * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
9544 2006-02-02 Martin Baulig <martin@ximian.com>
9546 * debug-debugger.h: New header file for debug-debugger.c.
9548 * debug-debugger.c: Big API cleanup; don't run the managed Main()
9549 function is a separate thread anymore; add support for attaching.
9551 2006-02-01 Zoltan Varga <vargaz@gmail.com>
9553 * tramp-x86.c: Fix a warning.
9555 2006-01-31 Zoltan Varga <vargaz@gmail.com>
9557 * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
9558 on very large methods.
9560 * aot.c (load_patch_info): Fix a warning.
9562 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
9564 * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
9565 mini-ops.h: alu membase optimizations.
9567 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
9569 * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
9570 to speedup StringBuilder.
9572 2006-01-27 Zoltan Varga <vargaz@gmail.com>
9574 * dominators.c (mono_compute_natural_loops): Fix detection of
9575 loop body start blocks.
9577 * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
9579 2006-01-26 Zoltan Varga <vargaz@gmail.com>
9581 * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
9584 2006-01-25 Massimiliano Mantione <massi@ximian.com>
9586 * aliasing.c: Fixed aliasing issue on 64 bit archs.
9588 2006-01-25 Martin Baulig <martin@ximian.com>
9590 * debug-debugger.c: Moved the `MonoDebuggerManager' and
9591 `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
9592 started to cleanup this file a little bit.
9594 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
9596 * mini.c: optimize a codepath frequently happening in generics code.
9598 2006-01-23 Martin Baulig <martin@ximian.com>
9600 * Makefile.am: Only compile debug-debugger.c on supported platforms.
9602 * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
9605 * driver.c: debug-debugger.c is only available if
9606 `MONO_DEBUGGER_SUPPORTED' is defined.
9608 2006-01-23 Martin Baulig <martin@ximian.com>
9610 * debug-debugger.c: Only enable this on platforms where the Mono
9611 Debugger is working (x86 and x86_64).
9613 2006-01-21 Martin Baulig <martin@ximian.com>
9615 The Mono Debugger is now using the normal `mono' instead of the
9616 `mono-debugger-mini-wrapper' when executing managed code.
9618 * debug-debugger.c: New file; previously known as
9619 debugger/wrapper/wrapper.c.
9621 * debug-mini.c (mono_init_debugger): Removed.
9623 * driver.c (mono_main): Added new `--inside-mdb' command line
9624 argument which is used when running inside the debugger.
9626 2006-01-20 Zoltan Varga <vargaz@gmail.com>
9628 * liveness.c (mono_analyze_liveness): Remove some unused data
9631 2006-01-17 Zoltan Varga <vargaz@gmail.com>
9633 * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
9635 2006-01-16 Zoltan Varga <vargaz@gmail.com>
9637 * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
9638 depends on implementation details of monobitset.
9640 * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
9643 2006-01-15 Zoltan Varga <vargaz@gmail.com>
9645 * liveness.c: Update after monobitset changes.
9647 2006-01-14 Zoltan Varga <vargaz@gmail.com>
9649 * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
9651 2006-01-11 Neale Ferguson <neale@sinenomine.net>
9653 * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
9655 * mini-s390x.c: Remove warning messages.
9657 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
9659 * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
9661 2006-01-10 Zoltan Varga <vargaz@gmail.com>
9663 * generics.2.cs: Add ldelem/stelem_any test.
9665 2006-01-10 Neale Ferguson <neale@sinenomine.net>
9667 * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
9669 2006-01-07 Zoltan Varga <vargaz@gmail.com>
9671 * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
9673 2006-01-06 Zoltan Varga <vargaz@gmail.com>
9675 * generics.2.cs: Reenable vtype tests.
9677 * inssel-x86.brg: Remove an icorrect valuetype rule.
9679 2006-01-06 Neale Ferguson <neale@sinenomine.net>
9681 * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
9682 initial support for OP_ABS.
9684 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9686 * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
9688 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9690 * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int
9691 conversion and implement LADD/LSUB.
9693 * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
9696 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9698 * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
9700 * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
9703 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9705 * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when
9706 localloc is encountered. Fixes crash in test-183.cs when using gmcs
9707 (stack walk problem).
9709 2006-01-04 Zoltan Varga <vargaz@gmail.com>
9711 * aot.c (mono_aot_load_method): Fix a warning.
9713 2006-01-03 Neale Ferguson <neale@sinenomine.net>
9715 * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
9717 2006-01-03 Zoltan Varga <vargaz@gmail.com>
9719 * iltests.il: Add test for #77148.
9721 * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
9724 2006-01-03 Neale Ferguson <neale@sinenomine.net>
9726 * mini-s390x.c, inssel-s390x.brg: Remove debug statements
9728 2006-01-03 Neale Ferguson <neale@sinenomine.net>
9730 * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
9731 cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
9733 * basic-long.cs: Add lconv-to-r4/r8 tests.
9735 2006-01-03 Zoltan Varga <vargaz@gmail.com>
9737 * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
9739 * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
9740 here as on other archs.
9742 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9744 * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
9746 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9748 * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
9750 * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
9752 * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
9753 instrument_prolog; Add memory_barrier instruction.
9755 2005-12-26 Zoltan Varga <vargaz@gmail.com>
9757 * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
9759 2005-12-23 Zoltan Varga <vargaz@gmail.com>
9761 * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
9763 * aliasing.c inssel.brg: Fix warnings.
9765 * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
9766 could skip initialization of some parts of memory.
9768 * mini.c mini-ia64.c: Fix warnings.
9770 * inssel-sparc.brg: Add an implementation of lneg which actually works.
9772 2005-12-22 Zoltan Varga <vargaz@gmail.com>
9774 * aliasing.c (mono_build_aliasing_information): Add a workaround for
9775 a crash seen on sparc.
9777 * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
9779 * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
9781 2005-12-21 Neale Ferguson <neale@sinenomine.net>
9783 * mini-ops.h: Add s390_backchain instruction
9785 * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
9787 * cpu-s390.md: Add s390_backchain instruction
9789 * mini-s390.c: Significant ABI changes
9791 * mini-s390.h: Cater for zero length structures
9793 2005-12-20 Neale Ferguson <neale@sinenomine.net>
9795 * mini-s390.c: ABI fixes
9797 * inssel-s390.brg: Remove debug statements
9799 * cpu-s390.md: Fix length of ATOMIC_xx operations
9801 2005-12-19 Zoltan Varga <vargaz@gmail.com>
9803 * basic-float.cs: Add float<->long conversion tests.
9805 2005-12-16 Neale Ferguson <neale@sinenomine.net>
9807 * mini-s390.c: Fix LOCALLOC processing.
9809 * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
9811 2005-12-15 Zoltan Varga <vargaz@gmail.com>
9813 * iltests.il: Add tests for some opcodes not covered by the other
9816 2005-12-15 Neale Ferguson <neale@sinenomine.net>
9818 * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct
9819 register loading for Tail processing; Correct trace output.
9821 * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
9823 * cpu-s390.md: Correct size of jmp instruction.
9825 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9827 * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
9829 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9831 * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
9832 Bring s390 up to current level.
9834 2005-12-12 Zltan Varga <vargaz@gmail.com>
9836 * generics.2.cs: Disable the newly added tests as they do not work yet.
9838 * generics.2.cs: Add valuetype tests.
9840 2005-12-09 Zoltan Varga <vargaz@gmail.com>
9842 * basic-long.cs: Add i4->u8 test.
9844 * objects.cs: Add tests for JIT intrinsic.
9846 * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
9847 optimizations lost by a mistake.
9849 2005-12-07 Zoltan Varga <vargaz@gmail.com>
9851 * basic-long.cs: Remove a test moved to objects.cs.
9853 * arrays.cs: Add more array tests.
9855 2005-12-06 Zoltan Varga <vargaz@gmail.com>
9857 * arrays.cs: Add new tests for multi-dimensional arrays.
9859 2005-12-06 Raja R Harinath <rharinath@novell.com>
9861 * Makefile.am (test_sources2): Add generics.2.cs.
9862 (EXTRA_DIST): Add test_sources2.
9864 2005-12-05 Ben Maurer <bmaurer@ximian.com>
9866 Support for boxing and unboxing nullable types as well as the
9867 isinst operation on nullables, per the CLI ammendment.
9869 * inssel.brg (CEE_ISINST): Special case for nullable
9871 * mini.c (handle_unbox_nullable): new method
9872 (handle_box): Special case for nullable types
9873 (mono_method_to_ir): Call handle_unbox_nullable in correct
9876 * generics.2.cs: New test suite
9878 * Makefile.am: Support for regression tests with generics.
9880 2005-12-03 Zoltan Varga <vargaz@gmail.com>
9882 * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
9883 allocated to registers. Fixes #76800.
9885 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
9887 * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
9889 2005-11-30 Zoltan Varga <vargaz@gmail.com>
9891 * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot
9894 2005-11-29 Zoltan Varga <vargaz@gmail.com>
9896 * objects.cs basic-calls.cs: Move a test depending on valuetypes to
9899 * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
9901 * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
9902 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
9904 * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
9905 single precision before storing to a single precision location.
9907 2005-11-28 Raja R Harinath <rharinath@novell.com>
9909 * Makefile.am (ILASM): Use profile-dependent location of ilasm.
9911 2005-11-27 Zoltan Varga <vargaz@gmail.com>
9913 * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
9916 * basic.cs: Remove test_0_byte_compares test which was moved to
9917 objects.cs a long time ago.
9919 2005-11-22 Massimiliano Mantione <massi@ximian.com>
9921 * aliasing.c: Fixed aliasing issue on 64 bit archs.
9923 2005-11-20 Zoltan Varga <vargaz@gmail.com>
9925 * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
9926 handlers are called.
9928 * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
9931 * mini-ia64.c: Add support for the throw->branch exception
9934 * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
9936 2005-11-18 Massimiliano Mantione <massi@ximian.com>
9938 * mini.c: Enabled "fastpath" deadce :-)
9940 2005-11-18 Massimiliano Mantione <massi@ximian.com>
9942 * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
9943 alias analysis pass to support it.
9946 * liveness.c: Likewise (liveness computation can use aliasing
9947 information to be more accurate).
9948 * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
9949 moreover made so that "--compile-all" uses the given optimization
9950 flags and not the default ones.
9951 * aliasing.c: Alias analysis (new file).
9952 * aliasing.h: Likewise.
9953 * Makefile.am: added "aliasing.c" and "aliasing.h".
9955 2005-11-17 Zoltan Varga <vargaz@gmail.com>
9957 * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
9960 2005-11-13 Zoltan Varga <vargaz@gmail.com>
9962 * mini-exceptions.c (mono_handle_exception_internal): Remove the
9963 fp >= end_of_stack exit condition, as it is not needed, and it might
9964 become true for fp eliminated frames.
9966 2005-11-11 Zoltan Varga <vargaz@gmail.com>
9968 * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
9971 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
9973 * mini-arm.c: fixed alignment of doubles/longs to match
9974 the C ABI (bug #76635).
9976 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
9978 * aot.c: fix compilation with --enable-minimal=aot.
9980 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
9982 * mini-arm.c: fixed compatibility with the new
9983 floating point emulator package for compares.
9985 2005-11-03 Atsushi Enomoto <atsushi@ximian.com?
9987 * mini.c : reverted sig->pinvoke changes (r51396-51397).
9989 2005-11-01 Zoltan Varga <vargaz@freemail.hu>
9991 * mini-exceptions.c (print_stack_frame): Output to stderr.
9992 (mono_handle_native_sigsegv): Ditto.
9994 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
9996 * mini-amd64.c (mono_arch_output_basic_block): Remove unused
9997 OP_LCONV_TO_OVF_I implementation.
9999 * mini-amd64.c: Add support for the throw->branch exception
10002 * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
10003 when the catch clause catches a more general exception, i.e. Object.
10005 2005-10-30 Zoltan Varga <vargaz@gmail.com>
10007 * cpu-ia64.md: Remove unused opcodes.
10009 * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
10010 specific defines for architectures defining USE_SIGACTION.
10012 * mini-ia64.c: Fix some warnings.
10014 * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
10015 version seemed to skip a frame.
10017 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
10019 * mini.c: Clean up the usage of sig->pinvoke flag. Now
10020 only calls which are made to native code use this flag.
10022 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
10024 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
10025 varargs methods as well.
10027 * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
10028 which have save_lmf set. Reorganize methods prologs a bit.
10030 * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
10031 debugger to the proper place.
10033 2005-10-29 Martin Baulig <martin@ximian.com>
10035 * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
10036 when running inside the debugger until the debugger has support
10039 2005-10-26 Zoltan Varga <vargaz@gmail.com>
10041 * mini.h: Fix a warning.
10043 2005-10-24 Miguel de Icaza <miguel@novell.com>
10045 * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
10046 we expose publicly, this returns the string.
10048 2005-10-22 Zoltan Varga <vargaz@freemail.hu>
10050 * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
10051 with fp elimination.
10053 2005-10-21 Zoltan Varga <vargaz@gmail.com>
10055 * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
10056 native stacktrace using the glibc 'backtrace' function if available.
10058 2005-10-20 Zoltan Varga <vargaz@gmail.com>
10060 * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
10062 * mini-exceptions.c (mono_handle_native_sigsegv): New function to
10063 handle SIGSEGVs received while in native code.
10065 * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
10066 code, call mono_handle_native_sigsegv which will abort the runtime
10067 after printing some diagnostics, instead of converting it into a
10068 confusing NullReferenceException.
10070 2005-10-18 Zoltan Varga <vargaz@gmail.com>
10072 * cpu-pentium.md: Remove unused opcodes.
10074 2005-10-18 Zoltan Varga <vargaz@freemail.hu>
10076 * mini-amd64.h (MonoLMF): Add rsp field.
10078 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
10081 2005-10-17 Zoltan Varga <vargaz@gmail.com>
10083 * mini-codegen.c (get_register_spilling): Fix some warnings.
10085 2005-10-16 Zoltan Varga <vargaz@freemail.hu>
10087 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
10088 elimination during exception handling. Enable fp elimination by
10091 * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
10094 2005-10-16 Martin Baulig <martin@ximian.com>
10096 * mini-exceptions.c
10097 (mono_debugger_run_finally): New public method for the debugger.
10099 2005-10-10 Zoltan Varga <vargaz@gmail.com>
10101 * debug-mini.c (mono_debug_init_method): Fix warning.
10103 * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
10104 the 'exname' parameter const to fix some warnings.
10106 2005-10-09 Zoltan Varga <vargaz@freemail.hu>
10108 * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
10109 introduced by the previous patch.
10111 2005-10-08 Zoltan Varga <vargaz@gmail.com>
10113 * basic-float.cs: Add test for precision of float arithmetic.
10115 * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
10116 when loading/storing single values from/to memory.
10118 * mini.c (mono_jit_compile_method_with_opt): Create the function
10119 pointers in the correct domain.
10121 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
10123 * mini-exceptions.c (mono_handle_exception_internal): Fix bug
10124 introduced by previous patch.
10126 * mini-exceptions.c (mono_handle_exception_internal): Handle the case
10127 when out_filter_idx is NULL.
10129 * mini-exceptions.c: Don't run filter clauses twice during exception
10130 handling. Fixes #75755.
10132 2005-10-07 Zoltan Varga <vargaz@gmail.com>
10134 * aot.c: Add support for ldflda wrappers.
10136 * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
10139 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
10141 * mini.c, mini.h: do not consider exception handlers blocks when
10142 setting up interface variables.
10144 2005-10-04 Zoltan Varga <vargaz@freemail.hu>
10146 * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
10148 2005-10-03 Zoltan Varga <vargaz@gmail.com>
10150 * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
10151 causes a regression.
10153 * mini.c (mini_thread_cleanup): Fix reading of freed memory.
10155 2005-10-02 Zoltan Varga <vargaz@freemail.hu>
10157 * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
10158 of the OP_P definitions.
10160 * TODO: Add a proposal for dealing with the CEE/OP mess.
10162 * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm
10163 optimizations from the x86 port.
10165 * cpu-amd64.md: Ditto.
10167 * basic.cs basic-long.cs: Add tests.
10169 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
10171 * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
10172 Patrik Torstensson's implementation of my exception-handling
10173 optimization idea, when the exception object is not used
10176 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
10178 * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
10179 of the mul_imm optimizations from the old jit.
10181 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
10183 * mini.c, liveness.c: patch by Patrik Torstensson and
10184 Zoltan Varga to improve performance in methods with
10187 2005-09-30 Zoltan Varga <vargaz@gmail.com>
10189 * driver.c: Remove 'Globalization' entry from --version.
10191 2005-09-28 Zoltan Varga <vargaz@gmail.com>
10193 * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
10194 there is a profiler interested in JIT events.
10196 * aot.c: Load profile files produced by the AOT profiling module, and
10197 reorder methods based on the profiling info. Add a 'method_order' table
10198 to the AOT file to make mono_aot_find_jit_info work with the reordered
10201 * mini.h: Bump AOT file version info.
10203 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
10205 * mini-arm.h: work around what looks like a gcc bug when optimizations
10208 2005-09-28 Raja R Harinath <rharinath@novell.com>
10210 * Makefile.am (AM_CFLAGS): Don't use += to append inside
10211 conditionals. Use ...
10212 (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
10214 2005-09-27 Zoltan Varga <vargaz@freemail.hu>
10216 * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
10217 to determine the amount of memory to copy when passing valuetypes.
10219 * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
10220 4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
10222 2005-09-27 Zoltan Varga <vargaz@gmail.com>
10224 * mini.h mini.c aot.c: Add infrastructure to collect pagefault
10225 information about aot.
10227 2005-09-27 Ben Maurer <bmaurer@ximian.com>
10229 * *.c: Replace the use of {Enter,Leave}CriticalSection with
10230 macros. This will allow a deadlock debugger to easily be plugged
10233 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
10235 * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
10237 2005-09-27 Raja R Harinath <rharinath@novell.com>
10239 * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
10240 (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
10241 (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
10242 ($(arch_built)) [CROSS_COMPILING]: Error out.
10244 2005-09-26 Zoltan Varga <vargaz@gmail.com>
10246 * aot.c: Add support for the no_special_static flag for classes.
10248 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
10250 * Reapply reverted patches.
10252 * *: Revert r50174 as well.
10254 * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
10256 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
10258 * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
10260 2005-09-23 Miguel de Icaza <miguel@novell.com>
10262 * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
10263 part of the SIG_HANDLER_SIGNATURE.
10265 2005-09-23 Zoltan Varga <vargaz@gmail.com>
10267 * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
10270 * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention
10271 introduced by previous patch.
10273 2005-09-21 Zoltan Varga <vargaz@gmail.com>
10275 * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
10276 saved registers too.
10278 * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based
10279 upon the information returned by get_call_info ().
10281 * mini-x86.c (add_float): Fix stack size calculation.
10282 (mono_arch_call_opcode): Rewrite this so it works based up the
10283 information returned by get_call_info ().
10284 (mono_arch_get_this_vret_args): Ditto.
10286 2005-09-21 Zoltan Varga <vargaz@freemail.hu>
10288 * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
10289 in cinfo to determine the registers which need to be used.
10291 2005-09-20 Miguel de Icaza <miguel@novell.com>
10293 * driver.c (mono_main): Add --server and --desktop flags.
10295 2005-09-16 Zoltan Varga <vargaz@gmail.com>
10297 * mini-ia64.h: Make register masks 64 bit. Don't treat argument
10298 registers as global registers.
10300 * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no
10301 longer needed with the new register allocator.
10303 * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
10305 * cpu-ia64.md: Remove unused opcodes.
10307 * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
10309 2005-09-16 Zoltan Varga <vargaz@freemail.hu>
10311 * cpu-amd64.md: Remove unused opcodes.
10313 * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
10314 needed with the new register allocator.
10316 * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
10319 2005-09-16 Raja R Harinath <rharinath@novell.com>
10321 * Makefile.am (check-local): Don't invoke semdel-wrapper.
10323 2005-09-16 Martin Baulig <martin@ximian.com>
10325 * exceptions-amd64.c
10326 (throw_exception): Don't call mono_debugger_throw_exception() if
10327 we're a rethrow - see the FIXME in the code.
10329 2005-09-15 Geoff Norton <gnorton@customerdna.com>
10331 * mini.c (mono_init_exceptions): This only works on some architectures.
10333 2005-09-15 Zoltan Varga <vargaz@gmail.com>
10335 * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
10338 * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
10340 * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
10341 now in mini-exceptions.c.
10343 2005-09-15 Zoltan Varga <vargaz@freemail.hu>
10345 * mini-amd64.h mini-am64.c: Remove the altstack support code which is
10346 now in mini-exceptions.c.
10348 2005-09-15 Zoltan Varga <vargaz@gmail.com>
10350 * exceptions-x86.c: Applied patch from Patrik Torstensson
10351 <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
10353 * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
10354 code into mini-exceptions.c. Add some assertions to it.
10356 2005-09-12 Zoltan Varga <vargaz@gmail.com>
10358 * aot.c (emit_section_change): Applied patch from "The Software Team"
10359 (<software@solmersa.com>). Fix as errors on windows.
10361 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
10363 * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
10364 method info into the LMF.
10366 2005-09-11 Zoltan Varga <vargaz@gmail.com>
10368 * mini-ia64.c: Add proper unwind info for method epilogs.
10370 * exceptions-ia64.c: Add some code to help debugging.
10372 * mini-ia64.c mini-ia64.h: Add sigaltstack support.
10374 * mini-exceptions.c: Fix warning.
10376 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
10378 * mini.c: Really fix build.
10380 * mini-x86.c mini-amd64.c: Fix build.
10382 2005-09-11 Zoltan Varga <vargaz@gmail.com>
10384 * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
10386 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
10387 some Interlocked methods as intrinsics.
10389 * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
10390 for Thread methods as well.
10392 * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
10394 * inssel.brg: Add rule for OP_MEMORY_BARRIER.
10396 * mini-ia64.c mini-x86.c mini-amd64.c
10397 cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of
10400 * mini.c (mono_init_exceptions): Fix build breakage.
10402 2005-09-10 Zoltan Varga <vargaz@gmail.com>
10404 * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
10405 of instructions. Use the new ia64_unw_op macros for emitting unwind
10408 * mini.c (mono_init_exceptions): Initialize exception handling
10409 related trampolines at startup.
10411 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
10413 * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
10415 2005-09-09 Zoltan Varga <vargaz@gmail.com>
10417 * mini.c: Handle type loading errors gracefully during compilation and
10418 throw the appropriate exception.
10420 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
10422 * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
10423 for the mono binary.
10425 2005-09-09 Martin Baulig <martin@ximian.com>
10427 * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
10430 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
10432 * mini-arm.h: use emulation for conv.r.un for the release.
10434 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
10436 * mini-arm.c, objects.cs: more fixes and tests for them.
10438 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
10440 * mini-arm.c: align structures to at least 4 bytes to be able
10441 to keep our current optimized memcpy.
10443 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
10445 * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
10447 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10449 * mini.c: ignore SIGPIPE.
10451 2005-09-04 Zoltan Varga <vargaz@gmail.com>
10453 * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
10455 * mini-ia64.h mini-ia64.c: Add some minor optimizations.
10457 2005-09-02 Zoltan Varga <vargaz@gmail.com>
10459 * mini.h: Add prototype for mono_allocate_stack_slots_full.
10461 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
10463 * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
10464 exception handling support.
10465 * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
10466 patch by Brian Koropoff <briank@marakicorp.com>).
10468 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
10470 * mini.c: revert another 'optimization' which breaks when
10471 items on the eval stack need to be saved at a basic block end
10474 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10476 * jit-icalls.c: for arrays, ensure we always provide
10479 2005-08-30 Zoltan Varga <vargaz@gmail.com>
10481 * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
10483 * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
10485 2005-08-29 Zoltan Varga <vargaz@gmail.com>
10487 * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
10488 arguments in their original register.
10490 2005-08-28 Zoltan Varga <vargaz@gmail.com>
10492 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
10495 * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
10496 when ssapre is enabled.
10498 * inssel-long.brg: Fix bug in previous patch.
10500 * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize
10501 multiplication by a constant.
10503 2005-08-27 Zoltan Varga <vargaz@gmail.com>
10505 * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
10508 * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
10511 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
10513 * inssel-arm.brg: apply changes tested by Brian Koropoff
10514 <briank@marakicorp.com>.
10516 2005-08-25 Zoltan Varga <vargaz@gmail.com>
10518 * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
10520 2005-08-24 Zoltan Varga <vargaz@gmail.com>
10522 * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
10523 to the same register if dreg is just a base register.
10524 (print_ins): Improve printing of membase opcodes.
10526 * inssel-x86.brg: Add optimized ldind(reg) rules.
10528 * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
10530 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
10532 * mini.c: when running under valgrind, set the stack bottom for
10533 the GC at the actual approximate stack for the app (fixes running
10534 mono with valgrind).
10536 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
10538 * mini.c: do no break at the first valuetype to init found
10539 (fixes bug #75791).
10541 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
10543 * cpu-arm.md, mini-arm.c: more fixes and LMF support.
10545 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
10547 * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
10549 2005-08-23 Zoltan Varga <vargaz@freemail.hu>
10551 * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
10553 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
10555 * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
10557 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
10560 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
10563 * mini.c (optimize_branches): Don't quit after 1000 iterations on large
10566 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
10568 * tramp-arm.c: allocate less memory for the trampoline and fix typo.
10570 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
10572 * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
10573 in the tail recursion optimization.
10575 * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as
10576 debug info into the assembly file.
10578 * iltests.il: Add test for filter regions.
10580 * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
10581 initial stack of filter regions. Fixes #75755.
10583 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
10585 * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
10586 stack requirements.
10588 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
10590 * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
10591 the check for an already compiled method on non-ia64 platforms.
10592 (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
10595 * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
10597 * inssel-x86.brg: Add some optimized call rules.
10599 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
10601 * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
10604 * mini.h mini-trampolines.c: Pass the trampoline argument to
10605 mono_arch_patch_delegate_trampoline.
10607 * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
10609 * mini-trampolines.c: Fix build.
10611 * mini-amd64.h: Add delegate trampolines.
10613 * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
10615 * inssel-amd64.brg: Add optimized call rules.
10617 * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
10619 * inssel-ia64.brg: Add optimized ldind(reg) rules.
10621 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
10623 * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
10626 * mini-ia64.c: Remove LMF fixmes.
10628 * mini-ia64.h: Remove most fields from LMF.
10630 * inssel-ia64.brg (stmt): Fix unaligned access errors.
10632 * mini-trampolines.c: Add support for IA64 function descriptors.
10634 * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
10635 for IA64 function descriptors.
10637 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
10639 * tramp-arm.c: patch the vtable for virtual calls. Added
10640 support code to register/unregister the LMF.
10641 * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
10644 2005-08-19 Dick Porter <dick@ximian.com>
10646 * mini.c: Use a gsize to store the thread ID, so it can hold a 64
10647 bit value if needed.
10649 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
10651 * mini.c (mini_get_method): Move handling of wrapper data here.
10653 * mini.c (mono_method_to_ir): Add support for dynamic methods.
10655 * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
10658 * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so
10659 bblock->code does not remain empty.
10661 2005-08-17 Zoltan Varga <vargaz@freemail.hu>
10663 * arrays.cs: Add regression test for #75832.
10665 * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
10666 rules. Fixes #75832.
10668 * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
10669 instruction scheduling.
10671 2005-08-12 Zoltan Varga <vargaz@freemail.hu>
10673 * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
10675 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
10677 * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
10679 * mini-codegen.c: Fix VC build.
10681 * cpu-pentium.md: Increase length of atomic_exhange_i4.
10683 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10685 * mini.h: fix signature for mono_register_opcode_emulation.
10687 2005-08-09 Zoltan Varga <vargaz@freemail.hu>
10689 * mini.c: Get rid of most of the helper_sig_... constants using
10690 mono_create_icall_signature ().
10692 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
10694 * jit-icalls.c (helper_ldstr): New helper function.
10696 * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
10698 * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
10699 throw, load the string using a helper call instead of creating a string object.
10701 * aot.c: Update after LDSTR changes.
10703 * mini.h: Bump AOT file version.
10705 * aot.c: Save class size info into the AOT file. Print more statistics during
10708 * mini.h: Bump AOT file version.
10710 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
10711 ordering of disasm cases. Fixes #74957.
10713 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
10715 * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
10716 jit-icalls.c, mini-codegen.c, Makefile.am: changes in
10717 the generic code needed for the ARM port.
10719 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
10721 * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
10722 inssel-arm.brg: more ARM features and fixes.
10724 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
10726 * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
10727 ARM port work in progress.
10729 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
10731 * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
10733 * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
10735 * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
10737 * inssel.brg (mini_emit_memset): Add support for unaligned access.
10739 * *-ia64.*: Ongoing IA64 work.
10741 * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
10743 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
10745 * TODO: Remove out-of-data todo stuff.
10747 * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
10750 * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
10752 * mini.h: Bump corlib version.
10754 2005-07-27 Martin Baulig <martin@ximian.com>
10757 (create_copy_ins): Added `const unsigned char *ip' argument; set
10758 `copy->cil_code' from it.
10760 2005-07-27 Martin Baulig <martin@ximian.com>
10762 * mini-exceptions.c (mono_handle_exception): Don't call
10763 mono_debugger_handle_exception() for filters.
10765 2005-07-27 Zoltan Varga <vargaz@freemail.hu>
10767 * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
10770 2005-07-26 Martin Baulig <martin@ximian.com>
10772 Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
10774 * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
10775 helper_compile_generic_method() if the method is actually virtual
10778 2005-07-26 Martin Baulig <martin@ximian.com>
10781 (trampoline_code): Renamed to `mono_trampoline_code' and made it
10782 public; this is now accessed directly by the debugger.
10783 (mono_generic_trampoline_code): Removed.
10786 (mono_debug_init_method): Also add interncalls and wrappers.
10788 2005-07-23 Zoltan Varga <vargaz@freemail.hu>
10790 * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
10792 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
10794 * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
10796 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
10798 * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
10800 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
10802 * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
10803 getting TLS offsets on AMD64 too.
10805 2005-07-20 Kornél Pál <kornelpal@hotmail.com>
10807 * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
10809 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
10811 * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
10812 inssel-arm.brg, mini-arm.h: ARM port work in progress.
10814 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
10816 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
10818 * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
10821 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call
10822 mono_sparc_is_virtual_call ().
10824 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
10826 * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
10827 trampoline parameters.
10829 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
10831 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
10832 to mono_arch_get_vcall_slot_addr.
10834 * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
10837 * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
10839 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
10841 * mini-ia64.h mini-ia64.c: Finish pinvoke support.
10843 2005-07-19 Martin Baulig <martin@ximian.com>
10845 * exceptions-amd64.c (throw_exception): Call
10846 mono_debugger_throw_exception() here like we're doing it on i386.
10848 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
10850 * mini-ia64.c: Add optimized TLS access support.
10852 2005-07-18 Zoltan Varga <vargaz@freemail.hu>
10854 * mini-exceptions.c: Ongoing IA64 work.
10856 * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
10858 * mini.c: Use the default optimization set when embedding. Fixes
10861 2005-07-11 Zoltan Varga <vargaz@freemail.hu>
10863 * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts
10864 of trampolines to a separate file.
10866 * mini-trampolines.c: New file.
10868 * mini.h tramp-x86.c: Move arch independent parts of trampolines to a
10871 * tramp-x86.c: Reorganize the trampoline code to be similar to the
10874 * mini-codegen.c: Fix cygwin build.
10876 2005-07-10 Zoltan Varga <vargaz@freemail.hu>
10878 * mini.c: Add some minor changes needed by the IA64 port.
10880 * *-ia64.*: Ongoing IA64 work.
10882 2005-07-09 Zoltan Varga <vargaz@freemail.hu>
10884 * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split
10885 trampolines into arch-independent and arch-dependent parts.
10887 * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
10889 2005-07-08 Zoltan Varga <vargaz@freemail.hu>
10891 * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
10893 * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
10894 the xp-regalloc-branch for amd64.
10896 * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
10897 xp-regalloc-branch for x86.
10899 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
10901 * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
10903 2005-07-06 Martin Baulig <martin@ximian.com>
10906 (mono_jit_compile_method_inner): Call mono_get_inflated_method().
10907 (mono_jit_runtime_invoke): Likewise.
10909 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
10911 * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
10914 * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
10915 without loading their metadata. Reorganize the file format so exception handling+
10916 debug info is kept separate from normal method info. Create MonoJitInfo
10917 structures for methods lazily.
10919 * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
10921 (x86_class_init_trampoline): Patch AOT class init trampolines too.
10923 * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
10925 * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
10928 * mini.h: Bump AOT file version.
10930 2005-07-04 Zoltan Varga <vargaz@freemail.hu>
10932 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10934 2005-07-01 Raja R Harinath <rharinath@novell.com>
10936 * Makefile.am (check-local): Call semdel-wrapper.
10938 2005-06-29 Zoltan Varga <vargaz@freemail.hu>
10940 * mini-x86.c: Revert the last change as it seems to break the build..
10942 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
10944 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10946 * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
10948 2005-06-27 Ben Maurer <bmaurer@ximian.com>
10950 * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
10951 outside of the macro, so strange stuff doesn't happen with gcc4
10952 (NEW_AOTCONST_TOKEN): Likewise.
10954 2005-06-28 Martin Baulig <martin@ximian.com>
10956 * mini.c (mini_class_is_system_array): New static method; use this
10957 instead of `klass->parent == mono_defaults.array_class' everywhere
10958 since this also works for the new generic array class.
10960 2005-06-26 Ben Maurer <bmaurer@ximian.com>
10962 * inssel.brg: Remove warnings.
10964 2005-06-24 Zoltan Varga <vargaz@freemail.hu>
10966 * mini-ia64.c: Ongoing IA64 work.
10968 * basic-float.cs: Add float->i1 conversion test.
10970 * iltests.il: Add conv.u4 test.
10972 2005-06-23 Zoltan Varga <vargaz@freemail.hu>
10974 * inssel-long.brg: Fix bug caused by last change.
10976 2005-06-23 Geoff Norton <gnorton@customerdna.com>
10978 * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other
10979 BSDs. Allows the x86 JIT to work on OSX86
10981 2005-06-22 Zoltan Varga <vargaz@freemail.hu>
10983 * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
10986 * mini-ia64.c: Ongoing IA64 work.
10988 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
10990 * mini-ia64.c: Ongoing IA64 work.
10992 * driver.c: Clean up jit_code_hash as well when using --regression.
10994 * inssel-long.brg: Fix long->i4/u4 conversion rules.
10996 * basic-long.cs: Add tests for long->u4 conversion.
10998 2005-06-18 Ben Maurer <bmaurer@ximian.com>
11000 * mini.c: Take mono_get_domainvar out of macros. This makes sure
11001 that we do not depend on undefined C behavior: the order stuff
11002 gets evaluated within an expression. Fixes mono when compiled on
11005 2005-06-18 Zoltan Varga <vargaz@freemail.hu>
11007 * *-ia64.*: Ongoing IA64 work.
11009 * aot.c: Lower memory usage while loading AOT methods.
11011 * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
11013 * mini.h: Bump AOT file format version.
11015 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
11017 * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
11019 2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
11021 * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
11022 not on callee assembly). Fixed some comments.
11024 2005-06-16 Zoltan Varga <vargaz@freemail.hu>
11026 * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
11027 it gets proper disassembly.
11028 (emit_method_info): Remove some dead code.
11030 * mini.c (mini_method_compile): Allways allocate the GOT var in
11031 mono_method_to_ir for emulating opcodes.
11033 2005-06-13 Zoltan Varga <vargaz@freemail.hu>
11035 * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
11036 before freeing the code memory. Fixes #74990.
11038 * objects.cs: Add regression test for #74992.
11040 * liveness.c: Extend live ranges of arguments to the beginning of the
11041 method. Fixes #74992.
11043 * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
11044 so it points into the faulting instruction.
11046 2005-06-12 Zoltan Varga <vargaz@freemail.hu>
11048 * jit-icalls.c (mono_imul_ovf): Add exception handling.
11050 * *-ia64.*: Ongoing IA64 work.
11052 * mini.c (mini_init): Fix signature of mono_delegate_ctor.
11054 2005-06-11 Zoltan Varga <vargaz@freemail.hu>
11056 * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
11058 * *-ia64.*: Ongoing IA64 work.
11060 2005-06-10 Zoltan Varga <vargaz@freemail.hu>
11062 * basic-long.cs: Add tests for add/sub.ovf.
11064 * basic.cs: Add tests for sub.ovf.
11066 * *-ia64.*: Ongoing IA64 work.
11068 2005-06-09 Zoltan Varga <vargaz@freemail.hu>
11070 * *-ia64.*: Ongoing IA64 work.
11072 * basic.cs: Add conv.ovf.i4.un test.
11074 2005-06-09 Massimiliano Mantione <massi@ximian.com>
11076 * mini.c: (remove_block_if_useless) Fixed bug 75061.
11078 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11080 * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
11082 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
11084 * *-ia64.*: Ongoing IA64 work.
11086 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11089 * mini.c: added the ability to toggle trace on/off using SIGUSR2.
11091 2005-06-04 Zoltan Varga <vargaz@freemail.hu>
11093 * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
11095 2005-06-03 Zoltan Varga <vargaz@freemail.hu>
11097 * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
11099 * mini-amd64.c (amd64_patch): Add an assert to check that the destination
11100 of a call is callable by a near call.
11102 2005-05-31 Zoltan Varga <vargaz@freemail.hu>
11104 * mini-ia64.c: Ongoing IA64 work.
11106 2005-05-29 Zoltan Varga <vargaz@freemail.hu>
11108 * genmdesc.c: Make the generated array non-static.
11110 * inssel-long.brg: Fix LSHR_IMM rule.
11112 * *-ia64.*: Ongoing IA64 work.
11114 * *-ia64.*: Ongoing IA64 work.
11116 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
11118 * *-ia64.*: Ongoing IA64 work.
11120 * *-ia64.*: Ongoing IA64 work.
11122 * mini-ia64.c: Ongoing IA64 work.
11124 * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
11126 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
11128 * objects.cs basic-calls.cs: Move some tests to objects.cs.
11130 * objects.cs basic-long.cs: Move some tests to objects.cs.
11132 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
11134 * *-ia64.*: Ongoing IA64 work.
11136 * iltests.il: Add a new test.
11138 * mini.c (mono_method_to_ir): Initialize valuetypes when created using
11139 newobj. Fixes #75042.
11141 2005-05-22 Zoltan Varga <vargaz@freemail.hu>
11143 * *-ia64.*: Ongoing IA64 work.
11145 * *-ia64.*: Ongoing IA64 work.
11147 * *-ia64.*: Ongoing IA64 work.
11149 * basic.cs objects.cs: Move tests accessing static variables as well.
11151 * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
11153 2005-05-21 Zoltan Varga <vargaz@freemail.hu>
11155 * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
11157 * driver.c: Always print failed tests.
11159 * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
11162 * *ia64*: Ongoing IA64 work.
11164 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
11166 * basic.cs: Add tests for add.ovf. Fix warnings.
11168 2005-05-18 Miguel de Icaza <miguel@novell.com>
11170 * driver.c (mono_main): Avoid crash if no argument is passed to
11171 --break; Do not use g_error, but f_printf. And fix all other
11172 ocurrences of the same crash.
11174 2005-05-17 Zoltan Varga <vargaz@freemail.hu>
11176 * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
11177 and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
11180 2005-05-14 Zoltan Varga <vargaz@freemail.hu>
11182 * *-ia64.*: Add beginnings of IA64 backend.
11184 * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.
11186 2005-05-13 Zoltan Varga <vargaz@freemail.hu>
11188 * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
11191 * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
11193 * mini-amd64.c: Fix a warning.
11195 2005-05-10 Zoltan Varga <vargaz@freemail.hu>
11197 * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
11198 in float_neg. Fixes #74897.
11200 * mini-amd64.c (emit_call): Fix another near call bug.
11202 2005-05-06 Sebastien Pouliot <sebastien@ximian.com>
11204 * declsec.c: Keep the appdomain information in the structure. Added a
11205 missing "return FALSE" for Unmanaged if FullTrust is set (or else the
11206 value gets overwritten).
11207 * declsec.h: Set the default MonoArray for the the stack to 6. Added
11208 an MonoAppDomain member to MonoSecurityFrame.
11209 * mini-exceptions.c: Do not use a glist to keep GC allocated objects
11210 used in the stack walk. Now use a MonoArray which grow (double) when
11213 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
11215 * mini.c: Re-enabled runtime cleanup, since running threads should
11216 now properly stop when exiting.
11218 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
11220 * mini-codegen.c: New file contaning the arch-independent local
11221 register allocator. Not used by any architectures yet.
11223 * mini.h linear-scan.c: Merge some changes from the
11224 mini-xp-local-regalloc branch.
11226 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
11228 * mini-amd64.c (emit_call): Fix calls to native functions when the
11229 runtime is compiled as a shared library. Fixes #74756.
11231 * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
11232 on a literal field. Fixes #74751.
11234 2005-04-25 Raja R Harinath <rharinath@novell.com>
11236 * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
11238 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
11240 * objects.cs: Add missing null casting test.
11242 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
11244 * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
11245 in wrapper methods. Also rename 'address' variable to 'offset'.
11247 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
11249 * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
11252 * Makefile.am (MCS): Use -unsafe instead of --unsafe.
11254 * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
11257 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
11259 * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
11261 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
11263 * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
11264 just the last bytes.
11266 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
11268 * aot.c (mono_compile_assembly): Fix warning.
11270 * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
11271 by the _MSC_VER stuff.
11273 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
11275 * inssel-long.brg: Fix #74588.
11277 * cpu-amd64.md: Fix #74591.
11279 * iltests.il: Add new regression tests.
11281 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
11283 * trace.c (mono_trace_enter_method): Print enums as an int, not as a
11286 2005-04-11 Zoltan Varga <vargaz@freemail.hu>
11288 * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
11290 * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches
11291 from Bill Middleton <flashdict@gmail.com>.
11293 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
11295 * arrays.cs: Add new regression test. Fix warnings.
11297 2005-04-09 Zoltan Varga <vargaz@freemail.hu>
11299 * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
11300 and leakage in CKFINITE.
11302 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
11303 this to a null op since it is called on amd64 too.
11305 * exceptions-amd64.c (get_throw_trampoline): Align stack.
11307 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
11308 body since this is not used on amd64.
11310 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
11312 * mini-amd64.c: Remove obsolete fixmes.
11314 * mini.c (print_method_from_ip): Fix debugging support.
11316 2005-2-1 Massimiliano Mantione <massi@ximian.com>
11318 * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
11319 so that expressions that don't give much gain are not reduced.
11320 * ssapre.h: Likewise.
11322 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
11324 * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
11326 * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
11328 * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
11330 2005-04-01 Zoltan Varga <vargaz@freemail.hu>
11332 * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
11334 * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
11336 2005-03-31 Zoltan Varga <vargaz@freemail.hu>
11338 * mini-x86.c: If sigaltstack support is enabled, perform win32 style
11341 * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
11343 * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
11345 * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
11347 * mini-x86.h mini-x86.c exceptions-x86.c: Add support for
11348 MONO_ARCH_USE_SIGACTION. Fixes #74252.
11350 * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
11352 * mini-x86.c: Fix up stack overflow handling.
11354 * exceptions.cs: Add new regression test.
11356 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
11358 * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
11359 mono_jit_thread_attach.
11361 * mini.c (mono_method_to_ir): Verify called method is not abstract.
11363 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
11365 * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
11366 avoid calling constructors using callvirt.
11368 * inssel.brg: Fix #74073.
11370 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
11372 * aot.c, mini.h: Added mono-compiler.h header to allow/ease
11373 compilation with non-GCC compilers.
11374 * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
11375 possible using VS.NET. Adapted from the work of J Lothian (for VC6).
11377 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
11379 * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
11380 klass->interface_offsets (will likely fix bug#74073).
11382 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
11384 * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
11386 2005-03-28 Zoltan Varga <vargaz@freemail.hu>
11388 * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
11389 to amd64_div_reg_size ().
11391 * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
11393 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
11395 * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
11397 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
11399 * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
11401 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
11403 * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
11405 * mini.c (mono_precompile_assembly): Load and precompile referenced
11406 assemblies as well. Fixes #74015.
11408 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
11410 * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
11412 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
11414 * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
11415 a lot of checks and (anyway) permissions cannot work until corlib is
11418 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
11420 * mini-ppc.c: fixed ABI issue on sysv/ppc.
11422 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
11424 * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
11425 calls (fixes bug#72824).
11427 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
11429 * mini.c: fix tail recursion elimination (see test in bug#73936).
11431 2005-03-21 Zoltan Varga <vargaz@freemail.hu>
11433 * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
11434 some fp functions in sse2 mode.
11436 2005-03-20 Zoltan Varga <vargaz@freemail.hu>
11438 * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
11440 2005-03-19 Zoltan Varga <vargaz@freemail.hu>
11442 * mini.h mini.c: Add mono_get_jit_tls_key ().
11444 * mini-x86.c: Enable fast TLS support on windows.
11446 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
11448 * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
11449 * mini.c: Check for p/invoke method when generating code. If a
11450 p/invoke method, or it's class, isn't decorated with [Suppress
11451 UnmanagedCodeSecurity] then generate code to call System.Security.
11452 UnmanagedDemand (only if the security manager is active).
11454 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
11456 * tramp-amd64.c (create_specific_trampoline): Revert parts of the
11457 last change as it seems to cause strange crashes.
11459 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11461 * *.c: handle unsafe function pointers where needed.
11463 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
11465 * mini.c (mono_jit_free_method): Remove the fixme too.
11467 2005-03-15 Miguel de Icaza <miguel@novell.com>
11469 * mini.c: As discussed, make the code actually free the delegate
11470 thunk now, to enable the debugging of delegate problems, use
11471 MONO_DEBUG=1 when running Mono.
11473 This takes also care of parts of the leaks as seen by Joe.
11475 2005-03-15 Zoltan Varga <vargaz@freemail.hu>
11477 * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable
11478 thread_tls_offset calculation.
11480 2005-03-14 Sebastien Pouliot <sebastien@ximian.com>
11482 * declsec.c: Reworked linkdemand checks for icall. The previous code
11483 was using the declaration code (untrusted) and didn't work as expected
11484 with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
11487 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
11489 * iltests.il: Add new localloc test.
11491 * mini-amd64.c: Handle large stack allocations the same way as on
11492 windows if stack overflow handling is working.
11494 * mini-amd64.c: Allocate the signal stack using mmap.
11496 * mini.c (sigsegv_signal_handler): Fix reading of context.
11498 * mini-exceptions.c: Fix up stack overflow handling.
11500 * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
11502 * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
11504 * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
11506 * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
11508 * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
11509 tramp_init functions as they are no longer needed.
11511 2005-03-12 Zoltan Varga <vargaz@freemail.hu>
11513 * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
11515 * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
11517 * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
11519 * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
11522 * mini-ops.h: Add OP_LMUL_IMM.
11524 * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
11525 long mul/div opcodes as intrinsic.
11527 * mini-amd64.c (emit_call): Handle the case when the callee might be
11530 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
11532 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
11535 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
11537 * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
11539 2005-03-09 Ben Maurer <bmaurer@ximian.com>
11541 * mini.c (mono_codegen): Don't leak here, to help people running
11544 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
11546 * mini-amd64.c (mono_arch_output_basic_block): Fix int->float
11547 conversions in sse2 mode.
11549 * basic-float.cs: Add regression test.
11551 * mini-amd64.c: Reenable sse2.
11553 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
11555 * mini-amd64.c: Disable sse2 until some regressions are fixed.
11557 2005-03-07 Joerg Rosenkranz <joergr@voelcker.com>
11559 * driver.c: Copyright text should include 2005.
11561 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
11563 * cpu-amd64.md (load_membase): Fix more max lengths.
11565 2005-03-06 Zoltan Varga <vargaz@freemail.hu>
11567 * cpu-amd64.md (load_membase): Fix max length.
11569 * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
11571 * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
11573 * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
11574 support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
11576 * basic-float.cs: Add rounding regression test.
11578 * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
11580 2005-03-04 Neale Ferguson <NealeFerguson@earthlink.net>
11582 * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
11583 structures in registers for pinvoke wrappers.
11585 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
11587 * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
11589 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
11591 * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
11592 wrapper to mono_jit_thread_attach.
11594 * mini.c (mini_jit_thread_attach): New jit icall.
11596 * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in
11597 native->managed wrappers.
11599 * exceptions.cs: Add new regression test.
11601 * mini.c (optimize_branches): Check regions in the cbranch to throw
11602 block case as well. Fixes #73242.
11604 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
11606 * mini.c: thread safety fixes.
11608 2005-02-27 Zoltan Varga <vargaz@freemail.hu>
11610 * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
11611 patching stuff, since delegates use jump trampolines so there is
11614 * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in
11617 * tramp-amd64.c: Fix build.
11619 * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
11620 it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
11622 * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
11623 Rename this to mono_arch....
11624 (mono_amd64_get_delegate_method_ptr_addr): Ditto.
11626 * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
11628 * mini-amd64.c (emit_call): If both the caller and the callee is
11629 guaranteed to have 32 bit addresses, emit a normal call.
11631 * tramp-amd64.c: Adapt to changes in mini-amd64.c.
11633 * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines.
11634 * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
11635 method_ptr inside delegates.
11637 2005-02-26 Zoltan Varga <vargaz@freemail.hu>
11639 * mini.c (mono_jit_free_method): Free the method info even if the native code is
11640 invalidated. Fixes #73001.
11642 * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
11644 * mini-x86.c: Only use stdcall for pinvokes on windows.
11646 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
11648 * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
11649 * mini-x86.c: remove unreliable __thread var offset detection,
11650 use the correct accessors and enable by default.
11652 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
11654 * mini.c (mono_jit_free_method): Fix memory leak.
11656 2005-02-22 Zoltan Varga <vargaz@freemail.hu>
11658 * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW.
11660 2005-02-21 Zoltan Varga <vargaz@freemail.hu>
11662 * cpu-amd64.md: Fix lengths of atomic opcodes.
11664 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
11666 * driver.c: try to not imply using ICU is any good.
11668 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
11670 * mini-amd64.c (mono_arch_get_inst_for_method): Implement more
11671 functions as inline ops.
11673 * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
11674 some Interlocked functions as inline ops.
11676 * mini.c (move_basic_block_to_end): Fix bug in last patch.
11678 * mini.h (MonoBasicBlock): Reorganize fields a bit.
11680 * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
11682 * mini.c: Add support for OP_NOT_TAKEN.
11684 * mini-amd64.h mini-amd64.c: Add support for passing/returning small
11685 structures in registers for pinvoke wrappers.
11687 * mini-amd64.c: Fix warnings.
11689 2005-02-19 Zoltan Varga <vargaz@freemail.hu>
11691 * mini.h (MonoCompile): Add 'ret_var_is_local' field.
11693 * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
11695 * mini.c (NEW_RETLOADA): If the ret variable is a local, use its
11696 address instead of loading the address from it.
11698 * mini-x86.c: Add support for returning small structs in registers
11699 on Win32. Fixes part of #70864.
11701 2005-02-18 Zoltan Varga <vargaz@freemail.hu>
11703 * trace.c (get_token): Improve error checking.
11705 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
11707 * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
11709 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
11711 * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
11712 it can be reused for MonoClass.
11713 * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
11716 2005-02-15 Sebastien Pouliot <sebastien@ximian.com>
11718 * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code
11719 instead of a MonoReflectionMethod. The method information wasn't used
11720 when displaying SecurityException details (but will be now).
11722 2005-02-15 Atsushi Enomoto <atsushi@ximian.com>
11724 * Makefile.am : windows build fix.
11726 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
11728 * iltests.il: Add new regression test.
11730 * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
11733 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
11735 * mini.c: Moved linkdemand check into helper function check_linkdemand
11736 to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP,
11739 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
11741 * declsec.c: Added statistics counter for different kinds of
11743 * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
11744 (and commented) declaration.
11745 * mini.c: Added statistics counter for security Demand code
11746 generation. Added display of security statistics.
11748 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
11750 * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
11751 Fix compilation errors under gcc-2.95.
11753 2005-02-12 Ben Maurer <bmaurer@ximian.com>
11755 * mini.c, driver.c: Use the new jit trampoline hashtable
11757 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11759 * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
11761 2005-02-11 Martin Baulig <martin@ximian.com>
11763 * debug-mini.c (mono_debug_close_method): Free the line number array.
11765 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
11767 * aot.c: Break up large methods into smaller ones. Share GOT slots for
11770 * mini.h: Bump AOT file format version.
11772 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
11774 * declsec.c: Added LinkDemand support and it's special cases for ECMA,
11776 * declsec.h: Added macros to get/set lazyly initialized security
11777 informations about assemblies. Added new enum for different type of
11778 possible LinkDemand violation. Added function to check LinkDemands.
11779 * mini.h: Added a field to MonoCompile to hold any security violation
11780 detected when JITting a method (so it can be thrown later).
11781 * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL
11782 and CEE_CALLVIRT. Added code to throw exception at the end of
11783 mini_method_compile (note: the exception is unhandled right now).
11785 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
11787 * mini.c, jit-icalls.c: use the managed implementation of
11788 memset for initobj and memset, to avoid managed <-> unmanaged
11791 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
11793 * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
11794 optimization if it would need a GOT var.
11796 * basic.cs: Add tests for constant propagation and switch statements.
11798 * ssa.c: Fix out-of-range constant propagation and switch statements.
11800 2005-02-09 <vargaz@freemail.hu>
11802 * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
11804 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
11806 * cpu-amd64.md (load_membase): Fix max length of load_membase.
11808 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11810 * mini.c: update to new signature of mono_class_get_allocation_ftn().
11812 2005-02-06 Neale Ferguson <NealeFerguson@earthlink.net>
11814 * cpu-s390.md, mini-s390.c: Correct bug with register usage on certain
11815 arithmetic operations.
11817 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
11819 * mini-ppc.c: add a workaround for broken user code that
11820 DllImports vararg functions with non-vararg signatures.
11822 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
11824 * mini.c (mono_jit_compile_method_inner): Add detection and a
11825 meaningfull error message for assemblies written in Managed C++.
11827 * tramp-amd64.c mini-amd64.h: Add support for
11828 create_trampoline_from_token ().
11830 * aot.c mini-x86.c abcremoval.c: Applied patch from
11831 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
11833 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
11835 * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline
11836 which takes a MonoImage/token as parameter instead of a MonoMethod.
11838 * aot.c: Use the new trampoline for initializing vtables.
11840 * aot.c: Add support for ldfld/stfld_remote wrappers.
11842 * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
11843 rules for compare <MEM>, IMM.
11845 * mini.h (MONO_AOT_FILE_VERSION): Bump it.
11847 * aot.c: Handle inherited finalizers correctly.
11849 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
11851 * inssel.brg (stmt): Add a missing _setup_... ().
11853 * aot.c: Save some parts of the class state to the AOT file and use it
11854 to recompute that state when a class is initialized.
11856 * mini.c: Install AOT hooks into the runtime.
11858 * mini.h: Bump AOT file format version.
11860 * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
11863 * iltests.il: Add new test.
11865 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
11867 * mini.c: fix typo.
11869 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
11871 * mini.c: setup the statistical profiler in the thread attach
11872 callback to cope with the new single thread code.
11874 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
11876 * mini-ppc.c: ensure we have enough room for the profiler
11877 calls (fixed bug#72084).
11879 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
11881 * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding
11884 2005-2-1 Massimiliano Mantione <massi@ximian.com>
11886 * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
11888 2005-2-1 Massimiliano Mantione <massi@ximian.com>
11890 * ssapre.c: Fixed an issue with down safety (this allows IronPython
11891 to succesfully execute parrotbench).
11892 * ssapre.h: Likewise.
11894 2005-2-1 Massimiliano Mantione <massi@ximian.com>
11896 * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
11897 variable for stores to method arguments (fixes a SSAPRE issue).
11899 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11901 * mini.c: handle value types in dup, fixes gen-112.cs.
11903 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
11905 * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
11906 sequence for calls in dynamic methods to avoid thunks.
11908 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
11910 * mini.c: correctly remove dynamic methods from the hashtable.
11912 2005-1-20 Massimiliano Mantione <massi@ximian.com>
11914 * driver.c: Disabled SSAPRE until fix the bug that appears
11915 in IronPython's parrotbench.
11917 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
11919 * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
11921 * mini.c (mono_method_to_ir): Revert the previous change.
11923 * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
11924 when AOT compiling.
11926 * tramp-x86.c (x86_magic_trampoline): Avoid calls to
11927 mono_jit_info_table_find () etc. when running under valgrind.
11929 * inssel.brg: Fix warnings.
11931 * mini-exceptions.c: Fix warnings.
11933 2005-01-31 Martin Baulig <martin@ximian.com>
11935 * driver.c (compile_all_methods_thread_main): Don't try to compile
11936 generic methods or anything which has type parameters.
11938 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
11940 * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
11942 * TestDriver.cs: Add --verbose flags.
11944 * graph.c ssa.c: Fix 64 bit warnings.
11946 * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c
11947 trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
11948 Fix 64 bit warnings.
11950 * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
11951 variable not spotted by gcc.
11953 * mini-amd64.c inssel-amd64.brg: Applied patch from
11954 Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of
11955 X86_COMPARE_MEMBASE opcodes.
11957 * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
11959 2005-01-29 Ben Maurer <bmaurer@ximian.com>
11961 * *: MonoMethod->signature might be NULL now. You *MUST* use
11962 mono_method_signature.
11964 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
11966 * driver.c (compile_all_methods_thread_main): Compile the methods
11967 without invoking cctors.
11969 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11971 * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
11972 * basic-calls.cs: test for the above.
11974 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
11976 * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after
11977 MonoJitInfo changes.
11979 2005-01-27 Zoltan Varga <vargaz@freemail.hu>
11981 * mini-exceptions.c (mono_handle_exception): Compute the stack trace
11982 eagerly if it contains dynamic methods.
11984 * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
11986 * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
11987 trace, it is now computed by an icall from trace_ips.
11989 * mini-exceptions.c: Fix a warning.
11991 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
11993 * mini-exceptions.c: don't bother getting stack trace info if
11994 it's not going to be used.
11996 2005-01-27 Raja R Harinath <rharinath@novell.com>
11998 * Makefile.am (common_sources): Add ssapre-cee-ops.h and
12001 2005-01-26 Zoltan Varga <vargaz@freemail.hu>
12003 * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
12005 * aot.c: Avoid calling mono_method_get_header () if not needed.
12007 * mini.h: Bump AOT file format version.
12009 * mini.c (mono_emit_native_call): Allocate a GOT var here.
12011 * mini.c (mono_print_tree): Print more info for calls.
12013 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
12015 * declsec.h: Remove warning by adding missing include for marshal.h
12017 2005-01-26 Martin Baulig <martin@ximian.com>
12019 * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
12022 2005-01-25 Zoltan Varga <vargaz@freemail.hu>
12024 * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
12027 * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
12029 * aot.c (mono_compile_assembly): Fix a warning.
12031 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
12033 * declsec.c: Look for security attributes on the original MonoMethod
12034 (and not the wrapped one). This fix permissions on icalls.
12036 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
12038 * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
12040 * mini.c (mono_allocate_stack_slots): Add a fixme.
12042 * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
12044 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
12046 * inssel.brg: optimize casts of sealed types (more
12047 optimizations waiting for fixes in remoting).
12049 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
12051 * inssel.brg (stmt): Add another dummy rule.
12053 * driver.c: Fix warnings.
12055 * driver.c (mono_main): If running under valgrind, instruct glib to use
12056 the system allocation functions so valgrind can track the memory
12057 allocated by the g_... functions.
12059 * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
12061 * mini-ops.h: Add OP_DUMMY_STORE opcode.
12063 * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
12065 * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
12066 variables in try regions.
12068 * mini.c (mini_method_compile): Don't disable optimizations on large
12069 methods when AOT compiling.
12071 * mini.c (mono_allocate_stack_slots): New arch independent method to
12072 allocate stack slots. Not yet used.
12074 2005-01-22 Ben Maurer <bmaurer@ximian.com>
12076 * debug-mini.c (mono_debug_close_method): Plug some leaks.
12078 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
12080 * mini-ppc.c: make the branch info relative as the code
12081 buffer can be reallocated.
12083 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
12085 * aot.c: Allow decoding of the new MONO_PATCH_INFO_DECLSEC.
12086 * driver.c: Removed the AOT/security restriction. Now initialize the
12087 security manager (in metadata) if --security is used.
12088 * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
12089 rather than the pointer to declarative security, when AOT is used.
12091 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
12093 * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
12094 basic blocks, reduced intrinsic exception throwing code size.
12096 2005-01-22 Miguel de Icaza <miguel@ximian.com>
12098 * driver.c (mini_usage): Reorder the usage screen.
12100 2005-01-21 Zoltan Varga <vargaz@freemail.hu>
12102 * mini.c (mono_resolve_patch_target): Fix warning.
12104 2005-01-20 Zoltan Varga <vargaz@freemail.hu>
12106 * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
12109 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
12111 * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
12112 breaks the amd64 build.
12114 * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem
12115 register allocation. Fixes #71454.
12117 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
12119 * arrays.cs: Add new regression test.
12121 2005-1-20 Massimiliano Mantione <massi@ximian.com>
12123 * ssapre.c: Turned usage of snprintf to GString.
12124 * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
12125 (I left it on by mistake in my previous commit).
12127 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
12129 * mini.c, cfold.c, basic-calls.cs: preserve side effects
12130 on cond branch optimization (fixes bug# 71515).
12132 2005-1-20 Massimiliano Mantione <massi@ximian.com>
12134 * abcremoval.c: Fixed bug 71062.
12135 * abcremoval.h: Likewise.
12137 2005-1-20 Massimiliano Mantione <massi@ximian.com>
12139 * mini.c: Added a new functionality to optimize_branches, the removal
12140 of useless basic blocks, and fixed some problem in the removal of
12141 critical edges; some utility functions added for both purposes.
12142 * ssapre.c: Added complex expression support, and fixed bug 70637.
12143 * ssapre.h: Likewise.
12144 * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
12146 * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
12147 * driver.c: Re-enabled SSAPRE.
12149 2005-01-19 Martin Baulig <martin@ximian.com>
12151 * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
12152 the result of mono_get_method_constrained().
12154 2005-01-18 Neale Ferguson <NealeFerguson@earthlink.net>
12156 * exceptions-s390.c tramp-s390.c: Allocate code using the global code
12159 2005-01-18 Geoff Norton <gnorton@customerdna.com>
12161 * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
12162 be detected. Fixes #59296.
12164 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
12166 * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
12167 which can happen. Fixes #71361.
12169 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
12171 * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
12174 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
12176 * mini.c (mono_create_jump_trampoline): Revert last change as it causes
12177 appdomain-unload.exe to fail.
12179 * mini.c: Fix some memory leaks.
12181 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
12183 * inssel.brg: handle the new size of rank, idepth, max_interface_id.
12184 Fixed bug and sped up some codepaths.
12186 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
12188 * mini.c: Fix some memory leaks.
12190 * exceptions.cs basic-long.cs: Add test for checked ulong->int
12193 * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
12195 * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
12198 * iltests.il: Add regression test for #71320.
12200 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
12202 * mini.c (mono_codegen): Fix installation of profiler hooks.
12204 * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
12206 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
12208 * mini.h, mini.c, cfold.c: optimize access to enum
12209 readonly fields, too. Eval conditional branches if possible
12210 to perform unreachable code removal in more cases.
12212 2005-01-15 Zoltan Varga <vargaz@freemail.hu>
12214 * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
12216 * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
12219 * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
12220 WinXP DEP. Fixes #71244.
12222 2005-01-14 Zoltan Varga <vargaz@freemail.hu>
12224 * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
12226 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
12228 * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
12230 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
12232 * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo
12235 * mini.h: Bump AOT version.
12237 * mini.h (MonoCompile): Change exvar to a hash table.
12239 * mini.c: Allocate a separate exvar for each handler block.
12241 * mini.c: Get rid of the computation of filter_lengths, its not needed.
12243 * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
12244 ex var with the pending exception and only throw if the two are equal.
12247 * exceptions.cs: Add tests for rethrow and nested catch clauses.
12249 * mini-x86.c: Fix warnings.
12251 * Makefile.am (common_sources): Move mini-exceptions.c here as it is
12252 used by all the ports now.
12254 * aot.c: Add write-symbols and save-temps options.
12256 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
12258 * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
12260 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
12262 * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx
12265 * tramp-s390.c: Check vtable slot belongs to the domain.
12267 * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
12268 as per other platforms.
12270 * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
12272 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
12274 * driver.c: we don't run the Main() code in a subthread anymore.
12276 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
12278 * mini.c: added experimental rtc support in the statistical
12279 profiler: if the user has the permission, more accurate statistics
12280 are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
12281 The MONO_RTC value must be restricted to what the linux rtc allows:
12282 power of two from 64 to 8192 Hz.
12284 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
12286 * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
12288 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
12290 * mini-ppc.c: better icache flush for smp.
12292 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
12294 * mini-amd64.c (emit_move_return_value): Fix memory leak.
12296 * mini-x86.c (get_call_info): Add the get_call_info () code from the
12297 amd64 port, not yet used.
12299 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
12301 * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
12304 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
12306 * driver.c: Added --security option to activate the security manager.
12307 Right now this will allow code generation for declarative demands and
12308 is disabled when AOT is specified.
12309 * mini.c: Add code generation for declarative security demands.
12310 * mini.h: Add mono_use_security_manager as an extern gboolean.
12312 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
12314 * aot.c (mono_compile_assembly): Speed up compilation a bit by
12315 emitting more dense assembly code.
12317 * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
12318 exception throwing stuff.
12320 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
12322 * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
12325 * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
12326 left in by mistake.
12328 * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is
12331 * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
12333 * tramp-*.c: Only patch vtable slots if the object is in the current
12334 domain. Fixes appdomain-unload.exe.
12336 * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
12338 * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
12341 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
12343 * mini.c (reverse_branch_op): New helper function.
12345 * mini.c (optimize_branches): Run the new optimization only on
12346 platforms which support it. Also reverse all kinds of branches.
12348 * mini.h (MonoBasicBlock): Add 'out_of_line' field.
12350 * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
12353 * mini.c (optimize_branches): Reverse not-equals branches if the false
12354 bblock is a throw. This happens a lot of time with argument checking in
12357 * mini.c (mono_codegen): Add support for placing basic blocks after
12358 the function epilogue.
12360 * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
12363 2005-01-05 Miguel de Icaza <miguel@ximian.com>
12365 * mini.c (setup_stat_profiler): Only set this up if the platform
12366 supports ITIMER_PROF.
12368 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
12370 * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
12373 * inssel.brg: Fix a warning.
12375 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
12377 * mini.c: added support for statistical profiler
12378 (run with: --profile=default:stat).
12380 2005-01-04 Zoltan Varga <vargaz@freemail.hu>
12382 * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
12384 * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
12386 * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes
12387 related to global registers from the amd64 port.
12389 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
12391 * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
12393 * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
12394 with global registers.
12395 (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
12397 * aot.c (emit_method_code): Fix the 'method emitted as' messages.
12399 2004-12-31 Zoltan Varga <vargaz@freemail.hu>
12401 * debug-mini.c (encode_value): Fix off-by-one.
12403 * aot.c (encode_value): Likewise.
12405 * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
12407 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
12409 * mini.c linear-scan.c: Add a workaround for the mcs crash when using
12412 * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
12414 * aot.c (emit_method_info): Increase size of temp buffer.
12416 * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in
12419 2004-12-28 Zoltan Varga <vargaz@freemail.hu>
12421 * aot.c (emit_method_info): Fix build.
12423 * aot.c: Further rework of the AOT file format to reduce the size of
12424 the method info data.
12426 * mini.h: Bump AOT file format version.
12428 2004-12-27 Martin Baulig <martin@ximian.com>
12430 * mini.c (mini_get_method): New static method; call
12431 mono_get_method_full() and mono_get_inflated_method().
12432 (mono_method_to_ir): Use mini_get_method() instead of
12433 mono_get_method_full().
12435 2004-12-26 Patrik Torstensson <patrik.torstensson@gmail.com>
12437 * mini-x86.c (atomic ops): fixed bug interlocked bug #70784.
12439 2004-12-25 Zoltan Varga <vargaz@freemail.hu>
12441 * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
12443 * inssel-amd64.brg: Add some optimization rules.
12445 2004-12-24 Ben Maurer <bmaurer@ximian.com>
12447 * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
12448 standard not GC'd stuff is fine.
12450 2004-12-24 Zoltan Varga <vargaz@freemail.hu>
12452 * aot.c: Rework the AOT file format to get rid of most of the global
12453 symbols. This reduces the size of the mscorlib.dll.so by 1MB.
12455 * mini.h: Bump AOT file format version.
12457 2004-12-23 Zoltan Varga <vargaz@freemail.hu>
12459 * mini.h: Bump AOT file format version.
12461 * aot.c (mono_aot_is_got_entry): New function to determine if an
12462 address is inside a GOT.
12464 * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
12466 * cpu-pentium.md: Increase the maximum size of some instructions which
12467 might involve a got access.
12469 * mini.c (get_method_from_ip): Another debug helper function.
12471 * mini.c: Call mono_get_got_var () in a couple places. Handle the case
12472 when got var accesses are created during the decompose phase.
12474 * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
12476 * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
12477 argument mini_compile_method and to MonoCompile, and use this to
12478 determine whenever a given method is compiled for AOT. This allows the
12479 other methods compiled during AOT compilation to be free of AOT stuff,
12480 so the backends does not need to add special support for them by
12481 creating a fake GOT etc.
12483 * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
12486 2004-12-21 Ben Maurer <bmaurer@ximian.com>
12488 * mini.c (mono_method_to_ir): It turns out that some of the
12489 x-appdomain wrappers are lax with types, so just ignore this for
12492 * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
12493 at the vtable->klass. If it is non-shared code we can just use the
12496 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
12498 * mini-ppc.c: access MonoDomain from tls, too.
12500 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
12502 * declsec.c: Removed unused variable (and related warning ;-)
12504 2004-12-21 Ben Maurer <bmaurer@ximian.com>
12506 * iltests.il: New test for LDELEMA on an array of ref types.
12508 * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
12509 all ldelema's on reftypes.
12510 (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
12511 it was the wrong place to put it.
12513 * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
12514 register to pop to make this cleaner, at the request of Paolo.
12516 2004-12-20 Ben Maurer <bmaurer@ximian.com>
12518 * mini-ops.h (OP_GETHASHCODE): New op.
12520 * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
12522 * mini.c (mini_get_inst_for_method): Create the intrinsic hash
12525 For a microbenchmark, this reduces the cost of Hashtable.get_Item
12528 * mini-x86.c (mono_arch_output_basic_block): Rather than
12536 The first is 3 bytes while the second is 1. This saves 36 kb on
12537 mscorlib, quite a big saving. When bootstraping mcs, I was able to
12538 see a small boost because of icache locality.
12540 * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
12542 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
12544 * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
12545 started code sharing with the generic code.
12547 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
12549 * mini-ppc.c, cpu-g4.md: added code for direct access to
12552 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
12554 * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
12555 mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
12558 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
12560 * declsec.c|h: Added functions to cache the declarative stack modifiers
12561 in MonoJitInfo and to create a security frame from a MonoJitInfo
12563 * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
12564 created. Register internal calls for System.Security.SecurityFrame::
12565 _GetSecurityFrame and _GetSecurityStack.
12566 * mini.h: Added definition for new icalls (in mini-exceptions.c) and
12567 the definitions for the new stack walk/callback mechanism.
12568 * mini-exceptions.c: Added internal call GetSecurityFrame (to get the
12569 first security frame for LinkDemands and InheritanceDemands) and
12570 GetSecurityStack for Demands. Both use the new mono_walk_stack code
12572 * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
12573 walk initialization (lupus).
12575 2004-12-20 Ben Maurer <bmaurer@ximian.com>
12577 * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
12579 (handle_loaded_temps): Do not create a temporary variable for
12580 things that we know are temps. They will never be modified.
12581 (mono_spill_call): Set MONO_INST_IS_TEMP
12582 (mono_emulate_opcode): ditto
12584 (mono_method_to_ir.CEE_DUP): ditto
12586 2004-12-19 Ben Maurer <bmaurer@ximian.com>
12588 * mini.c (type_to_eval_stack_type): Make this handle the void type
12589 (mono_emit_call_args): set the call->type with type_to_eval_stack_type
12590 (emit_tree): use ip_in_bb to special case some common idioms
12591 Update all callers to pass in the IP.
12592 (mono_method_to_ir): Make CEE_CALL* do the above as well.
12594 This gives us a nice 2% speedup in mcs bootstrap.
12596 * mini-x86.c (peephole_pass): Peephole pass to make
12605 * mini.c (ip_in_bb): new method.
12606 (mono_method_to_ir): use this method rather than doing the hash
12609 * linear-scan.c (mono_linear_scan): When expiring actives, you
12610 don't need to keep around variables that expire on this
12611 instruction. This makes it so that:
12614 store (ebx add (ebx, 1))
12618 2004-12-19 Zoltan Varga <vargaz@freemail.hu>
12620 * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc
12621 combination to avoid doing two copies. Fix up problems with previous
12624 * mini.c: Fix 64 bit warnings.
12626 * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
12628 2004-12-17 Zoltan Varga <vargaz@freemail.hu>
12630 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
12631 changes from the x86 code.
12633 * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
12635 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
12637 * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
12638 throwing code to reduce its size, unify the AOT and non-aot code and
12639 get rid of relocations in the AOT case.
12641 * mini-x86.h mini.c exceptions-x86.c
12642 (mono_arch_get_throw_corlib_exception): New arch specific function to
12643 raise corlib exceptions which doesn't require relocations in the
12646 * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
12648 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
12650 * mini.c (mono_emit_method_call): Only allocate the got var when it is
12653 * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
12656 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
12658 * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
12659 with add function when used from Inc/dec atomic
12660 functions. Re-enabled optimization on x86.
12661 * mini-ops.h: renamed atomic_add functions to
12662 allow _add to match the Interlocked::Add and
12663 _add_next to match Interlocked::Inc/Dec.
12665 2004-12-15 Massimiliano Mantione <massi@ximian.com>
12667 * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
12668 linking of BBs to the end BB, and enabled SSAPRE also with
12669 consprop and copyprop (which was prevented by that bug).
12671 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
12673 * mini-x86.c: disabling the Interlocked optimizing code.
12675 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
12677 * aot.c (load_aot_module): Move reading of got_addr after the AOT
12678 file version check.
12680 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
12682 * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm
12683 interlocked optimization due lack of support on x86, rewrote
12684 exchange to take into account that base may be in eax.
12686 xsp works again; activated Interlocked optimizing code.
12688 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
12690 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
12692 2004-12-13 Zoltan Varga <vargaz@freemail.hu>
12694 * mini-ops.h: Add new opcodes.
12696 * mini.h: Add new patch types. Add got_var to MonoCompile.
12698 * mini.h mini-x86.c mini-amd64.c aot.c: Rename
12699 mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
12700 make it work with all kinds of patchable code.
12702 * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
12703 address of the GOT, and referencing entries in the GOT.
12705 * mini.c: Add code to load the GOT address if needed by an opcode.
12707 * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position
12708 independent AOT code on the x86 using an elf-style Global Offset Table.
12710 2004-12-14 Raja R Harinath <rharinath@novell.com>
12712 * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
12714 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12716 * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
12719 2004-12-13 Patrik Torstensson <patrik.torstensson@gmail.com>
12721 * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
12722 of Interlocked:Increment/Decrement/Add as inline ops.
12723 (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
12725 2004-12-12 Geoff Norton <gnorton@customerdna.com>
12727 * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
12728 * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
12730 2004-12-12 Duncan Mak <duncan@ximian.com>
12732 * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
12733 again. `patch_info->table_size' is no longer valid after Zoltan's
12736 2004-12-12 Martin Baulig <martin@ximian.com>
12738 * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
12739 if we are the "real" method, ie. not an inlined method inside it.
12741 2004-12-11 Ben Maurer <bmaurer@ximian.com>
12743 * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
12744 before we look in the special fields table. This fixes
12745 ../tests/thread-static-init.cs.
12747 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12749 * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
12750 for Array get_Rank and get_Length. Fixes bug #70465.
12752 2004-12-11 Zoltan Varga <vargaz@freemail.hu>
12754 * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
12755 separate structure to reduce the size of MonoJumpInfo.
12757 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
12759 * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
12761 2004-12-10 Patrik Torstensson <patrik.torstensson@gmail.com>
12763 * mini.c (mini_get_inst_for_method): Changed to allow ports
12764 to return a MonoInst instead of opcode
12765 (renamed mini_get_opcode_for_method to better reflect the new functionality)
12767 * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method):
12768 Allow ports to return a created MonoInst instead of op-code, will enable
12770 (renamed mini_get_opcode_for_method to better reflected the functionality)
12772 2004-12-09 Zoltan Varga <vargaz@freemail.hu>
12774 * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
12776 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
12778 * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
12781 2004-12-08 Martin Baulig <martin@ximian.com>
12783 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
12784 if we're a CEE_CONSTRAINED call. Fixes gen-118.cs.
12786 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
12788 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
12791 * exceptions.cs: Disable some tests which depend on properties of x86 fp
12794 2004-12-08 Raja R Harinath <rharinath@novell.com>
12796 * Makefile.am (CLEANFILES): Add *.exe, *.dll.
12798 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
12800 * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
12801 bug introduced by the previous patch.
12803 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12805 * mini-ppc.c, objectc.cs: handle large structs passed by value
12806 (fixes bug #69972).
12808 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
12810 * mini-ppc.c: OP_ARGLIST implementation from
12811 Geoff Norton <gnorton@customerdna.com>.
12813 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
12815 * inssel-x86.brg, inssel-ppc.brg: fix reference to register
12816 in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
12818 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12820 * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
12822 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12824 * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
12827 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
12829 * mini-sparc.c: Zero out localled-ed memory.
12831 * iltests.il: Add tests for zeroing out localloc-ed memory.
12833 2004-12-04 Martin Baulig <martin@ximian.com>
12835 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
12836 mono_method_get_signature_full().
12838 2004-12-03 Massimiliano Mantione <massi@ximian.com>
12840 * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
12841 and some utility functions (always for SSAPRE), integrated SSAPRE.
12842 * mini.h: Likewise.
12843 * driver.c: Added ssapre option.
12844 * ssa.c: Small fix on OP_ARG handling.
12845 * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
12846 * Makefile.am: Likewise.
12848 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
12850 * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
12851 now in the xp code.
12853 * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
12856 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12858 * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
12860 * cpu-s390.md : Increase instruction length of oparglist.
12862 * mini-s390.c : Implement vararg and TYPEDEBYREF support.
12864 2004-11-30 Martin Baulig <martin@ximian.com>
12866 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
12867 virtual generic methods. We call a special helper_compile_generic_method()
12868 icall to retrieve the method from the vtable, inflate and compile
12869 it and then do a CEE_CALLI. Thanks a lot to Paolo for this idea.
12871 * jit-icalls.c (helper_compile_generic_method): New JIT icall.
12873 2004-11-30 Zoltan Varga <vargaz@freemail.hu>
12875 * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
12877 2004-11-29 Zoltan Varga <vargaz@freemail.hu>
12879 * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
12882 2004-11-27 Ben Maurer <bmaurer@ximian.com>
12884 * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
12885 platforms with PIC aot.
12887 2004-11-28 Martin Baulig <martin@ximian.com>
12889 * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
12892 2004-11-28 Martin Baulig <martin@ximian.com>
12894 * mini-x86.c (mono_arch_call_opcode): Use the original type, not
12895 the result of mono_type_get_underlying_type() to check whether
12898 2004-11-26 Martin Baulig <martin@ximian.com>
12901 (mono_method_to_ir): Use `!method->signature->has_type_parameters'
12904 2004-11-26 Zoltan Varga <vargaz@freemail.hu>
12906 * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
12907 the same way as the other arguments so they won't get clobbered.
12909 * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual
12910 calls through R11 since it is clobbered by the trampoline code.
12912 2004-11-26 Raja R Harinath <rharinath@novell.com>
12914 * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
12915 pick up in-tree mscorlib.dll.
12917 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
12919 * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
12921 * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to
12922 runtime data/code are now stored in a table similar to the GOT in ELF.
12923 This allows the code itself to be position independent.
12925 * aot.c: Fix loading of referenced assemblies after the lazy assembly
12928 * aot.c: Attach ELF type (object/function) directives to all global
12931 * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
12933 * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
12935 * mini-amd64.h: Turn on PIC AOT code.
12937 * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
12938 returning the offset within an OP_AOTCONST instruction where the GOT
12939 offset needs to be added.
12941 * mini.h: Bump AOT file format version.
12943 2004-11-25 Martin Baulig <martin@ximian.com>
12945 * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
12946 uninflated generic methods.
12948 2004-11-25 Martin Baulig <martin@ximian.com>
12950 * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
12952 2004-11-24 Martin Baulig <martin@ximian.com>
12954 * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
12955 original klass (this only applies for generic instances).
12957 2004-11-24 Martin Baulig <martin@ximian.com>
12959 * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
12960 `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
12963 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
12965 * mini.c (mono_method_to_ir): Disable inlining for methods containing
12966 localloc. Fixes #69678.
12968 * iltests.il (test_0_localloc_inline): Add regression test for #69678.
12970 2004-11-23 Zoltan Varga <vargaz@freemail.hu>
12972 * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
12973 used SSE registers on pinvoke calls. Fixes #69774.
12975 2004-11-23 Geoff Norton <gnorton@customerdna.com>
12977 * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
12978 vt->inst_vtype->data.klass. This fixes generic structs and bug #69766
12980 2004-11-23 Raja R Harinath <rharinath@novell.com>
12982 * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
12983 Refer directly to the mcs/ tree.
12985 2004-11-19 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12987 * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
12988 Check if a trampoline for a synchronized method is required.
12990 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
12992 * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
12993 with localloc if needed. Throe arithmetric exception in
12994 div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
12995 Adapted from a patch by Geoff Norton <gnorton@customerdna.com>.
12997 2004-11-19 Geoff Norton <gnorton@customerdna.com>
12999 * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
13000 types before switching on type. Fixes #69622.
13002 2004-11-19 Raja R Harinath <rharinath@novell.com>
13004 * Makefile.am (check-local): New. Integrate into 'make check'.
13005 (MCS,RUNTIME): Define using in-tree mono and mcs.
13007 (%.exe): Use $(ILASM).
13009 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
13011 * mini-ppc.c: adjust initial prolog size (bug #69691).
13013 2004-11-18 Zoltan Varga <vargaz@freemail.hu>
13015 * cpu-pentium.md (localloc): Increase max instruction len. Fixes
13018 2004-11-17 Raja R Harinath <rharinath@novell.com>
13020 * Makefile.am (clean-local): Rename from 'clean'.
13022 2004-11-15 Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13024 * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
13025 to mono_arch_is_int_overflow.
13026 * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
13029 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
13031 * declsec.c|h: New files to support declarative security attributes.
13032 Added function to check if a method has (applicable) security.
13033 * mini.c|h: Add check for declarative security attributes in
13034 mono_method_check_inlining.
13035 * Makefile.am: Added declsec.c and declsec.h to the build.
13037 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
13039 * mini.c, mini.h: update to keep dynamic code info per-domain.
13041 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
13043 * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
13044 (mini_init): Get rid of it from here too.
13046 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
13048 * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
13049 implemented OP_RETHROW (patch by Geoff Norton
13050 <gnorton@customerdna.com>).
13052 2004-11-10 Geoff Norton <gnorton@customerdna.com>
13054 * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
13055 between appdomains. Fixes appdomain-unload on PPC.
13057 2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
13059 * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13060 mini-exceptions.c: handle the new wrapper types.
13061 * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
13062 token value as a MonoClass* when compiling a wrapper.
13063 mono_jit_create_remoting_trampoline now takes an additional
13064 MonoRemotingTarget parameter.
13066 2004-11-10 Martin Baulig <martin@localhost>
13068 * mini.c (mono_method_to_ir): Use `generic_container->context'
13069 rather than creating a new one.
13071 2004-11-09 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13073 * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
13075 * inssel-390.md, mini-s390.c: Correct register allocation for globals.
13077 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
13079 * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
13080 the experimental aot cache stuff.
13082 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
13084 * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13085 mini-exceptions.c: update to exception clause structure changes.
13087 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
13089 * exceptions-x86.c (throw_exception): Fix warnings.
13091 * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support
13094 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
13096 * exceptions-sparc.c (get_throw_exception): Really fix this.
13098 2004-11-07 Ben Maurer <bmaurer@ximian.com>
13100 * tramp-*.c: we no longer support icalls without wrappers, so
13101 a bit of code can be removed here
13103 2004-11-07 Zoltan Varga <vargaz@freemail.hu>
13105 * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
13108 * cpu-sparc.md: Add op_rethrow.
13110 * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
13112 * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
13114 * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
13115 * mini-ops.h: Add OP_RETHROW.
13117 * mini.c inssel.brg: Distinguish between THROW and RETHROW.
13119 * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
13121 2004-11-05 Geoff Norton <gnorton@customerdna.com>
13123 * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
13124 Makes the output much easier to read
13126 2004-11-05 Ben Maurer <bmaurer@ximian.com>
13128 * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
13129 prevents another huge leak when compiling with ssa. Secondly, the
13130 performance of doing this rather than freeing the lists is much
13131 better. GList does a lock every time you allocate a list link,
13132 so that it can use a memory pool. So, it is better to just use
13133 a memory pool of our own.
13135 * ssa.c, linear-scan.c: replace g_list_remove_link with
13136 g_list_delete. The remove one does not free the GList, so we were
13137 leaking memory. On -O=all --compile-all with corlib, this cut down
13138 3 MB of allocations.
13140 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
13142 * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
13144 * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
13146 * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
13147 into a new function mono_create_jit_trampoline ().
13149 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
13151 * trace.c (get_spec): Allow tracing of classes without a namespace.
13153 2004-11-02 Sebastien Pouliot <sebastien@ximian.com>
13155 * mini.c: Fix pointer overwrite in mini_method_compile.
13157 2004-11-2 Geoff Norton <gnorton@customerdna.com>
13159 * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
13160 The darwin ABI needs some special handling for 1 and 2 byte structs
13161 Lets use lbz/lhz instead of lwz everywhere.
13162 * mini-ppc.c (calculate_sizes): The Darwin ABI needs from special handling
13163 for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
13164 Use stb/sth for the former, and put the latter always on stack instead of in
13165 argument registers.
13167 2004-10-30 Zoltan Varga <vargaz@freemail.hu>
13169 * trace.c (is_filenamechar): Add '_'.
13171 2004-10-29 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13173 * mini-s390.c: Fix prolog length to allow for large trace requirements.
13175 * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
13177 2004-10-29 Zoltan Varga <vargaz@freemail.hu>
13179 * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
13180 depends on libmonogc. Fixes #68805.
13182 2004-10-26 Miguel de Icaza <miguel@ximian.com>
13184 * mini.c (mono_jit_free_method): Provide extra information for
13185 this error. Currently this leaks, but will be turned into a
13186 developer option in the future.
13188 2004-10-26 Zoltan Varga <vargaz@freemail.hu>
13190 * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
13192 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
13194 * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte
13195 boundary. Fixes reading of PATCH_INFO_R4 and R8.
13196 (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
13198 2004-10-24 Zoltan Varga <vargaz@freemail.hu>
13200 * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
13201 trampolines for AOT code.
13203 2004-10-22 <vargaz@freemail.hu>
13205 * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
13206 constructed types. Fixes #68136.
13208 2004-10-21 Martin Baulig <martin@ximian.com>
13210 * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
13211 if it returns true, unwind the stack to the call instruction.
13213 2004-10-21 <vargaz@freemail.hu>
13215 * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
13217 * mini.h: Bump AOT version number.
13219 * objects.cs: Add another test for unbox trampolines.
13221 * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for
13224 2004-10-20 <vargaz@freemail.hu>
13226 * driver.c: Add SHARED to the set of optimizations tested.
13228 * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
13230 * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
13231 used by CEE_NEWARR.
13233 * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
13235 2004-10-20 Martin Baulig <martin@ximian.com>
13237 * mini-exceptions.c (mono_handle_exception): Call
13238 mono_debugger_handle_exception() to tell the debugger about
13239 catch/finally clauses.
13241 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
13243 * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
13245 * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
13248 2004-10-15 Geoff Norton <gnorton@customerdna.com>
13250 * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
13251 methods as their native size, fixed bug #57543, #57545.
13252 * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
13253 This saves a temporary register and mullw call down into 1 (minor perf
13254 increase for cases like sum = sum * 5; This use to translate into:
13257 It now translates to
13260 2004-10-15 Zoltan Varga <vargaz@freemail.hu>
13262 * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
13265 2004-10-11 Martin Baulig <martin@ximian.com>
13267 * mini.c (mono_method_to_ir): If we're a generic method, get the
13268 MonoGenericContainer from our MonoMethodNormal and create a
13269 MonoGenericContext from it.
13271 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
13273 * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
13275 * basic-long.cs: Add test for checked i8->i2 cast.
13277 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13279 * inssel-ppc.brg: added a couple of speedup rules.
13281 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
13283 * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
13284 to speed up rebuilds.
13286 2004-10-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13288 * mini-s390.c: Minor fix to OP_OR_IMM.
13290 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
13292 * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
13293 better. Fixes appdomain-unload.exe on sparc.
13295 2004-10-02 Massimiliano Mantione <massi@ximian.com>
13297 * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
13298 simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
13301 2004-10-02 Zoltan Varga <vargaz@freemail.hu>
13303 * jit-icalls.c: Handle a nonexisting trunc function more correctly.
13305 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
13307 * mini.c: Always generate a field read/write wrapper for members
13308 of the class MarshalByRefObject since the actual instance could
13311 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
13313 * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
13315 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
13317 * driver.c mini.h trace.c: Move the setting of the main assembly into
13318 a separate function called mono_trace_set_assembly () and call it after
13319 actually loading the main assembly. Fixes #66872.
13321 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
13323 * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
13324 using the code manager.
13326 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
13328 * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
13330 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
13332 * cpu-amd64.md: Fix bug in previous patch.
13334 * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
13337 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
13339 * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13340 mini-exceptions.c: updates for changed stack walk interface.
13342 2004-09-21 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13344 * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
13346 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
13348 * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
13350 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
13352 * driver.c (mini_regression_list): Do not call mono_assembly_close
13353 since assemblies can't be unloaded.
13355 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
13357 * cpu-amd64.md: Fix more instruction lengths.
13359 * cpu-amd64.md: Fix lengths of some instructions.
13361 2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
13363 * inssel.brg: Make the array ldelema check aot friendly.
13365 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
13367 * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
13369 * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
13371 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
13373 * mini-x86.c: Fix build.
13375 * mini-sparc.c mini-x86.c mini-amd64.c: Use the new
13376 mono_type_get_underlying_type () helper function to simplify code.
13378 2004-09-09 Martin Baulig <martin@ximian.com>
13380 * mini-amd64.c: Don't access `type->data.klass' directly, call
13381 mono_class_from_mono_type() instead since the type may be a
13384 2004-09-09 Martin Baulig <martin@ximian.com>
13386 * mini-amd64.c (get_call_info): Fix support for generic instances.
13387 (add_valuetype): Use mono_class_from_mono_type() to get the class
13388 since we can be a generic instance.
13390 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
13392 * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
13394 2004-09-07 Ben Maurer <bmaurer@users.sourceforge.net>
13396 * liveness.c: reset spill costs on each scan: bug 62107
13398 2004-09-07 Bernie Solomon <bernard@ugsolutions.com>
13400 * exceptions-sparc.c (mono_arch_find_jit_info): remove
13401 unnecessary line that doesn't compile
13403 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
13405 * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
13406 trampolines, make them call an error function so people can fix their
13409 2004-09-06 Martin Baulig <martin@ximian.com>
13411 * mini.c (mono_method_to_ir): When initializing locals, handle a
13412 generic instances like a valuetype if it's a valuetype and like a
13413 class if it's a class.
13415 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
13417 * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
13418 stack. Fixes #64674.
13420 * exceptions.cs: Add test for unwinding of call arguments.
13422 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
13424 * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
13425 OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
13426 set the carry/borrow flag). The sparc and s390 implementations
13427 can now use optimized versions (and simplify the code). ppc bugfixes.
13429 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
13431 * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
13433 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
13435 * inssel-amd64.brg: Remove leftover 32 bit rule.
13437 * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
13439 2004-09-04 Zoltan Varga <vargaz@freemail.hu>
13441 * mini-exceptions.c (mono_find_jit_info): Refactor common code from
13442 mono_arch_find_jit_info functions into a new function. Fix a memory
13445 * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
13448 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
13450 * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
13453 * exceptions.cs: Add array size tests.
13455 * mini.c: Allocate a separate icall wrapper for each arity of
13456 mono_array_new_va. Fixes #59509.
13458 * exceptions.cs: Add testcase for 64578.
13460 * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
13462 * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
13464 2004-09-02 Martin Baulig <martin@ximian.com>
13466 * mini.c (mono_method_to_ir): When initializing the locals, call
13467 handle_initobj() on the generic instance itself, not its
13470 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
13472 * mini.h (MonoJitDynamicMethodInfo): New structure, extension of
13473 MonoJitInfo for dynamic methods.
13475 * mini.c: Rename trampoline_hash_mutex to jit_mutex.
13477 * mini.c: Add support for freeing JIT data for dynamic methods.
13479 2004-09-01 Martin Baulig <martin@ximian.com>
13481 * mini-x86.c (is_regsize_var): Added support for generic
13483 (mono_arch_emit_prolog): Make this compile again, use
13484 `x86_push_imm_template (code)'.
13486 2004-08-30 Ben Maurer <bmaurer@users.sourceforge.net>
13488 * mini-x86.c: make all push_imm instructions that get
13489 patched always emit the long form
13491 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
13493 * mini.c (mono_create_jump_trampoline): Store the jump trampolines
13494 in a per-domain hash.
13496 * mini-amd64.c (merge_argument_class_from_type): Handle generic
13499 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
13501 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
13504 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
13507 * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
13508 Beginnings of SSE2 support.
13510 * exceptions.cs: Add more tests for checked int<->uint casts.
13512 2004-08-28 Martin Baulig <martin@ximian.com>
13514 * mini-x86.c (mono_arch_instrument_epilog): Added support for
13518 (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
13519 Handle generic instances recursively.
13521 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
13523 * iltests.il: test for conv.u8 on a constant
13525 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
13527 * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
13528 LCONV_x4 (shrun_32 (membase)).
13530 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
13532 * inssel-x86.brg: c&p rules for push/setret of long
13534 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
13536 * inssel-x86.brg: c&p rules for compare (base, regvar) and
13537 compare (regvar, base)
13539 * inssel-x86.brg: more burg love
13541 * inssel.brg: more cleanup
13543 * inssel-x86.brg, inssel-long32.brg: burg cleanup.
13545 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
13547 * basic-long.cs, basic-calls.cs: new tests for optimization.
13549 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
13551 * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
13554 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
13556 * mini-amd64.c (read_tls_offset_from_method): Add another case.
13558 2004-08-25 Bernie Solomon <bernard@ugsolutions.com>
13560 * inssel.brg (mini_emit_memcpy): use
13561 NO_UNALIGNED_ACCESS to disable memcpy optimization
13563 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
13565 * mini-amd64.c: Handle generic types in various places.
13567 * mini.c (mono_method_to_ir): Handle generic types in init locals.
13569 2004-08-24 Zoltan Varga <vargaz@freemail.hu>
13571 * mini.c (handle_box): Fix warning.
13573 * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
13575 * mini-amd64.h: Enable the emit_state optimization.
13577 * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
13579 * mini-amd64.c: Add some new 64 bit peephole opts.
13581 * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
13583 * cpu-amd64.md: sreg1 of div instructions must be %rax.
13585 * mini-amd64.c: Register allocator fixes.
13587 * mini.c: Add an optimization to emit_state to avoid allocation of new
13588 registers on some platforms.
13590 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
13592 * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
13594 * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
13595 allocation. Fixes #63085.
13597 * basic-long.cs: Add new regression test.
13599 * mini-amd64.c: Register allocator improvements.
13601 2004-08-21 Zoltan Varga <vargaz@freemail.hu>
13603 * mini-amd64.c (read_tls_offset_from_method): Add another code
13606 * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
13607 instruction sequence for nullifying class init trampolines.
13609 * objects.cs: Add new regalloc test.
13611 * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
13613 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
13615 * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
13617 * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
13620 * driver.c: Fix profiling after TLS changes.
13622 * driver.c (mono_main): Set mono_stats.enabled if needed.
13624 * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
13627 2004-08-20 Ben Maurer <bmaurer@users.sourceforge.net>
13629 * mini-x86.c: use a 1 op rather than a 2 op tls access
13630 instruction -> faster.
13632 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
13634 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
13637 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
13639 * exceptions-sparc.c (throw_exception): fix typo
13641 2004-08-19 Ben Maurer <bmaurer@users.sourceforge.net>
13643 * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
13644 set tree->dreg correctly with tls. Allow any
13645 register to be used.
13647 * mini-x86.c (read_tls_offset_from_method): add new code
13648 generation pattern seen with GCC.
13651 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13653 * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
13654 exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13655 exceptions-sparc.c: fix some performance issues in exception
13656 handling and setting of the stack trace for exceptions that were
13659 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
13661 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
13664 * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible
13667 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
13669 This patch inlines tls access, when possible.
13671 * mini.h: new arch functions for TLS intrinsics.
13672 All platforms updated with a stub.
13674 * mini.c: use the new intrinsics
13676 * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
13677 arch specific intrinsic for tls variables
13679 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
13681 * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
13684 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
13686 * mini.c: thread local allocation
13688 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
13690 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
13692 * Makefile.am: Link against the static version of libmonogc.
13694 * Makefile.am: Link the static versions of the convenience libraries
13695 into the mono executable.
13697 * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
13699 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
13701 * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
13702 on integer overflow.
13704 * mini-amd64.c: Reorganize function call code.
13706 * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
13708 2004-08-14 Ben Maurer <bmaurer@ximian.com>
13710 * inssel-x86.brg: use xor eax,eax.
13712 * basic.cs: new tests
13714 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
13716 * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
13717 in exception throwing code.
13719 2004-08-14 Ben Maurer <bmaurer@ximian.com>
13721 * inssel-x86.brg: use xor esi,esi.
13723 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
13725 * driver.c (mono_main): Call mono_trace_parse_options earlier so it
13726 can trace methods compiled during mini_init () too.
13728 * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle
13731 2004-08-14 Ben Maurer <bmaurer@ximian.com>
13733 * Makefile.am: static link on x86 (r=zoltan)
13735 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
13737 * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
13738 code since it causes some programs to fail.
13740 2004-08-12 Zoltan Varga <vargaz@freemail.hu>
13742 * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
13744 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
13746 * mini.c: ovfops_op_map - add STACK_OBJ case for
13748 * basic.cs: add test_0_pin_string as test
13751 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
13753 * Makefile.am: build C# if srcdir != builddir
13755 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13757 * dominators.c, mini.h, mini-x86.c: fix loop alignment with
13758 fall-through blocks.
13760 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13762 * driver.c: enable loop by default again and include abcrem in -O=all.
13764 2004-08-08 Zoltan Varga <vargaz@freemail.hu>
13766 * iltests.il: Add some localloc tests.
13768 * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
13770 * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly.
13773 * inssel-amd64.brg: Add some optimizations.
13775 * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
13778 * Makefile.am: Statically link mono against libmono on AMD64.
13780 * mini-amd64.c inssel-amd64.brg: Optimizations.
13782 2004-08-07 Zoltan Varga <vargaz@freemail.hu>
13784 * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
13786 * tramp-amd64.c: Patch calling code in trampolines.
13788 2004-08-06 Zoltan Varga <vargaz@freemail.hu>
13790 * mini-amd64.c: pinvoke struct passing fixes.
13792 2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
13794 * mini-sparc.c: redo change, make mono_arch_cpu_init call
13795 mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
13797 2004-08-05 Duncan Mak <duncan@ximian.com>
13799 * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
13802 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
13804 * mini-amd64.c (emit_move_return_value): Move return value for normal
13807 2004-08-05 Martin Baulig <martin@ximian.com>
13809 * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
13810 `type->type'; just modify `type' itself when dealing with enums
13811 and generic instances.
13812 (check_call_signature): Make `simple_type' a `MonoType *'.
13814 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
13816 * mini.c: Use OP_PADD to add offsets to addresses.
13818 * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
13820 2004-08-04 Bernie Solomon <bernard@ugsolutions.com>
13822 * mini-sparc.c (mono_arch_emit_epilog): fix check
13823 for folding last op into restore instruction
13825 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
13827 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
13828 helper methods using the code manager.
13830 * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
13832 * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
13834 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13836 * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
13837 cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
13839 * mini-s390.c: fix tail processing
13841 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
13843 * mini-ppc.c: mul.ovf.un exception name fix.
13845 2004-08-03 Martin Baulig <martin@ximian.com>
13847 * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
13848 instances; before jumping to `handle_enum', also modify `ptype'.
13850 2004-08-02 Bernie Solomon <bernard@ugsolutions.com>
13852 * cpu-sparc.md: fcall maximal length too small.
13854 2004-08-02 Zoltan Varga <vargaz@freemail.hu>
13856 * mini-amd64.c mini.h: Add initial support for passing/returning
13857 structures to/from pinvoked methods.
13859 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
13861 * mini-ppc.c: reg allocator fix.
13863 2004-07-31 Zoltan Varga <vargaz@freemail.hu>
13865 * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
13867 * inssel.brg: Optimize memset on 64 bit machines.
13869 * mini-amd64.c: Fix some vararg cases.
13871 2004-07-30 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13873 * mini-s390.c: Corrected macro in emit_float_to_int
13875 * s390-abi.cs: Tests to exercise the s390 ABI
13877 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
13879 * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
13882 * basic.cs: Add a test for add.ovf.un.
13884 2004-07-30 Bernie Solomon <bernard@ugsolutions.com>
13886 * mini-sparc.c: add case for OP_IDIV_UN
13888 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
13890 * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
13892 * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
13894 2004-07-30 Ben Maurer <bmaurer@ximian.com>
13896 * basic.cs: regression tests.
13898 * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
13901 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
13903 * basic.cs: Add a new test.
13905 * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling
13906 and AOT. Various fixes and optimizations.
13908 * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
13910 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
13912 * mini-ppc.c: make sure temp regs are not used for global reg
13915 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
13917 * cpu-sparc.md: conv_i8 fix for 64bits
13919 * mini-sparc.c: add cases for OP_IXXX codes for 64bits
13921 2004-07-29 Ben Maurer <bmaurer@ximian.com>
13923 * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
13924 add opcode for cmp BYTE PTR [eax], imm.
13926 * inssel.brg: Make memcpy and memset takes bases.
13928 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
13930 * *-amd64.*: More AMD64 work.
13932 2004-07-28 Ben Maurer <bmaurer@ximian.com>
13934 * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
13935 add a compare-not-equal opcode.
13937 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
13939 * mini.c: Use mono_init_from_assembly instead of mono_init.
13941 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
13943 * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
13945 * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
13947 * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
13949 * inssel.brg: 64 bit fixes.
13951 * mini.h (MonoCallInst): Add some AMD64 specific data.
13953 * mini.h: Add some OP_P opcodes.
13955 2004-07-28 Ben Maurer <bmaurer@ximian.com>
13957 * basic.cs: tests for 61797 and 61740
13959 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13961 * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
13962 numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
13964 2004-07-24 Zoltan Varga <vargaz@freemail.hu>
13966 * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
13968 * *-amd64*.*: Ongoing AMD64 work.
13970 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
13972 * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
13974 * *-amd64*: Ongoing AMD64 work.
13976 * mini-arch.h: Add AMD64 support.
13978 * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
13980 * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
13982 * mini-ops.h: Add new opcodes.
13984 * Makefile.am: Add AMD64 support.
13986 * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
13987 rules into the inssel-long*.brg files.
13989 * *-amd64.*: Add beginnings of AMD64 backend.
13991 2004-07-22 Ben Maurer <bmaurer@ximian.com>
13993 * mini.c (print_dfn): commenting out the code that prints
13994 the cil. With -O=deadce, this makes -v -v crash.
13996 * cpu-pentium.md: make checkthis have a length of 2
13998 2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
14000 * mini-sparc.h: fix implementations of __builtin
14001 functions for Sun compiler for V9.
14003 2004-07-16 Ben Maurer <bmaurer@ximain.com>
14005 * mini.c: use the new stelem.ref wrapper
14006 * exceptions.cs, arrays.cs: new stelem.ref tests
14008 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14010 * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
14011 new XSP should work with these changes).
14013 2004-07-14 Ben Maurer <bmaurer@ximain.com>
14015 * inssel-{long32,x86,}.brg: trivial optimizations.
14017 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
14019 * mini.c: load value when emitting box operation in
14022 2004-07-12 Ben Maurer <bmaurer@ximian.com>
14024 * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
14025 is one byte shorter than cmp DWORD PTR [eax], 0.
14027 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14029 * inssel-ppc.brg: arguments on the stack are always
14030 relative to the stack pointer (spotted by Neale Ferguson).
14032 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14034 * exceptions-x86.c: delay appending the method name to the trace until
14035 after mono_jit_info_table_find is called, as this gets the real
14038 2004-07-09 Ben Maurer <bmaurer@ximian.com>
14040 * aot.c: register roots
14042 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
14044 * aot.c : I could just use PLATFORM_WIN32 flag.
14046 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
14048 * aot.c : Reverting the previous fix. This time it broke linux build.
14050 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
14052 * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
14054 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
14056 * mini.c (handle_stack_args): Remove some more debugging code.
14058 * mini.c (handle_stack_args): Remove debug output left in by mistake.
14060 * driver.c mini.h aot.c: Allow additional options to be specified with
14061 --aot and pass them to mono_compile_assembly.
14063 * aot.c: Add experimental code to AOT compile all loaded assemblies
14064 on demand and save the code into a cache in the filesystem.
14066 * aot.c: Add support for more wrapper methods.
14068 * mini.c (handle_stack_args): Handle some corner cases. Fixes
14071 * cpu-*.md: Remove removed opcodes.
14073 * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
14074 CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
14075 related icalls to marshal.c.
14077 2004-07-06 Zoltan Varga <vargaz@freemail.hu>
14079 * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
14081 * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
14083 * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
14085 2004-07-06 Ben Maurer <bmaurer@ximian.com>
14086 * liveness.c: If liveness is recomputated we need to reset the information
14087 for each variable. This way, if the liveness range has been narrowed
14088 by optimizations that happened after the last computation, we can return
14091 For example, if you have
14096 // Tons of code that does not affect i
14102 i = 0 is dead code and will be removed by SSA. However, when
14103 linear scan gets to the code, i will still appear to be live
14104 throughout the entire block. This prevents good register allocation.
14106 2004-07-06 Martin Baulig <martin@ximian.com>
14108 * debug-mini.c (mono_debug_init_method): Allow
14109 MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
14110 (mono_debug_add_icall_wrapper): New method.
14112 * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
14114 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
14116 * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
14119 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
14121 * aot.c (mono_aot_load_method): Fix loading of debug info.
14123 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
14125 * aot.c: Add logging support.
14127 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
14129 * mini.h: Add prototype for mono_print_method_from_ip.
14131 * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
14133 * inssel.brg: 64 bit fixes.
14135 * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to
14138 * Makefile.am: Add SPARC64 support.
14140 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
14142 * aot.c: Fix alignment problems on 32 bit platforms.
14144 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
14146 * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
14149 * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
14152 * mini.h: Bump AOT file version. Some 64 bit fixes.
14154 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
14156 * inssel-sparc.brg: Add new rule to avoid register moves.
14158 * inssel.brg: Add ldind_to_load_membase helper function.
14160 2004-06-30 Ben Maurer <bmaurer@ximian.com>
14162 * mini.c: OffsetToStringData intrinsic.
14164 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
14166 * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
14168 * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
14171 * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
14172 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14174 * mini.c: reinstated mono_compile_get_interface_var()
14175 on x86, too, since the change breaks the Gtk# build there as well.
14177 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14179 * driver.c: remove loop from the default optimizations: it seems to
14180 interact badly with some of the other options (see bug #60613).
14182 2004-06-25 Zoltan Varga <vargaz@freemail.hu>
14184 * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
14185 (fld@informatik.uni-bremen.de): Add Solaris x86 support.
14187 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
14189 * mini-ppc.c, cpu-g4.md: small updates to be able to compile
14190 vararg-using methods.
14192 2004-06-21 Martin Baulig <martin@ximian.com>
14194 * mini/mini-exceptions.c
14195 (mono_handle_exception): Added `gpointer original_ip' argument.
14196 After calling mono_unhandled_exception(), call
14197 mono_debugger_unhandled_exception() and if that returns true,
14198 restore the context and return.
14200 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
14202 * mini-ppc.c: prefer the use of relative branches so
14203 they won't need to be patched in aot code (patch from Patrick Beard).
14205 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14207 * aot.c: patch from Patrick Beard to make the output assembly
14208 more correct for the MacOSX assembler. Small tweak to
14209 generate sane images on Linux/PPC, too.
14211 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14213 * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
14214 case until bug #59509 is fixed (shows up in #60332).
14216 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14218 * mini.c: make sure the needed wrappers are compiled, too, with
14221 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
14223 * driver.c: remove NPTL reference in --version output.
14225 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14227 * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
14228 generate valid assembly for the Mach-O assembler.
14230 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14232 * driver.c: don't include abcrem in the all optimization specifier
14233 since it slows down jit compilation too much for now.
14235 2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
14237 * mini.c: use BIGMUL only if both operands have the same signage.
14238 * iltests.il: Test for bug 60056. (errors related to signage in
14243 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
14245 * mini.c, aot.c: memory leak fixes.
14247 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14249 * inssel-long32.brg: implemented a few missing ulong cast opcodes.
14251 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
14253 * Makefile.am: remove the -static hack completely, it links in
14254 statically glib as well.
14256 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
14258 * iltests.il, mini.c: fixed bug#59580 in branch optimization.
14259 * exceptions.cs: make it compile with new mcs/csc.
14261 2004-06-03 Massimiliano Mantione <massi@ximian.com>
14262 * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
14263 and added relevant test case.
14265 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
14267 * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
14268 regressions in gtk-sharp.
14270 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
14272 * exceptions.cs: New regression tests.
14274 * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
14276 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
14278 * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
14280 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
14282 * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
14284 * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
14286 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
14288 * mini.c (mono_jit_runtime_invoke): Init class in this
14289 method instead of trusting mono_jit_compile_method to
14290 do the work (because wrappers can be in object class)
14292 2004-05-27 Zoltan Varga <vargaz@freemail.hu>
14294 * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
14296 * basic-long.cs: New regression test.
14298 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
14300 * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
14301 and div/rem checks.
14303 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
14305 * Makefile.am: fix miguel's change to build mono statically against
14306 libmono (track build dependencies).
14308 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
14310 * cfold.c: Some glib versions do not have G_MININT32.
14312 2004-05-26 Massimiliano Mantione <massi@ximian.com>
14314 * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
14315 with precision of tan, atan, sin and cos, and implemented related
14316 regressions tests (fixes bug 54467, but one new problem appeared and
14319 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
14321 * cfold.c (FOLD_BINOPZ): Avoid division by zero.
14323 * exceptions.cs: Add test for constant folding && division by zero.
14325 * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
14326 since driver.c is in libmono too, so the optimization was useless.
14328 * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
14329 variable to driver.c so the compiler can emit more efficient code to
14332 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14334 * Makefile.am: don't distribute generated inssel.[ch] files.
14336 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
14338 * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
14339 into the default appdomain. Fixes #58707.
14341 * jit-icalls.c: Remove the broken approximation for truncl, doing
14342 no conversion is better.
14344 * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
14347 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14349 * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
14350 of the mcrxr instruction which is not available on some processors
14351 even if it's documented to be. Implement add and sub overflow correctly
14352 (still not complete for long unsigned). Speed up icalls a bit.
14354 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
14356 * mini.c (mono_jit_compile_method_with_opt): Make sure that
14357 we run .cctor in the current domain instead of target_domain.
14359 Fixes bug #58558, .cctor not being called in -O=shared.
14361 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14363 * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
14365 2004-05-24 Ben Maurer <bmaurer@users.sourceforge.net>
14367 * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
14368 which can be done with an imm8, do it that way.
14369 (mono_arch_output_basic_block): ditto for a jmp
14370 (mono_arch_emit_prolog): Computate maximum offset of a label.
14372 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
14374 * mini-x86.c (mono_arch_local_regalloc): the reg allocator
14375 now tries to allocate prefered physical reg's for virtual
14376 regs. This reduces the number of emited spills/loads with
14377 20-30% on our core assemblies.
14379 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14381 * jit-icalls.c: truncl() is not needed and trunc() is
14382 the correct thing to do anyway (bug #58287).
14384 2004-05-24 Zoltan Varga <vargaz@freemail.hu>
14386 * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
14389 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
14391 * driver.c: enable loop optimizations by default.
14393 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
14395 * mini-x86.c: fix calc of max loop size when aligning loops start.
14397 2004-05-23 Zoltan Varga <vargaz@freemail.hu>
14399 * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
14402 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
14404 * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
14407 * basic-long.cs: Add tests for add/subtract of immediates with carry.
14409 * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
14411 * mini.c (inline_method): Allways inline some wrappers even if the cost
14412 is too large. Fixes #58785.
14414 * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
14416 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
14418 * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
14419 (crichton@gimp.org). Beginning of support for sparc/linux.
14421 * mini-sparc.c: Optimize retrieval of LMF address.
14423 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
14425 * exceptions-ppc.c: handle alloca in methods with clauses.
14427 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
14429 * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
14431 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
14433 * mini.c: Delegate most of the abort signal work to
14434 mono_thread_request_interruption, which also handles Stop and Suspend
14437 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
14439 * mini.c mini.h: Allow inlining of icall wrappers if the backend
14440 supports the save/restore lmf opcodes.
14442 2004-05-19 Zoltan Varga <vargaz@freemail.hu>
14444 * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
14445 by gcc-3.4 as well.
14447 * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
14449 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
14451 * mini.h mini.c (mini_method_compile): Only run abc removal pass on
14452 methods which contain array accesses.
14454 * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
14455 boundaries. Fixes #58537.
14457 * iltests.il: Add regression test for #58537.
14459 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
14461 * mini-x86.c (mono_arch_local_regalloc): Last part of
14462 fix for bug #58633 (releasing register to early).
14464 2004-05-18 Miguel de Icaza <miguel@ximian.com>
14466 * basic-long.cs: Add new regression test.
14468 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
14470 * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
14471 register too early on the chain.
14473 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
14475 * mini.c (create_helper_signature): Use a helper function to reduce
14476 the code which needs to be written. Also set the calling convention of
14477 icalls on windows. Fixes #57840.
14479 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14481 * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
14482 exceptions-ppc.c: added helper function to get the instruction address
14483 from a signal handler context.
14485 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
14487 * helpers.c: use g_get_tmp_dir. Invokes happyness
14490 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
14492 * helpers.c: Add new env variable to pass args to objdump.
14493 Specifically for those of us who love -Mintel. r=miguel, gonzalo.
14495 2004-05-17 Radek Doulik <rodo@ximian.com>
14497 * Makefile.am (common_sources): added abcremoval.h so it get
14498 disted and daily mono packages on go-mono.com will build again
14500 2004-05-17 Massimiliano Mantione <massi@ximian.com>
14502 * abcremoval.c: Fixed coding style, added copyright header.
14504 * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
14506 * mini.h: Added prototype for abc removal main function.
14508 * build_relations_propagation_table.pl: Added copyright header.
14510 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
14512 * basic-long.cs: reg test for complex ceq_long bug.
14514 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
14516 * mini-x86.c (mono_arch_local_regalloc): Correctly free
14517 reg in long and clob case (bug #58343). Fixed/added comments.
14519 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
14521 * mini.c (mono_jit_runtime_invoke): Follow new convention
14522 of calling the invoke method with an function pointer.
14524 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
14526 * ChangeLog: Fix author of memory leak patch.
14528 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
14530 * Makefile.am: fix make dist as well...
14533 2004-05-14 Massimiliano Mantione <massi@ximian.com>
14535 * cfold.c: Made so that conversions from pointer to int4 are no-ops
14536 on archs where pointers are 4 bytes long.
14538 * Makefile.am: Added abcremoval.c source file.
14540 * abcremoval.c: Added abcremoval.c.
14542 * abcremoval.h: Added abcremoval.h.
14544 * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
14546 * inssel.brg: Enabled bounds check removal.
14548 * mini.c: Added support for abcrem optimization.
14550 * mini.h: Added abcrem optimization label.
14552 * driver.c: Added support for abcrem optimization.
14554 * propagated_relations_table.def: Added propagated_relations_table.def.
14556 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
14558 * mini.c, cfold.c: fix style.
14560 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14562 * mini.c: handle issue with the low-level implementation of
14563 some long opcodes (bug #54209).
14565 2004-05-13 Ben Maurer <bmaurer@users.sourceforge.net>
14567 * basic.cs: test for my new cmov stuff.
14569 2004-05-13 Patrik Torstensson
14571 * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
14572 opt and added peephole documentation.
14574 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
14576 * tramp-ppc.c: rewrote the generic trampoline code.
14578 2004-05-11 Patrik Torstensson
14580 * mini-x86.c: optimize long shl/shr asm code (one less branch)
14582 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
14584 * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
14586 * mini.h mini.c dominators.c: Applied patch from Derek Woo
14587 (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
14589 * mini.c: Add new icalls for AsAny marshalling.
14591 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14593 * tramp-ppc.c, mini-ppc.c: more cleanups.
14595 2004-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14597 * mini.c: no warnings.
14599 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14601 * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
14603 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
14605 * mini.c: In the thread abort signal handler, if the thread is in the
14606 process of being stoped, don't throw the Abort exception, just stop the
14609 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
14611 * tramp-ppc.c: removed old code.
14613 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14615 * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
14616 do some simple speed optimizations on ppc.
14618 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14620 * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
14621 and large offsets in load/store.
14623 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
14625 * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
14626 it causes regressions.
14628 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
14630 * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
14633 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14635 * jit-icalls.c: remove warnings.
14636 * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
14637 speedups for unsafe code.
14639 2004-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
14641 * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
14643 2004-05-06 Zoltan Varga <vargaz@freemail.hu>
14645 * basic-calls.cs: Add new regression test.
14647 * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
14650 * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
14652 * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
14655 2004-05-06 Patrik Torstensson
14657 * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
14658 long reg allocation in any reg (not only eax:edx) and implemented
14659 long shl/shr ops in asm instead of helpers.
14661 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
14663 * mini-sparc.h: Fix warnings.
14665 * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
14668 * mini-exceptions.c (mono_handle_exception): Call the filter in a
14669 separate statement for clarity.
14671 * mini-sparc.c: Update status.
14673 2004-05-04 Zoltan Varga <vargaz@freemail.hu>
14675 * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
14678 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14680 * inssel-ppc.brg: another small pre-release workaround:
14681 we don't do overflow detection for long_sub_un.
14683 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14685 * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
14686 (also works around a weird ppc bug: 57957).
14688 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
14690 * tramp-ppc.c: trampoline fixes.
14692 Fri Apr 30 15:54:26 EDT 2004 Paolo Molaro <lupus@ximian.com>
14694 * mini-ppc.c: fixed typos.
14696 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14698 * mini-ppc.c, exceptions-ppc.c: more code saves registers
14699 at the top of the stack. Fixed typos. Use a frame registers
14700 for all the methods with exception clauses.
14702 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14704 * exceptions-ppc.c: restore fp registers.
14706 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14708 * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
14709 order from the stack top (moved the stack room to save the
14710 return value for trace after the param area). Fixed corruption
14711 in restoring registers on unwind.
14713 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14715 * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
14717 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14719 * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
14720 and prolog/epilog for methods that use it. Allow
14721 enough param area room for varargs methods. Fix miguel's
14722 breakage in exception handling.
14724 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14726 * Makefile.am: run genmdesc only on current arch.
14728 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14730 * exceptions-x86.c:
14731 * mini-x86.h: fix the build on windows.
14733 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
14735 * 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.
14737 * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
14739 * mini-exceptions.c: New file.
14741 * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
14742 Move some parts of the x86 exception handling code to an
14743 arch-independent file so it can be shared with other ports.
14745 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
14747 * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
14749 2004-04-26 David Waite <mass@akuma.org>
14751 * driver.c: remove comma from end of enumeration declaration
14753 2004-04-26 Jackson Harper <jackson@ximian.com>
14755 * driver.c: parse config file before loading first assembly. This
14756 allows the user gac to be enabled/disabled.
14758 2004-04-23 Miguel de Icaza <miguel@ximian.com>
14760 * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
14761 simpler mechanism: we do not care what is encoded initially
14762 (branch absolute or relative), we care about the code and its
14763 target. I kept the old code for reference for now.
14765 The new code tries first to determine if the jump is anywhere in
14766 the -/+32 absolute meg range, if it succeeds, it encodes using the
14767 absolute branch; If not, it tried to find something in the
14768 relative range, if not, it uses the handle_thunk code.
14770 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
14772 * exceptions-ppc.c: use the correct ip register on macosx.
14774 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
14776 * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
14778 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
14780 * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
14781 Raise exception on integer divide by zero by hand since the hw
14782 doesn't support it. Handle NaNs in FP compares.
14784 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
14786 * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
14787 code reducing duplication between the platforms and enabled
14788 signal exception handling (on linux for now).
14790 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
14792 * exceptions-ppc.c: more macosx support.
14794 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14796 * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
14798 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
14800 * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
14802 2004-04-19 Ben Maurer <bmaurer@users.sourceforge.net>
14804 * iltests.il: more tests.
14806 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
14808 * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
14811 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
14813 * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
14815 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
14817 * liveness.c: Mark variables as volatile in all basic blocks reachable
14818 from exception clauses.
14820 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
14822 * exceptions.cs (test_0_rethow_stacktrace): Make this work with
14825 2004-04-18 Ben Maurer <bmaurer@users.sourceforge.net>
14827 * iltests.il, basic.cs: more tests for regalloc.
14829 2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
14831 * iltests.il: Some tests for register allocation modifications
14834 2004-04-16 Zoltan Varga <vargaz@freemail.hu>
14836 * exceptions.cs: Add regression test for bug #56782.
14838 * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
14839 original stack trace if an exception is rethrown. Fixes #56782. Oh,
14840 the beauty of fixing the same thing in 5 different files...
14842 2004-04-15 Zoltan Varga <vargaz@freemail.hu>
14844 * mini.c (mono_method_to_ir): Do not compute coverage for inlined
14847 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
14849 * mini.c: Add support for STRWLPARRAY marshalling convention.
14851 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
14853 * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
14854 to init the context to setup the regs pointer).
14856 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14858 * exceptions-ppc.c: more exceptions work.
14860 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14862 * mini.c: avoid reusing the same MonoInst on multiple trees: this is
14865 2004-04-13 Miguel de Icaza <miguel@ximian.com>
14867 * inssel-x86.brg (reg): Add new rules for add, sub and mul that
14868 can use the memory directly.
14870 * cpu-pentium.md: Update documentation from a post from Zoltan.
14872 add x86_add_membase, x86_sub_membase, x86_mul_membase
14874 2004-04-13 Miguel de Icaza <miguel@ximian.com>
14876 * mini-ppc.c: Remove unused definitions FLOAT_REGS and
14877 GENERAL_REGS they were also hardcoded for all PPC ports.
14879 (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
14881 Remove hard-coded limit for floating point registers, use
14882 PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
14884 Notice that in MacOS X calling conventions you can fit a lot more
14885 floating point values in registers, so I should update the PInvoke
14886 test to excercise the passing of floating point values on the
14887 stack (currently broken).
14889 2004-04-06 Miguel de Icaza <miguel@ximian.com>
14891 * tramp-ppc.c (create_trampoline_code): Added
14892 JUMP_TRAMPOLINE_SIZE.
14893 (ppc_magic_trampoline): Follow the pattern from
14894 x86_magic_trampoline: if code is set to zero, return.
14895 (create_trampoline_code): Always pass MonoMethod to the jump
14896 trampoline, before it was passing a null.
14897 (mono_arch_create_jump_trampoline): Implement the jump stub, could
14898 share the code with mono_arch_create_jit_trampoline.
14900 * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
14902 (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
14905 * cpu-g4.md: Added length for jmp instruction, the worst case
14906 scenario is 92 bytes (4 mandatory bytes, potential 19 registers
14909 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
14911 * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
14913 2004-04-07 Zoltan Varga <vargaz@freemail.hu>
14915 * mini.c: Only set bblock->real_offset when adding a new bblock, and
14916 before each IL instruction.
14918 * mini.c (CEE_BOX): Fix warnings.
14920 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14922 * mini.c: removed a few unused vars and extra whitespace.
14924 2004-04-05 Ben Maurer <bmaurer@users.sourceforge.net>
14926 * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
14928 (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
14930 (OP_GETCHR): use the above
14931 (CEE_LDELEMA): use the above.
14933 * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
14934 version of the generic impl.
14935 (MONO_EMIT_BOUNDS_CHECK_IMM): the same
14936 (CEE_LDELEMA): use the above.
14938 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
14940 * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
14943 * iltests.il: Added new regression test for #56317.
14945 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
14947 * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
14948 under NetBSD. Fixes #56450.
14950 * liveness.c (update_gen_kill_set): Fix previous patch.
14952 2004-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14954 * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
14956 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
14958 * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
14959 ldsfld and ldsflda.
14961 * inssel-sparc.brg: Add more optimizations.
14963 * mini-sparc.c: Replace multiply/divide with shifts if possible.
14965 2004-04-01 Martin Baulig <martin@ximian.com>
14967 * mini.c (handle_box): New static function; moved the
14968 implementation of CEE_BOX here.
14969 (mono_method_to_ir): Added `constrained_call' variable.
14970 (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
14971 (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
14972 mono_method_get_constrained() to get the method.
14974 2004-04-01 Martin Baulig <martin@ximian.com>
14976 * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
14977 (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
14978 (mono_method_to_ir): We don't need these macros anymore since
14979 mono_class_get_full() already takes care of it.
14981 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14983 * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
14984 use @function (as doesn't accept #function here) and check the return
14985 value of system and stop if fails.
14987 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14989 * mini.c: set the timeout to 2s when calling mono_domain_finalize.
14991 2004-03-31 Zoltan Varga <vargaz@freemail.hu>
14993 * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
14995 * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
14997 * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
15000 * basic-long.cs: Add test for negation of Int64.MinValue.
15002 2004-03-30 Zoltan Varga <vargaz@freemail.hu>
15004 * mini-sparc.c: Update status.
15006 * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
15008 * exceptions-sparc.c: Fix return value in filters.
15010 * inssel-sparc.brg: Fix register allocation in some rules.
15012 2004-03-28 Martin Baulig <martin@ximian.com>
15014 * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
15017 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
15019 * mini-x86.c (mono_arch_patch_code): Fix warnings.
15021 * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if
15022 dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
15023 remove unused conv_u4 opcode.
15025 * mini-x86.c: Remove valgrind workaround since it slows down things
15026 even when mono is not run under valgrind.
15028 2004-03-26 Zoltan Varga <vargaz@freemail.hu>
15030 * mini-sparc.c: Update status.
15032 * inssel-sparc.brg: Add some optimizations.
15034 * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
15035 future delay slot filling. Add support for varargs, tail calls and JMP.
15037 * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of
15038 CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
15040 * inssel.brg: Fix register allocation in OP_ARGLIST.
15042 * inssel.brg: Fix warnings.
15044 2004-03-25 Martin Baulig <martin@ximian.com>
15046 * mini.c (inflate_generic_field): Removed.
15047 (mini_get_method): Removed, use mono_get_method_full(),
15048 (mini_get_class): Removed, use mono_class_get_full().
15049 (mono_method_to_ir): Pass our generic context to
15050 mono_field_from_token().
15052 2004-03-25 Martin Baulig <martin@ximian.com>
15054 * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
15055 of a `MonoMethod *'.
15056 (mini_get_method): Take a `MonoGenericContext *' instead
15057 of a `MonoMethod *'.
15058 (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
15059 a new local variable called `generic_context' which holds the
15060 current `MonoGenericContext *'; use it to lookup things.
15062 2004-03-24 Martin Baulig <martin@ximian.com>
15064 * mini.c (mini_get_class): New static method; if we're inside a
15065 generic instance, inflate the class if neccessary.
15066 (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
15068 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
15070 * iltests.il: New regression test for #55976.
15072 * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
15075 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
15077 * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
15080 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
15082 * liveness.c: Consider SSA stores as well as loads when making vars
15085 * exceptions.cs: New regression tests for register allocation.
15087 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
15089 * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
15090 * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
15091 domain lock only to protect puntual access to data structures.
15092 Added access lock for sighash, jit_icall_hash_name,
15093 jit_icall_hash_addr and domain->code_mp.
15095 2004-03-20 Zoltan Varga <vargaz@freemail.hu>
15097 * driver.c: Print SIGSEGV handling method.
15099 * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
15101 * mini.c (setup_jit_tls_data): Handle case when this is called
15102 multiple times for a thread.
15104 * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx
15105 is different from fbxx_un. Fixes #54303. Also use constants instead of
15106 magic numbers in a lot of places.
15108 2004-03-19 Zoltan Varga <vargaz@freemail.hu>
15110 * exceptions.cs: Fix cctor test when --regression is used.
15112 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
15114 * mini-ppc.c, exceptions-ppc.c: basic exceptions support
15117 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
15119 * inssel-ppc.brg: fixed register assignments for some rules.
15121 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
15123 * exceptions.cs: Add test for exceptions in static constructors.
15125 * mini.c (mono_jit_compile_method_with_out): Move the calling of
15126 static constructors outside the domain lock. Fixes #55720.
15128 2004-03-17 Martin Baulig <martin@ximian.com>
15130 * mini.c (get_generic_field_inst): Removed, this'll never happen.
15131 (inflate_generic_field): Take the `MonoMethod *' instead of the
15132 `MonoClass *' and added support for generic method.
15133 (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
15134 have a `field->parent->gen_params', only inflate the field if it's
15135 an open constructed type.
15137 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
15139 * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
15140 exception object instead of the preconstructed ones.
15142 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15144 * mini.c: reverted changed to sigsegv_signal_handler commited
15145 accidentally in the previous patch.
15147 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15150 (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
15151 running --aot with an old assembly.
15153 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
15155 * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
15158 * mini-sparc.c: Add support for v9 branches with prediction.
15160 2004-03-15 Bernie Solomon <bernard@ugsolutions.com>
15162 * mini.c (mini_init): #warning is GNUC only
15164 * mini-sparc.h: implement __builtin_frame_address
15165 and __builtin_return_address for Sun C compiler
15167 2004-03-15 Zoltan Varga <vargaz@freemail.hu>
15169 * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
15171 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
15173 * basic-calls.cs: Add test for unaligned byref long argument passing.
15175 * mini-ops.h: Add sparcv9 compare and branch instructions.
15177 * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
15178 v9 instructions if we have a v9 cpu.
15180 * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
15181 registers for global allocation.
15183 * exceptions-sparc.c: Fixes.
15185 2004-03-11 Zoltan Varga <vargaz@freemail.hu>
15187 * liveness.c (mono_analyze_liveness): Optimized version.
15189 * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
15191 * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
15194 * basic-float.cs basic-calls.cs: New regression tests.
15196 2004-03-10 Zoltan Varga <vargaz@freemail.hu>
15198 * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
15199 sigaltstack implementation.
15201 * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
15203 * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
15204 stuff if SIGSEGV_ON_ALTSTACK is not defined.
15206 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
15208 * mini.c: Fix warnings.
15210 * mini.c (mono_resolve_patch_target): New function which contains the
15211 arch independent part of the patching process.
15213 * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
15214 patching code to a separate function.
15216 2004-03-09 Bernie Solomon <bernard@ugsolutions.com>
15218 * mini.c (add_signal_handler): ifdef out on Windows
15220 2004-03-08 Zoltan Varga <vargaz@freemail.hu>
15222 * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c
15223 cpu-sparc.md: Add exception handling support + other fixes.
15225 * driver.c: Print --help output to stdout. Fixes #55261. Also fix
15226 typed GC detection in --version.
15228 * basic.cs exceptions.cs: New regression tests.
15230 * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
15231 the arch specific code can store data during a compilation.
15233 * mini-ops.h: Add OP_SETFRET.
15235 * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
15236 function, register a separate icall for each arity, so the icalls can
15239 * mini.c (mono_print_tree): Print negative offsets in a more readable
15242 * mini.c: Make signal handling work on sparc.
15244 * mini.c (mini_init): Add emulation for lconv_to_r8_un.
15246 * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
15248 * jit-icalls.c: Emulate truncl by aintl on solaris.
15250 * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
15252 2004-03-05 Zoltan Varga <vargaz@freemail.hu>
15254 * mini.c (mini_init): fconv_to_ovf can raise exceptions.
15256 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
15258 * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
15259 a MarshalByRef type, inline a method that performs the check, taking into
15260 account that the object can be a proxy. Also implemented tow new opcodes:
15261 CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
15262 * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and
15263 OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
15265 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
15267 * mini-ppc.c: if a relative branch displacement is too big
15268 but it points to and area reachable with an absolute branch,
15271 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
15273 * mini.c: optimize small copies in cpblk.
15275 2004-03-01 Zoltan Varga <vargaz@freemail.hu>
15277 * basic-calls.cs basic-float.cs: New regression tests.
15279 * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at
15280 negative offsets from %fp. Implement localloc. Fix local register
15281 allocation. Fix the case when the this argument needs to be saved to
15282 the stack. Implement some missing opcodes.
15284 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
15286 * mini.c (mini_method_compile): Reenable global regalloc in methods
15287 with exception handlers.
15289 * linear-scan.c (mono_varlist_sort): Fix warning.
15291 * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
15293 * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
15296 * liveness.c: Make all variables uses in exception clauses volatile, to
15297 prevent them from being allocated to registers. Fixes #42136.
15299 2004-02-25 Zoltan Varga <vargaz@freemail.hu>
15301 * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
15302 causes regressions.
15304 * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
15305 argument to mono_arch_regalloc_cost.
15307 * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs
15310 2004-02-24 Zoltan Varga <vargaz@freemail.hu>
15312 * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c:
15313 Make the cost of allocating a variable to a register arch dependent.
15315 * basic-calls.cs: Fix compilation of tests.
15317 * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
15318 helper function to cut back on the number of #ifdefs needed.
15320 * mini-ppc.c: Fix compilation.
15322 * basic-calls.cs: New regression tests.
15324 * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
15326 * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
15327 of l0 since that is callee saved.
15329 * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
15332 * mini-sparc.c: Ongoing work + flag virtual calls with a special kind
15333 of delay instruction.
15335 * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
15337 * mini.h (MonoCallInst): Add 'virtual' flag.
15339 * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
15341 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
15343 * *.cs: New regression tests.
15345 * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc
15348 * mini.c (mono_runtime_install_handlers): Fix build.
15350 * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
15351 'signal_stack_size' members.
15353 * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an
15354 alternate signal stack.
15356 * exceptions-x86.c: Add stack overflow handling.
15358 * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing
15359 functions to arch independent code.
15361 * mini.c (mono_print_tree): Print more detailed info for load_membase
15364 2004-02-23 Martin Baulig <martin@ximian.com>
15366 * mini.c (mini_get_method): Set `gmethod->generic_inst'.
15368 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
15370 * mini-x86.c: fixed reg allocation for div/rem.
15372 2004-02-22 Miguel de Icaza <miguel@ximian.com>
15374 * driver.c (mono_main): Report some configuratio options on --version.
15376 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
15378 * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
15379 low in the address space. Correctly flush memory in thunks where we
15380 output native code.
15382 2004-02-20 Martin Baulig <martin@ximian.com>
15384 * mini.c (mini_get_method): New static method; inflate all generic
15385 methods and methods in open generic instances.
15386 (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
15387 (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
15389 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
15391 * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
15393 * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
15395 2004-02-19 Bernie Solomon <bernard@ugsolutions.com>
15397 * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
15399 * mini-sparc.c (flushi mono_arch_output_basic_block): make
15400 it compile using Sun's compiler.
15402 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
15404 * 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.
15406 * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
15408 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
15410 * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
15412 * mini-ppc.c: handle calls outside of the allowed range with thunks
15413 allocated using the code manager.
15414 * tramp-ppc.c: use the code manager to hold generated native code.
15415 Fixed the magic trampoline to just patch vtable entries.
15417 2004-02-17 Zoltan Varga <vargaz@freemail.hu>
15419 * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
15422 2004-02-16 Zoltan Varga <vargaz@freemail.hu>
15424 * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
15427 * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
15428 if we have a working __thread implementation.
15430 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove
15431 OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
15433 2004-02-15 Zoltan Varga <vargaz@freemail.hu>
15435 * mini-x86.c: Fix compilation under gcc 2.
15437 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
15439 * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
15440 contains a call to the wrapped function.
15442 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add
15443 OP_<CALL>_IMM opcodes, and use them under X86.
15445 * mini.c (mono_jit_find_compiled_method): Fix warning.
15447 * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
15449 * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
15451 * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
15452 functionality to mini.c.
15454 * mini.c (mono_create_jump_trampoline): New function to create a jump
15455 trampoline. Return a compiled method instead of a trampoline if it
15456 exists. Add a cache for jump trampolines.
15458 * mini.c (mono_jit_find_compiled_method): New function to return a
15459 compiled method if it exists.
15461 * mini-x86.c: Call mono_create_jump_trampoline instead of
15462 mono_arch_create_jit_trampoline.
15464 * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
15465 a jump trampoline. Fixes #52092.
15467 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
15469 * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
15470 which is not up-to-date. Add check_corlib_version () instead.
15472 * mini.c (mini_init): Call mono_thread_attach () so embedders do not
15475 * mini.c (mono_runtime_install_handlers): Remove check for valgrind
15476 since newer valgrind versions do not need it.
15478 * mini.c (mono_jit_compile_method_with_opt): New helper function to
15479 compile a method with a given set of optimizations.
15481 * mini.c: Compile icall wrappers on-demand instead of at startup.
15483 * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
15484 wrapper for an icall.
15486 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
15488 * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
15491 * iltests.il: Add test for non-empty stack before switch instruction.
15493 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
15495 * mini.c: Add support for new stringbuilder marshalling conventions.
15497 * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
15499 2004-02-01 Martin Baulig <martin@ximian.com>
15501 * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
15502 in `ginst->mtype_argv'.
15504 2004-01-31 Miguel de Icaza <miguel@ximian.com>
15506 * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
15507 facilitate grepping.
15509 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
15511 * mini.c: fixed buglet in initobj generic implementation for references.
15513 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
15515 * Makefile.am: make the version script conditional.
15516 * jit-icalls.c: handle missing truncl().
15518 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
15520 * exceptions.cs: Add more tests for double->int conversion.
15522 * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
15523 we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
15525 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
15527 * driver.c: make --verbose --version emit an error
15528 if the loaded corlib doesn't match the runtime version.
15530 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
15532 * mini-ppc.h: export ppc_patch().
15533 * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
15534 * tramp-ppc.c: call convention fixes: Linux/PPC support should be
15535 on par or better than on MacOSX.
15537 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
15539 * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
15540 mono_lookup_pinvoke_call.
15542 * mini-x86.c: Under windows, the default pinvoke calling convention is
15543 stdcall. Fixes #52834.
15545 * mini.c (optimize_branches): Add an upper bound to the number of
15546 iterations to prevent infinite loops on strange loops. Fixes #53003.
15548 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
15550 * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
15551 and ISINST. Fixes #52093.
15553 * objects.cs (test_0_vector_array_cast): New tests.
15555 2004-01-15 Zoltan Varga <vargaz@freemail.hu>
15557 * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
15558 checking in Array.Set ().
15560 * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
15563 * object.cs (test_0_multi_array_cast): New regression test.
15565 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
15567 * exceptions-ppc.c: fix build on Linux/PPC.
15569 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
15571 * tramp-x86.c (x86_magic_trampoline): Disable code patching when
15572 running under valgrind.
15573 (x86_magic_trampoline): Fix build bustage.
15575 * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
15576 negative values as well. This is needed for the encoding of the line number
15577 info, since sometimes the line numbers are not in increasing order.
15579 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
15581 * cpu-pentium.md (localloc): Increase the size of the localloc
15582 instruction since it is a loop under Win32.
15584 * debug-mini.c (record_line_number): Get rid of unneccesary memory
15587 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
15589 * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c
15590 tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from
15591 Max Horn (max@quendi.de). Fix file names in comments.
15593 2004-01-03 Zoltan Varga <vargaz@freemail.hu>
15595 * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
15596 avoid stack overflow.
15597 (replace_usage): Avoid uninitialized variable warnings.
15599 * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
15600 and taking the address of valuetype variables.
15602 2004-01-03 Patrik Torstensson
15604 * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
15605 for other purposes than FP later on.
15607 2004-01-02 Zoltan Varga <vargaz@freemail.hu>
15609 * mini.c (mono_method_to_ir): Prevent register allocation for arguments
15612 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
15614 * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
15616 2003-12-30 Patrik Torstensson <p@rxc.se>
15618 * mini-x86.h: Decreased number of availiable fp regs.
15619 Solves corner cases with FP spilling.
15621 2003-12-23 Patrik Torstensson <p@rxc.se>
15623 * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
15624 for floating point stack tracking / spilling on x86.
15627 * basic-float.cs: added float mul overflow test.
15629 2003-12-23 Zoltan Varga <vargaz@freemail.hu>
15631 * mini.c (mono_method_to_ir): Add workaround for bug #51126.
15633 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15635 * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
15636 supports for cond branches that overflow the immediate
15637 overflow offset. mcs can compile simple programs.
15639 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15641 * exceptions-ppc.c: exception handling support wip:
15642 finally handlers get run on exception.
15644 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
15646 * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while
15649 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15651 * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
15652 initial support for stack walking and unwinding.
15654 2003-12-18 Zoltan Varga <vargaz@freemail.hu>
15656 * driver.c (mono_main): Make corlib-out-of-sync message more
15657 descriptive. Also remove verify_corlib call.
15659 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15661 * mini.c: make CEE_NEWARR calls and other emulated opcodes
15662 not overlap with other call's arguments, too.
15664 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
15666 * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c:
15667 move to arch-specific code the choice of arch-specific
15668 intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
15669 * mini.c: ensure emulation calls will not interleave
15672 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
15674 * tramp-ppc.c, basic-calls.cs: rework trampolines so that
15675 the magic trampoline stack frame is dropped before executing
15678 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15680 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
15681 and integer to fp conversions. Added support for overflowing
15682 arguments on the stack. Reserve a couple more registers as temps.
15683 Added support for aot compilation (as output still needs to be
15686 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15688 * mini-ppc.c, basic-long.cs: fix jumps to known labels.
15689 Don't overwrite return register in some corner cases.
15691 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
15693 * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
15694 static constructors when AOT compiling.
15696 * driver.c (mono_main): Call mono_check_corlib_version.
15698 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15700 * cpu-g4.md, basic.cs: fixed div target register.
15702 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
15704 * mini-ppc.c, basic.cs: shl_imm fix with test.
15706 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15708 * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing
15709 structures by value. Misc fixes.
15710 * objects.cs: more tests.
15712 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
15714 * mini-ppc.c: lconv.ovf.i implemented.
15716 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15719 (mini_init): don't error out if someone already called g_thread_init.
15721 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15723 * exceptions-x86.c, exceptions-ppc.c: allow the exception object
15724 to be any type per the spec. Fix abnormal memory usage when
15725 the same object is repeatedly thrown.
15727 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
15729 * mini.c: check for overruns in IL code.
15731 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
15733 * TODO: Add/remove some todo entries.
15735 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
15737 * driver.c (mono_main): Call mono_verify_corlib.
15739 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
15741 * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy.
15742 This has been moved to mini.c
15743 * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
15744 type being casted is marshalbyref it could be a proxy, so instead of
15745 emitting the type check code, emit a call to a runtime method that will
15746 perform the check by calling CanCastTo if needed.
15748 2003-12-06 Zoltan Varga <vargaz@freemail.hu>
15750 * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
15751 methods with large stack frames under Win32.
15753 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
15755 * Makefile.am: Distribute regression tests.
15757 * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
15758 at the end instead of inserting each variable into the sorted list.
15760 * linear-scan.c (mono_varlist_sort): New helper function.
15762 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15764 * mini.c: ensure arguments and locals are within bounds.
15766 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15768 * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and
15771 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
15773 * mini.c (mono_cprop_copy_values): Fix crash.
15775 * aot.c: Set verbosity back to 0.
15777 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15779 * regalloc.c: complete memory leak fix by Laurent Morichetti
15782 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
15784 * driver.c (main_thread_handler): Revert the previous patch.
15786 * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
15789 * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
15790 memory from the memory pool.
15792 * driver.c (main_thread_handler): Turn on all optimizations when
15795 * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
15796 an array for better performance.
15798 * regalloc.c (mono_regstate_assign): Fix memory leak.
15800 * debug-mini.c (mono_debug_serialize_debug_info): New function to
15801 serialize the debug info.
15803 * debug-mini.c (mono_debug_add_aot_method): New function to load the
15804 debug info from the serialized representation.
15806 * aot.c: Save debug info into the generated file and load it when
15809 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15811 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15813 * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
15814 More FP-related fixes.
15816 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15818 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
15819 and register allocation buglet. Hello world now runs.
15821 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15823 * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
15824 * tramp-ppc.c: fixed class init trampoline.
15825 * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
15827 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15829 * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
15830 mini.c: more ppc changes/fixes.
15832 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
15834 * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
15835 Also optimize the case when the arguments are the same in the caller
15838 * iltests.il: Add tests for tail calls with valuetype arguments.
15840 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15842 * mini-ppc.c: fixes for struct return type.
15844 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
15846 * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move
15847 mono_spillvar_offset() to arch-specific code.
15849 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15851 * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
15853 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
15855 * exceptions-x86.c: Fix stack space leaks.
15857 * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
15858 registers from the lmf if the method has save_lmf set.
15860 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
15862 * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
15863 of icall wrappers into InvokeInDomain, since these are now per-domain.
15865 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
15867 * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
15868 make some opcode emulation and intrinsic ops enabled/disabled
15869 according to the architecture. More fixes.
15871 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15873 * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
15875 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15877 * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
15878 arch-specific handling for 'this' and struct return type to
15879 arch-specific code.
15881 2003-11-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15883 * aot.c: prevent divide by zero error when reporting (it happened with
15884 Accessibility.dll).
15886 2003-11-25 Zoltan Varga <vargaz@freemail.hu>
15888 * mini.h (inst_switch): Remove unused macro.
15890 2003-11-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15893 (load_aot_module): free 'info->methods' and 'info' properly. No more
15894 "free(): invalid pointer blah" messages when you have an old aot
15897 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
15899 * jit-icalls.c, mini.c: Added support for context static fields.
15901 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
15903 * mini.c (mono_method_blittable): Methods which set LastError are not
15904 blittable either. Fixes #51108.
15906 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15908 * mini.c: flush icache.
15909 * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
15911 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
15913 * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
15915 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
15917 * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
15920 * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with
15923 * inssel.brg (CEE_MKREFANY): Fix AOT case.
15925 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
15927 * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div
15928 instruction when the result is discarded.
15930 * iltests.il (test_0_div_regalloc): New regression test.
15932 * arrays.cs: Fix compilation error.
15934 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
15936 * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
15937 float rules to inssel-x86.brg: sane architectures with FP registers
15938 don't need to implement these rules.
15940 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15942 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
15944 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15946 * mini.h, inssel-long32.brg: fixed endianess issues in int64
15947 implementation of 32 bit systems.
15949 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15951 * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
15952 (Jeroen Zwartepoorte).
15954 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
15956 * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
15957 the caller and the callee matches.
15959 * mini.c (mono_method_to_ir): Add comment.
15961 * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
15962 signbit is missing on some platforms.
15964 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
15966 * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
15968 * mini.c (setup_jit_tls_data): Call the new function.
15970 * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
15972 * mini-x86.c: Add experimental support for fast access to the lmf
15973 structure under NPTL/Linux 2.6.x.
15975 2003-11-06 Martin Baulig <martin@ximian.com>
15977 * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
15978 `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
15981 2003-11-02 Martin Baulig <martin@ximian.com>
15983 * mini.c (inflate_generic_field): New static method.
15984 (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
15985 generic instance and the field is declared in a generic type, call
15986 inflate_generic_field() to inflate it. Fixes gen-28.cs.
15988 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
15990 * mini.h mini.c (mono_method_same_domain): New function to return
15991 whenever the caller and the callee are in the same domain.
15993 * tramp-x86.c (x86_magic_trampoline): Use the new function.
15995 2003-10-30 Martin Baulig <martin@ximian.com>
15997 * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
15998 similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
16000 (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
16001 MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS().
16003 2003-10-29 Zoltan Varga <vargaz@freemail.hu>
16005 * mini.c mini-ops.h inssel.brg: Implement undeniable exception
16008 * mini.c (sigusr1_signal_handler): Move creation of the thread abort
16009 object here, so it is in the correct appdomain etc.
16011 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
16013 * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
16015 (mono_method_to_ir): Avoid freeing the type created returned from
16016 mono_type_create_from_typespec, since it is put into an internal cache
16017 by the function. Fixes pointer.exe.
16019 * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal
16020 trampolines for icalls and pinvokes as well. Fixes #33569.
16022 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
16024 * mini.c: Update after appdomain changes.
16026 * mini.c (mono_jit_compile_method_inner): Allways compile native
16027 method wrappers in the root domain, since there can only be one
16028 instance of them, whose address is stored in method->info.
16030 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
16032 * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
16033 environment variable. Instead detect automatically whenever running
16034 under valgrind using the magic macro RUNNING_ON_VALGRIND from
16037 2003-10-16 Miguel de Icaza <miguel@ximian.com>
16039 * trace.c, trace.h: New files that implement the new trace option
16042 * driver.c: Document new --trace options.
16044 * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
16047 - if (mono_jit_trace_calls)
16048 + if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
16050 * mini.h: prototypes.
16052 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
16054 * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
16056 * mini.c inssel.brg: Implement typedefbyref opcodes.
16058 * mini.c (mono_jit_compile_method): Remove unused local variable.
16060 * mini.c (mono_jit_compile_method_inner): Ditto.
16062 2003-10-12 Zoltan Varga <vargaz@freemail.hu>
16064 * tramp-x86.c (x86_class_init_trampoline): Fix build.
16066 * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
16068 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
16070 * mini.c (mono_no_aot): Remove unused global variable.
16072 * mini.c: Thread safety fixes.
16074 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
16076 * mini.c (mono_create_class_init_trampoline): Add a lock around
16077 class_init_hash_addr.
16079 * arrays.cs (test_0_newarr_emulation): Add new regression test for
16082 * mini.c: Decompose the NEWARR instruction before decomposing its
16083 arguments. Fixes #30073.
16085 2003-10-08 Zoltan Varga <vargaz@freemail.hu>
16087 * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
16090 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
16092 * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
16094 * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
16096 * driver.c: Add support for compiling icall wrappers to --compile.
16098 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
16100 * inssel.brg: The empty value in class->interface_offsets is -1, not
16103 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
16105 * objects.cs: New test for 'is' operator on an array of interfaces.
16107 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16109 * tramp-ppc.c: update trampoline code to support jumps
16110 and class initialization.
16112 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
16114 * mini.c (mono_jit_compile_method): Fix reading of freed memory.
16116 * inssel.brg (OP_UNBOXCAST): Fix #46027.
16118 * inssel.brg (OP_UNBOX): Remove unused rule.
16120 * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
16121 region instead of one for each method. Fixes #47813.
16123 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
16125 * exceptions.cs (test_0_nested_finally): New regression test for
16126 nested exception handlers.
16128 * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
16130 * mini.c (mono_method_to_ir): Avoid inlining tail calls.
16132 * mini.c (mono_method_to_ir): Fix tail recursion in the presence of
16135 * mini.c (mono_method_check_inlining): Make the inlining limit
16136 configurable by an environment variable.
16138 * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
16140 * mini.h: Bump AOT file version.
16142 * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a
16143 token, store the image along with the token, since the token might not
16144 refer to the same image as the method containing the relocation,
16145 because of inlining.
16147 2003-09-27 Zoltan Varga <vargaz@freemail.hu>
16149 * mini.c (mono_precompile_assemblies): New function to compile
16150 all methods in all loaded assemblies.
16152 * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
16154 * regalloc.h regalloc.c (MonoRegState): Change the type of
16155 iassign and fassign to int*, since they can contain large negative
16156 values if the register is spilled. Also added some comments. Fixes
16159 * exceptions-x86.c (seh_handler): Fix handling of system exceptions
16160 under Win32. Fixes #42964.
16162 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
16164 * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
16166 * aot.c: Added support for AOT compiling methods which contain calls
16167 to wrappers. Currently, only remoting-invoke-with-check wrappers are
16170 * driver.c (compile_all_methods): Run the compilation in a thread
16171 managed by mono. Fixes #44023.
16173 * mini.c (mono_codegen): Print full method name in verbose output.
16175 * mini-x86.c (mono_arch_patch_code): Fix warning.
16177 * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
16178 jumps, since the method we are jumping to might be domain-specific.
16180 * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
16182 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16184 * inssel.brg: string chars are unsigned.
16186 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
16188 * TODO: New todo item.
16190 * tramp-x86.c (x86_class_init_trampoline): New trampoline function
16191 which calls mono_runtime_class_init and patches the call site to
16192 avoid further calls.
16193 (mono_arch_create_class_init_trampoline): New arch specific function
16194 to create a class init trampoline.
16195 (create_trampoline_code): Generalized so it can create
16196 class init trampolines as well.
16198 * mini.c (helper_sig_class_init_trampoline): New helper variable.
16199 (mono_create_class_init_trampoline): New function to create and cache
16200 class init trampolines.
16201 (mono_find_class_init_trampoline_by_addr): New function to lookup the
16202 vtable given the address of a class init trampoline. Used by the
16204 (mono_codegen): Generate a call to a trampoline instead of
16205 mono_runtime_class_init in LDSFLD[A].
16206 (mono_codegen): Add relocations for the new trampoline.
16208 * mini.h mini-x86.c aot.c: Added a new relocation type:
16209 MONO_PATCH_INFO_CLASS_INIT.
16211 * mini.h: Bump AOT version number.
16213 * aot.c: Create a copy of the loaded code instead of using the original
16214 so methods which call each other will be close in memory, improving
16217 * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
16218 patch since it breaks the regression tests.
16220 * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
16221 for the register saving instruction sequence since the
16222 frame_state_for function in glibc 2.3.2 don't seem to detect it.
16224 2003-09-14 Zoltan Varga <vargaz@freemail.hu>
16226 * TODO: Fix todo item && remove another.
16228 2003-09-12 Zoltan Varga <vargaz@freemail.hu>
16230 * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
16233 * aot.c: Moved the check for MONO_LASTAOT into the initialization
16234 function of the module.
16236 * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
16237 turning on/off the usage of AOT code. Got rid of mono_no_aot and the
16238 --no-aot command line option.
16240 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
16242 * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
16243 by Bernie Solomon (bernard@ugsolutions.com).
16245 * inssel.brg: Refactor the interface offset table related code into
16246 its separate functions and add support for the AOT case.
16248 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
16250 * aot.c (mono_aot_get_method_inner): Fix memory leak.
16252 * aot.c: Added mono_aot_verbose variable and made all debugging
16253 output depend on the value of this variable.
16255 * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
16256 method_label and info_label.
16258 * mini.h mini-x86.c aot.c: Added a new relocation type
16259 MONO_PATCH_INFO_IID for klass->interface_id.
16261 * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
16262 the MonoJitInfo structure.
16264 * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
16265 a non-root appdomain in shared mode.
16267 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
16269 * aot.c: make aot loader less verbose. Remove free of unused variable.
16271 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
16273 * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
16275 * .cvsignore: Added *.dll.
16277 * mini.c (mono_print_tree_nl): New function callable while debugging.
16279 * mini.c (mono_print_code): Export this.
16281 * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
16284 2003-09-05 Zoltan Varga <vargaz@freemail.hu>
16286 * mini.h (MonoCompile): Added 'jit_info' field.
16288 * mini.c (mini_method_compile): Save the generated MonoJitInfo into
16289 the cfg structure, since it is needed by the AOT compiler.
16291 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
16293 * aot.c: A major rewrite. Changes include:
16294 - save exception tables for methods which have them.
16295 - cache failed lookups in aot_get_method () to avoid the (slow) calls
16296 to g_module_symbol.
16297 - reworked the file format so it is now much smaller and needs
16298 fewer relocation entries.
16300 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
16302 * aot.c (load_aot_module): Fix build bustage on platforms without
16305 2003-09-04 Martin Baulig <martin@ximian.com>
16307 * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
16309 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
16311 * TODO: Some new optimization ideas.
16313 * aot.c: Move AOT module loading logic here from mono_assembly_open.
16315 * aot.c: Save the optimization flags used to compile the code into
16318 * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
16319 support emitting domain specific code.
16321 * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is
16322 no longer domain neutral. It can be made domain neutral by compiling
16323 with --optimize=shared.
16325 * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
16326 between appdomains.
16328 * driver.c mini.h mini.c: New --no-aot debugging option which disables
16329 loading of AOT code.
16331 * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
16333 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
16334 if there is no domain neutrality information.
16336 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
16338 * aot.c (mono_compile_assembly): Emit a symbol containing the file
16339 format version into the generated library.
16341 * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
16342 callee method into the caller since one of them could be shared.
16344 * mini.h mini-x86.c aot.c: Added two new relocations so throwing
16345 system exceptions from AOT code now works.
16347 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling
16348 method if it is domain neutral and the callee is not.
16350 * graph.c (cfg_emit_one_loop_level): Fix warning.
16352 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
16354 * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
16357 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
16359 * mini.c (mini_init): Call mono_marshal_init () explicitly since it
16360 is needed by code which is executed before mono_runtime_init ().
16361 Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
16363 * mini.c (mono_thread_abort): Fix warning.
16364 (mono_jit_compile_method): Call static constructor in the AOT case too.
16366 * aot.c (mono_compile_assembly): Fix warning.
16368 2003-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16370 * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
16372 2003-08-28 Zoltan Varga <vargaz@freemail.hu>
16374 * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
16376 * cpu-pentium.md: Fix the length of call opcodes so they include the
16377 ESP restoring instruction. Fixes #47968.
16379 2003-08-28 Martin Baulig <martin@ximian.com>
16381 * mini-x86.c (mono_arch_call_opcode): Added support for
16382 MONO_TYPE_GENERICINST.
16384 * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.
16386 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
16388 * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
16389 a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
16391 * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
16394 2003-08-26 Martin Baulig <martin@ximian.com>
16396 * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
16397 when reporting an error, set this to the actual error location.
16398 (mono_method_to_ir): Report the correct error location if
16399 get_basic_blocks() returned an error.
16401 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
16403 * mini.c (mono_type_blittable): OBJECT is not blittable.
16404 (mono_method_blittable): Methods which have marshalling descriptors
16405 are not blittable either. Fixes #47842.
16407 2003-08-22 Zoltan Varga <vargaz@freemail.hu>
16409 * driver.c mini.c: Use an environment variable instead of a global
16410 variable. Also fix the build.
16412 * mini.c (mini_init): Call g_thread_init () to make glib thread-safe.
16413 Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
16416 * driver.c mini.c: Added --with-valgrind option to turn off some
16417 code which prevents mono from running under valgrind.
16419 * mini.c (mono_emit_call_args): Fixed warning.
16421 * mini.c (mono_emulate_opcode): Fixed warning.
16423 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16425 * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
16426 * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
16427 regalloc.c, regalloc.h: specify available registers in arch-specific
16428 code and support floats in the regallocator (patch by Laurent Morichetti
16431 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16433 * mini.c: mono_thread_current() can be called only after
16434 mono_runtime_init(): rearrange code to not call it early on.
16436 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16438 * mini.c: allocate jump tables in the code mempools.
16440 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16442 * mini.c, mini.h: make sure per-thread data allocated by the jit is
16445 2003-08-10 Miguel de Icaza <miguel@ximian.com>
16447 * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
16448 12 to 16. This fixes bug #47453.
16451 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
16453 * mini-ppc.c: fixed indexed load and unsigned compares.
16455 2003-08-06 Lluis Sanchez Gual <lluis@ximian.com>
16457 * mini.c: reenabled installation of handler for
16458 thread abort signal.
16460 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16462 * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
16463 by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
16464 until it's fixed and actually useful.
16466 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16468 * inssel-long32.brg: couple more opcodes implemented.
16470 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
16472 * mini-sparc.c: Even more opcodes implemeted.
16474 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
16476 * mini-sparc.c: More opcodes implemented.
16478 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
16480 * mini-sparc.c: More opcodes implemented.
16482 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
16484 * inssel-sparc.brg: Add some needed rules. Direct
16486 * Makefile.am: Use inssel-sparc.brg
16487 * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
16488 an assert happy for now.
16490 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
16492 * mini-sparc.c: Fixed compile errors.
16493 * exceptions-sparc.c: Same. We now produce a mono binary
16494 on sparc-linux. Yea.
16496 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
16498 * mini-sparc.c: Renamed registers. Also some macro cleanups.
16499 * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
16500 They compile, but do not work.
16502 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16504 * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
16505 mini-sparc.h, tramp-sparc.c: Beginning of sparc support
16506 from Mark Crichton <crichton@gimp.org> and Christopher Taylor
16509 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16511 * mini.c: more opcodes implemented and better support for generics.
16513 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16515 * cpu-g4.md, cpu-pentium.md: updates for new instructions.
16516 * mini.c, mini.h: first cut at generics support: some new instructions
16517 added and changed the behaviour of some of the existing ones.
16519 2003-07-21 Miguel de Icaza <miguel@ximian.com>
16521 * mini.c: Removed definition of metadata_shared mutex here.
16523 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16525 * mini-x86.c: make vararg calls work for instance methods.
16527 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
16529 * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
16530 returns the arguments in a separte list, now.
16532 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16534 * aot.c, mini.c: updates for array type representation changes.
16536 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
16538 * mini.c: register function to perform jit shutdown.
16540 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16542 * mini.c: use a faster allocator if possible.
16544 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16546 * aot.c: some cleanups and portability changes.
16548 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16550 * mini.c: use faster allocation for CEE_BOX if possible.
16552 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16554 * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
16555 Moved inlined mempcy code to its own function so that is can be
16556 reused. Added an inline memset function as well (optimized initobj).
16557 * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
16559 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16561 * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
16563 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
16565 * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
16566 arch code can setup the cpu for CLR execution, if needed.
16567 We use it on x86 to set the precision of FP operations.
16569 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
16571 * mini.c: disable some optimizations if we can guess they'll cost too
16572 much for a given method.
16574 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
16576 * mini.h mini.c: Rework last patch based on suggestions by Paolo.
16578 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
16579 * mini.h mini.c mini-x86.c: Added instruction level coverage
16580 info collection support.
16582 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16584 * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
16585 is now implemented in the profiling API. Get rid of a couple of
16586 unnecessary global variables.
16588 2003-06-15 Nick Drochak <ndrochak@gol.com>
16590 * basic-long.cs: tests for negative values for bigmul, and unsigned.
16591 * cpu-g4.md: add op_bigmul and op_bigmul_un
16592 * cpu_pentium.md: add op_bigmul_un
16593 * inssel-long32.brg: add rule for unsigned bigmul
16594 * mini-ops.h: define OP_BIGMUL_UN
16595 * mini-x86.c: THE BUG: handle (un)signed properly
16596 * mini.c: choose unsigned opcode if needed.
16597 This set of patches fixes bug #44291
16599 2003-06-13 Dietmar Maurer <dietmar@ximian.com>
16601 * mini.c (optimize_branches): improved to handle all kinds of
16602 conditional branches.
16604 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16606 * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
16607 don't raise exceptions.
16609 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16611 * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
16612 to arch-specific files.
16614 2003-06-09 Martin Baulig <martin@ximian.com>
16616 * Makefile.am (libs): Added $(LIBGC_LIBS).
16618 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
16620 * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
16621 and OP_ATAN (fixes bug#44293).
16623 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
16625 * Makefile.am, mini-x86.c: rename cpu description array to
16626 pentium_desc, since some compilers define the 'pentium' preprocessor
16629 2003-05-28 Dietmar Maurer <dietmar@ximian.com>
16631 * mini.c (mini_select_instructions): add explicit branch if the
16632 following block is not the false target of a conditional branch -
16633 we need this with any optimization that reorder or remove bblocks
16635 * mini.c (optimize_branches): bug fixes
16637 2003-06-06 Dietmar Maurer <dietmar@ximian.com>
16639 * mini.c (mono_method_to_ir): inline static readonly fields
16641 * ssa.c (fold_tree): start cfold support for long (very simple
16644 * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
16646 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16648 * inssel.brg: fixed memcpy (bug #44219).
16650 2003-06-05 Dick Porter <dick@ximian.com>
16652 * driver.c: Set the glib log levels to not abort if g_message
16655 g_set_prgname() has to happen before mini_init() so that the
16656 process handle gets the info.
16658 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16660 * driver.c: add intrins to the default optimizations to get wider
16663 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16665 * mini.h: some large basic blocks will overflow a 16-bit
16666 integers for symbolic registers.
16668 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
16670 * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
16671 (mono_arch_output_basic_block): fix bug 43499
16673 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16675 * mini.c: kill duplicated definition of mono_debug_format.
16677 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
16679 * mini-x86.c, arrays.cs: fixed register allocation bug.
16681 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
16683 * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
16685 * mini.c (mini_get_opcode_for_method): inline IEEERemainder
16687 2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16690 (print_method_from_ip): also print source location information if
16693 2003-06-02 Dietmar Maurer <dietmar@ximian.com>
16695 * mini.c (mono_find_block_region): bug fix in region code
16696 (mini_method_compile): enable removing unreachable code again, but
16697 only in methods without exception clauses.
16699 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16701 * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
16702 Implemented arglist opcode and handling of TypedReference type.
16703 Fixed x86 call convention when a structure is returned.
16704 Minimal support for calling static vararg methods.
16706 2003-05-30 Dietmar Maurer <dietmar@ximian.com>
16708 * mini.c (mini_method_compile): always remove unreachable code,
16709 because the code in them may be inconsistent (access to dead
16710 variables for example).
16712 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16714 * driver.c, debug-mini.c: warning fixes.
16716 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
16718 * Makefile.am, jit.h, mini.h: install header for embedding mono.
16720 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
16722 * mini.c: thread-static fields are registered in mono_class_vtable(),
16723 so ensure the function is called before checking for them.
16725 2003-05-27 Dietmar Maurer <dietmar@ximian.com>
16727 * mini.c (optimize_branches): fix for bug 43586
16729 * jit-icalls.c (mono_llmult_ovf): added an additional check for
16730 overflow (fixes Bug #43639)
16732 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16734 * mini.c, objects.cs: allow the use of stobj for primitive types.
16736 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16738 * mini.c: be less strict about argument checking until we support
16739 running the verifier.
16741 2003-05-27 Nick Drochak <ndrochak@gol.com>
16743 * basic-long.cs: tests for (ulong)int * (ulong)int also
16744 * mini.c: use the same trick for (ulong)int * (ulong)int
16746 2003-05-27 Nick Drochak <ndrochak@gol.com>
16748 * basic-long.cs: add regression test for (long)int * (long)int
16749 * cpu-pentium.md: add op_bigmul specification
16750 * inssel-long32.brg: add OP_BIGMUL rule
16751 * mini-ops.h: add OP_BIGMUL
16752 * mini-x86.c: register allocator: handle case where src1 needs to be
16754 * mini.c: substitute special BIGMUL opcode in the tree for
16755 (long)int * (long)int
16757 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
16759 * jit-icalls.c: call the type ctor on field access if needed.
16761 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16763 * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
16764 to a method (including results of ldelema, bug#43207).
16766 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
16768 * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
16769 colors to show exception handler blocks.
16771 * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
16772 (fix for pinvoke7.cs).
16774 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16776 * mini.h, mini.c: ensure correct initialization order for types that
16777 require it. Prepare for lazy compilation of jit icall wrappers.
16778 Provide a name for opcode emulation to reduce unneeded mallocing.
16780 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
16782 * mini-x86.c: better register restoring code and profiling
16783 support for tail calls.
16785 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16787 * mini.h, driver.c: prepare for leaf methods optimization.
16789 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16791 * mini.c: get targets of branches before converting a method.
16793 2003-05-23 Dietmar Maurer <dietmar@ximian.com>
16795 * mini.c (optimize_branches): added some experimental code (disbaled)
16797 2003-05-22 Dietmar Maurer <dietmar@ximian.com>
16799 * mini.c (optimize_branches): fix branch to branch optimization
16801 * exceptions-x86.c (mono_arch_handle_exception): bug fix.
16803 * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
16805 * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
16807 * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
16810 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
16812 * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
16813 enable use of interface variables again.
16815 * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
16816 I1 to registers because there is no simply way to sign extend 8bit
16817 quantities in caller saved registers on x86.
16819 * inssel-float.brg: set costs of some rules to 2 so
16820 that monobure always select the arch. specific ones if supplied,
16821 regardless of the order we pass the files to monoburg.
16823 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16825 * mini.c, mini-x86.c: since the magic trampoline for jumps
16826 can't patch the code directly, we do it as soon as the
16827 method gets compiled.
16829 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16831 * mini-x86.c, mini.h: introduce a new patching method
16832 to support CEE_JMP and tail calls.
16833 * mini.c: obey tail.call. Don't precompile methods target
16835 * tramp-x86.c: new trampoline code to handle methods
16836 reached through a jump.
16838 2003-05-20 Dietmar Maurer <dietmar@ximian.com>
16840 * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
16841 bit values to registers
16843 2003-05-19 Dietmar Maurer <dietmar@ximian.com>
16845 * mini.c (mono_compile_get_interface_var): share interface
16846 variables if possible.
16848 2003-05-16 Martin Baulig <martin@ximian.com>
16850 * debug-mini.c (mono_init_debugger): New function to initialize
16851 the debugger. This is not in the debugger since it needs to
16852 access some of mini's internals.
16854 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
16856 * mini.c (mono_method_to_ir): inlining fixes/cleanups
16858 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
16860 * mini.c, mini-opts.h, inssel.brg: inline small memcpy
16861 for value type handling.
16863 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
16865 * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
16866 (mono_method_check_inlining): enable inlining of all kinds of wrappers
16868 2003-05-15 Lluis Sanchez Gual <lluis@ideary.com>
16870 * mini.c: fixed little bug in CEE_NEWOBJ case when calling
16871 the constructor through a proxy.
16873 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16875 * jit-icalls.c, inssel.brg: fixes to array element address
16878 2003-05-15 Dietmar Maurer <dietmar@ximian.com>
16880 * mini-x86.c (is_regsize_var): allocate pointer to registers
16882 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16884 * driver.c: fixed typo, added intrins to the set of optimizations
16885 tested with regressions.
16887 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
16889 * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
16890 * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
16893 2003-05-14 Dietmar Maurer <dietmar@ximian.com>
16895 * inssel.brg: remove some common pop instructions without side effects
16897 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16899 * inssel-x86.brg: fixed thinko in int to double conversions.
16901 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
16903 * mini.c, jit-icalls.c: added runtime thread-static variable support.
16905 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16907 * inssel-long32.brg: two more missing instructions.
16909 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
16911 * mini.c (mono_emit_call_args): set the cil_code for all arguments
16912 if not already set.
16914 2003-05-12 Zoltan Varga <vargaz@freemail.hu>
16916 * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
16919 * basic-float.cs: Added tests for negative zero.
16921 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16923 * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
16924 a couple of missing operations for long casts, with test cases.
16926 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16928 * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
16930 2003-05-09 Dietmar Maurer <dietmar@ximian.com>
16932 * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
16933 code size estimation.
16935 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
16937 * mini.c (mono_jit_create_remoting_trampoline): make it work with
16938 abstract methods (fix bug 42542)
16940 * aot.c: add ability to handle array types
16942 2003-05-08 Zoltan Varga <vargaz@freemail.hu>
16944 * mini.c: Call the _specific versions of the object allocation
16945 functions if possible.
16947 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16949 * driver.c: call setlocale ().
16951 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16953 * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
16956 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
16958 * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
16960 * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
16961 wrappers (fix bug 42122)
16963 2003-05-04 Martin Baulig <martin@ximian.com>
16965 * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
16967 * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
16968 s/mini_set_defaults/mono_set_defaults/g.
16970 2003-05-04 Martin Baulig <martin@ximian.com>
16972 * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
16974 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16976 * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
16977 (reported by Don Roberts).
16979 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16981 * mini.c: temporarily work around two bugs for this release.
16983 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16985 * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
16986 that contains -export-dynamic and it makes using the ld script
16988 * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
16990 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16992 * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
16995 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16997 * mini.c: make sure leave calls all the needed finally blocks,
16998 even when the target jumps out of multiple exception clauses.
17000 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17002 * ldscript, Makefile.am: add linker script to reduce the number of
17003 exported symbols (should also fix the issues with libwine defining
17004 some of the same symbols in io-layer).
17006 2003-05-01 Zoltan Varga <vargaz@freemail.hu>
17008 * driver.c (mini_main): Avoid assertion when no file name is given on
17011 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
17013 * driver.c: added --version/-V command line option.
17014 Added the inline optimization in the regression tests.
17016 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17018 * mini.c, basic-calls.cs: when inlining, save arguments to locals according
17019 to the type in the method signature (fixes bug#42134).
17021 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
17023 * mini.c: when inlining, check this is not null only when needed (bug #42135).
17025 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
17027 * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
17029 2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17031 * driver.c: fixed bug #42100.
17033 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
17035 * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
17037 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
17039 * mini.c: moved most of the code required to do inlining to its own
17040 function so it can be reused. Inline also ctors if appropriate.
17042 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
17044 * Makefile.am: Link with -export-dynamic so shared libs loaded by
17045 the runtime can call mono API functions.
17047 2003-04-27 Martin Baulig <martin@ximian.com>
17049 * debug-mini.c (mono_debug_init_method): Added
17050 `guint32 breakpoint_id' argument; if the method has a breakpoint,
17051 send a notification to the debugger.
17053 * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
17054 running in the Mono Debugger, just pass the breakpoint number to
17055 mono_debug_init_method().
17057 * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
17059 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
17061 * mini.c: allow some more unsafe compares.
17063 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17065 * mini-x86.c, Makefile.am: make distcheck works (partially from
17066 a patch by Richard Lee <r.h.lee@attbi.com>).
17067 * regset.c, regset.h: removed, they are unused.
17069 2003-04-25 Dick Porter <dick@ximian.com>
17071 * driver.c: Usage reports the name as 'mono' not 'mini'
17072 * exceptions-x86.c: Build and run on freebsd
17074 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
17076 * Makefile.am: install the program with the 'mono' name and
17077 the library as libmono instead of mini and libmini.
17079 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17081 * driver.c: provide the APIs for the embedding interface of the old jit.
17083 2003-04-23 Dietmar Maurer <dietmar@ximian.com>
17085 * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
17087 2003-04-23 Martin Baulig <martin@ximian.com>
17089 * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
17091 * driver.c: Added `--debug' command line argument to enable
17094 2003-04-23 Martin Baulig <martin@ximian.com>
17096 * debug.[ch]: Removed. The code is now in
17097 ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
17099 * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
17102 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
17104 * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
17106 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17109 (mini_cleanup): moved mono_runtime_cleanup call after the call to
17110 mono_domain_finalize.
17111 (mini_method_compile): use mono_method_profile* if the the option is
17114 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
17116 * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
17117 methods with their wrapper.
17119 * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
17120 methods with their wrapper.
17122 * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
17125 * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
17128 * mini.c (mono_method_check_inlining): Avoid inlining synchronized
17131 2003-04-17 Dietmar Maurer <dietmar@ximian.com>
17133 * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
17135 2003-04-16 Dietmar Maurer <dietmar@ximian.com>
17137 * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
17138 of the mempool. This is slightly faster and uses less memory
17140 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
17142 * mini.c: avoid O(n) allocation for variables.
17144 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17146 * mini.c: handle items on the stack after inlining methods.
17148 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
17150 * mini.c: make the method->opcode optimization dependent
17151 on MONO_OPT_INSTRINS and do it lazily.
17153 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
17155 * driver.c: print overall results at the end of regression run.
17157 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
17159 * inssel.brg: don't overwrite symbolic registers.
17161 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17163 * inssel-x86.brg: fix conversion from long to float.
17165 2003-04-11 Dietmar Maurer <dietmar@ximian.com>
17167 * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
17169 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
17171 * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
17173 * driver.c: Added --print-vtable option as in the old JIT.
17175 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
17177 * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
17179 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
17181 * inssel.brg, basic.cs: fixed checked conversions to byte and short.
17183 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
17185 * mini.c regalloc.c regalloc.h: Fix memory leak.
17187 2003-04-09 Dietmar Maurer <dietmar@ximian.com>
17189 * aot.c (mono_aot_get_method): register all used strings
17191 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
17193 * mini.c: always intern strings references with ldstr at compile time.
17195 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17197 * Makefile.am: add BUILT_SOURCES.
17199 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17201 * driver.c: give a better error message when the assembly to execute
17202 doesn't have an entry point.
17204 2003-04-07 Dietmar Maurer <dietmar@ximian.com>
17206 * Makefile.am: added hack for automake
17208 * mono/mini/mini.c (mono_save_args): always copy arguments to keep
17211 * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
17213 22003-04-07 Martin Baulig <martin@ximian.com>
17215 * Makefile.am: Added Makefile.am.
17217 * debugger-main.c: Removed, this is now in the debugger where it
17220 * mini.pc.in: Call this package `mini' for the moment.