1 2008-11-21 Zoltan Varga <vargaz@gmail.com>
3 * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
5 * mini-ops.h: Correct the dreg type of a few long opcodes.
7 * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
10 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
12 * mini-ppc.c: remove negative stack references in epilog
13 for platforms that don't support the red zone.
15 2008-11-21 Mark Probst <mark.probst@gmail.com>
17 * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
18 point regs. Now PPC64 passes basic-calls.exe.
20 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
22 * basic-simd.cs: Add tests for accessors of Vector2l.
24 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
26 * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
28 * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
30 * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
32 2008-11-21 Mark Probst <mark.probst@gmail.com>
34 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes. Now
35 PPC64 passes basic-long.exe.
37 2008-11-20 Mark Probst <mark.probst@gmail.com>
39 * decompose.c: Decompose carry and overflow add on PPC64 like on
40 other 64 bit archs. Don't decompose sub at all on PPC64.
42 * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
43 Several fixes and new opcodes. Now PPC64 runs (but doesn't pass)
46 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
48 * basic-simd.cs: Add tests for accessors of Vector2d.
50 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
52 * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
56 * mini-x86.c (mono_arch_output_basic_block): Same.
58 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
60 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
62 * basic-simd.cs: Add tests for accessors of Vector4f.
64 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
66 * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
70 * mini-x86.c (mono_arch_output_basic_block): Same.
72 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
74 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
76 * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
78 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
80 * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
84 * mini-x86.c (mono_arch_output_basic_block): Same.
86 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
88 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
90 * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
92 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
94 * simd-intrinsics.c: Enable setters for Vector16sb.
96 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
98 * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
102 * mini-x86.c (mono_arch_output_basic_block): Same.
104 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
106 2008-11-19 Rodrigo Kumpera <rkumpera@novell.com>
108 * simd-intrinsics.c: Implement setter for Vector8us.
110 2008-11-19 Zoltan Varga <vargaz@gmail.com>
112 * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
115 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
117 * mini-ppc.c: remove references to the red zone in the prolog
118 (for systems that don't support it).
120 2008-11-19 Mark Probst <mark.probst@gmail.com>
122 * cpu-ppc64.md: Fixed a few instruction lengths.
124 * mini-ppc64.c: Don't emit SETLRET. PPC64 passes basic-float.exe,
127 2008-11-19 Mark Probst <mark.probst@gmail.com>
129 * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes. PPC64 passes
132 2008-11-19 Zoltan Varga <vargaz@gmail.com>
134 * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
136 2008-11-18 Rodrigo Kumpera <rkumpera@novell.com>
138 * mini-ops.h: Added OP_INSERT_I2.
142 * mini-x86.c (mono_arch_output_basic_block): Same.
144 * simd-intrinsics.c: Implement setter for Vector8s.
146 * simd-methods.h: Add the names of get setters of Vector8s.
148 2008-11-18 Zoltan Varga <vargaz@gmail.com>
150 * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
152 * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
155 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
157 2008-11-18 Mark Probst <mark.probst@gmail.com>
159 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
160 for PPC64. An empty program runs now.
162 2008-11-18 Zoltan Varga <vargaz@gmail.com>
164 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
166 * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
167 a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
168 info for JITted code is emitted into a shared library, loadable into gdb.
170 2008-11-18 Mark Probst <mark.probst@gmail.com>
172 * Makefile.am: Changes to build PPC64.
174 * mini-arch.h: Include mini-ppc64.h on PPC64.
176 2008-11-18 Mark Probst <mark.probst@gmail.com>
178 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
179 in PPC code up to r119147.
181 2008-11-18 Mark Probst <mark.probst@gmail.com>
183 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
184 cpu-ppc64.md: Changes for PPC64.
186 Based on code submitted by andreas.faerber@web.de at
187 https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
190 2008-11-18 Mark Probst <mark.probst@gmail.com>
192 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
193 cpu-ppc64.md: Copied from the corresponding PPC files from
196 2008-11-18 Scott Peterson <lunchtimemama@novell.com>
198 * mini-ops.h: Added OP_ROUND.
200 * cpu-x86.md: Added round.
202 * mini-x86.c: Added support for intrinsicing Math.Round (double).
204 * basic-math.cs: Added test_0_round to test rounding.
206 Contributed under MIT/X11 license.
208 2008-11-17 Bill Holmes <billholmes54@gmail.com>
210 * aot-compiler.c : Fix the Winx64 build.
212 Contributed under MIT/X11 license.
214 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
216 * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
217 in OP_EXTRACT_R8 to avoid possible stack corruption.
219 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
221 * mini-ops.h: Added OP_EXTRACT_R8/I8.
223 * cpu-x86.md: Added extract_r8.
225 * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
227 * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
228 a couple of OP_EXTRACT_I4.
230 * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
232 * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
234 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
236 * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
239 2008-11-17 Zoltan Varga <vargaz@gmail.com>
241 * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
242 trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
244 * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
245 are not needed any more.
247 * mini.h: Remove the unused INS_LIST macros.
249 * mini.c (mini_method_compile): Remove a disable globalra case which is no
252 * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
255 * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
256 mono_alloc_ireg () instead.
258 * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
261 * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
264 * aot-runtime.c (load_aot_module): Disable AOT when running under
267 * mini-amd64.h: Change the monitor fastpath defines to check for
268 !PLATFORM_WIN32 so they work on *bsd too.
270 * mini.h mini.c mini-hhpa.c: Remove more unused code.
272 * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
274 * mini.h (MonoCompile): Remove new_ir flag.
276 * regalloc.h regalloc.c: Remove unused code.
278 * cpu-*.md: Remove more unused opcodes.
280 * simple-cee-ops.h simple-mini-ops.h: Removed.
282 * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
284 2008-11-17 Zoltan Varga <vargaz@gmail.com>
286 * aliasing.h: Removed.
288 * *.c: Remove references to aliasing.h and inssel.h.
290 * mini.c: Remove additional unused functions.
292 * mini-ops.h cpu-*.md: Remove unused opcodes.
294 2008-11-16 Zoltan Varga <vargaz@gmail.com>
296 Remove the old JIT code.
298 * inssel*.brg: Removed.
300 * ssa.c abcremoval.c aliasing.c: Removed.
302 * ssa2.c: Renamed to ssa.c.
304 * abcremoval2.c: Renamed to abcremoval.c.
306 * *.c: Removed all !cfg->new_ir code.
308 * mini-<ARCH>.c: Removed mono_arch_call_opcode (),
309 mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
311 * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
313 2008-11-16 Zoltan Varga <vargaz@gmail.com>
315 * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
316 to simplify the code and cut back on the number of global symbols in the AOT
319 * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
321 2008-11-15 Zoltan Varga <vargaz@gmail.com>
323 * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
324 with the got/got_info tables.
326 * mini.h: Bump AOT file format version.
328 * unwind.h: New file, contains definitions for stack unwinding.
330 * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
333 * aot-compiler.c: Generalize the emitting of unwind information to use the
334 information in cfg->unwind_ops.
336 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
338 * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
339 AOT method frames. Enable writing symbols for methods by default.
341 2008-11-14 Rodrigo Kumpera <rkumpera@novell.com>
343 * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
344 and make it work with vectors of element sizes 1, 2 and 4.
346 * simd-intrinsics.c: Enable getter for all vectors with element size
349 * simd-methods.h: Add the names of other getters.
351 * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
357 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
359 * mini-ppc.h: portability fix.
361 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
363 * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
364 buggy and will overwrite it.
366 2008-11-14 Zoltan Varga <vargaz@gmail.com>
368 * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
369 Use it to emit local symbols for all methods so AOTed methods show up with
370 their full name in gdb/valgrind output.
372 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
374 * mini-ppc.c: portability fixes.
376 2008-11-14 Zoltan Varga <vargaz@gmail.com>
378 * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
379 entries out of the if (!generic_shared...) code so it is always done.
380 (mono_class_init_trampoline): Do the patching when running under valgrind
381 too, newer versions of valgrind have no problems with it.
383 2008-11-13 Zoltan Varga <vargaz@gmail.com>
385 * aot-compiler.c (emit_writeout): Rework this to make it easier to add
388 2008-11-13 Mark Probst <mark.probst@gmail.com>
390 * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
393 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
395 * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui.
397 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
399 * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
405 * simd-intrinsics.c: Same.
407 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
409 * simd-intrinsics.c: Enable constructor intrinsics for all types.
411 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
413 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
414 to work with more Vector types.
416 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
418 * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
419 store the elemens directly instead of using and intermediate.
421 2008-11-13 Zoltan Varga <vargaz@gmail.com>
423 * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
425 * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
426 to preserve %eax for aot plt trampolines.
428 * aot-compiler.c (compile_method): Don't skip synchronized methods.
429 (encode_method_ref): Flag synchronized methods so they won't go through
432 * aot-compiler.c: Additional work to support AOTing synchronized methods/
435 * cpu-ia64.md (jmp): Increase max length.
437 2008-11-12 Zoltan Varga <vargaz@gmail.com>
439 * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
440 open generic classes.
442 * aot-compiler.c: Enable the ELF writer on ELF platforms.
444 * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
445 box+brtrue optimization since it causes test failures on x86.
447 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
449 * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
455 * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
456 for simd ctor values.
458 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
459 instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
461 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
463 * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
466 * simd-instrincs.c: Same.
468 * basic-simd.cs: Same.
470 2008-11-12 Zoltan Varga <vargaz@gmail.com>
472 * ratests.cs: Add more tests.
474 * regalloc2.c (add_spill_code): Handle more corner cases.
476 2008-11-11 Zoltan Varga <vargaz@gmail.com>
478 * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
479 (update_liveness): Avoid holes in the liveness ranges of hregs if they are
480 both the source an destination of an instruction.
482 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
484 * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
485 wapihandles.c: more portability changes.
487 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
489 * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
490 * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
491 safe to execute in a signal handler and the kernel provides better
492 the info in /proc/self/smaps. Avoid the assert on sigaction during
495 2008-11-11 Zoltan Varga <vargaz@gmail.com>
497 * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
498 do the bblock linking hack if it is actually needed.
500 * Makefile.am (patch-libtool): New helper target to patch libtool to speed
503 * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
504 crash problem is fixed.
506 * branch-opts.c (mono_remove_critical_edges): Link up newly added
509 * mini.c (mini_method_compile): Compute unreachable bblocks properly even
511 (mini_method_compile): Set the starting value of next_vreg to
512 MAX_IREGS + MAX_FREGS when using globalra.
514 * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
515 filter clauses with BB_EXCEPTION_HANDLER.
517 * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
519 2008-11-10 Mark Probst <mark.probst@gmail.com>
521 * mini-x86.c (mono_arch_get_argument_info): Don't align argument
522 space for stdcall. Fixes regressions on Win32.
524 2008-11-10 Zoltan Varga <vargaz@gmail.com>
526 * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
528 (linear_scan): Remove an assert which doesn't seem to be needed.
530 * local-propagation.c (mono_local_deadce): Avoid a call to
531 MONO_DELETE_INS which would screw up the instruction linking.
533 * mini.c (mono_decompose_op_imm): Make this work with globalra.
535 * regalloc2.c: Upgrade to work the current JIT code.
537 2008-11-09 Zoltan Varga <vargaz@gmail.com>
539 * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
542 * aot-runtime.c: Remove some dead code.
544 * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
546 (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
548 * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
549 trampolines using sscanf since atoi doesn't work on large unsigned values.
551 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full):
552 Initialize code_size.
554 2008-11-08 Mark Probst <mark.probst@gmail.com>
556 * method-to-ir.c (mini_emit_inst_for_method): Make
557 Interlocked.CompareExchange work for Int arguments on 32 bit
560 2008-11-07 Mark Probst <mark.probst@gmail.com>
562 * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
564 2008-11-06 Bill Holmes <billholmes54@gmail.com>
566 * main.c Fix MSVC build.
568 Contributed under MIT/X11 license.
570 2008-11-06 Mark Probst <mark.probst@gmail.com>
572 * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
573 alignment larger than 8 bytes are aligned correctly, too.
575 * mini.c: Honor the min_align field of MonoClass when laying out
578 2008-11-06 Zoltan Varga <vargaz@gmail.com>
580 * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
582 * aot-compiler.c (emit_plt): Fix a warning.
584 * aot-compiler.c: Implement ARM support in the binary writer.
586 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
588 * basic-simd.cs: Add test for getter with byref arg.
589 Fix the naming of a few tests.
590 Add missing checks to a test.
592 2008-11-05 Zoltan Varga <vargaz@gmail.com>
594 * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
596 * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
597 most of the full-aot support for monitor enter/exit trampolines.
599 * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
600 enter/exit trampoline creation functions.
602 * Makefile.am: Fix the generation of buildver.h so it is not invoked during
605 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
607 * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
608 incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
609 implement the needed functionality without adding crap to the runtime.
611 2008-11-05 Zoltan Varga <vargaz@gmail.com>
613 * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
616 * mini.c (mono_build_date): New global version holding the build date in
619 * Makefile.am (buildver.c): Generate a file containing the build date.
621 * main.c: Set the build date from the generated file.
623 * mini.c (mono_get_runtime_build_info): New helper function returning build
624 information in a string format.
626 * driver.c (mono_main): Print the build date in --version.
628 * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
629 file when the bind-to-runtime-version option is used.
631 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
633 * simd-intrinsics.c: Fix bug when using getters and byref args.
635 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
637 * simd-methods.h: Rename prefetch methods.
639 * simd-intrinsics.c: Same.
641 2008-11-05 Mark Probst <mark.probst@gmail.com>
643 * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
646 2008-11-04 Zoltan Varga <vargaz@gmail.com>
648 * aot-compiler.c: Use the bundled elf header files instead of depending on
651 * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
654 * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
657 2008-11-04 Rodrigo Kumpera <rkumpera@novell.com>
659 * cpu-x86.md: Add store nta ops.
665 * mini.h: Add an enum for simd prefetch modes.
667 * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
668 of store. Use the changed code to support store nta.
670 * simd-intrinsics.c: Add prefetch ops for all vector types.
672 2008-11-04 Zoltan Varga <vargaz@gmail.com>
674 * aot-compiler.c: Add an option for JIT compiling the methods by multiple
677 * aot-compiler.c: Use statically allocated buffers for constructing symbol
680 * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
683 2008-11-04 Mark Probst <mark.probst@gmail.com>
685 * mini-x86.c: Fixed commit.
687 2008-11-04 Zoltan Varga <vargaz@gmail.com>
689 * aot-compiler.c (emit_plt): Align the plt section only on x86.
691 2008-11-04 Mark Probst <mark.probst@gmail.com>
693 * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
694 and MONITOR_EXIT, for the ASM fastpaths.
696 * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
699 * mini.c, patch-info.h: Signature and patch infos for
700 Monitor.Enter/Exit trampolines.
702 * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
704 * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
705 Monitor.Enter/Exit ASM fastpath for Linux.
707 2008-11-04 Zoltan Varga <vargaz@gmail.com>
709 * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
711 * objects.cs: Add a new test.
713 * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
715 * aot-runtime.c (load_method): Run class initialization in the PLT case even
716 if MONO_LOG_LEVEL is set.
718 * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
720 * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
722 * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
724 * aot-compiler.c: Change the relocation code to use virtual addresses instead
725 of file offsets. Align the sections belonging to the data segment to
728 2008-11-03 Zoltan Varga <vargaz@gmail.com>
730 * aot-compiler.c: Simplify the elf writer by depending on the definitions in
731 elf.h. Port it to amd64.
733 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
735 * driver.c: Enable SIMD by default.
737 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
739 * cpu-x86.md: Add prefetch op.
745 * mini.h: Add an enum for simd prefetch modes.
747 * simd-methods.h: Add prefetch function names.
749 * simd-intrinsics.c: Add prefetch ops for all vector types.
751 2008-11-03 Zoltan Varga <vargaz@gmail.com>
753 * aot-compiler.c (emit_bytes): Speed this up a little.
755 2008-11-02 Zoltan Varga <vargaz@gmail.com>
757 * aot-compiler.c: Add JIT time etc. statistics.
759 * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
761 * mini.h (MonoCompile): Add 'got_offset' field.
763 * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
764 method_got_offsets array.
766 * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
769 * aot-compiler.c (compile_method): Add generic method instances referenced
770 by the method to the list of methods to be compiled, this is required so if
771 A<T> references B<T>, and another assembly references A<int>, then it will
772 also get a copy of B<int>.
774 * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
775 when checking for monitor enter/exit.
777 2008-10-30 Mark Probst <mark.probst@gmail.com>
779 * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
780 for Monitor.Enter and Monitor.Exit if enabled.
782 * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
785 2008-10-30 Zoltan Varga <vargaz@gmail.com>
787 * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
788 of an OP_MOVE. Fixes #440046.
790 * basic-long.cs: Add a new test.
792 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
794 * mini.h: Add synchronization note for the managed counter-part.
796 * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
797 returns the simd caps of the current cpu.
799 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
801 * basic-simd.cs: Remove Console.WriteLine.
803 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
805 * basic-simd.cs: New tests for Vector2ul.
807 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
809 * simd-intrinsics.c: Add new vector type Vector2ul.
811 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
813 * basic-simd.cs: New tests for Vector2l.
815 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
817 * cpu-x86.md: Add long version of most packed int ops.
823 * simd-intrinsics.c: Add new vector type Vector2l.
825 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
827 * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
829 * simd-methods.h: Remove SN_op_BitwiseXor.
831 2008-10-28 Zoltan Varga <vargaz@gmail.com>
833 * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
836 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
838 * basic-simd.cs: Test for Vector2d.
840 * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
843 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
845 * cpu-x86.md: Add double version of all packed float ops.
851 * simd-intrinsics.c: Add new vector type Vector2d.
853 * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
855 * simd-methods.h: Add Duplicate.
857 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
859 * basic-simd.cs: Test for packing with signed saturation.
861 2008-10-28 Zoltan Varga <vargaz@gmail.com>
863 * aot-compiler.c (add_generic_instances): Add all methods of generic instances
864 found in the TYPESPEC table.
866 2008-10-26 Zoltan Varga <vargaz@gmail.com>
868 * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
871 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
873 * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
874 instead of the RVA, since the RVA can be changed by tools like the cil
877 * method-to-ir.c (mono_method_to_ir2): Ditto.
879 * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
880 (deserialize_variable): Ditto.
882 2008-10-25 Martin Baulig <martin@ximian.com>
884 * debug-mini.c (write_variable): Use
885 `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
887 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
889 * cpu-x86.md: Add unsigned variants of packd and packw.
893 * mini-x86.h: Emit the right instruction for packd and packw.
894 Add unsigned variants of packd and packw.
896 * simd-intrinsics.c: Packd and packw were used in place of their
897 unsigned variants. Change that.
898 Add intrinsics for (Signed)PackWithSignedSaturation.
900 * simd-methods.h: Add (Signed)PackWithSignedSaturation.
902 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
904 * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
906 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
908 * mini-ops.h: Remove dword packed add/sub with saturation ops.
910 * cpu-x86.md: Remove dword packed add/sub with saturation ops.
912 * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
915 * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
917 2008-10-24 Mark Probst <mark.probst@gmail.com>
919 * method-to-ir.c, mini.c: Special casing for the synchronized
920 wrapper for the ldtoken+GetTypeFromHandle case.
922 2008-10-24 Zoltan Varga <vargaz@gmail.com>
924 * mini.c (mono_replace_ins): Move this to branch-opts.c.
926 * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
927 created/split bblocks.
929 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
931 * mini-ops.h: Add packed signed mul high.
935 * mini-x86.c (mono_arch_output_basic_block): Same.
937 * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
939 * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
941 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
943 * basic-simd.cs: Tests for Vector16sb.
945 2008-10-24 Zoltan Varga <vargaz@gmail.com>
947 * inssel.brg (stmt): Fix OP_HARD_NOP rule.
949 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
951 * mini-ops.h: Add packed signed min, max and compare greater.
955 * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
958 * simd-methods.h: Add CompareGreaterThan.
960 * simd-methods.h: Remove CompareEquals.
962 * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
964 * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
966 * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
969 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
971 * basic-simd.cs: Fix tests due to change in the API.
973 2008-10-21 Zoltan Varga <vargaz@gmail.com>
975 * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
977 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
979 * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
981 * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
982 inst_offset as this has invalid values for LDADDR.
984 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
986 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
988 * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
990 2008-10-21 Zoltan Varga <vargaz@gmail.com>
992 * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
993 for accessing field->data.
995 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
997 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
999 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
1001 * simd-methods.h: Add SignedPackWithUnsignedSaturation.
1003 * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
1005 2008-10-21 Zoltan Varga <vargaz@gmail.com>
1007 * dominators.c (mono_compute_natural_loops): Allocate GList enties
1008 from the cfg mempool.
1010 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
1012 * basic-simd.cs: Tests for new methods in Vector8us.
1014 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
1016 * mini-ops.h: Add multiply and store high.
1020 * mini-x86.c (mono_arch_output_basic_block): Same.
1022 * simd-methods.h: Same.
1024 * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
1027 2008-10-19 Zoltan Varga <vargaz@gmail.com>
1029 * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
1030 mono_class_setup_vtable ().
1032 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
1033 mono_class_get_vtable_entry () for accessing klass->vtable.
1035 * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
1037 * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
1040 * method-to-ir.c (mono_save_token_info): Don't save references made from
1043 * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
1044 of generic instances.
1046 * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
1048 2008-10-19 Mark Probst <mark.probst@gmail.com>
1050 * cpu-ppc.md, mini-ppc.c: The length of the code generated for
1051 OP_JMP depends on the method signature. Calculate it properly.
1053 2008-10-19 Zoltan Varga <vargaz@gmail.com>
1055 * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
1058 * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
1060 (emit_extra_methods): Add another table mapping method indexes to
1061 offsets in the extra_method_info table.
1063 * mini.h: Bump AOT file format version.
1065 * aot-runtime.c: Merge most of the code from mono_aot_get_method
1066 and mono_aot_get_method_from_token () into one function.
1068 2008-10-19 Mark Probst <mark.probst@gmail.com>
1070 * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
1073 2008-10-18 Zoltan Varga <vargaz@gmail.com>
1075 * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
1078 * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
1081 * mini.c (mono_patch_info_equal): Compare the generic context as well.
1083 * mini.h: Bump aot file format version.
1085 * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
1086 AOT file can contain native code for methods which are not in the METHOD
1087 table. Generate code for non-sharable generic instances of generic methods
1088 found in the METHODSPEC table.
1090 * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
1091 encoding generic type handles.
1093 * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
1094 (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
1096 * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
1097 macros + MONO_ADD_INS.
1099 * mini.c (mono_jump_info_token_new2): New function which takes a generic
1102 * mini.h (MonoJumpInfoToken): Include fields for a generic context.
1104 * mini.h: Bump aot file format version.
1106 * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
1108 2008-10-17 Mark Probst <mark.probst@gmail.com>
1110 * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
1111 platforms, with definable stack alignment value. Set to 16 now
1114 * mini.c, mini.h, driver.c: Command line option for disabling
1117 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
1119 * basic-simd.cs: Tests for new methods in Vector4ui.
1121 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
1123 * mini-ops.h: Add packed int shuffle.
1127 * mini-x86.c (mono_arch_output_basic_block): Same.
1129 * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
1130 extract mask, max, min, shuffle.
1132 * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
1134 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
1136 * basic-simd.cs: Tests for new methods in Vector8us.
1138 2008-10-17 Mark Probst <mark.probst@gmail.com>
1140 * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
1141 RuntimeTypeHandle, not a TypedReference.
1143 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
1145 * simd-intrinsics.c: remove relocations.
1147 2008-10-17 Zoltan Varga <vargaz@gmail.com>
1149 * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM
1150 optimizations from the x86 backend.
1152 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
1154 * simd-methods.h, simd-intrinsics.c: debloat method names and
1155 prepare for no relocations.
1157 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
1159 * mini-ops.h: Add packed min/equal and sum of absolute differences.
1163 * mini-x86.c (mono_arch_output_basic_block): Same.
1165 * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
1166 extract mask, max, min and sum of absolute differences.
1168 * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
1171 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
1173 * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
1174 Renamed one test for consistency.
1176 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
1178 * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
1179 fix to the code that deal with other blocks.
1181 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
1183 * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
1185 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
1187 * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
1188 that deals with vreg interference. Explicitly check for OP_LDADDR to be
1189 able to process the source reg.
1191 2008-10-16 Martin Baulig <martin@ximian.com>
1193 * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
1195 * inssel.brg: Add `OP_HARD_NOP'.
1197 * mini.h (MonoCompile): Added `keep_cil_nops' flag.
1199 * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
1200 `OP_HARD_NOP' instruction when running inside the debugger.
1202 * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
1203 `OP_HARD_NOP' instruction when running inside the debugger.
1205 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
1207 * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
1208 now works. The issue with the regalloc tripping up no longer
1211 * simd-intrinsics.c (load_simd_vreg): Same.
1213 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
1215 * basic-simd.cs: Tests for new Vector8ui methods.
1217 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
1219 * simd-intrinsics.c (get_simd_vreg): Simplify code and test
1220 only for type. This fixes crashes where MonoInst::klass is checked
1221 for ops of type != VTYPE or OBJ.
1223 * simd-intrinsics.c (load_simd_vreg): Same.
1225 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
1227 * mini-ops.h: Add ops for packed shuffle/max/avg and
1232 * mini-x86.c (mono_arch_output_basic_block): Same.
1234 * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
1237 * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
1238 to emit extract mask op.
1240 * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
1241 to emit word shuffles.
1243 2008-10-15 Mark Probst <mark.probst@gmail.com>
1245 * mini.c (mono_allocate_stack_slots_full): Align stack frame to
1246 the largest alignment needed by a variable, but at least
1249 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
1251 * basic-simd.cs: Tests for the fixes in the last commit.
1253 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
1255 * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
1256 no longer handles STACK_PTR input.
1258 * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
1260 * simd-intrinsics.c (load_simd_vreg): New function that works like
1261 get_simd_vreg but handles STACK_PTR input.
1263 * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
1264 as the input can be an arbitrary pointer.
1266 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
1267 LDADDR local optimization directly otherwise use a store op.
1269 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
1271 * basic-simd.cs: Tests for dup low and dup high.
1273 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
1275 * mini-ops.h: Add dup low and dup high ops.
1279 * mini-x86.c (mono_arch_output_basic_block): Same.
1281 * simd-intrinsics.c (vector4f_intrinsics): Same.
1283 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
1285 * basic-simd.cs: Tests for recently added functionality.
1287 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
1289 * mini-ops.h: Add remaining sse1 fp ops.
1291 * cpu-x86.md: Add remaining sse1 fp ops.
1293 * mini-x86.c (mono_arch_output_basic_block): Same.
1295 * mini.h: Add enum for simd FP compare conditions.
1297 * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
1299 * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
1300 so the backed can generate the appropriate op.
1302 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
1303 This patch squeese one more byte from the SimdIntrinsc struct.
1305 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
1306 a a shift amount intead of simply or'ing it.
1308 * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
1310 * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
1311 byte so we can have an aditional flags field without increasing struct size.
1313 * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
1314 against the simd_supported_versions bitmask.
1316 * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
1318 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
1320 * mini.c: remove rawbuffer code (the only use here is unsafe because
1321 it takes locks during signal handling and the kernel now provides much
1322 better info in proc/pid/smaps these days).
1324 2008-10-13 Zoltan Varga <vargaz@gmail.com>
1326 * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
1327 OP_X86_PUSH_OBJ. Fixes #434620.
1329 * objects.cs: Add a test.
1331 2008-10-12 Rodrigo Kumpera <rkumpera@novell.com>
1333 * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
1334 that the packuswb/packusdw don't work with unsigned numbers for what
1335 would be negative numbers in signed format.
1337 * cpu-x86.md: Add doubleword forms of many ops and packing ones.
1338 Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
1340 * mini-ops.h: Add doubleword forms of many ops and packing ones.
1342 * mini-x86.c: Emit doubleword forms of many ops and packing ones.
1344 * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
1346 * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
1348 * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
1351 * simd-intrinsics.c (simd_version_name): New function, returns the name of the
1352 version as the enum in mini.h.
1354 * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
1355 for sse3 ops, check the simd_version field if present. This way the code
1356 works with all versions of sse.
1358 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1360 * simd-intrinsics.c: Fixed intrinsic name typo.
1362 * mini.h: Added missing simd exported function.
1364 * basic-simd.cs: Added tests for Vector4ui.
1365 Fixed broken test for Vector16b.
1367 2008-10-10 Zoltan Varga <vargaz@gmail.com>
1369 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
1370 the max length to 64.
1372 2008-10-10 Mark Probst <mark.probst@gmail.com>
1374 * method-to-ir.c: Only do the fast virtual generic method call for
1375 non-wrapper methods.
1377 * mini.h, mini-trampolines.c: The new generic virtual remoting
1378 trampoline handles virtual method calls via the vtable (as done by
1379 the fast virtual generic method calls) to remoting proxies.
1381 * mini.c (mono_jit_create_remoting_trampoline): For generic
1382 methods reate a generic virtual remoting trampoline.
1384 * mini-amd64.h: Enable fast virtual generic method calls again.
1386 2008-10-10 Mark Probst <mark.probst@gmail.com>
1388 * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
1389 restore registers when doing tail calls.
1391 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1393 * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
1396 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1398 * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
1400 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1402 * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
1404 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1406 * basic-simd.cs: Retrofit for API changes.
1408 2008-10-10 Mark Probst <mark.probst@gmail.com>
1410 * mini-ppc.c: Handle integer stack arguments for tail calls.
1412 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1414 * optflags-def.h: Removed sse3 optimization.
1418 * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
1421 * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
1423 * mini.h: Added enumeration with simd versions.
1425 * simd-intrinsics.c (emit_intrinsics): Use the new static var
1428 * simd-intrinsics.c: Added mono_simd_intrinsics_init.
1430 * mini.c (mini_init): Call mono_simd_intrinsics_init.
1432 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
1434 * basic-simd.cs: Added tests for Vector8u and Vector16u.
1436 * basic-simd.cs: Fixed test naming.
1438 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
1440 * mini-ops.h: Added ops for packed and saturated math, shifts
1441 and packing/unpacking.
1443 * cpu-x86.md: Added descriptors for the above ops.
1445 * mini-x86.c: Added code to emmit the above ops.
1447 * simd-intrinsics.c: Added support for Vector16u and Vector8u.
1449 2008-10-08 Zoltan Varga <vargaz@gmail.com>
1451 * aot-compiler.c (compile_method): Enable AOT for generic code.
1453 * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
1455 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
1457 * mini.c: add a workaround for a common screwup that ends up blamed
1458 to mono (other processes blocking signal delivery).
1460 2008-10-07 Zoltan Varga <vargaz@gmail.com>
1462 * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
1463 in the LDFLD/STFLD opcodes. Fixes #432673.
1465 * iltests.il.in: Add a new test.
1467 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
1469 * mini-arm.c: attach the thread in unmanaged->managed transitions
1470 using delegates (bug #433148).
1472 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
1474 * basic-simd.cs: Use new ShuffleSel constants.
1476 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
1478 * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
1480 * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
1481 only disable simd intrinsics if no sse2 is detected.
1483 * optflags-def.h: Added sse3.
1485 * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
1488 2008-10-07 Zoltan Varga <vargaz@gmail.com>
1490 * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
1491 when adding delegate-invoke wrappers.
1493 2008-10-07 Zoltan Varga <vargaz@gmail.com>
1495 * Makefile.am: Reenable the simd tests.
1497 2008-10-07 Bill Holmes <billholmes54@gmail.com>
1499 * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
1500 add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
1501 other vreg is allocated to that hreg.
1503 Contributed under MIT/X11 license.
1505 2008-10-07 Zoltan Varga <vargaz@gmail.com>
1507 * Makefile.am: Disable the simd tests for now as Mono.Simd is not
1510 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
1512 * basic-simd.cs: New test suite for SIMD intrinsics.
1514 * Makefile.am: Added new tests.
1516 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
1518 * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
1522 * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
1524 * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
1525 using SSE2 aware opcodes.
1527 * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
1528 is enabled, this code path is only reachable if conversion ops are emmited after
1531 * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
1533 This optimization saves 6 bytes per conversion against the old version.
1535 2008-10-06 Zoltan Varga <vargaz@gmail.com>
1537 * aot-compiler.c (compile_method): Don't skip methods referencing
1538 generic methods without a corresponding entry in token_info_hash, since
1539 encode_method_ref () can handle all generic methods now.
1541 * method-to-ir.c (mono_save_token_info): Don't save the token info if a
1542 generic context is set.
1544 * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
1545 generic sharing of LDTOKEN.
1547 2008-10-06 Mark Probst <mark.probst@gmail.com>
1549 * mini-amd64.h: Temporarily disabled fast virtual generic method
1550 calls because it breaks the System.Runtime.Remoting tests.
1552 2008-10-06 Zoltan Varga <vargaz@gmail.com>
1554 * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
1556 * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
1557 so inlining actually works.
1558 (check_inline_caller_method_name_limit): Ditto.
1560 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
1562 * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
1563 64 bit safety (from Olaf Hering and Andreas Färber).
1565 2008-10-06 Zoltan Varga <vargaz@gmail.com>
1567 * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
1568 mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
1569 unused virtual call support code.
1571 * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
1573 * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
1574 which can't use aot trampolines.
1575 (decode_patch): Don't create aot trampolines for methods which can't use
1578 * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
1579 use aot trampolines.
1581 * mini.h: Bump AOT image format version.
1583 2008-10-05 Zoltan Varga <vargaz@gmail.com>
1585 * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
1586 to save_token_info () since cmethod is inflated for constrained calls.
1588 * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
1590 2008-10-04 Andreas Färber <andreas.faerber@web.de>
1592 * Makefile.am: Add build rules for ppc64.
1593 This avoids the build failing at pedump with unresolved symbols
1594 due to lack of arch_sources. Instead it will now fail earlier
1595 due to lack of cpu-ppc64.md.
1597 Contributed under MIT/X11 license.
1599 2008-10-04 Mark Probst <mark.probst@gmail.com>
1601 * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
1604 * iltests.il.in: Add test case for tail call with many arguments.
1606 2008-10-03 Zoltan Varga <vargaz@gmail.com>
1608 * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
1609 to the fast virtual generic method code until the aot case is fixed.
1611 2008-10-03 Mark Probst <mark.probst@gmail.com>
1613 * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
1615 2008-10-03 Mark Probst <mark.probst@gmail.com>
1617 * mini-amd64.c, mini-amd64.h: Implement generic virtual method
1620 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
1622 * simd-intrinsics.c: Forgot to add this one.
1624 * mini-codegen.c: Fix macro in case SIMD is not supported.
1626 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
1628 This patch land initial JIT support for simd intrinsics.
1630 * mini-x86.h: Added new define to make --enable_minimal work on x86.
1632 * Makefile.am: Added simd-intrinsics.c
1634 * simd-intrinsics.c: New file with simd instrinsic related
1637 * cfold.c (mono_constant_fold_ins2): Fold XZERO.
1639 * cpu-x86.md: Add simd related instructions.
1641 * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
1643 * driver.c: Added two new --regression variants.
1645 * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
1647 * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
1649 * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
1650 extract some complicated logic to helper functions.
1652 * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
1654 * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
1656 * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
1657 the specialized simplification pass.
1659 * method-to-ir.c (mono_spill_global_vars): Use new macro.
1661 * mini-codegen.c: Added SIMD constants to all regbanks arrays.
1663 * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
1666 * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
1667 if MONO_ARCH_NEED_SIMD_BANK is defined.
1669 * mini-ops.h: Added the new simd ops.
1671 * mini-x86.c: Added mono_arch_xregname.
1673 * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
1675 * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
1677 * mini-x86.h: Define simd related MONO_ARCH macros.
1679 * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
1681 * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
1683 * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
1684 MONO_CLASS_IS_SIMD to deal with simd related IR.
1686 * mini.h (MonoInst): Added spill_var to the backend union.
1688 * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
1690 * mini.h: Added forward declarations of the new simd fuctions.
1692 * optflags-def.h: Added new optimization names SIMD.
1694 * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
1696 * regalloc.h: Added support for working with 3 register banks.
1698 * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
1700 * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
1702 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
1704 * mini-exceptions.c: remove 64 bit related ifdef clutter.
1706 2008-10-03 Zoltan Varga <vargaz@gmail.com>
1708 * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
1709 instead of one on 64 bit systems.
1711 * method-to-ir.c: Remove unused includes.
1713 2008-10-02 Zoltan Varga <vargaz@gmail.com>
1715 * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
1716 cfg->used_int_regs, since the two are different on arm.
1718 2008-10-02 Mark Probst <mark.probst@gmail.com>
1720 * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
1721 mono_method_get_vtable_index() to get the vtable index.
1723 2008-10-02 Mark Probst <mark.probst@gmail.com>
1725 * method-to-ir.c (mono_method_to_ir2): Don't create native
1726 wrappers for array methods, because they're never called (and if
1727 they were called they wouldn't work).
1729 2008-10-02 Mark Probst <mark.probst@gmail.com>
1731 * method-to-ir.c (mono_method_to_ir2): Array methods are
1732 special-cased and must not be invoked indirectly via the (M)RGCTX
1733 when generic sharing is turned on. Fixes #431413.
1735 2008-10-01 Mark Probst <mark.probst@gmail.com>
1737 * method-to-ir.c: When generic sharing is active, call
1738 non-interface virtual generic methods via the standard trampoline.
1740 * mini-trampolines.c: Handle virtual generic shared methods.
1742 * mini.h, mini-x86.c, mini-x86.h: New argument for
1743 mono_arch_build_imt_thunk() which is non-NULL for virtual generic
1744 method thunks and which is the trampoline to call if the lookup
1745 fails. Enable the virtual generic method thunk for x86.
1747 * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
1748 mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
1749 argument but assert that it's NULL, because these archs don't yet
1750 implement the virtual generic method thunk. Changes in the IMT
1751 thunk data structures.
1753 2008-10-01 Zoltan Varga <vargaz@gmail.com>
1755 * aot-compiler.c (emit_globals): Avoid invalid characters in
1756 the static linking symbol.
1758 * objects.cs: Add a test for the range check optimization. Fix warnings.
1760 * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
1761 optimization from the current JIT.
1763 * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
1764 later in decompose_array_access_opts () to allow more optimizations.
1766 * method-to-ir.c (mono_handle_soft_float): Rename this to
1767 mono_decompose_soft_float () for consistency.
1769 * mini-ops.h: Fix arguments of OP_STRLEN.
1771 * method-to-ir.c (save_cast_details): Extract the cast details saving code
1772 into a separate function.
1773 (reset_cast_details): Ditto.
1774 (handle_unbox): Save cast details. Fixes #431254.
1776 * method-to-ir.c: Remove some obsolete FIXMEs.
1778 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1780 * ir-emit.h (alloc_dreg): Write a warning before crashing.
1782 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1784 * mini-codegen.c: More work on macros to make them
1785 ready for multiple regbanks.
1787 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1789 * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
1791 * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
1793 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1795 * mini-codegen.c (mono_spillvar_offset): Proper support for
1798 2008-09-30 Zoltan Varga <vargaz@gmail.com>
1800 * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
1801 the stack overflow changes.
1803 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1805 * mini-codegen.c: Make all bank macros depend on reg_bank.
1807 * mini-codegen.c (mono_local_regalloc): Make free mask
1808 initialization regbank aware.
1810 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1812 * mini-codegen.c (mono_local_regalloc): Extract callee
1813 mask selection to a function and make it regbank aware.
1815 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
1817 * mini-codegen.c (mono_local_regalloc): Changed the cloberring
1818 code to deal with many regbanks.
1820 2008-09-30 Zoltan Varga <vargaz@gmail.com>
1822 * mini-codegen.c: More fp->regbank changes.
1824 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
1826 * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
1827 of a hardcoded constant.
1829 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
1831 * method-to-ir.c (type_from_stack_type): Fix typo.
1833 2008-09-29 Zoltan Varga <vargaz@gmail.com>
1835 * mini-ia64.c (emit_move_return_value): Convert float return values to
1838 * objects.cs: Add a new test.
1840 * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
1841 VARARG methods to fix an assert later.
1843 * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
1844 end so it at least compiles.
1846 2008-09-28 Zoltan Varga <vargaz@gmail.com>
1848 * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
1850 2008-09-28 Rodrigo Kumpera <rkumpera@novell.com>
1852 * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
1853 optimization to a new function (emit_optimized_ldloca_ir) and enable
1854 it for both ldloca and ldloca_s.
1856 2008-09-28 Zoltan Varga <vargaz@gmail.com>
1858 * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
1859 gshared CASTCLASS code.
1861 * driver.c (mono_main): Add a workaround for shutdown crashes seen on
1862 amd64, where the libc stack unwinder encounters stack frames referring to
1863 native code in unmapped memory.
1865 * method-to-ir.c (mini_emit_check_array_type): Add support for generic
1868 * generics.cs: Add new test.
1870 2008-09-27 Zoltan Varga <vargaz@gmail.com>
1872 * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
1873 add a check that one of the ARM_FPU_ constants is defined.
1875 * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
1877 * mini-exceptions.c: Fix build on non-altstack platforms.
1879 * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
1882 * ir-emit.h: Add a comment to NEW_PCONST.
1884 * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
1886 * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
1888 * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
1889 after the changes to MonoJitDomainInfo.
1891 2008-09-27 Mark Probst <mark.probst@gmail.com>
1893 * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
1895 2008-09-27 Mark Probst <mark.probst@gmail.com>
1897 * mini-ppc.c: Compiler warning fixes.
1899 2008-09-27 Mark Probst <mark.probst@gmail.com>
1901 * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
1904 2008-09-27 Mark Probst <mark.probst@gmail.com>
1906 * exceptions-ppc.c, mini-ppc.h: Compile
1907 mono_arch_handle_altstack_exception() on Darwin, too.
1909 2008-09-27 Mark Probst <mark.probst@gmail.com>
1911 * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
1912 work on archs which don't have generic sharing implemented, only
1913 without the vtable_arg.
1915 2008-09-26 Mark Probst <mark.probst@gmail.com>
1917 * mini.c: Added comment explaining why delegate ctor icall
1918 wrappers are compiled.
1920 2008-09-26 Mark Probst <mark.probst@gmail.com>
1922 * mini.c: Don't produce trampolines to delegate ctor icall
1923 wrappers but compile them upfront.
1925 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
1927 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
1928 runtime-set function when going back to managed code. Currently this
1929 is used to set back the protection on the soft ovf pages and/or to
1930 throw the stack overflow exception that happened in unmanaged code.
1932 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
1934 * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
1935 runtime-set function when going back to managed code. Currently this
1936 is used to set back the protection on the soft ovf pages and/or to
1937 throw the stack overflow exception that happened in unmanaged code.
1939 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1941 * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
1942 the support code for restoring stack protection after stack overflows
1943 that happen in unmanaged code. Don't set the exec permission on the
1946 2008-09-26 Zoltan Varga <vargaz@gmail.com>
1948 * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
1949 delegate->method_ptr is set. Fixes #428054.
1951 2008-09-25 Zoltan Varga <vargaz@gmail.com>
1953 * tests.cs: Rename to ratests.cs.
1955 * method-to-ir.c: Merge the emit_get_rgctx () calls into the
1956 emit_get_rgctx_... functions.
1958 2008-09-25 Mark Probst <mark.probst@gmail.com>
1960 * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
1962 2008-09-25 Mark Probst <mark.probst@gmail.com>
1964 * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
1965 before asserting that method is sharable.
1967 2008-09-25 Mark Probst <mark.probst@gmail.com>
1969 * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
1970 whether method needs a static RGCTX wrapper used instead of
1973 * generic-sharing.c, mini.h: A few functions moved to
1974 metadata/generic-sharing.c.
1976 2008-09-25 Mark Probst <mark.probst@gmail.com>
1978 * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
1979 Generic code sharing for value types, which essentially means
1980 treating value type methods like static methods. The RGCTX is
1981 passed in the same way.
1983 2008-09-25 Zoltan Varga <vargaz@gmail.com>
1985 * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
1986 opcode when creating multi-dimensional arrays of open types.
1988 * generic-sharing.c (mono_method_check_context_used): Handle arrays of
1991 * generics.cs: Add a test.
1993 * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
1995 2008-09-24 Zoltan Varga <vargaz@gmail.com>
1997 * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
1999 * mini.c (mini_method_compile): Set it when running under the debugger.
2001 * method-to-ir.c (mono_handle_global_vregs): Disable global->local
2002 vreg optimization if the flag is set.
2004 * driver.c (mono_main): Add --attach= option to pass options to
2007 * mini.c (sigquit_signal_handler): Start the attach agent.
2009 * ssapre.c: Disable this to save space since it is not yet ported to
2012 * regalloc2.c: Disable this to save space.
2014 * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
2016 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
2018 * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
2019 the -v option useful again.
2021 2008-09-24 Zoltan Varga <vargaz@gmail.com>
2023 * mini-amd64.c (mono_arch_output_basic_block): Add support for
2026 * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
2027 arrays of arrays. Fixes #428406.
2029 * method-to-ir.c (mini_emit_castclass): Ditto.
2031 * objects.cs: Add new test.
2033 2008-09-23 Rodrigo Kumpera <rkumpera@novell.com>
2035 * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
2036 was wrong at it choked against target_type_is_incompatible for byref types.
2038 2008-09-23 Zoltan Varga <vargaz@gmail.com>
2040 * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most
2043 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
2045 * mini-exceptions.c: update a few more exceptions-related counters.
2047 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
2049 * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
2050 new functions to allocate from persistent mempools.
2052 2008-09-23 Zoltan Varga <vargaz@gmail.com>
2054 * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow
2055 multiple register banks in the future.
2057 * mini-codegen.c (mono_local_regalloc): Fix a warning.
2059 2008-09-22 Rodrigo Kumpera <rkumpera@novell.com>
2061 * mini.c (type_to_eval_stack_type): Remove duplicated function.
2063 * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
2065 * mini.h: Export type_to_eval_stack_type.
2067 This function was nearly duplicated in method-to-ir.c and mini.c. The difference
2068 is only ins->klass of byref types.
2070 2008-09-22 Zoltan Varga <vargaz@gmail.com>
2072 * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
2073 (mini_emit_memcpy2): Ditto.
2075 * mini-amd64.c: Fix a warning.
2077 2008-09-21 Mark Probst <mark.probst@gmail.com>
2079 * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
2082 2008-09-19 Rodrigo Kumpera <rkumpera@novell.com>
2084 * method-to-ir.c: Extract stloc micro-optimization to a
2085 function and apply it to all cases.
2087 2008-09-19 Mark Probst <mark.probst@gmail.com>
2089 * method-to-ir.c: Don't fail generic code sharing in cases we
2092 2008-09-18 Mark Probst <mark.probst@gmail.com>
2094 * mini-ppc.c: Handle structs in tailcalls on Darwin.
2096 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
2098 * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
2101 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
2103 * trace.c: make tracing more useful and correct, with per-thread
2106 2008-09-15 Mark Probst <mark.probst@gmail.com>
2108 * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
2109 doing a method call and the argument is an R4.
2111 2008-09-14 Zoltan Varga <vargaz@gmail.com>
2113 * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
2116 2008-09-13 Mark Probst <mark.probst@gmail.com>
2118 * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
2120 2008-09-12 Zoltan Varga <vargaz@gmail.com>
2122 * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
2123 (MONO_JUMP_TABLE_FROM_INS): Ditto.
2125 2008-09-11 Zoltan Varga <vargaz@gmail.com>
2127 * driver.c: Add a --agent argument (not supported yet) to load managed
2128 agent assemblies before loading the main assembly, similarly to how the
2129 Java VM handles agents.
2131 2008-09-11 Mark Probst <mark.probst@gmail.com>
2133 * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
2134 function to do stack layout of local variables.
2136 2008-09-11 Mark Probst <mark.probst@gmail.com>
2138 * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
2141 2008-09-11 Zoltan Varga <vargaz@gmail.com>
2143 * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
2144 abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
2145 JIT if DISABLE_JIT is defined.
2147 * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
2150 2008-09-10 Mark Probst <mark.probst@gmail.com>
2152 * iltests.il.in: Disable the fconv test on PPC (the result is
2153 undefined according to ECMA).
2155 2008-09-10 Mark Probst <mark.probst@gmail.com>
2157 * iltests.il.in: Enable tail call tests for PPC.
2159 * mini.h: Add variable for storing incoming valuetype argument
2160 addresses for tail calls.
2162 * mini-ppc.c: Implement valuetype arguments and return values for
2165 2008-09-09 Mark Probst <mark.probst@gmail.com>
2167 * mini-ppc.c: Partially implement tail calls (struct arguments and
2168 return values not supported).
2170 * method-to-ir.c: Enable tail calls on PPC.
2172 2008-09-08 Zoltan Varga <vargaz@gmail.com>
2174 * aot-compiler.c (emit_wrapper_info): Omit the klass name from
2175 runtime-invoke wrappers to work around the problem of them getting
2176 assigned to a random class.
2178 * aot-runtime.c (mono_aot_get_method): Ditto.
2180 2008-09-07 Zoltan Varga <vargaz@gmail.com>
2182 * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
2183 the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
2185 2008-09-07 Mark Probst <mark.probst@gmail.com>
2187 * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
2188 until they're implemented properly.
2190 * exceptions-ppc.c: Use arch-independent exception-handling code
2191 instead of custom one.
2193 * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
2196 * tramp-ppc.c, mini-ppc.c: Fixed warnings.
2198 * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
2199 applies when __powerpc__ is defined.
2201 2008-09-06 Zoltan Varga <vargaz@gmail.com>
2203 * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
2204 methods to their code to avoid computing the full name of wrappers and
2205 doing a lookup in a string hash table.
2207 2008-09-05 Zoltan Varga <vargaz@gmail.com>
2209 * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
2210 we identify bblocks before method_to_ir () is ran.
2212 * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
2213 Also avoid optimizing branches pointing to themselves.
2215 * mini.c (mini_method_compile): Ditto. Fixes #422947.
2217 2008-09-05 Rodrigo Kumpera <rkumpera@novell.com>
2219 * driver.c (mono_main): Enable the new verifier under core-clr and cas.
2221 2008-09-05 Zoltan Varga <vargaz@gmail.com>
2223 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
2224 (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
2225 (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
2228 * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all
2229 jumped to the same entry in plt_jump_table.
2231 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
2233 * method-to-ir.c (initialize_array_data): Handle field with RVA from
2236 2008-08-31 Zoltan Varga <vargaz@gmail.com>
2238 * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
2239 other assignment can be if converted. Saves 1.5% on corlib size and fixes
2242 2008-08-29 Geoff Norton <gnorton@novell.com>
2244 * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
2245 segment, and doesn't properly handle .space as .text. Fixes
2248 2008-08-29 Geoff Norton <gnorton@novell.com>
2250 * mini.c: Disable the mach exception handler when running on
2253 2008-08-29 Geoff Norton <gnorton@novell.com>
2255 * aot-compiler.c: Patch from Renaldas Zioma to properly register
2256 globals on Darwin/ARM
2258 2008-08-28 Zoltan Varga <vargaz@gmail.com>
2260 * mini.c: Avoid not initializing the runtime when doing AOT compilation,
2261 since too many things depend on it. Instead, call
2262 mono_runtime_set_no_exec ().
2264 * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
2267 * aot-compiler.c: Add an 'asm-only' AOT option.
2269 * mini.c: Avoid initializing the runtime when doing AOT compilation.
2271 * aot-compiler.c (compile_method): Disable gshared support for now as it
2274 2008-08-27 Bill Holmes <billholmes54@gmail.com>
2276 * mini-amd64.h : Fix a compiler warning.
2278 * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
2279 Changed to use a callback function to retrieve the unwind info.
2280 This avoids problems observed when code blocks were removed by
2281 unloading an app domain.
2283 * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole
2284 and branch excludes for Winx64. The fix in exceptions-amd64.c allows them
2287 Contributed under MIT/X11 license.
2289 2008-08-27 Bill Holmes <billholmes54@gmail.com>
2291 * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
2292 case to keep the stack aligned to 8.
2294 Contributed under MIT/X11 license.
2296 2008-08-26 Zoltan Varga <vargaz@gmail.com>
2298 * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
2299 avoid repeated linear searches.
2301 2008-08-25 Zoltan Varga <vargaz@gmail.com>
2303 * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
2304 methods it can't handle.
2306 * aot-compiler.c (add_method): Avoid adding a method twice.
2307 (add_wrappers): Add runtime invoke wrappers for all methods.
2309 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
2310 function to create an aot-compatible version of this trampoline.
2312 * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
2314 2008-08-24 Zoltan Varga <vargaz@gmail.com>
2316 * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
2318 * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
2319 with a generic sharing failure.
2321 * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
2323 * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
2324 CEE_RETHROW. Fixes #419634.
2326 * mini.c (mono_method_to_ir): Ditto.
2328 * exceptions.cs: Add a new test.
2330 * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
2331 to mono_type_stack_size_internal () since some callers might not pass in
2334 * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
2335 instrument_prolog. Fixes #419878.
2337 * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
2338 doubles in soft float mode volatile.
2340 2008-08-23 Zoltan Varga <vargaz@gmail.com>
2342 * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
2344 * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
2345 to handle soft float correctly.
2347 * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
2350 * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
2352 * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
2353 to sp, since the generics catch code requires it.
2355 * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
2358 * method-to-ir.c (emit_imt_argument): Pass imt_arg to
2359 mono_arch_emit_imt_argument ().
2361 * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
2363 * mini-arm.c tramp-arm.c: Generic sharing updates.
2365 2008-08-22 Zoltan Varga <vargaz@gmail.com>
2367 * mini-arm.c: Fix the arm build.
2369 * generic-sharing.c (mini_type_get_underlying_type): New helper function
2370 handling enums, generic instances and generic sharing.
2371 (mini_type_stack_size_full): Ditto.
2373 * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
2375 * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
2377 * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
2379 * tramp-arm.c: Implement the rgctx fetch and the generic class init
2382 * mini-arm.c: Various small generic sharing changes.
2384 * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
2386 (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
2389 * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
2390 helper function to return a generic class init trampoline.
2392 * method-to-ir.c mini.c: Use it.
2394 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
2395 arch-specfic function to return a generic class init trampoline.
2397 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
2398 the GENERIC_CLASS_INIT custom code.
2400 * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
2401 a fatal error, not a sharing failure.
2403 * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
2406 * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
2407 trampoline argument from MONO_ARCH_VTABLE_REG.
2409 * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
2410 order of the arguments to the C trampoline: pass 'slot' as the trampoline
2411 argument, and pass the vtable in VTABLE_REG.
2413 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
2414 order of the arguments to the C trampoline: pass 'slot' as the trampoline
2415 argument, and pass the vtable in VTABLE_REG.
2416 (mono_arch_create_trampoline_code_full): Remove some special casing for
2417 the rgctx fetch trampoline.
2419 * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
2422 * iltests.il: Add a test for it.
2424 2008-08-21 Zoltan Varga <vargaz@gmail.com>
2426 * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
2428 * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
2431 * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
2432 use mono_jit_info_table_find () to avoid recursion.
2433 (mono_delegate_trampoline): Add a sync wrapper here.
2435 * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
2438 * mini.c (mono_method_to_ir): Ditto.
2440 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
2441 add_sync_wrapper argument. Don't add a sync wrapper here.
2442 (mono_create_jump_trampoline): Don't add a sync wrapper here.
2444 * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
2446 2008-08-20 Bill Holmes <billholmes54@gmail.com>
2448 * exceptions-amd64.c (seh_handler): For Winx64 adding missing copy
2449 of nonvolatile registers back from MonoContext to CONTEXT.
2451 Contributed under MIT/X11 license.
2453 2008-08-20 Bill Holmes <billholmes54@gmail.com>
2455 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): When shifting the
2456 arguments on Winx64 there are only 4 argument registers. For this
2457 logic to work the last argument must be pulled from the stack.
2459 Contributed under MIT/X11 license.
2461 2008-08-20 Zoltan Varga <vargaz@gmail.com>
2463 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2465 * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
2466 MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
2467 encode/decode_method_ref ().
2469 * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
2471 * aot-runtime.c (decode_patch): Ditto.
2473 * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
2474 MONO_PATCH_INFO_METHOD.
2476 * aot-runtime.c (decode_exception_debug_info): Decode the contents of
2479 * aot-compiler.c (emit_exception_debug_info): Emit the contents of
2482 * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
2484 * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
2485 one from the caller.
2487 * aot-runtime.c (decode_generic_inst): New function to decode and
2488 return a interned generic inst.
2489 (decode_klass_ref): Use it.
2490 (decode_method_ref): Ditto.
2492 * aot-compiler.c (emit_exception_debug_info): Save
2493 jinfo->has_generic_jit_info too.
2495 2008-08-19 Zoltan Varga <vargaz@gmail.com>
2497 * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
2499 * iltests.il.in: Add a test for fconv_to_i.
2501 * liveness.c: Disable the liveness2 pass for now to save space.
2503 * regalloc2.c: Include mempool-internals.h to fix warnings.
2505 * aot-compiler.c (encode_method_ref): Encode the context of generic
2508 * aot-runtime.c (decode_method_ref): Inflate generic methods using
2509 the context saved in the aot file.
2511 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2513 * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
2515 * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
2516 volatile so they won't be optimized away.
2518 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
2524 * dominators.c: Remove duplicated functions that now are in
2525 mempool-internals.h.
2527 2008-08-19 Zoltan Varga <vargaz@gmail.com>
2529 * aot-compiler.c: Fix warnings.
2531 * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
2533 * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
2535 * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
2538 * mini.c (mono_resolve_patch_target): Ditto.
2540 * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
2541 (encode_klass_ref): Add support for encoding VARs/MVARs.
2543 * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
2545 * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
2546 the handling of the got entries into a separate 'decode_got_entry' function.
2547 Add support for RGCTX_FETCH.
2549 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
2550 clobbered by the trampoline code.
2552 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
2553 not clobbered by the indirect calling code.
2555 2008-08-18 Zoltan Varga <vargaz@gmail.com>
2557 * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
2560 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
2562 * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
2563 signature using the compilation mempool otherwise we would leak it.
2565 2008-08-18 Zoltan Varga <vargaz@gmail.com>
2567 * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
2568 mono_emit_abs_call ().
2570 * patch-info.h: Add GENERIC_CLASS_INIT.
2572 * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
2574 * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
2575 as their target as a near call.
2577 * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
2579 (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
2581 * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
2582 call to a runtime function described by a patch.
2584 * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
2585 mono_emit_abs_call, this has the advantage that the ABS handling code in
2586 mono_codegen () can handle them both, and can handle other stuff in the
2587 future without additional code.
2589 * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
2591 (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
2594 * mini.h: Add missing bblock related prototypes.
2596 * mini.h (MonoCompile): Remove unused reverse_inst_list and
2597 reverse_inst_list_len fields.
2599 * mini.c: Refactor this file a bit by moving branch optimizations to
2602 * method-to-ir.c: Merge generic sharing changes missed earlier.
2604 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
2606 * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
2607 shared patches. Process METHODCONST as a shared patch.
2609 * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
2610 as it crashes on the 2.0 mscorlib.
2612 * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
2615 * aot-compiler.c: Use is_plt_patch () in a few additional places.
2616 (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
2619 * aot-compiler.c: Reorganize the got handling code to be a bit more
2622 2008-08-17 Zoltan Varga <vargaz@gmail.com>
2624 * aot-compiler.c: Make the patch_to_plt_offset hash table use
2625 mono_patch_info_equals/hash, and use it to massively simplify
2628 * mini.c (mono_patch_info_hash): Simplify this and add support for
2631 * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
2633 * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
2634 handling code, since an offset is not enough to identify a trampoline.
2636 * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
2638 2008-08-17 Mark Probst <mark.probst@gmail.com>
2640 * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
2642 * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
2644 * mini-ops.h: Argument and result types for OVF_CARRY ops.
2646 * decompose.c: PPC decompositions for various ops.
2648 * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
2650 2008-08-17 Zoltan Varga <vargaz@gmail.com>
2652 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
2653 call the generic trampoline code using a call, instead of a jump, to
2654 remove some special casing from the generic trampoline code.
2656 * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
2657 (mono_codegen): Ditto.
2659 * aot-compiler.c aot-runtime.c: Ditto.
2661 * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
2663 * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
2664 helper function to find the offset corresponding to a lazy fetch trampoline.
2666 * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
2667 when doing generic sharing.
2669 * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
2672 * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
2673 mini-trampolines.c to be with the other trampoline creation functions.
2675 * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
2676 as it is equal to method->signature in most cases, add a
2677 mono_emit_method_call_full variant which takes a signature and an imt
2680 2008-08-16 Zoltan Varga <vargaz@gmail.com>
2682 * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
2683 to this function, since it could be computed easily from the method
2685 (mono_helper_compile_generic_method_wo_context): Removed, not needed any
2688 * method-to-ir.c mini.c: Remove references to
2689 compile_generic_method_wo_context.
2691 * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
2692 generic method calls.
2694 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
2695 dimensional non-szarrays.
2697 * mini.c (mini_init): Register mono_array_new_1.
2699 * jit-icalls.c (mono_array_new_1): New jit icall.
2701 * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
2702 pointing to the method.
2704 * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
2705 method addresses belonging to METHOD_JUMP patches in the
2706 jump_target_got_slot_hash.
2707 (mono_aot_load_method): Ditto.
2709 * aot-compiler.c (compile_method): Allow AOT compilation of methods with
2710 METHOD_JUMP patches.
2712 * mini.c (mini_create_jit_domain_info): New helper function which
2713 initializes/frees domain->runtime_info.
2714 (mini_free_jit_domain_info): Ditto.
2715 (mini_init): Install the domain hook functions with the runtime.
2717 * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
2718 information maintained by the JIT.
2720 * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
2721 insertion into jump_table_hash into mono_codegen (), also implement proper
2724 * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
2725 tail calls, it is already done by the aot code.
2727 * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
2730 * iltests.il.in: Make the jmp test a bit more complex.
2732 * aot-compiler.c (encode_method_ref): Handle references to normal methods of
2733 generic instances which doesn't have a token.
2735 * aot-runtime.c (decode_method_ref): Ditto.
2737 * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
2738 can handle this case now.
2739 (handle_box): Ditto.
2741 2008-08-15 Geoff Norton <gnorton@novell.com>
2743 * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
2746 2008-08-15 Zoltan Varga <vargaz@gmail.com>
2748 * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
2749 calling generic methods.
2751 * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
2753 * aot-runtime.c (decode_patch_info): Ditto.
2755 * mini.c (mono_resolve_patch_target): Ditto.
2757 * patch-info.h: Add METHOD_RGCTX.
2759 * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
2761 2008-08-14 Zoltan Varga <vargaz@gmail.com>
2763 * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
2764 arguments in registers.
2766 * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
2767 OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
2769 * mini.c (mini_method_compile): Abort aot compilation for generic
2770 methods if generic sharing is disabled.
2772 * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
2775 * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls
2776 requiring an mrgctx.
2778 * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
2779 store instructions when converting a vcall to a normal call.
2781 * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
2782 mono_arch_find_jit_info.
2784 2008-08-13 Zoltan Varga <vargaz@gmail.com>
2786 * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
2787 avoid calling mono_method_full_name () for every method even if the
2789 (check_inline_caller_method_name_limit): Ditto.
2791 2008-08-12 Zoltan Varga <vargaz@gmail.com>
2793 * driver.c (main_thread_handler): Allow AOT compilation of multiple
2794 assemblies in one run.
2796 * aot-compiler.c (mono_compile_assembly): Only print out a count of
2797 skipped methods if it is not 0.
2799 * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
2801 2008-08-12 Bill Holmes <billholmes54@gmail.com>
2803 * mini.c (mono_codegen): Changing a preprocessor check from WIN64 to
2804 MONO_ARCH_HAVE_UNWIND_TABLE.
2806 Contributed under MIT/X11 license.
2808 2008-08-12 Bill Holmes <billholmes54@gmail.com>
2810 * mini-amd64.c (mono_arch_cpu_optimizazions): Remove peephole and branch
2811 from default optimizaton list on Winx64.
2813 * mini-amd64.c (emit_tls_get): Added Winx64 specific implementation for GetTLS.
2815 * mini-amd64.c (mono_arch_emit_prolog): Adding an offset on Winx64 to get
2816 the LMF from the MonoJitTlsData structure.
2818 * mini-amd64.c (mono_arch_setup_jit_tls_data): Added Winx64 implementation.
2820 Contributed under MIT/X11 license.
2822 2008-08-12 Zoltan Varga <vargaz@gmail.com>
2824 * mini.c (sigsegv_signal_handler): Fix the build.
2826 * mini-amd64.c (emit_call_body): Use image->aot_module instead of
2827 assembly->aot_module.
2829 * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
2830 hash table. This simplifies and speeds up a lot of code, and fixes support
2833 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
2836 * mini-exceptions.c: Ditto.
2838 * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
2839 'native_offset' argument, since these are computed in the
2840 mono_find_jit_info () function.
2842 * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
2843 is used by exceptions-ppc.c.
2845 * exceptions-ppc.c: Call mono_find_jit_info () instead of
2846 mono_arch_find_jit_info ().
2848 * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
2849 mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
2850 generic code in mini-exceptions.c.
2852 2008-08-11 Zoltan Varga <vargaz@gmail.com>
2854 * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
2856 * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
2858 * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
2859 the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
2860 called while holding the loader lock. Fixes #415608.
2861 (mono_aot_get_method_from_token_inner): Ditto.
2863 2008-08-09 Zoltan Varga <vargaz@gmail.com>
2865 * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
2866 to reduce differences between this and the generic implementation in
2868 (ves_icall_get_frame_info): Ditto.
2870 * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
2872 * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
2875 * exceptions-ppc.c (arch_get_call_filter): Rename this to
2876 mono_arch_get_call_filter () and make it non-static, for consistency with the
2877 other architectures.
2879 2008-08-09 Rodrigo Kumpera <rkumpera@novell.com>
2882 * local-propagation.c:
2883 * mini-x86.c: Correct the name of arch defines.
2885 2008-08-09 Zoltan Varga <vargaz@gmail.com>
2887 * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
2888 NO_EMULATE_LONG_SHIFT_OPS define.
2890 2008-08-08 Zoltan Varga <vargaz@gmail.com>
2892 * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
2893 now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
2895 * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
2896 MACH fixes. Merged from the 2.0 branch.
2898 * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
2900 * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
2901 (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
2903 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
2905 * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
2906 mono_marshal_get_native_wrapper () signature changes.
2908 2008-08-07 Rodrigo Kumpera <rkumpera@novell.com>
2910 * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
2911 conversion bug under arm.
2913 2008-08-06 Rodrigo Kumpera <rkumpera@novell.com>
2915 * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
2917 * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
2918 with overflow checking.
2920 2008-08-05 Marek Habersack <mhabersack@novell.com>
2922 * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
2923 to the genmdesc.pl file
2925 2008-08-05 Zoltan Varga <vargaz@gmail.com>
2927 * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
2928 arg_array in the soft-float versions of the LOAD/STORE macros.
2930 * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
2933 * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
2935 2008-08-02 Zoltan Varga <vargaz@gmail.com>
2937 * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
2938 a float HFA. Fixes #413621.
2940 2008-08-02 Gert Driesen <drieseng@users.sourceforge.net>
2942 * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
2943 frame_size to args_size. Fixes build.
2945 2008-08-02 Zoltan Varga <vargaz@gmail.com>
2947 * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
2948 and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
2950 * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
2951 the stack are not unaligned. Fixes #413247.
2953 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
2955 * mini.c: update jitted methods performance counters.
2957 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
2959 * mini-exceptions.c: increase the exceptions thrown performance
2960 counter in mono_handle_exception ().
2962 2008-07-29 Zoltan Varga <vargaz@gmail.com>
2964 * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
2965 can work with netmodules.
2967 2008-07-28 Geoff Norton <gnorton@novell.com>
2969 * mini-x86.h: Correct the frame alignment on OSX. Fixes the jit
2972 2008-07-28 Zoltan Varga <vargaz@gmail.com>
2974 * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
2977 2008-07-28 Bill Holmes <billholmes54@gmail.com>
2979 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2980 The float param registers and other param registers must be the
2981 same index on Windows x64.
2983 * mini-amd64.c (mono_arch_allocate_vars) : Implementing the
2984 ArgValuetypeAddrInIReg argument case. Setting the argument
2985 op to OP_VTARG_ADDR (OP_REGOFFSET)).
2987 * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix. Use the size
2988 variable computed above as the copy length for arguments of storage
2989 type ArgValuetypeAddrInIReg.
2991 * mini-amd64.c (mono_arch_emit_call) : Implementing the
2992 ArgValuetypeAddrInIReg argument case. This case will rely on
2993 mono_arch_emit_outarg_vt to emit the correct code later in the process.
2995 * mini-amd64.c (mono_arch_emit_call) : On Winx64 there always needs to be
2996 a 32 byte stack allocation for all calls. We will omit the adjustment for
2997 jump and tail call instructoins as they do not follow the typical call behavior.
2999 * mini-amd64.c (mono_arch_emit_outarg_vt) : Implementing the case for
3000 ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
3001 local variable and pass the local variable by reference to the called method.
3003 * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
3004 Implementing the ArgValuetypeAddrInIReg argument case. When the address
3005 of a struct is passed in a register it must be saved with the other
3006 volatile argument on the stack.
3008 * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix. When omitting the
3009 frame pointer the stack adjustment value must be saved to the unwind
3012 Contributed under MIT/X11 license.
3014 2008-07-28 Zoltan Varga <vargaz@gmail.com>
3016 * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
3017 which got lost in the merge.
3019 2008-07-27 Zoltan Varga <vargaz@gmail.com>
3021 * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
3024 * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
3026 * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
3027 icalls, since they won't be patched.
3029 * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
3030 different code sequence when running under valgrind to prevent some valgrind
3033 * iltests.il.in: Add new regression test.
3035 * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
3038 * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
3039 accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
3041 * iltests.il.in: Add new test.
3043 * aot-compiler.c: Fix some warnings.
3045 * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
3048 2008-07-27 Zoltan Varga <vargaz@gmail.com>
3050 * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
3051 (mini_usage_jitdeveloper): Add a missing --wapi option.
3053 2008-07-25 Zoltan Varga <vargaz@gmail.com>
3055 * mini-codegen.c: Simplify the is_fp macros.
3056 (free_up_ireg): Remove, use free_up_reg instead.
3057 (free_up_reg): Fix the fp case.
3059 2008-07-26 Zoltan Varga <vargaz@gmail.com>
3061 * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
3064 * exceptions-x86.c: Merge some changes which seemed to have got lost
3065 in the linear-ir merge.
3067 * liveness.c: Disable the liveness2 pass on 32 bit platforms.
3069 * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
3070 long vreg volatile even if the variable was already created.
3072 * liveness.c (update_liveness2): Avoid eliminating dead definitions of
3075 2008-07-26 Zoltan Varga <vargaz@gmail.com>
3077 * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
3079 * mini.c (mono_jit_compile_method_inner): Add support for
3080 MONO_EXCEPTION_BAD_IMAGE.
3082 * method-to-ir.c (mono_method_to_ir2): Avoid a crash if
3083 mini_method_get_context () returns NULL. Fixes #356531.
3085 * mini.c (mono_method_to_ir): Ditto.
3087 * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
3088 accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
3090 2008-07-25 Zoltan Varga <vargaz@gmail.com>
3092 * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
3093 in the LDFTN implementation.
3095 2008-07-25 Mark Probst <mark.probst@gmail.com>
3097 * mini-trampolines.c (mono_magic_trampoline): When sharing generic
3098 code, patch calls to icalls, too, even if they're not in the
3099 shared generic code hash. Fixes #411962.
3101 2008-07-25 Zoltan Varga <vargaz@gmail.com>
3103 * cpu-x86.md: Increase the length of the fcall opcodes.
3105 * mini-x86.c (emit_move_return_value): Avoid some precision issues for
3106 calls returning floats.
3108 * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
3111 * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
3114 * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
3115 into the domain->method_code_hash.
3117 * aot-compiler.c: Fix win32 build.
3119 * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
3121 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
3122 gshared NEWARR implementation.
3124 * cpu-sparc.md: Remove duplicate localloc_imm opcode.
3126 * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
3127 can be used outside of method_to_ir.
3129 * mini.h (MonoCompile): Add arg_types field.
3131 * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
3133 * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
3134 the values of the local arg_array and param_types array.
3136 2008-07-24 Zoltan Varga <vargaz@gmail.com>
3138 * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
3139 got accesses might only get generated later when NEWOBJ is decomposed.
3141 * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
3142 looking up the native code of the target method when a delegate is called
3145 * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
3148 * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
3150 * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
3151 AOT work on platforms without a working dlsym implementation.
3153 * mini.h: Bump AOT image format version.
3155 2008-07-24 Mark Probst <mark.probst@gmail.com>
3157 * mini-exceptions.c: Free a MonoType with
3158 mono_metadata_free_type() instead of g_free().
3160 * aot-runtime.c: Free a MonoType.
3162 2008-07-24 Zoltan Varga <vargaz@gmail.com>
3164 * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
3167 * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
3170 2008-07-23 Massimiliano Mantione <massi@ximian.com>
3171 * mini.c (sigprof_signal_handler): call the new "runtime initialized"
3174 2008-07-23 Zoltan Varga <vargaz@gmail.com>
3176 * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
3177 NEWOBJ calls on valuetypes.
3179 * iltests.il.in: Add new test.
3181 * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
3183 2008-07-22 Zoltan Varga <vargaz@gmail.com>
3185 * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
3186 is no longer needed.
3188 * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
3189 non register sized integer arguments.
3190 (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
3191 (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to
3194 * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
3197 * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
3198 two a binop with different sized arguments is emitted.
3200 * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
3201 instruction in the ins==NULL case.
3203 2008-07-23 Zoltan Varga <vargaz@gmail.com>
3205 * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
3207 * mini-x86.c: Fix osx build.
3209 * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
3212 * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
3213 instruction for non int sized variables.
3215 * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
3218 2008-07-23 Robert Jordan <robertj@gmx.net>
3220 * method-to-ir.c: Fix MSVC build.
3222 2008-07-22 Zoltan Varga <vargaz@gmail.com>
3224 * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
3225 a non int sized type, widen it to an int since newer versions of gcc seem to
3226 generate code which needs this.
3228 * ssa2.c abcremoval2.c: Fix warnings.
3230 * *: Merge the Linear IR branch.
3232 The original branch is at trunk/branches/vargaz/mini-linear-il, and
3233 the ChangeLog file there describes all the changes done over the years.
3234 Further documentation can be found at www.mono-project.com/Linear_IL.
3236 2008-07-21 Bill Holmes <billholmes54@gmail.com>
3238 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
3239 The float param registers and other param registers must be the
3240 same index on Windows x64.
3242 Contributed under MIT/X11 license.
3244 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
3246 * mini.c: Make the previous fix GC safe.
3248 2008-07-21 Raja R Harinath <harinath@hurrynot.org>
3250 * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
3252 2008-07-21 Bill Holmes <billholmes54@gmail.com>
3254 * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
3255 on Winx64. This type will not be passed on the stack (ArgOnStack), but
3256 ArgValuetypeAddrInIReg instead.
3258 Contributed under MIT/X11 license.
3260 2008-07-21 Zoltan Varga <vargaz@gmail.com>
3262 * mini-codegen.c (get_register_spilling): Fix a warning.
3264 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
3266 * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
3267 for types which the initialization fails. Raises the provided exception
3268 at the right stop after cleanup.
3270 2008-07-16 Zoltan Varga <vargaz@gmail.com>
3272 * aot-compiler.c: Free most of the memory allocated during compilation.
3274 * mini.c (mini_parse_debug_options): Fix a leak.
3276 * mini.c (mini_method_compile): Don't add the method to the jit info tables
3277 during aot compilation.
3279 2008-07-14 Zoltan Varga <vargaz@gmail.com>
3281 * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as
3282 it has too much register pressure.
3284 2008-07-13 Zoltan Varga <vargaz@gmail.com>
3286 * inssel.brg (CEE_CASTCLASS): Remove some dead code.
3288 2008-07-12 Zoltan Varga <vargaz@gmail.com>
3290 * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
3293 * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
3294 on amd64 similar to the way it is done on arm.
3296 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3298 * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for
3299 consistency, normalize error messages, avoid loading aot-only modules in
3302 * driver.c (mono_main): Rename --aot-only command line option to --full-aot
3305 * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
3307 2008-07-11 Martin Baulig <martin@ximian.com>
3310 (MonoDebuggerInfo): Add `interruption_request'.
3312 2008-07-12 Zoltan Varga <vargaz@gmail.com>
3314 * aot-compiler.c (emit_plt): Remove some dead code.
3316 * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
3318 * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
3319 return the plt info offset belonging to a given plt entry.
3321 * mini-trampolines.c (mono_aot_plt_trampoline): Use
3322 mono_aot_get_plt_info_offset.
3324 * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
3325 similar to the amd64 code by makeing jumps through a separate jump table
3326 instead of embedding the jump addresses into the code.
3328 2008-07-11 Zoltan Varga <vargaz@gmail.com>
3330 * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
3333 2008-07-10 Martin Baulig <martin@ximian.com>
3335 * mini.c (mini_method_compile): Disable generics sharing when
3336 running in the debugger.
3338 2008-07-10 Zoltan Varga <vargaz@gmail.com>
3340 * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
3342 * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
3343 the local register allocator from running out of registers on x86 when
3346 2008-07-10 Bill Holmes <billholmes54@gmail.com>
3348 * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when
3349 expressing IntMin for the VS Compiler. See Compiler Warning (level 2)
3352 Contributed under MIT/X11 license.
3354 2008-07-10 Zoltan Varga <vargaz@gmail.com>
3356 * aot-compiler.c: Get rid of whitespace in the generated assembly file to
3357 speed up the assembler.
3359 2008-07-09 Zoltan Varga <vargaz@gmail.com>
3361 * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
3364 * mini.c: Move the soft float handling macros a bit earlier, add
3365 NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
3368 * mini.h: Add prototype for mono_arch_fixup_jinfo.
3370 * mini.c (mini_init): In aot-only mode, set the root domain code manager to
3371 read-only to help catch code allocation requests.
3373 * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
3374 and turn it off when using --aot-only or when compiling with --aot=full.
3376 * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
3377 jump table for switches from the normal domain mempool, not the code
3380 * mini-trampolines.c (get_unbox_trampoline): New function to return an
3381 unbox trampoline which handles aot-only mode too.
3383 * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
3384 an AOTed unbox trampoline.
3386 * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
3388 2008-07-09 Bill Holmes <billholmes54@gmail.com>
3390 * wapihandles.c: Fixing MSVC builds. Include statement changed from <> to
3393 Contributed under MIT/X11 license.
3395 2008-07-09 Bill Holmes <billholmes54@gmail.com>
3397 * mini.c (mono_codegen): Allocate space at the end of the code block and store
3398 the unwind information for the method at the end of the allocated block.
3400 * mini-amd64.h: Added declarations for the unwind routines and adding field to
3401 MonoCompileArch to hold the unwind info for SEH on Winx64
3403 * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
3404 frame pointer info for the method being compiled.
3406 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
3407 the call to mono_exception_from_token.
3409 * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations. This code is responsible
3410 storing the method prolog information in a format that the Winx64 SEH can understand. This
3411 information is stored a the end of the method block because it is all 32-bit offset based.
3413 Contributed under MIT/X11 license.
3415 2008-07-09 Zoltan Varga <vargaz@gmail.com>
3417 * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
3419 * wapihandles.c: Fix warnings.
3421 * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
3424 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling
3425 mono_jit_compile_method in aot-only mode since that calls the type
3428 * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
3429 get_delegate_invoke_impl in aot-only mode.
3431 * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
3433 2008-07-08 Zoltan Varga <vargaz@gmail.com>
3435 * trace.c (mono_trace_enter_method): Fix printing of Type instances.
3437 * aot-compiler.c (compile_method): Disable the check for GSHARED since it
3440 * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
3442 * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
3443 init trampoline from the AOT file as well.
3445 * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
3446 mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
3449 * mini.c (mini_init): Move the call to mono_exceptions_init () after
3452 * exceptions-amd64.c: Add _full variants for the remaining exception code
3453 creation functions as well, allow emission of relocatable code, remove
3454 caching since that is now done by the caller.
3456 * mini-exceptions.c: Add _full variants for the remaining exception code
3457 creation functions as well, add aot-only support.
3459 * aot-compiler.c (compile_method): Allow calls to methods of constructed types
3460 if we can determine a proper token for them.
3461 (add_wrappers): Add a few more wrappers.
3462 (emit_method_code): Remove some dead code.
3463 (emit_trampolines): Emit exception code too.
3465 * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
3467 * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
3468 mono_array_new_va which avoids varargs.
3470 * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
3472 * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
3473 mono_arch_create_specific_trampoline () in all places.
3475 * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
3476 a bit so it can be used for other things as well.
3478 * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
3481 * exceptions-amd64.c: Rename the caching from the exception code creation
3482 functions, it is done by the caller instead.
3484 * exceptions-amd64.c: Change the signature of the exception code creation
3485 functions to allow the creation of relocatable code later.
3487 * mini-exceptions.c: Add a set of functions to query the various
3488 runtime-generated exception functions.
3490 * mini.c mini-exceptions.c: Use the newly added functions instead of the
3491 mono_arch_.. () functions.
3493 2008-07-07 Zoltan Varga <vargaz@gmail.com>
3495 * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
3497 * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
3499 * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
3500 (mini_get_vtable_trampoline): Ditto.
3502 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
3503 code in the AOT case by returning the code size and a list of relocations to
3506 * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
3508 2008-07-07 Bill Holmes <billholmes54@gmail.com>
3510 * mini-amd64.c: On Winx64 the calling convention always requires the caller to
3513 Contributed under MIT/X11 license.
3515 2008-07-07 Zoltan Varga <vargaz@gmail.com>
3517 * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
3518 so the buffer size can be computed correctly. Fixes #404735.
3520 * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
3521 normally as cfg->debug_info is already freed.
3523 2008-07-06 Zoltan Varga <vargaz@gmail.com>
3525 * mini-amd64.c: For calls returning vtypes in registers, don't store
3526 the return address on the stack, instead allocate a separate local for
3529 2008-07-05 Mark Probst <mark.probst@gmail.com>
3531 * mini-trampolines.c, mini.h: Add an argument to
3532 mono_create_jit_trampoline_in_domain() for turning off the adding
3533 of the sync wrapper.
3535 * mini.c: Use the JIT trampoline without sync instead of
3536 ldftn_nosync in static RGCTX invoke wrappers so that the call can
3539 2008-07-04 Mark Probst <mark.probst@gmail.com>
3541 * driver.c: Turn on GSHARED optimization by default.
3543 2008-07-04 Zoltan Varga <vargaz@gmail.com>
3545 * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
3546 to MONO_TRAMPOLINE_JIT since it better reflects what it does.
3548 * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
3549 create a variant of the generic trampoline code callable from AOTed trampolines.
3551 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
3552 trampoline code callable from AOTed trampolines.
3554 * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
3556 2008-07-04 Mark Probst <mark.probst@gmail.com>
3558 * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
3559 pass-through manner.
3561 * mini.c: Generic method sharing. Pass MRGCTX to generic methods
3562 and don't fail sharing for them anymore.
3564 * mini-exceptions.c: Handle exceptions in shared generic methods.
3566 * generic-sharing.c: When checking the context of a generic
3567 method, also check its class's context. Don't treat wrappers as
3570 * mini-trampolines.c: Some code factored out to
3571 metadata/generic-sharing.c. Handle the MRGCTX case.
3573 * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
3574 we must deal with the method being of another instantiation of the
3575 class. Add static rgctx invoke wrappers to generic methods.
3577 2008-07-04 Mark Probst <mark.probst@gmail.com>
3579 * mini.c: Provide all jit infos of generic shared methods with a
3582 * mini-exceptions.c: Handle the new situation that a generic info
3583 might be available, but not info about the this/vtable/mrgctx
3586 2008-07-03 Mark Probst <mark.probst@gmail.com>
3588 * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
3591 2008-07-03 Zoltan Varga <vargaz@gmail.com>
3593 * dominators.c (check_dominance_frontier): Fix a warning.
3595 * mini.h: Add some missing prototypes.
3597 * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
3599 * driver.c (mono_jit_init_version): Correct the comments since the first
3600 argument should be the name of the root domain, not a filename.
3602 * aot-runtime.c (make_writable): Error out if this is called while running
3604 (load_aot_module): Ditto.
3606 * aot-compiler.c: Really fix the computation of method indexes.
3608 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous
3609 optimizations as this is no longer called frequently.
3611 * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
3612 method and the invoke impl code and pass it to the delegate trampoline instead of
3613 just the delegate class.
3615 2008-07-02 Zoltan Varga <vargaz@gmail.com>
3617 * aot-compiler.c: Fixup the computation of method indexes.
3618 (add_wrappers): Create the base methods of the runtime invoke wrappers using
3619 the method builder infrastructure.
3621 * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
3624 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
3625 mode, load the method right away instead of creating a trampoline.
3627 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
3629 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
3632 2008-07-01 Zoltan Varga <vargaz@gmail.com>
3634 * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
3635 (mono_aot_load_method): Use method_index instead of method->token.
3637 * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
3638 can handle icalls etc. properly.
3640 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3642 * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
3644 * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
3645 (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
3646 JIT_ICALL_ADDR patch type.
3648 * patch-info.h: Add JIT_ICALL_ADDR patch type.
3650 * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
3652 (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
3654 * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
3656 2008-06-30 Zoltan Varga <vargaz@gmail.com>
3658 * mini.c: Use domain->jit_code_hash_lock for controlling access to
3659 domain->jit_code_hash.
3661 2008-06-29 Zoltan Varga <vargaz@gmail.com>
3663 * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
3665 2008-06-27 Zoltan Varga <vargaz@gmail.com>
3667 * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
3668 get_this_arg_from_call, let it compute it when needed.
3670 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
3671 gsctx from code only when needed.
3673 * mini-trampolines.c (get_generic_context): Rename this to
3674 mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
3675 it can be called by the arch backends.
3677 * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
3679 2008-06-26 Zoltan Varga <vargaz@gmail.com>
3681 * driver.c (mono_main): Add experimental --aot-only command line option.
3683 * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
3686 2008-06-26 Kornél Pál <kornelpal@gmail.com>
3688 * driver.c (DllMain): Remove mono_module_handle.
3690 Contributed under MIT/X11 license.
3692 2008-06-25 Zoltan Varga <vargaz@gmail.com>
3694 * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
3695 for emitting methods which are not in the source assembly. Detect and report
3696 failure of assembling+linking.
3698 * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
3700 * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
3702 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
3704 * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
3706 2008-06-24 Zoltan Varga <vargaz@gmail.com>
3708 * mini.h: Remove some obsolete prototypes.
3710 * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
3712 2008-06-24 Mark Probst <mark.probst@gmail.com>
3714 * mini.c (get_object_generic_inst): Variable-sized arrays are not
3715 supported by Visual Studio, so use alloca().
3717 2008-06-23 Zoltan Varga <vargaz@gmail.com>
3719 * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
3722 2008-06-23 Mark Probst <mark.probst@gmail.com>
3724 * mini.c: Fail sharing of a generic method if it contains an open
3725 catch clause (because we don't pass MRGCTXs yet).
3727 2008-06-23 Mark Probst <mark.probst@gmail.com>
3729 * mini.c: When compiling a method with generic sharing, insert the
3730 method instantiated with an all-Object generic context into the
3731 jit info table, instead of the context of the first instantiation
3732 of the method we happen to compile.
3734 2008-06-18 Martin Baulig <martin@ximian.com>
3736 * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
3737 `major_version' and `minor_version'.
3739 2008-06-17 Mark Probst <mark.probst@gmail.com>
3741 * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
3742 mono_method_is_generic_sharable_impl() takes an additional
3743 argument specifying whether to treat type variables as reference
3746 2008-06-17 Mark Probst <mark.probst@gmail.com>
3748 * mini.h: Removed obsolete prototypes.
3750 2008-06-17 Mark Probst <mark.probst@gmail.com>
3752 * mini.c: Don't fail generic sharing for initobj and sizeof - we
3753 already handle them.
3755 2008-06-17 Mark Probst <mark.probst@gmail.com>
3757 * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
3758 tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
3759 tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
3760 tramp-x86.c: Added a MonoGenericContext* argument to
3761 mono_arch_get_unbox_trampoline() so that it can call other
3762 functions which require it.
3764 2008-06-17 Mark Probst <mark.probst@gmail.com>
3766 * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
3767 mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
3768 mono_arch_get_this_arg_from_call() takes a
3769 MonoGenericSharingContext* as well.
3771 2008-06-17 Mark Probst <mark.probst@gmail.com>
3773 * mini.c: Factor out code for emitting unbox into emit_unbox() and
3774 implement generic sharing of unbox.
3776 2008-06-17 Mark Probst <mark.probst@gmail.com>
3778 * mini.c: Don't compute the vtable to determine whether a field is
3779 special static, because it might not work for open types.
3781 2008-06-17 Mark Probst <mark.probst@gmail.com>
3783 * mini.c: Removed the unused token_type and token_source arguments
3784 from get_runtime_generic_context_ptr().
3786 2008-06-17 Marek Habersack <mhabersack@novell.com>
3788 * mini.c (ADD_BINOP): fix the build
3790 2008-06-16 Zoltan Varga <vargaz@gmail.com>
3792 * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
3795 2008-06-16 Mark Probst <mark.probst@gmail.com>
3797 * mini.h: Removed class relations enum that's not used anymore.
3799 2008-06-16 Mark Probst <mark.probst@gmail.com>
3801 * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
3803 * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
3804 the lazy fetch trampoline access code.
3806 2008-06-15 Zoltan Varga <vargaz@gmail.com>
3808 * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
3810 2008-06-14 Zoltan Varga <vargaz@gmail.com>
3812 * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
3814 * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
3816 * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
3818 2008-06-13 Zoltan Varga <vargaz@gmail.com>
3820 * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
3823 * mini-ops.h: Add MIN/MAX_UN opcodes.
3825 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
3828 * basic-math.cs: Add more min/max tests.
3830 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
3832 2008-06-13 Mark Probst <mark.probst@gmail.com>
3834 * mini.c: Small fix in the prologue of emit_castclass.
3836 2008-06-13 Zoltan Varga <vargaz@gmail.com>
3838 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
3840 * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
3841 do not work even for unsigned types. Fixes #400014.
3843 * basic-math.cs: Add regression tests for unsigned Min/Max.
3845 2008-06-13 Mark Probst <mark.probst@gmail.com>
3847 * mini.c: Added additional context_used argument to several
3848 functions, which will be needed for sharing generic methods. Use
3849 GET_RGCTX macro wherever appropriate. Declare only one
3850 context_used in mono_method_to_ir().
3852 2008-06-13 Mark Probst <mark.probst@gmail.com>
3854 * mini.c, generic-sharing.c: Removed generic class relations.
3856 * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
3857 functions due to MRGCTX changes.
3859 2008-06-13 Mark Probst <mark.probst@gmail.com>
3861 * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
3862 graph.c, local-propagation.c, aliasing.c: New opcodes for calls
3863 with calculated IMT.
3865 * mini.c: Generic sharing of calls via generic interfaces.
3867 * jit-icalls.c, jit-icalls.h: Helper function for compiling a
3868 generic method with non-constant MonoGenericContext*. Instead,
3869 the context is taken out of the method itself.
3871 2008-06-13 Mark Probst <mark.probst@gmail.com>
3873 * mini.c: Generic sharing of ldvirtftn.
3875 2008-06-13 Mark Probst <mark.probst@gmail.com>
3877 * mini.c: Generic sharing of ldftn.
3879 2008-06-13 Mark Probst <mark.probst@gmail.com>
3881 * mini.c: Do pass VTable/RGCTX argument to static generic methods.
3883 2008-06-13 Mark Probst <mark.probst@gmail.com>
3885 * mini.c: Generic sharing of the special case of ldtoken followed
3886 by a call to GetTypeFromHandle.
3888 2008-06-13 Mark Probst <mark.probst@gmail.com>
3890 * mini.c: Generic sharing of box for nullable types.
3892 2008-06-13 Zoltan Varga <vargaz@gmail.com>
3894 * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
3895 are passed on the stack. Fixes #324807.
3897 2008-06-12 Bill Holmes <billholmes54@gmail.com>
3899 * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
3900 for the ArgValuetypeAddrInIReg case.
3902 * mini-amd64.c:mono_arch_allocate_vars: Adding a case for
3903 ArgValuetypeAddrInIReg to avoid asserts. Code needs to be added here.
3905 * mini-amd64.c: mono_arch_call_opcode: Adding Winx64 code for an ArgInfo of
3906 type ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
3907 local variable and pass the local variable by reference to the called method.
3909 * mini-amd64.c: mono_arch_emit_prolog: Adjust the stack for calls to
3910 mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
3912 Contributed under MIT/X11 license.
3914 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3916 * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
3918 * debug-mini.c (mono_debug_print_vars): Release memory after printing
3921 2008-06-10 Martin Baulig <martin@ximian.com>
3924 (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
3926 2008-06-09 Kornél Pál <kornelpal@gmail.com>
3928 * main.c: Add and set argv [argc] to NULL to match C specification that fixes
3929 possible error when no arguments are passed.
3931 Contributed under MIT/X11 license.
3933 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
3935 * mini-exceptions.c (ves_icall_get_trace): Skip source locations
3936 where the file name is NULL.
3938 2008-06-09 Zoltan Varga <vargaz@gmail.com>
3940 * mini.c: Fix s390 build.
3942 2008-06-08 Zoltan Varga <vargaz@gmail.com>
3944 * trace.c (mono_trace_parse_options): Fix warnings.
3946 * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
3948 2008-06-07 Zoltan Varga <vargaz@gmail.com>
3950 * mini.c (remove_block_if_useless): Avoid printing the method name.
3952 * mini.c: Remove needless setting of ins->cil_code which is now done by
3955 * mini-amd64.c: Add some code to avoid saving callee saved registers in the
3958 * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
3959 translated code after it has been patched.
3961 2008-06-06 Zoltan Varga <vargaz@gmail.com>
3963 * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
3964 avoid problems during code patching on SMP systems.
3965 (emit_call): Avoid adding a patch info which is already added by
3967 (mono_arch_emit_exceptions): Ditto.
3969 2008-06-05 Zoltan Varga <vargaz@gmail.com>
3971 * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
3972 MONO_TYPE_ISSTRUCT already checks for it.
3974 2008-06-05 Bill Holmes <billholmes54@gmail.com>
3976 * mini-amd64.c:merge_argument_class_from_type: When marshaling
3977 structs with floats on Winx64 the float registers are not used.
3978 The integer registers are always used..
3979 * mini-amd64.c:add_valuetype: When marshaling structs on Winx64
3980 only one register will be used and only if the size of the struct
3981 is 1,2,4, or 8 bytes.
3983 * tramp-amd64.c : Adjusting size used for mono_global_codeman_reserve
3986 Contributed under MIT/X11 license.
3988 2008-06-05 Martin Baulig <martin@ximian.com>
3990 * debug-debugger.c (debugger_lookup_class): Also call
3991 mono_class_setup_methods() here; we're only called from RTI.
3993 2008-06-05 Andreas Färber <andreas.faerber@web.de>
3995 * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
3996 (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
3997 * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
3998 Post-process object files and add dtrace-generated object, if necessary.
4000 Contributed under MIT/X11 license.
4002 2008-06-04 Mark Probst <mark.probst@gmail.com>
4004 * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
4007 * mini.c: Generic sharing for unbox.any and castclass.
4009 2008-06-04 Mark Probst <mark.probst@gmail.com>
4011 * mini.c: Ignore tailcall prefix in shared generic code and when
4012 doing calls which require a vtable/rgctx argument.
4014 2008-06-04 Mark Probst <mark.probst@gmail.com>
4016 * mini.c: Don't free the JIT info.
4018 * driver.c: Changes in the JIT info table testing code.
4020 2008-06-03 Zoltan Varga <vargaz@gmail.com>
4022 * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread
4023 interruption. Fix some warnings.
4025 * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
4026 interruption_checkpoint.
4028 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
4030 * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
4031 from embedding applications.
4033 2008-06-02 William Holmes <billholmes54@gmail.com>
4035 * mini-amd64.c : Correcting some of the issues for Winx64 dealing with
4036 reserving 32 bytes on the stack when making calls.
4038 Contributed under MIT/X11 license.
4040 2008-06-01 Zoltan Varga <vargaz@gmail.com>
4042 * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
4043 the linear IL branch.
4045 * driver.c: Print out more information for --version on arm.
4047 2008-05-30 Zoltan Varga <vargaz@gmail.com>
4049 * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
4050 bb_exit instead, since out of line bblocks might not actually be emitted
4053 * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
4054 maximum epilog size for out of line bblocks if tracing is enabled.
4056 * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
4058 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
4060 * arrays.cs: Regression tests for allocating arrays with negative sizes.
4062 2008-05-28 Zoltan Varga <vargaz@gmail.com>
4064 * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
4065 CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE
4068 2008-05-27 Zoltan Varga <vargaz@gmail.com>
4070 * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
4071 the 'value' to store is a constant.
4073 * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
4075 * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
4076 of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
4078 2008-05-26 Zoltan Varga <vargaz@gmail.com>
4080 * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
4081 for accessing method->generic_container.
4083 2008-05-24 Zoltan Varga <vargaz@gmail.com>
4085 * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
4087 * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
4089 * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
4091 * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
4094 2008-05-23 Zoltan Varga <vargaz@gmail.com>
4096 * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
4098 * mini.c: Handle the case when mono_class_vtable () fails.
4100 2008-05-23 Massimiliano Mantione <massi@ximian.com>
4101 * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
4104 2008-05-22 Mark Probst <mark.probst@gmail.com>
4106 * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
4107 together with domain sharing.
4109 2008-05-22 Mark Probst <mark.probst@gmail.com>
4111 * mini.c: Treat callvirts to final methods like non-virtual calls
4112 when doing generic sharing, i.e. look them up in the runtime
4115 2008-05-22 Mark Probst <mark.probst@gmail.com>
4117 * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
4118 with computed types (for generic sharing).
4120 * mini.c: Generic sharing for mkrefany and refanyval.
4122 2008-05-22 Zoltan Varga <vargaz@gmail.com>
4124 * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
4127 * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
4128 the generic sharing code.
4130 * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
4133 2008-05-21 Zoltan Varga <vargaz@gmail.com>
4135 * mini.h: Remove the declaration of mono_aot_init_vtable ().
4137 2008-05-21 C.J. Adams-collier <cjac@colliertech.org>
4139 * driver.c: updated copyright date
4141 2008-05-21 Zoltan Varga <vargaz@gmail.com>
4143 * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
4146 2008-05-19 Martin Baulig <martin@ximian.com>
4148 * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
4149 pointing to the new `_mono_debug_using_mono_debugger' variable.
4152 (mono_main): Check mono_debug_using_mono_debugger() rather than
4153 the `MONO_INSIDE_MDB' environment variable to check whether we're
4154 inside the debugger.
4156 2008-05-19 Zoltan Varga <vargaz@gmail.com>
4158 * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
4161 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
4163 * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
4165 * mini.c: Added mini_assembly_can_skip_verification. This
4166 function checks if the assembly requested to skip verification.
4167 Fixes part of #387274.
4169 2008-05-07 Zoltan Varga <vargaz@gmail.com>
4171 * mini.c (mini_get_method): Disable the check for open generic classes when
4172 using generic sharing.
4174 * generics.cs: Add a test for #387034.
4176 * mini.c (mini_get_method): Check whenever the method class is an open generic
4177 type, and return NULL in that case, causing a verification error. Fixes
4180 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
4182 * driver.c (mono_main): Revert r102623. The right
4183 thing to do is to enable the verifier under verifiable
4184 unless a --security flag was passed.
4186 We need this non-trivial behavior for --verify-all otherwise
4187 mcs-compileall won't be able to use it. As it needs everything to
4188 be verified under validil.
4190 2008-05-06 Martin Baulig <martin@ximian.com>
4194 * debug-mini.c (mono_debugger_thread_created): Add proper locking.
4195 (mono_debugger_thread_cleanup): Likewise.
4196 (mono_debugger_extended_notification): Likewise.
4198 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
4200 * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
4201 against both inflated and non-inflated methods. We need to check against the
4202 generic definition for cases where the instantiated method is not visible.
4203 We need to check against the inflated types for cases where the instantiation
4204 changes any super type. This fixes #382986.
4206 Note that this doesn't need to be applied to other parts of mono_method_to_ir
4207 that check for visibiliy as generic params only appears as the type subject
4208 of tokens on call opcodes. Field manipulation and ldftn must always
4209 target an exact type.
4211 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
4213 * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
4214 if no related --security flag is passed.
4216 2008-05-05 Andreas Färber <andreas.faerber@web.de>
4218 * mini-arch.h: Prepare support for ppc64.
4220 Contributed under MIT/X11 license.
4222 2008-05-05 Andreas Färber <andreas.faerber@web.de>
4224 * aot-runtime.c: Prepare support for ppc64.
4226 Contributed under MIT/X11 license.
4228 2008-05-05 Andreas Färber <andreas.faerber@web.de>
4230 * mini-ops.h: Prepare support for ppc64.
4232 Contributed under MIT/X11 license.
4234 2008-05-04 Andreas Färber <andreas.faerber@web.de>
4236 * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
4238 Contributed under MIT/X11 license.
4240 2008-05-03 Zoltan Varga <vargaz@gmail.com>
4242 * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
4243 assemblies, since aot_name is not a full path, causing us to load MS.NET
4244 assemblies on windows.
4246 2008-04-28 Kornél Pál <kornelpal@gmail.com>
4248 * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
4249 for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
4250 * main.c: Use UTF-8 encoded command line instead of Windows default code
4251 page on Windows to support Unicode.
4252 * driver.c (DllMain): New function for mixed-mode assembly support.
4253 * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
4254 export __stdcall functions without decoration.
4256 Contributed under MIT/X11 license.
4258 2008-04-28 Mark Probst <mark.probst@gmail.com>
4260 * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
4261 saving it very early.
4263 2008-04-28 Mark Probst <mark.probst@gmail.com>
4265 * mini.h, mini.c: Lots of code for accessing the old RGCTX
4266 deleted. The only way to access the new RGCTX is via the
4269 * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
4270 vtable instead of the RGCTX to static methods.
4272 * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
4273 accessing the new RGCTX.
4275 * generic-sharing.c: There is no separation between self, type
4276 arguments and other types in the RGCTX anymore.
4278 2008-04-25 Jonathan Chambers <joncham@gmail.com>
4280 * mini-amd64.c (add_general): Remove previous stack adjustment.
4281 (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
4282 adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
4283 for 32 bytes of stack space reserved for all calls.
4285 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
4286 (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack
4289 Code contributed under MIT/X11 license.
4291 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
4293 * mini.c (mini_method_verify): Only verify non-inflated methods, check
4294 against the root definition, peeling out method and type instantiations.
4295 Cache verify success results, code that fails verification is still
4296 checked multiple times.
4298 2008-04-23 Zoltan Varga <vargaz@gmail.com>
4300 * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
4302 2008-04-23 Jonathan Chambers <joncham@gmail.com>
4304 * mini-amd64.c (add_general): Always increment stack on Win64.
4305 (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
4308 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for
4309 stack based argument handling on Win64.
4311 Code contributed under MIT/X11 license.
4313 2008-04-23 Raja R Harinath <harinath@hurrynot.org>
4315 * Makefile.am (version.h): Add support for git-svn.
4317 2008-04-22 Zoltan Varga <vargaz@gmail.com>
4319 * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
4320 so instead of calling g_spawn_command_line_sync, we do everything by hand,
4321 avoiding allocations and libc functions which might deadlock.
4323 * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
4324 'no-gdb-backtrace' option is set.
4326 * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
4328 * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
4330 2008-04-21 Martin Baulig <martin@ximian.com>
4332 * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
4333 and `get_lmf_addr'; `notification_address' is no longer a pointer.
4335 2008-04-21 Martin Baulig <martin@ximian.com>
4337 * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
4338 `thread_vtable', `event_handler_ptr' and `event_handler'.
4340 2008-04-21 Martin Baulig <martin@ximian.com>
4342 * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
4343 allows delayed initialization of the `executable_code_buffer' when
4346 2008-04-21 Martin Baulig <martin@ximian.com>
4348 * mini.h (mono_debugger_create_notification_function): Removed.
4349 * tramp-*.c (mono_debugger_create_notification_function): Removed.
4351 * mdb-debug-info64.s
4352 (MONO_DEBUGGER__notification_function): Added this in the .text section.
4354 * mdb-debug-info32.s
4355 (MONO_DEBUGGER__notification_function): Added this in the .text section.
4357 * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
4358 currently only works on x86 and x86_64, so don't create it on ppc.
4360 2008-04-21 Martin Baulig <martin@ximian.com>
4362 * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
4365 (mini_method_compile): In the fp elimination check, check
4366 `debug_options.mdb_optimizations' in addition to
4367 mono_debug_using_mono_debugger().
4369 * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
4370 disable some JIT optimizations which are only disabled when
4371 running inside the debugger.
4372 Added `--help-debug' option to describe the debugging options.
4373 (parse_debug_options): New static function to parse the `--debug'
4374 options, so we can easily add more stuff in future.
4376 2008-04-20 Zoltan Varga <vargaz@gmail.com>
4378 * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
4379 the method has no body.
4381 2008-04-19 Jonathan Chambers <joncham@gmail.com>
4383 * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
4384 assembly is not allowed in MSVC 64-bit compiler.
4385 (mono_arch_cpu_init): Don't set floating point precision on MSVC build
4386 as we get floating point exceptions everywhere.
4388 * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
4389 correctly align arguments for call to throw_exception.
4390 (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
4392 Code contributed under MIT/X11 license.
4394 2008-04-19 Zoltan Varga <vargaz@gmail.com>
4396 * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
4398 2008-04-17 Zoltan Varga <vargaz@gmail.com>
4400 * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
4402 * mini-amd64.c (NEW_INS): Set cil_code.
4404 * mini.c (mini_method_compile): Move the disabling of fp elimination to here
4405 from mini-amd64.c so all debugger related logic is in one place.
4407 * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
4408 later won't have a random ip assigned to them.
4410 2008-04-16 Zoltan Varga <vargaz@gmail.com>
4412 * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
4413 the arch specific function initializes code_size.
4414 (mono_create_delegate_trampoline): Ditto.
4416 * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
4417 tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
4420 * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if
4421 running under the debugger.
4423 * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
4426 * mini.c (mini_method_compile): Set a few flags in cfg if running under the
4427 debugger. Also move the disabling of optimizations here from driver.c.
4428 (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
4431 * mini.h (MonoCompile): Add a few new flags.
4433 2008-04-15 Zoltan Varga <vargaz@gmail.com>
4435 * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
4436 so the cil_code field of created MonoInst's is properly set.
4437 (mini_select_instructions): Ditto.
4439 * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
4440 (MONO_INST_NEW_CALL): Ditto.
4442 * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
4443 in many places so the ins->cil_code field is properly initialized.
4445 * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
4448 2008-04-14 Zoltan Varga <vargaz@gmail.com>
4450 * mini.c (mini_method_compile): Print a different message when compiling a
4453 * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
4456 2008-04-11 Zoltan Varga <vargaz@gmail.com>
4458 * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
4461 * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
4463 2008-04-11 Zoltan Varga <vargaz@gmail.com>
4465 * mini.c (handle_stack_args): Make this return void since its return value was
4466 never used. Also set cfg->unverifiable for invalid IL instead of calling
4469 2008-04-10 Mark Probst <mark.probst@gmail.com>
4471 * mini.c: Make sure "this" is live in catch clauses with type
4472 variables in shared generic code.
4474 2008-04-08 Mark Probst <mark.probst@gmail.com>
4476 * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
4477 generic_class_is_reference_type() to ensure the proper behaviour
4478 when sharing generic code and the type in question is a type
4481 2008-04-08 Zoltan Varga <vargaz@gmail.com>
4483 * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
4484 race conditions when printing thread dumps. Fixes #377738.
4486 2008-04-08 Massimiliano Mantione <massi@ximian.com>
4488 aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
4489 shows up when both MonoInst arguments can cause aliasig.
4490 There is likely no way in the current JIT to trigger this problem, but
4491 it showed up in the development of generics sharing, when in a new
4492 opcode both args of an OP_GROUP can be aliases (addresses of a local).
4493 When the generics sharing code will be committed, its tests will be
4494 valid also for this bug.
4496 2008-04-08 Zoltan Varga <vargaz@gmail.com>
4498 * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
4501 * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
4504 2008-04-07 Zoltan Varga <vargaz@gmail.com>
4506 * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
4507 use a more detailed exception message for InvalidCastException.
4509 * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
4511 * driver.c (mono_main): Add --debug=casts option to turn on better
4512 InvalidCastException message details.
4514 * mini.c (mini_get_debug_options): New helper function to return the address of
4515 the debug_options variable.
4517 * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
4518 the jit_tls TLS variable.
4520 * mini.c (mono_jit_tls): New TLS variable.
4522 * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
4525 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
4527 * mini.h: Removed verifer related stuff. This code was moved to verify.c
4529 * mini.c: Removed verifer related stuff, code moved to verify.c.
4531 * driver.c: Using code from verify.c instead of mini.c.
4533 2008-04-05 Zoltan Varga <vargaz@gmail.com>
4535 * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
4538 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
4540 * mini.c (check_for_method_verify): Enabling verification of
4541 corlib if mono_verify_all is set. Bugs in the verifier preventing that
4544 2008-04-04 Zoltan Varga <vargaz@gmail.com>
4546 * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
4547 caller saved registers as well.
4549 * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
4550 saved registers as well.
4552 2008-03-30 Zoltan Varga <vargaz@gmail.com>
4554 * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
4556 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
4559 2008-03-27 Zoltan Varga <vargaz@gmail.com>
4561 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
4563 (get_call_info): Take a gsctx argument instead of 'cfg'.
4565 2008-03-26 Zoltan Varga <vargaz@gmail.com>
4567 * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
4568 mono_verify_all is set.
4570 * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
4572 * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
4574 2008-03-25 Zoltan Varga <vargaz@gmail.com>
4576 * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
4579 * driver.c mini.c mini.h: Add a --verify-all development option to test the
4580 verifier and the code generated by the compiler.
4582 2008-03-25 Mark Probst <mark.probst@gmail.com>
4584 * mini.c: Generic sharing of the non-nullable case of the box
4587 2008-03-24 Zoltan Varga <vargaz@gmail.com>
4589 * inssel.brg: Fix the build.
4591 * iltests.il.in: Add a test for lconv.ovf.u8.un.
4593 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
4595 * mini.c (mono_method_to_ir): Implement readonly for ldelema and
4596 Array:Address. Fixes #372410.
4598 * iltests.il.in: New tests for readonly prefix.
4600 2008-03-23 Zoltan Varga <vargaz@gmail.com>
4602 * mini.h mini.c mini-trampolines.c: Move trampoline related code to
4605 * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to
4608 * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
4610 * mini.c (mono_decompose_op_imm): New helper function.
4612 * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
4613 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
4616 * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
4617 mono_arch_output_basic_block. Fix warnings.
4619 * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
4622 2008-03-22 Zoltan Varga <vargaz@gmail.com>
4624 * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
4625 since the extra frame is now detected automatically inside the loop.
4627 * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole
4628 opts which are now in mono_peephole_ins ().
4630 * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
4632 * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
4633 frames and skip duplicate managed-to-native frames. Fixes #367665.
4635 * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
4636 opts which are now in mono_peephole_ins ().
4637 (mono_arch_peephole_pass_2): Ditto.
4639 * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
4641 * mini-codegen.c (mono_peephole_ins): New helper function containing the
4642 arch independent peephole optimizations.
4644 * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
4645 opts which are now in mono_peephole_ins ().
4647 * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
4649 * mini-s390.c (mono_arch_output_basic_block): Fix build.
4651 * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
4654 * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
4655 CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
4658 2008-03-21 Zoltan Varga <vargaz@gmail.com>
4660 * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
4661 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
4664 * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
4665 mono_arch_output_basic_block. Fix warnings.
4667 2008-03-20 Zoltan Varga <vargaz@gmail.com>
4669 * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
4672 2008-03-20 Zoltan Varga <vargaz@gmail.com>
4674 * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
4677 * iltests.il: Add new tests.
4679 2008-03-20 Kornél Pál <kornelpal@gmail.com>
4681 * mini.c: Removed Windows version macros.
4683 2008-03-20 Mark Probst <mark.probst@gmail.com>
4685 * generic-sharing.c: Put reflection types in the extensible part
4686 of the runtime generic context.
4688 * mini.c: Generic sharing of the GetTypeHandle special case of the
4689 ldtoken instruction.
4691 2008-03-20 Zoltan Varga <vargaz@gmail.com>
4693 * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
4695 * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
4697 * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for
4698 consistency with the other version on the linear IR branch.
4700 * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
4702 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
4704 * iltests.il.in: Add new tests.
4706 2008-03-19 Zoltan Varga <vargaz@gmail.com>
4708 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
4710 * iltests.il.in: Add new tests.
4712 2008-03-19 Mark Probst <mark.probst@gmail.com>
4714 * mini.c: Two variables with the same name were declared in
4715 nesting contexts and one wasn't initialized. Fixed.
4717 2008-03-19 Mark Probst <mark.probst@gmail.com>
4719 * mini.c: Generic sharing of the initobj instruction.
4721 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
4723 * mini.c: make the test to optimize ldtoken from typeof() more
4726 2008-03-18 Mark Probst <mark.probst@gmail.com>
4728 * mini.c: Generic sharing of the initobj instruction for reference
4731 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
4733 * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
4734 the mono_breakpoint_clean_code() code to perform bound checks.
4736 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
4738 * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
4739 mono_arch_patch_callsite() to include the start of the managed method
4740 to be able to perform bound checks.
4742 2008-03-17 Mark Probst <mark.probst@gmail.com>
4744 * mini.c: Generic sharing for the isinst instruction.
4746 2008-03-17 Mark Probst <mark.probst@gmail.com>
4748 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
4749 inssel-long32-mips.brg: Added opcodes for doing indirect calls
4750 with the runtime generic context argument.
4752 * mini.c: Share calls to several types of unsharable methods by
4753 putting the address of the method code in the runtime generic
4754 context and doing an indirect call.
4756 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
4759 2008-03-16 Mark Probst <mark.probst@gmail.com>
4761 * generic-sharing.c: Change due to a change in the runtime genric
4764 2008-03-15 Martin Baulig <martin@ximian.com>
4767 (mono_arch_nullify_class_init_trampoline): Add call to
4768 mono_breakpoint_clean_code() to make things work when running
4769 inside the debugger.
4772 (mono_arch_nullify_class_init_trampoline): Add call to
4773 mono_breakpoint_clean_code() to make things work when running
4774 inside the debugger.
4776 2008-03-14 Zoltan Varga <vargaz@gmail.com>
4778 * inssel-long.brg (reg): Fix 64 bit build.
4780 2008-03-14 Mark Probst <mark.probst@gmail.com>
4782 * mini.c, mini.h: Share static generic code by passing it an
4783 implicit argument pointing to the runtime generic context.
4785 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
4786 inssel-long32-mips.brg: New opcodes for calling shared static,
4787 which need to be passed the runtime generic context.
4789 * mini-amd64.c, mini-x86.c: Save the runtime generic context
4790 argument on the stack in the prologue if needed. New function for
4791 finding the runtime generic context argument from the registers
4792 saved by the trampoline.
4794 * mini-amd64.h, mini-x86.h: Specify which register to use for the
4795 runtime generic context argument.
4797 * tramp-amd64.c: Also restore the register used for the runtime
4798 generic context argument.
4800 * mini-trampoline.c: Resolve shared static calls by consulting the
4801 runtime generic context via the new argument.
4803 * generic-sharing.c: Add an argument to sharability-checking
4804 functions that specifies whether type variables should be treated
4805 as sharable type arguments.
4807 * inssel-x86.brg: Removed a superfluous, buggy rule.
4809 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
4812 2008-03-14 Martin Baulig <martin@ximian.com>
4814 * debug-debugger.c (main_thread_handler): Call
4815 mono_runtime_run_main() without sending any notifications.
4817 * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
4819 2008-03-14 Zoltan Varga <vargaz@gmail.com>
4821 * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
4823 2008-03-14 Mark Probst <mark.probst@gmail.com>
4825 * tramp-x86.c: Fixed register restore offsets in the trampoline
4826 code for ECX and EDX.
4828 2008-03-12 Geoff Norton <gnorton@novell.com>
4830 * mini-arm.h: Add some #defines for locating sp, pc, r4 with
4831 different ucontext_t implementations.
4832 * exceptions-arm.c: Use the above defines to get exceptions working on
4833 iPhone (based on a patch by Luke Howard lukeh@padl.com)
4834 * mini-arm.c: Implement iPhone icache support (based on a patch by
4835 Luke Howard lukeh@padl.com)
4837 2008-03-12 Mark Probst <mark.probst@gmail.com>
4839 * mini.c: Enable generic sharing of calls to non-static
4840 non-interface non-generic non-value-type methods.
4842 * mini-trampolines.c: Resolve calls from shared generic code.
4844 2008-03-11 Zoltan Varga <vargaz@gmail.com>
4846 * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
4848 * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
4850 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
4852 * mini.c: some fixes for the AOT compiler.
4854 2008-03-07 Zoltan Varga <vargaz@gmail.com>
4856 * cpu-amd64.md: Add clob:1 to some float opcodes.
4858 2008-03-07 Rodrigo Kumpera <rkumpera@novell.com>
4860 * mini.h: Added MiniVerifierMode enumeration.
4862 * mini.c: Added mini_verifier_set_mode to control
4863 the usage of the new verifier.
4865 * mini.c (mono_method): Integrated the new verifier.
4867 * driver.c: Extended --security option with validil and
4868 verifiable options to activate the new verifier.
4870 2008-03-07 Zoltan Varga <vargaz@gmail.com>
4872 * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation
4873 optimization to ctors taking 0 or 2 arguments too.
4875 * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
4878 * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
4880 * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
4882 2008-03-06 Zoltan Varga <vargaz@gmail.com>
4884 * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
4885 non-aot case as well.
4887 * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
4889 * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
4892 * aot-compiler.c (encode_patch): Ditto.
4894 * mini.h (G_MININT32): Fix the definition of this.
4896 2008-03-05 Zoltan Varga <vargaz@gmail.com>
4898 * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
4900 * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
4902 2008-03-04 Zoltan Varga <vargaz@gmail.com>
4904 * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for
4905 methods returning vtypes in registers.
4906 (mono_arch_allocate_vars): Ditto.
4908 * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
4910 * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().
4912 * generics.cs: Add a test from the linear IR branch.
4914 * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
4916 * mini.c (inline_method): Cache failed inline attempts.
4918 2008-03-04 Mark Probst <mark.probst@gmail.com>
4920 * mini.c: For shared methods of generic classes put the location
4921 of "this" into the MonoGenericJitInfo.
4923 * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
4924 register out of a MonoContext by register number. Add the generic
4925 sharing context as an argument to mono_arch_find_this_argument().
4927 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
4928 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
4929 for new arch function.
4931 * mini-exception.c: Handle open exception clauses in shared
4934 * mini-trampolines.c: Supply additional argument to
4935 mono_arch_find_this_argument().
4937 2008-03-04 Zoltan Varga <vargaz@gmail.com>
4939 * Makefile.am (regtests): Run the bench.exe tests last.
4941 2008-03-03 Zoltan Varga <vargaz@gmail.com>
4943 * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
4946 2008-03-02 Zoltan Varga <vargaz@gmail.com>
4948 * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
4951 * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
4953 * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
4955 * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
4956 whose class has no cctor.
4958 * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
4960 2008-03-01 Zoltan Varga <vargaz@gmail.com>
4962 * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
4965 2008-02-29 Zoltan Varga <vargaz@gmail.com>
4967 * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
4968 to be in sync with the code on the linear IR branch.
4970 * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
4972 * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
4974 2008-02-27 Zoltan Varga <vargaz@gmail.com>
4976 * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
4978 * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
4980 * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
4982 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
4984 * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
4986 * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
4989 2007-11-14 Yoichi NAKAYAMA <nakayama@pixela.co.jp>
4991 * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
4992 OP_LOADR4_MEMBASE emission.
4994 * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
4995 (mono_spillvar_offset_float): Ditto.
4997 * mini-mips.c (mono_arch_emit_prolog): Ditto.
4999 * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
5002 * basic-long.cs: Add regression tests for them.
5004 * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
5006 (mono_arch_allocate_vars): Fix representation of single-precision float
5008 (mono_arch_output_basic_block): Ditto.
5010 * inssel-mips.brg: Ditto, remove duplicate items.
5012 * mini-mips.c (emit_load_volatile_arguments): New function to handle
5013 arguments of tail calls as on other platforms.
5014 (mono_arch_output_basic_block): Handle tail calls.
5016 * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
5019 * objects.cs (test_5_pass_static_struct): Add test for it.
5021 Contributed under MIT/X11 license.
5023 2008-02-26 Zoltan Varga <vargaz@gmail.com>
5025 * Makefile.am: Use gmcs for compiling the regression tests.
5027 * *.2.cs *.2.il: Rename to *.cs and *.il.
5029 2008-02-24 Zoltan Varga <vargaz@gmail.com>
5031 * regalloc.h: Make the vassign array smaller.
5033 * mini.c (mini_method_compile): Remove an unused field in cfg.
5035 * mini-codegen.c: Add a bunch of micro optimizations.
5037 2008-02-23 Zoltan Varga <vargaz@gmail.com>
5039 * regalloc.h: Remove some unused fields.
5041 2008-02-22 Zoltan Varga <vargaz@gmail.com>
5043 * mini-amd64.c (mono_arch_patch_code): Fix a warning.
5045 * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
5047 2008-02-22 Mark Probst <mark.probst@gmail.com>
5049 * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
5051 * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
5052 trampoline: Fetch an entry from the runtime generic context. If
5053 it's NULL, jump to the actual trampoline to fill the runtime
5054 generic context. Otherwise, return it.
5056 * mini.c: Call the lazy fetch trampoline to get entries out of the
5057 runtime generic context.
5059 * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
5060 tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
5061 tramp-sparc.c: Stubs for the lazy fetch trampoline.
5063 2008-02-21 Mark Probst <mark.probst@gmail.com>
5065 * mini.c: Fetch data out of the extensible part of the runtime
5066 generic context instead of calling a helper function.
5068 * generic-sharing.c: Some functions moved into
5069 metadata/generic-sharing.c. Helper function for fetching other
5070 types now checks and asserts against extensible rgctx (just for
5071 debugging purposes - the helper function isn't called anymore
5072 unless for debugging).
5074 2008-02-21 Zoltan Varga <vargaz@gmail.com>
5076 * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
5077 for tail calls up to the point that the tests in iltests.exe run. Also add a
5078 dummy CKFINITE implementation.
5079 (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
5080 needed for trampoline LMF frames.
5082 * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for
5083 trampoline LMF frames.
5085 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
5087 * mini.c (inline_method): clean any pending loader error when inlining fail.
5088 Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
5090 2008-02-21 Zoltan Varga <vargaz@gmail.com>
5092 * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
5094 * aot-runtime.c (decode_patch_info): Ditto.
5096 * mini.c (mono_resolve_patch_target): Ditto.
5098 * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
5101 * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
5103 * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
5104 if it references an icall address.
5106 2008-02-20 Zoltan Varga <vargaz@gmail.com>
5108 * cpu-s390x.md: Remove some more unused opcodes.
5110 * cpu-s390x.md: Remove some unused opcodes.
5112 * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
5113 mono_op_imm_to_op ().
5115 * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
5116 instead of a switch statement.
5118 * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
5119 the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
5121 * mini-codegen.c: Eliminate rassign macro which is no longer needed.
5123 * mini-codegen.c: Remove unused mono_regstate2_... functions.
5125 * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
5128 2008-02-19 Zoltan Varga <vargaz@gmail.com>
5130 * driver.c (mono_main): Improve error reporting when an assembly cannot be
5131 opened. Fixes #362607.
5133 * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
5135 * iltests.il.in: Add a test for static methods in interfaces.
5137 2008-02-18 Zoltan Varga <vargaz@gmail.com>
5139 * genmdesc.c (build_table): Fix a crash on older glib versions.
5141 * cpu-sparc.md: Remove some unused opcodes.
5143 * genmdesc.c: Error out if the .md contains CEE_ opcodes if
5144 MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
5146 * cpu-amd64.md: Remove some unused opcodes.
5148 * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
5149 like the other opcodes.
5151 2008-02-17 Zoltan Varga <vargaz@gmail.com>
5153 * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
5155 * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
5157 * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
5158 variables 'cfg' instead of 'm' for consistency.
5160 * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
5162 * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
5163 argument holding the vtype return address, to avoid the ambigious use of
5164 cfg->ret for this purpose.
5166 * mini.c (NEW_RETLOADA): Use vret_addr if set.
5168 * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
5170 * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
5171 new mono_print_ins () function which only takes one argument.
5173 2008-02-15 Zoltan Varga <vargaz@gmail.com>
5175 * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
5178 2008-02-14 Zoltan Varga <vargaz@gmail.com>
5180 * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
5182 * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
5184 * mini-x86.c: Sync with the version on the linear IR branch by adding new
5185 opcodes and other small changes.
5187 * mini-ops.h: Add some new opcodes from the linear IR branch.
5189 * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
5191 * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
5192 opcodes, use the REG_MEMBASE opcodes instead.
5194 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
5195 opcodes, use the REG_MEMBASE opcodes instead.
5197 * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
5200 * mini.c (mono_op_imm_to_op): New helper function.
5202 * mini-ops.h: Add some opcodes from linear IR branch.
5204 2008-02-13 Zoltan Varga <vargaz@gmail.com>
5206 * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov
5209 2008-02-12 Zoltan Varga <vargaz@gmail.com>
5211 * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to
5214 * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
5216 2008-02-09 Zoltan Varga <vargaz@gmail.com>
5218 * aot-compiler.c (emit_method_code): Add an assert.
5220 * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
5221 the IMT code so it is AOT friendly. Enable AOT for methods which call interface
5224 2008-02-08 Zoltan Varga <vargaz@gmail.com>
5226 * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for
5227 some load/store opcodes so they are consistent.
5228 (mono_arch_emit_prolog): Simplify some code.
5230 * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
5232 * objects.cs: Add tests for large argument offsets on ARM.
5234 * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large
5235 stack offsets. Fixes #359651.
5237 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
5239 * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
5241 * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
5243 * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
5245 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
5247 * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
5248 rid of CEE_CONV_R_UN.
5250 * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
5252 2008-02-07 Zoltan Varga <vargaz@gmail.com>
5254 * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
5256 * mini.c (mono_normalize_opcodes): Add some more opcodes.
5258 * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
5260 * cpu-amd64.md: Remove some unused opcodes.
5262 * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
5264 * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
5266 * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make
5267 arch specific functions for its parts. Call the peephole pass after local
5268 regalloc so the prolog can compute a more accurate max_offset.
5270 * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
5271 the corresponding OP_I/OP_L opcodes.
5273 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
5275 * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
5277 2008-02-06 Zoltan Varga <vargaz@gmail.com>
5279 * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
5280 as they are handled in mini.c.
5282 * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
5284 * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
5285 case since it is handled in mini.c.
5287 * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
5289 * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
5291 * *.c: Use the new opcodes in the IR and back end code.
5293 * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
5295 * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
5297 2008-02-06 Mark Probst <mark.probst@gmail.com>
5299 * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
5300 an assert because it has a race condition.
5302 2008-02-06 Zoltan Varga <vargaz@gmail.com>
5304 * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
5306 * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
5308 * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
5310 * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
5311 use OP_MOVE/OP_FMOVE/OP_ICONST instead.
5313 2008-02-05 Zoltan Varga <vargaz@gmail.com>
5315 * cpu-amd64.md (move): Correct the maximum size of move.
5317 2008-02-05 Mark Probst <mark.probst@gmail.com>
5319 * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
5320 the generic class init trampoline to return quickly if the class
5323 2008-02-04 Zoltan Varga <vargaz@gmail.com>
5325 * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
5326 issues where an 32 bit callsite cannot be patched by a 64 bit address.
5328 2008-02-03 Zoltan Varga <vargaz@gmail.com>
5330 * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
5333 2008-01-31 Zoltan Varga <vargaz@gmail.com>
5335 * objects.cs: Add some soft-float tests.
5337 * mini.c: Fix a couple more soft-float issues.
5339 * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
5341 * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
5344 2008-01-30 Zoltan Varga <vargaz@gmail.com>
5346 * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
5347 exception happens while compiling a virtual method.
5349 2008-01-29 Zoltan Varga <vargaz@gmail.com>
5351 * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
5353 * mini-sparc.c: Fix build.
5355 * mini-sparc.c (get_call_info): Add support for generic sharing.
5357 * mini-exceptions.c: Add a FIXME.
5359 2008-01-27 Zoltan Varga <vargaz@gmail.com>
5361 * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
5362 altstack handling code.
5364 * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
5366 * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
5368 * mini-s390.c: Add support for generic sharing.
5370 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
5372 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
5374 * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
5376 * mini-s390x.c: Add support for generic sharing.
5378 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
5380 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
5382 * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
5383 can be used since it takes a 16 bit signed immediate.
5385 * inssel-s390x.brg: Fix OP_SETRET.
5387 * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
5389 * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
5391 * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
5393 * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
5395 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
5398 * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
5401 * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
5402 of the unused mono_arch_patch_delegate_trampoline stuff.
5404 2008-01-26 Zoltan Varga <vargaz@gmail.com>
5406 * basic-long.cs: Move the fp related tests to basic-float.cs.
5408 * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
5410 * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
5412 * basic-calls.cs: Add a test for proper float argument passing.
5414 * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
5415 if the context corresponds to an exception received through a signal.
5417 * exceptions.cs: Add a test for nullref handling at the start of a try
5420 * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
5422 * jit-icalls.c (mono_break): New JIT icall.
5424 * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
5426 * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
5428 2008-01-25 Zoltan Varga <vargaz@gmail.com>
5430 * cpu-*.md: Get rid of unused opcodes.
5432 * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
5434 * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
5437 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
5440 * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
5441 the arch independent trampoline code in mini-trampolines.c.
5443 * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
5445 * mini.c (get_runtime_generic_context_ptr): Fix a warning.
5447 * mini-s390.h: Remove an unused define.
5449 * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
5450 the arch independent trampoline code in mini-trampolines.c.
5452 * mini-arm.c (mono_arch_emit_prolog): Fix build.
5454 2008-01-24 Zoltan Varga <vargaz@gmail.com>
5456 * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
5458 * mini-s390.c (mono_arch_emit_prolog): Fix build.
5460 * mini-s390x.c (mono_arch_emit_prolog): Fix build.
5462 * mini-ppc.c (mono_arch_emit_prolog): Fix build.
5464 * cpu-amd64.md: Use smaller sizes for int opcodes.
5466 * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
5468 * *.cs: Add some tests from the linear-ir branch. Move structs tests to
5471 * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
5474 * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
5475 instead of though a pointer to save an indirection when accessing elements of
5478 * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
5480 (NOT_IMPLEMENTED): New helper macro.
5481 (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
5484 * *.c: Use the new helper macro.
5486 2008-01-21 Zoltan Varga <vargaz@gmail.com>
5488 * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
5490 2008-01-20 Zoltan Varga <vargaz@gmail.com>
5492 * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
5495 2008-01-18 Zoltan Varga <vargaz@gmail.com>
5497 * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
5498 profiling is enabled.
5500 * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
5502 (mono_arch_emit_prolog): Add more first bblock optimizations.
5504 * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
5505 in order if possible.
5506 (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
5507 bblock, since the arguments are still in their original registers.
5509 * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
5511 2008-01-17 Zoltan Varga <vargaz@gmail.com>
5513 * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
5516 * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
5519 * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
5521 * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
5522 process async exceptions received while in unmanaged code.
5524 * mini.c (mini_init): Install a callback with the runtime which will be called
5525 when a thread receives an async exception while in unmanaged code.
5527 * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
5529 * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
5531 2008-01-16 Wade Berrier <wberrier@novell.com>
5538 2008-01-16 Zoltan Varga <vargaz@gmail.com>
5540 * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
5541 compilation with sun cc.
5543 * cpu-*.md: Fix the build.
5545 * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
5547 * mini-amd64.h: Add some comments to the MonoLMF structure.
5549 * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
5551 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
5552 in the LMF structure if possible. This saves two instructions in the
5553 managed->native wrappers.
5555 * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
5557 2008-01-16 Mark Probst <mark.probst@gmail.com>
5559 * generic-sharing.c: New type argument lookup code which uses the
5560 runtime generic context template.
5562 2008-01-15 Zoltan Varga <vargaz@gmail.com>
5564 * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
5566 * mini-arm.c (add_general): Fix arm eabi parameter passing.
5567 (mono_arch_output_basic_block): Fix localloc implementation.
5569 * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
5571 * mini-ia64.c (peephole_pass): Fix ia64 build.
5573 * mini-amd64.c (peephole_pass): Fix a warning.
5575 * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
5576 at a constant offset from sp/fp.
5578 * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
5579 instead of obtaining it from *lmf in the managed method case.
5581 2008-01-14 Zoltan Varga <vargaz@gmail.com>
5583 * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
5585 Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
5587 * mini.h (MonoInstList): New type.
5588 (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
5589 __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
5590 MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
5591 __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
5592 MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
5593 MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
5594 MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
5595 MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
5596 MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
5597 MONO_INST_LIST_FOR_EACH_PREV_SAFE,
5598 MONO_INST_LIST_FOR_EACH_ENTRY,
5599 MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
5600 MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
5601 mono_inst_list_first, mono_inst_list_last,
5602 mono_inst_list_next, mono_inst_list_prev): New instruction
5603 list handling interfaces.
5604 (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
5605 list head 'ins_list'.
5606 (MonoInst): Replace next pointer with list head 'node'.
5607 (MonoCallInst): Make 'out_args' a MonoInstList.
5608 (MONO_INST_NEW_CALL): Explicitly init ->out_args.
5609 (MonoCompile): Delete reverse_inst_list and
5610 reverse_inst_list_len.
5611 * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
5612 mono_arch_lowering_pass, mono_arch_local_regalloc,
5613 mono_arch_output_basic_block, mono_arch_emit_prolog):
5614 Convert to new instruction lists.
5615 (insert_after_ins): Delete.
5616 * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
5618 * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
5619 * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
5620 split_bblock, mono_add_ins_to_end, mono_emit_call_args,
5621 mono_emulate_opcode, mono_emit_load_got_addr,
5622 inline_method, mono_method_to_ir, mono_print_bb_code,
5623 print_dfn, decompose_pass, nullify_basic_block,
5624 replace_out_block_in_code, remove_block_if_useless,
5625 merge_basic_blocks, move_basic_block_to_end,
5626 try_unsigned_compare, optimize_branches, mono_print_code,
5627 mini_select_instructions, remove_critical_edges): Likewise.
5628 * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
5629 peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
5630 mono_arch_output_basic_block, mono_arch_emit_prolog):
5632 * mini-mips.c (mono_arch_call_opcode, peephole_pass,
5633 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5634 mono_arch_output_basic_block): Likewise.
5635 (inst_list_prepend, insert_after_ins): Delete.
5636 * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
5637 MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
5639 * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
5640 peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
5641 mono_arch_emit_prolog): Likewise.
5642 * cfold.c (mono_constant_fold): Likewise.
5643 * liveness.c (visit_bb, mono_analyze_liveness,
5644 optimize_initlocals): Likewise.
5645 * ssapre.c (dump_code, process_bb, code_motion): Likewise.
5646 * graph.c (mono_draw_code_cfg): Likewise.
5647 * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
5648 mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
5649 mono_ssa_cprop): Likewise.
5650 * abcremoval (get_relations_from_previous_bb, process_block):
5652 * local-propagation (mono_cprop_invalidate_values,
5653 mono_local_cprop_bb): Likewise.
5654 * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
5655 peephole_pass, mono_arch_output_basic_block,
5656 mono_arch_emit_prolog): Likewise.
5657 * mini-arm.c (mono_arch_call_opcode, peephole_pass,
5658 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5659 mono_arch_emit_prolog): Likewise.
5660 (insert_after_ins): Delete.
5661 * aliasing.c (print_code_with_aliasing_information,
5662 mono_build_aliasing_information, mono_aliasing_deadce):
5663 Convert to new instruction lists.
5664 * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
5665 peephole_pass, NEW_INS, mono_arch_lowering_pass,
5666 mono_arch_local_regalloc, mono_arch_output_basic_block):
5668 (insert_after_ins): Delete.
5669 * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
5670 peephole_pass, mono_arch_output_basic_block): Convert to
5671 new instruction lists.
5672 * mini-codegen (InstList, inst_list_prepend,
5673 insert_after_ins): Delete.
5674 (insert_before_ins, get_register_force_spilling,
5675 get_register_spilling, free_up_ireg, free_up_reg,
5676 create_copy_ins, create_spilled_store, alloc_int_reg,
5677 alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
5678 to new instruction lists.
5679 * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
5680 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5681 mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
5682 (insert_after_ins): Delete.
5683 * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
5684 mono_arch_local_regalloc, mono_arch_output_basic_block,
5685 mono_arch_call_opcode): Convert to new instruction lists.
5686 (insert_after_ins): Delete.
5687 * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
5688 peephole_pass, mono_arch_output_basic_block,
5689 mono_arch_emit_prolog): Convert to new instruction lists.
5691 2008-01-11 Zoltan Varga <vargaz@gmail.com>
5693 * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
5695 * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
5698 * Makefile.am (version.h): Make this work with non-bash shells.
5700 2008-01-10 Zoltan Varga <vargaz@gmail.com>
5702 * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
5704 2008-01-08 Zoltan Varga <vargaz@gmail.com>
5706 * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
5707 the InitializeArray optimization.
5709 2008-01-06 Zoltan Varga <vargaz@gmail.com>
5711 * mini.c driver.c: Don't include os/gc_wrapper.h.
5713 2008-01-05 Zoltan Varga <vargaz@gmail.com>
5715 * mini.c (print_jit_stats): Print GC statistics if available.
5717 2008-01-04 Zoltan Varga <vargaz@gmail.com>
5719 * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
5721 2007-12-29 Zoltan Varga <vargaz@gmail.com>
5723 * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
5725 2007-12-26 Zoltan Varga <vargaz@gmail.com>
5727 * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
5729 * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
5731 * driver.c (mono_main): Ditto.
5733 2007-12-23 Zoltan Varga <vargaz@gmail.com>
5735 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
5737 * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
5738 in the vtable can't be encoded.
5739 (compile_method): Ditto.
5741 2007-12-21 Zoltan Varga <vargaz@gmail.com>
5743 * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
5746 * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
5749 * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
5750 the top LMF entry belongs to the current method.
5752 * mini.c: Update after renaming of mono_thread_get_pending_exception ().
5754 2007-12-20 Zoltan Varga <vargaz@gmail.com>
5756 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
5758 * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
5760 * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
5762 * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
5764 * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
5766 * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
5769 * basic-float.cs: Add an ulong->double cast test.
5771 2007-12-15 Zoltan Varga <vargaz@gmail.com>
5773 * mini.c (mono_method_to_ir): Fix a warning.
5775 2007-12-14 Zoltan Varga <vargaz@gmail.com>
5777 * mini-ops.h: Add OP_SWITCH.
5779 * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
5780 CEE_SWITCH in back-end code, use OP_SWITCH instead.
5782 2007-12-11 Geoff Norton <gnorton@novell.com>
5784 * mini-s390x.c: Minor change to the MAX() define to allow
5785 it to compile with other gcc versions.
5787 2007-12-11 Geoff Norton <gnorton@novell.com>
5790 * mini-s390x.c: Implement sext_i4 to fix the build on s390x
5792 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
5794 exceptions-arm.c (mono_arch_get_restore_context): Restore
5797 exceptions-arm.c (throw_exception): Save the frame pointer.
5798 This is a partial fix for #323747. Only the client side is
5801 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
5803 * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
5804 was using an unrelated variable to log the class which
5805 needed the cctor to be called. This was crashing on arm.
5807 2007-12-09 Robert Jordan <robertj@gmx.net>
5809 * mini-x86.c (mono_arch_emit_epilog):
5810 Consider all kinds of 64-bit types. Fixes #323114.
5812 2007-12-08 Zoltan Varga <vargaz@gmail.com>
5814 * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
5816 2007-12-07 Zoltan Varga <vargaz@gmail.com>
5818 * mini-amd64.c (peephole_pass): Add a missing instruction check.
5820 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
5822 * mini.c: run type ctor before allocating an object, not only
5823 when running it's constructor method (fixes at least part of bug #342507).
5825 2007-12-07 Zoltan Varga <vargaz@gmail.com>
5827 * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
5829 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
5830 * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
5833 * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
5834 mono_generic_class_init_trampoline () the same as it is done with the other
5837 * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
5838 aot-runtime.c aot-compiler.c: Implement AOT support.
5840 2007-12-07 Mark Probst <mark.probst@gmail.com>
5842 * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
5843 build for archs which don't have the vtable trampoline defined
5846 2007-12-07 Zoltan Varga <vargaz@gmail.com>
5848 * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
5850 * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
5852 * mini-trampolines.c (mono_get_trampoline_func): New helper function.
5854 * tramp-<ARCH>.c: Use the new helper function.
5856 2007-12-07 Mark Probst <mark.probst@gmail.com>
5858 * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
5859 trampoline call, which takes a vtable argument.
5861 * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
5862 OP_TRAMPCALL_VTABLEs like other calls.
5864 * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
5865 register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
5866 call. Implemented a support function which fetches the vtable
5867 from a register set.
5869 * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
5870 Implemented a generic class init trampoline, using the
5871 OP_TRAMPCALL_VTABLE opcode.
5873 * mini.c: Implemented static field access when sharing generic
5874 code. This implies initing the class using the new
5875 OP_TRAMPCALL_VTABLE call.
5877 2007-12-07 Mark Probst <mark.probst@gmail.com>
5879 * mini.c: Don't compile methods with sharing enabled if their
5880 classes are disabled for sharing.
5882 2007-12-06 Zoltan Varga <vargaz@gmail.com>
5884 * inssel.brg: Add a missing sign extension to the GETCHR and array access
5885 opcodes. Fixes #346563.
5887 * objects.cs: Add a new test.
5889 * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
5891 * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
5892 HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
5894 2007-12-06 Zoltan Varga <vargaz@gmail.com>
5896 * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
5898 2007-12-03 Zoltan Varga <vargaz@gmail.com>
5900 * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
5903 2007-12-02 Zoltan Varga <vargaz@gmail.com>
5905 * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
5907 * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
5908 optimization in the AOT case.
5910 2007-11-30 Zoltan Varga <vargaz@gmail.com>
5912 * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
5914 * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
5916 * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
5918 * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
5920 * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
5921 is created by the inlined delegate ctor.
5923 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
5925 * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
5927 2007-11-29 Zoltan Varga <vargaz@gmail.com>
5929 * cpu-x86.md: Fix the length of ckfinite.
5931 2007-11-28 Zoltan Varga <vargaz@gmail.com>
5933 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
5935 * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
5936 (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
5938 * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
5940 * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
5941 OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
5943 2007-11-28 Martin Baulig <martin@ximian.com>
5946 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
5947 after creating the trampoline.
5949 2007-11-27 Zoltan Varga <vargaz@gmail.com>
5951 * aot-runtime.c (load_aot_module): Check runtime version if needed.
5953 * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
5956 * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
5957 instead of the calling method to help AOT.
5959 * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
5961 2007-11-26 Zoltan Varga <vargaz@gmail.com>
5963 * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
5966 2007-11-23 Zoltan Varga <vargaz@gmail.com>
5968 * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
5970 * aot-compiler.c (compile_method): Correct check for generic method definitions.
5971 (encode_method_ref): No need to handle generic method definitions specially.
5973 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5975 * aot-runtime.c (decode_klass_ref): Clean this up and rename from
5978 * aot-compiler.c (encode_klass_ref): Clean this up and rename from
5980 (compile_method): Enable generic sharing.
5982 2007-11-22 Zoltan Varga <vargaz@gmail.com>
5984 * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
5985 (mini_method_compile): Add preliminary support for AOTing shared generic code.
5987 * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
5990 * mini-trampolines.c: Fix a warning.
5992 * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
5994 (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
5995 (generic_class_is_reference_type): Remove unused function.
5997 * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
5998 in the generic vtable trampoline case.
6000 * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
6002 * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
6003 return an AOT method based on a vtable slot.
6005 * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
6007 * mini.c (mini_get_vtable_trampoline): Export this.
6009 2007-11-22 Martin Baulig <martin@ximian.com>
6012 (MonoDebuggerInfo): Move `debugger_version' up.
6014 2007-11-22 Martin Baulig <martin@ximian.com>
6017 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
6019 * mini-trampolines.c
6020 (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
6021 after compiling the method.
6023 2007-11-20 Martin Baulig <martin@ximian.com>
6026 (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
6027 (mono_debugger_remove_breakpoint): Likewise.
6028 (mono_debugger_check_breakpoints): Likewise.
6030 * debug-debugger.c: Implement the new breakpoint interface here.
6032 2007-11-18 Zoltan Varga <vargaz@gmail.com>
6034 * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
6035 CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
6037 * mini-x86.c (mono_arch_output_basic_block): Ditto.
6039 2007-11-17 Zoltan Varga <vargaz@gmail.com>
6041 * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
6043 * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
6046 * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
6049 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
6050 returning a vtype in a register.
6052 * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
6053 here from the arch specific code.
6055 * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
6058 * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
6059 (mono_arch_emit_prolog): Increment maximum prolog size.
6061 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
6062 START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
6064 * mini-x86.c (get_call_info): Receive a MonoCompile instead of a
6065 MonoGenericSharingContext.
6067 * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
6068 MonoGenericSharingContext. Allocate memory from the cfg mempool.
6070 2007-11-15 Mark Probst <mark.probst@gmail.com>
6072 * mini.c, mini.h, generic-sharing.c: Functions for producing code
6073 which extract fields out of the runtime generic context. Full
6074 sharing of the NEWARR opcode.
6076 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
6078 * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
6079 --enable-minimal=ssa.
6081 2007-11-13 Zoltan Varga <vargaz@gmail.com>
6083 * mini-trampolines.c (mono_delegate_trampoline): Update after
6084 mono_marshal_get_delegate_invoke () signature change.
6086 2007-11-13 Mark Probst <mark.probst@gmail.com>
6088 * mini.c: Removed the shared context in favor of the generic
6089 sharing context. Allocate the MonoJitInfo structure with room for
6090 the generic sharing context if it's needed.
6092 * mini.h: Remove MonoGenericSharingContext declaration. It's in
6093 domain-internals.h now.
6095 * mini-x86.c: Pass the generic sharing context to get_call_info ().
6097 * generic-sharing.c: Several changes for working without a shared
6098 context and instead operating on open types instead.
6100 2007-11-12 David S. Miller <davem@davemloft.net>
6102 * inssel-sparc.brg: Fix double instruction emit.
6104 2007-11-12 Zoltan Varga <vargaz@gmail.com>
6106 * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
6107 Get/Set/Address methods.
6109 * mini.c debug-debugger.c mini-trampolines.c: Update after
6110 mono_marshal_get_delegate_invoke signature change.
6112 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
6114 * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
6115 This can happens with dynamic methods. Fixes the other bug in #322722.
6117 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
6119 * tramp-arm.c (mono_arch_patch_callsite): Support patching
6122 * mini-arm.c (arm_patch): Implement patching of BX call
6123 sequence. Fixes one of the bugs in #322722.
6125 2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
6127 * mini-sparc.c (mono_arch_flush_icache): Make more efficient
6128 under Linux. We only need to flush every 32-byte cache line.
6130 2007-11-07 Massimiliano Mantione <massi@ximian.com>
6133 move_basic_block_to_end: Add branches when needed, eventually creating
6135 optimize_branches: added a parameter that tells if it's ok to create
6136 new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
6137 and avoid calling move_basic_block_to_end when it's not ok.
6140 2007-11-07 Mark Probst <mark.probst@gmail.com>
6142 * mini.c: Abort inlining call to InitializeArray if something
6143 looks wrong. Let the icall handle it, which now has proper safety
6146 2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
6148 * mini.c (mono_spill_call): add support for soft-float.
6150 * mini.c (mono_method_to_ir): add support for soft-float
6151 to inlined functions that return float.
6153 * mini.c (mono_method_to_ir): add support for soft-float
6154 to cee_stsfld opcode on float fields.
6156 2007-11-05 Geoff Norton <gnorton@novell.com>
6158 * mini-x86.h: Fix the structure access for X86 Leopard.
6161 2007-11-05 Martin Baulig <martin@ximian.com>
6163 * mini-trampolines.c
6164 (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
6165 after compiling the method to notify the debugger.
6167 2007-11-05 Martin Baulig <martin@ximian.com>
6169 * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
6171 2007-11-02 Zoltan Varga <vargaz@gmail.com>
6173 * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
6174 David Miller <davem@davemloft.net>. Allow larger offsets in branches.
6176 2007-11-01 Zoltan Varga <vargaz@gmail.com>
6178 * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
6179 native-to-managed wrappers.
6181 2007-11-01 Geoff Norton <gnorton@novell.com>
6183 * mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
6186 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
6188 * mini.c, mini-x86.c: when getting back from unmanaged code
6189 to managed via a marshaled delegate we also need to set the
6192 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6194 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
6197 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
6199 * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
6200 let the debugger or other external agents to tell the JIT when
6201 a sw breakpoint has been inserted in the code that the JIT needs
6202 to be able to inspect.
6204 2007-10-31 Martin Baulig <martin@ximian.com>
6207 (MonoDebuggerInfo): Remove `runtime_class_init'.
6209 2007-10-30 Martin Baulig <martin@ximian.com>
6212 (mono_debugger_thread_created): Added `MonoThread *' argument.
6213 (mono_debugger_extended_notification): New public method.
6214 (mono_debugger_trampoline_compiled): New public method.
6217 (MonoDebuggerThreadInfo): Added `thread' and
6218 `extended_notifications' fields.
6221 (debugger_executable_code_buffer): New static variable.
6224 (MonoDebuggerInfo): Added `executable_code_buffer',
6225 `executable_code_buffer_size', `breakpoint_info_area',
6226 `breakpoint_table' and `breakpoint_table_size'.
6228 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
6230 * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
6231 that IP either is an unused value or the vtable pointer. IMT
6232 calls use vtable + offset now. Reduced by almost half the size
6235 2007-10-26 Jonathan Chambers <joncham@gmail.com>
6237 * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
6238 defines to access param registers. Replace long usage with
6239 gsize as sizeof(long) != sizeof(void*) on Win64.
6241 * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
6242 on Win64. Fix intrinsic, use _AddressOfReturnAddress
6243 instead of non-existant _GetAddressOfReturnAddress.
6245 * tramp-amd64.c: Use AMD64_ARG_REG# defines to access
6246 param registers. Save/restore %rdi and %rsi in MonoLMF.
6248 * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
6249 param registers. Modify (throw_exception) signature to take
6250 %rdi and %rsi on Win64.
6252 Code is contributed under MIT/X11 license.
6254 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6256 * helpers.c: unlink debugging output files.
6258 2007-10-25 Zoltan Varga <vargaz@gmail.com>
6260 * mini.c: Move mono_create_ftnptr () to object.c.
6262 2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
6264 * helpers.c (mono_disassemble_code): MonoCompile parameter is now
6265 optional. This function can now be used to disassemble code generated
6266 outside the JIT such as trampolines and IMT thunks.
6268 * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
6270 * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
6271 vtable pointer from a ldr instruction.
6273 * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
6274 new IMT call sequence.
6276 * mini-arm.c (mono_arch_output_basic_block): emit the IMT
6277 call sequence for interface invocations.
6279 * mini-arm.c (mono_arch_emit_imt_argument): added, required
6280 for imt support. This function is empty since IMT on ARM requires no
6281 special handling on the IR side.
6283 * mini-arm.c (mono_arch_find_imt_method): added, required for
6286 * mini-arm.c (mono_arch_find_this_argument): added, required
6289 * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
6290 a ldr instruction to load a value stored in the code stream.
6292 * mini-arm.c (mono_arch_build_imt_thunk):added, required
6296 2007-10-23 Zoltan Varga <vargaz@gmail.com>
6298 * mini.c (mini_init): Install the jump trampoline callback.
6300 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6302 * mini-trampolines.c: handle synchronized methods with the common
6303 vtable trampoline (bug #335601).
6305 2007-10-17 Zoltan Varga <vargaz@gmail.com>
6307 * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
6309 * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
6312 * mini-ia64.h mini-ia64.c: Add support for IMT.
6314 * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
6315 prolog. Fixes #331958.
6317 2007-10-15 Zoltan Varga <vargaz@gmail.com>
6319 * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
6321 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6323 * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
6326 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6328 * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
6331 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
6333 * mini-x86.c, mini-x86.h: x86 support for the common vtable
6336 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6338 * mini-trampolines.c: changed the magic rampoline to understand
6339 the common vtable trampoline method: the method to invoke is
6340 determined by the vtable displacement of the call.
6342 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6344 * mini.c, mini.h: register the common vtable trampoline if the
6345 architecture supports it.
6347 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6349 * cpu-amd64.md: use the correct max length for tls_get.
6351 2007-10-14 Zoltan Varga <vargaz@gmail.com>
6353 * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
6354 CEE_STELEM_ANY. Fixes #333696.
6356 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6358 * exceptions-x86.c: provide more graceful handling of the case where
6359 we followed a bogus function pointer from managed code (bug #332866).
6361 2007-10-11 Mark Probst <mark.probst@gmail.com>
6363 * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
6364 replaces the generic_shared flag and will carry more information
6367 * generic-sharing.c: Added mini_type_stack_size() which allows
6368 allows open types if given a generic sharing context.
6369 mini_get_basic_type_from_generic() takes a
6370 MonoGenericSharingContext* instead of a MonoCompile* now.
6372 * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
6373 mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
6374 mini-sparc.c, mini-x86.c: Trivial changes required by the two
6375 changes above. Just passing arguments through to the right
6378 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6380 * mini-arm.c: unify the call emission to emit_code_seq().
6382 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
6384 * tramp-arm.c: reduced the trampoline size.
6386 2007-10-10 Mark Probst <mark.probst@gmail.com>
6388 * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
6389 variable handling out of arch-specific code.
6391 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
6393 * mini-arm.c: implemented fast delegate dispatch.
6395 2007-10-09 Zoltan Varga <vargaz@gmail.com>
6397 * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
6398 that fp elimination is turned off if the space required by locals is too
6401 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6403 * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
6404 ARM to the new style trampoline.
6406 2007-10-09 Zoltan Varga <vargaz@gmail.com>
6408 * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
6410 * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
6412 2007-10-09 Martin Baulig <martin@ximian.com>
6415 (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
6416 `field_info_offset_offset'.
6418 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
6420 * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
6421 removed more internal usage of the r11 register and made it available
6422 to the register allocator.
6424 2007-10-08 Mark Probst <mark.probst@gmail.com>
6426 * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
6427 when sharing generics and treat type variables as references.
6429 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6431 * mini-ppc.c: started removing the internal uses of register r11
6432 to eventually allow the register allocator to manage it as an
6433 additional available register.
6435 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6437 * tramp-amd64.c: fixed memory corruption in the trampoline generation.
6439 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
6441 * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
6442 specific trampolines as they are not performance critical as a jump
6443 target (maybe align as before only for AOT code?). This saves about
6444 200 KB of native code on x86 for monodevelop startup.
6446 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
6448 * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
6449 monodevelop startup.
6451 2007-10-06 Zoltan Varga <vargaz@gmail.com>
6453 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
6455 * mini-sparc.h mini-sparc.c: Implement IMT support.
6457 * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
6458 its smaller and doesn't clobber sparc_g1.
6460 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
6462 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6464 * mini-ppc.c: optimized the size of the IMT thunks a bit.
6466 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6468 * mini-ppc.c: implemented fast delegate invocation.
6470 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
6472 * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
6474 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6476 * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
6477 code to the new style trampoline in preparation for IMT support.
6479 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
6481 * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
6482 systems already. This also reduces the specific trampiline sizes and
6483 prepares for the use of r12 as the IMT identifier register.
6485 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6487 * mini-mips.h: endianess fix (simplified from a patch by
6488 Thomas Kunze <thommy@tabao.de>, bug #323737).
6490 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6492 * exceptions-ppc.c, mini-ppc.h: refactor to use macros
6493 to access ucontext fields and enable netbsd support
6494 (partially from Magnus Henoch <mange@freemail.hu>).
6496 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6498 * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
6499 use the preprocessor from the CPP env var if it is set.
6501 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6503 * mini-trampolines.c: fixed an assertion and moved it earlier in the
6504 code, before interface_offset gets used.
6506 2007-10-02 Zoltan Varga <vargaz@gmail.com>
6508 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
6509 mono_class_setup_vtable () before accessing klass->vtable.
6511 2007-10-01 Zoltan Varga <vargaz@gmail.com>
6513 * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
6516 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6518 * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
6519 IMT slots (this saves hundreds of KB of memory in programs like
6520 IronPython and Monodevelop).
6522 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6524 * mini.c: print the delegate counter.
6526 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
6528 * mini-x86.c: make it easier to enable the debugging code for IMT
6531 2007-09-28 Martin Baulig <martin@ximian.com>
6534 (MonoDebuggerMetadataInfo): Add `klass_image_offset',
6535 `mono_method_klass_offset' and `mono_method_token_offset'.
6537 2007-09-20 Mark Probst <mark.probst@gmail.com>
6539 * mini.c: First generics sharing implementation. Can only share
6540 in very simple cases. If sharing doesn't work it falls back to
6541 dedicated compilation.
6543 * mini.h: Flag in MonoCompile to specify whether generic
6544 compilation is shared. Flags enum for marking which generic inst
6545 of a context is used. Prototypes for helper functions.
6547 * generic-sharing.c: Helper functions for generic method sharing.
6549 * optflags-def.h: Optimization flag (gshared) for enabling generic
6550 method sharing added.
6552 * Makefile.am: generic-sharing.c added.
6554 2007-09-19 Daniel Nauck <dna@mono-project.de>
6556 * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
6558 2007-09-19 Massimiliano Mantione <massi@ximian.com>
6559 * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
6562 2007-09-19 Martin Baulig <martin@ximian.com>
6564 * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
6565 mono_debug_cleanup() is now part of mono_cleanup().
6567 2007-09-18 Zoltan Varga <vargaz@gmail.com>
6569 * driver.c (mono_main): Fix a warning.
6571 2007-09-17 Zoltan Varga <vargaz@gmail.com>
6573 * aot-compiler.c: Optimize various parts when processing large assemblies.
6576 * mini.c (mono_patch_info_hash): Improve hash function.
6578 2007-09-14 Jonathan Chambers <joncham@gmail.com>
6580 * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
6582 Code is contributed under MIT/X11 license.
6584 2007-09-14 Zoltan Varga <vargaz@gmail.com>
6586 * mini.c (mini_init): Fix a leak.
6588 * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
6590 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6592 * mini.c: redirect string.InternalAllocStr() to the managed allocator.
6594 2007-09-14 Zoltan Varga <vargaz@gmail.com>
6596 * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
6598 2007-09-13 Zoltan Varga <vargaz@gmail.com>
6600 * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
6603 * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
6605 * mini.c (handle_alloc): Enable managed allocators in AOT code.
6607 * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
6609 * aot-runtime.c (decode_patch_info): Ditto.
6611 2007-09-12 Jonathan Chambers <joncham@gmail.com>
6613 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
6614 static case. Cache delegates in architecture specific code,
6615 based on number of parameters.
6617 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
6618 in architecture specific code, based on number of parameters.
6620 * mini-trampolines.c (mono_delegate_trampoline): Architecture specific
6621 caching happen in architecture specific code now.
6623 Code is contributed under MIT/X11 license.
6625 2007-09-12 Jonathan Chambers <joncham@gmail.com>
6627 * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
6628 mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
6629 mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
6631 Code is contributed under MIT/X11 license.
6633 2007-05-15 Massimiliano Mantione <massi@ximian.com>
6634 * mini.c: (mono_thread_abort) Fixed bug #82416.
6636 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6638 * mini.: hook the new managed GC allocation feature into the JIT.
6640 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6642 * mini.c: implementation for the new runtime tls opcode.
6644 2007-09-11 Martin Baulig <martin@ximian.com>
6647 (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
6648 `mono_method_inflated_offset'.
6650 2007-09-07 Zoltan Varga <vargaz@gmail.com>
6652 * driver.c mini.h mini.c: Add a new devel command line option for injecting
6653 async exceptions into a method.
6655 * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
6656 purpose of testing whenever the unwinder works at every instruction.
6658 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
6660 * mini.c: check accessibility of method used in ldftn (fixes
6663 2007-09-04 Zoltan Varga <vargaz@gmail.com>
6665 * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
6667 * inssel.brg: Fix a warning.
6669 2007-09-03 Martin Baulig <martin@ximian.com>
6671 * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
6672 now takes the `main_method' as argument.
6674 2007-09-02 Zoltan Varga <vargaz@gmail.com>
6676 * cpu-sparc.md (endfilter): Add missing src1:i argument.
6678 2007-08-30 Jonathan Chambers <joncham@gmail.com>
6680 * driver.c: include the cil-coff.h header on Windows.
6682 Code is contributed under MIT/X11 license.
6684 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6686 * mini.c, driver.c: don't include the cil-coff.h header.
6688 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6690 * mini.c: flag places that needs fixes fo soft-float support.
6692 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
6694 * mini.h, inssel-float.brg: fix soft-float constant loads on big
6695 endian systems (partially from Dean Jenkins, bug #81924).
6697 2007-08-28 Mark Probst <mark.probst@gmail.com>
6699 * mini.c (check_linkdemand): Remove embedded reference object in
6700 call to LinkDemandSecurityException.
6701 (mono_jit_compile_method_inner): Call LinkDemandSecurityException
6702 with an IntPtr instead of a reference object.
6704 2007-08-28 Zoltan Varga <vargaz@gmail.com>
6706 * mini.c (handle_initobj): Handle alignment properly.
6708 * inssel.brg (mini_emit_memset): Ditto.
6710 * inssel.brg (mini_emit_memcpy): Ditto.
6712 * inssel-sparc.brg: Ditto.
6714 * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
6716 2007-08-26 Zoltan Varga <vargaz@gmail.com>
6718 * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
6719 exceptions raised in unmanaged code. Fixes part of #82594.
6721 2007-08-24 Mark Probst <mark.probst@gmail.com>
6723 * mini.c (mono_method_to_ir), declsec.c
6724 (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
6726 2007-08-22 Martin Baulig <martin@ximian.com>
6729 (MonoDebuggerThreadInfo): New typedef.
6730 (mono_debugger_thread_table): New global variable.
6731 (mono_debugger_thread_created): New public function.
6732 (mono_debugger_thread_cleanup): New public function.
6736 - removed `get_current_thread' and `lookup_assembly'.
6737 - removed `data_table'.
6738 - added `thread_table'.
6741 (mono_thread_start_cb): Call mono_debugger_thread_created().
6742 (mono_thread_attach_cb): Likewise.
6743 (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
6744 (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
6747 * driver.c (mono_main): Move mono_debug_init() up, before calling
6748 mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
6750 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6752 * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
6753 together when passing several arguments of type double (gives a small
6754 speedup and saves a few bytes of generated code).
6756 2007-08-20 Jb Evain <jbevain@novell.com>
6758 * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
6760 2007-08-20 Jb Evain <jbevain@novell.com>
6762 * mini.c (mono_method_to_ir): throw MethodAccessException
6763 and FieldAccessException instead of InvalidProgramException.
6765 2007-08-20 Mark Probst <mark.probst@gmail.com>
6767 * mini.c: CoreCLR security checks.
6769 * mini.h: Removed MonoSecurityMode (moved to
6770 metadata/security-manager.h) and mono_security_mode global var
6771 (replaced by set/get functions in security-manager.h).
6773 * driver.c: Added "core-clr-test" security mode for testing. Used
6774 set-function for setting security mode.
6776 2007-08-17 Mark Probst <mark.probst@gmail.com>
6778 * mini.c: MonoJitInfo's are freed hazardously now. Statistics for
6779 the new jit_info_table.
6781 * driver.c: Test code for the new jit_info_table (enabled by the
6782 define MONO_JIT_INFO_TABLE_TEST).
6784 2007-08-14 Zoltan Varga <vargaz@gmail.com>
6786 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
6787 detection of call <REG> instruction sequence. Fixes build on freebsd.
6789 2007-08-13 Zoltan Varga <vargaz@gmail.com>
6791 * mini-exceptions.c: Fix a warning.
6793 2007-08-11 Zoltan Varga <vargaz@gmail.com>
6795 * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
6796 stack overflow handling code on amd64 too.
6798 * mini-exceptions.c (mono_setup_altstack): Make this use
6799 mono_thread_get_stack_bounds ().
6801 * mini-x86.h: Disable sigaltstack on solaris x86.
6803 2007-08-10 Zoltan Varga <vargaz@gmail.com>
6805 * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
6807 2007-08-10 Geoff Norton <gnorton@customerdna.com>
6809 * tramp-x86.c: Remove some unneeded alignment changes on Apple. Fixes #82387.
6811 2007-08-08 Zoltan Varga <vargaz@gmail.com>
6813 * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
6815 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
6817 2007-08-03 Neale Ferguson <neale@sinenomine.net>
6819 * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
6822 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6824 * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
6825 to be emitted (bug #82281).
6827 2007-08-01 Martin Baulig <martin@ximian.com>
6829 Merged the `debugger-dublin' branch.
6831 * debug-debugger.h (MonoDebuggerInfo):
6832 Removed the `old_*' compatibility entries.
6833 Added `debugger_version' and `data_table'.
6834 Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
6835 Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
6838 (MiniDebugMethodBreakpointInfo): Add `address_list'.
6839 (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
6840 instead of a `gconstpointer'.
6841 (mono_debugger_insert_method_breakpoint): Return a
6842 `MonoDebugMethodAddressList *'.
6844 2007-06-28 Martin Baulig <martin@ximian.com>
6846 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6848 2007-08-01 Zoltan Varga <vargaz@gmail.com>
6850 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using
6851 __builtin_frame_address () since it is broken on older gcc versions.
6853 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6855 * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
6856 on the stack overflow handling and made the managed stack overflows
6857 catchable in most cases using soft guard pages.
6858 * exceptions-x86.c: added code to restore the protection in the soft
6859 guard pages at the end of exception handling.
6861 2007-07-31 Zoltan Varga <vargaz@gmail.com>
6863 * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
6865 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6867 * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
6870 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6872 * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
6873 signal handling support until it has been ported to the new mechanism.
6874 * mini.c: fixed stack overflow detection and use the new
6875 architecture code to handle signals on the altstack.
6877 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
6879 * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
6880 stack overflows on the alt stack.
6882 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
6884 * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
6885 stack overflows on the alt stack.
6887 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
6889 * exceptions-ppc.c: cleanup preparing for altstack support.
6891 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6893 * exceptions-arm.c: cleanup preparing for altstack support.
6895 2007-07-27 Mark Probst <mark.probst@gmail.com>
6897 * mini.c (print_jit_stats): Output hazard pointer stats.
6899 2007-07-26 Mark Probst <mark.probst@gmail.com>
6901 * driver.c, mini.c: Replaced security mode flags with a single
6904 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6906 * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
6908 2007-07-25 Mark Probst <mark.probst@gmail.com>
6910 * mini.c, mini.h, driver.c (mono_main): Added command-line flag
6911 (which doesn't do anything yet) for activating Core CLR
6912 (Silverlight) security.
6914 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
6916 * mini-codegen.c: work around a possible gcc bug on arm.
6918 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6920 * driver.c, mini-x86.h, mini-amd64.h: print a nice error
6921 message for platforms that don't support AOT compilation.
6923 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6925 * mini.h, mini.c, driver.c: temporary smcs hack.
6927 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
6929 * mini-arm.h, mini-arm.c: arm EABI fixes.
6931 2007-07-22 Zoltan Varga <vargaz@gmail.com>
6933 * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
6936 * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
6937 trampolines taking a method argument.
6939 * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
6941 * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
6942 * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
6944 * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
6945 JIT compilation throws an exception. Fixes #82050.
6947 2007-07-19 Mark Probst <mark.probst@gmail.com>
6949 * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
6950 with the MONO_EXCEPTION_ defines.
6952 2007-07-17 Zoltan Varga <vargaz@gmail.com>
6954 * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
6957 * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
6958 the cause of an assertion.
6960 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
6962 * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
6965 2007-07-15 Zoltan Varga <vargaz@gmail.com>
6967 * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
6968 assert. Should fix #82103.
6970 2007-07-14 Zoltan Varga <vargaz@gmail.com>
6972 * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
6973 here too. Fixes #82095.
6975 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
6978 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
6980 * mini-amd64.h: Enable IMT for amd64.
6982 * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
6984 2007-07-12 Zoltan Varga <vargaz@gmail.com>
6986 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
6988 2007-07-12 Mark Probst <mark.probst@gmail.com>
6990 * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
6991 as soon as check_linkdemand sets an exception_type.
6993 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6995 * mini-x86.c: fixed offsets for IMT call sequence.
6996 * mini-x86.h: enable IMT again.
6998 2007-07-11 Zoltan Varga <vargaz@gmail.com>
7000 * trace.c (mono_trace_enter_method): Decode MonoType too.
7002 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
7004 * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
7006 * mini-amd64.c: Add preliminary IMT implementation.
7008 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
7010 * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
7011 understand the new IMT-base interface invocation (thanks to
7012 Daniel Nauck for the report and the remote debugging session).
7014 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
7016 * mini-x86.c: size and speed optimizations for the IMT bsearch.
7018 2007-07-11 Zoltan Varga <vargaz@gmail.com>
7020 * Makefile.am (aotcheck): Make this actually use the AOTed code.
7022 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
7024 * mini-trampolines.c: implement AOT IMT support.
7025 * mini-x86.h: enable IMT support for wider testing.
7027 2007-07-10 Zoltan Varga <vargaz@gmail.com>
7029 * inssel.brg (emit_imt_argument): Add aot support here.
7031 * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
7033 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7035 * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
7036 of the IMT implementation, partially from massi, with my
7037 implementation of the bsearch sequence. Disabled by default until
7038 the AOT code is implemented.
7040 2007-07-10 Zoltan Varga <vargaz@gmail.com>
7042 * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
7044 * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
7046 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7048 * inssel.brg, mini.c, mini.h, mini-trampolines.c:
7049 arch-independent IMT JIT code from Massimiliano
7050 Mantione (massi@ximian.com) with small cleanups from me.
7052 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
7054 * Makefile.am: fix svn invocation to get the svn revision to be
7055 independent of the local language (build fix).
7057 2007-07-09 Mark Probst <mark.probst@gmail.com>
7059 * mini.c (inline_method): Reset cfg->exception_type if the
7060 inlining is aborted. Fixes: 82049.
7062 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
7064 * mini.c: remove assert from exception handling code when exception_ptr
7067 2007-07-05 Zoltan Varga <vargaz@gmail.com>
7069 * mini.c (mono_codegen): Add an assert.
7071 * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method
7072 enter and leave code.
7073 * mini-amd64.c (mono_arch_emit_prolog): Likewise.
7075 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7077 * mini-ppc.c: fixed memory corruption for localloc(0)
7080 2007-07-05 Zoltan Varga <vargaz@gmail.com>
7082 * mini.c: Fix warnings.
7084 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
7086 * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
7087 to emit better double->int conversions.
7089 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
7091 * mini.c: the provided Min/Max optimizations are valid for unisgned
7094 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
7096 * 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
7098 2007-06-28 Miguel de Icaza <miguel@novell.com>
7100 * mini.c (mono_running_on_valgrind): Add support for reporting the
7101 method and its boundaries to valgrind.
7103 2007-06-28 Martin Baulig <martin@ximian.com>
7105 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
7107 2007-06-25 Zoltan Varga <vargaz@gmail.com>
7109 * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
7111 * generic.2.cs: Add new test case.
7113 2007-06-25 Martin Baulig <martin@ximian.com>
7115 Merged the `debugger-dublin' branch.
7118 (mono_debugger_insert_method_breakpoint): New public method.
7119 (mono_debugger_remove_method_breakpoint): Likewise.
7120 (mono_debugger_check_breakpoints): New static method.
7121 (mono_debug_close_method): Call mono_debugger_check_breakpoints().
7123 * debug-debugger.h (MonoDebuggerInfo):
7124 Renamed (to keep backward compatibility in the vtable):
7125 `insert_breakpoint' -> `old_insert_breakpoint'.
7126 `remove_breakpoint' -> `old_remove_breakpoint'.
7127 `create_string' -> `old_create_string'.
7128 `lookup_class' -> `old_lookup_class'.
7129 `lookup_type' -> removed; changed into a dummy field.
7130 `lookup_assembly' -> `old_lookup_assembly'.
7131 Added (same functionality, but different signature):
7132 `create_string', `lookup_class', `lookup_assembly'
7134 `get_method_addr_or_bpt', `remove_method_breakpoint',
7135 `runtime_class_init'.
7137 * debug-debugger.c: Merged the `debugger-dublin' branch.
7139 2007-06-23 Zoltan Varga <vargaz@gmail.com>
7141 * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
7143 (peephole_pass): Likewise.
7145 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
7147 * driver.c: hopefully make setaffinity work also for ancient
7150 2007-06-22 Atsushi Enomoto <atsushi@ximian.com>
7152 * driver.c : win32 build fix.
7154 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
7156 * driver.c: check for the MONO_NO_SMP env var and bind to a single
7157 processor if it is set.
7159 2007-06-21 Martin Baulig <martin@ximian.com>
7161 * debug-mini.h: New file.
7164 (mono_debugger_insert_breakpoint_full): Moved here from
7165 ../metadata/mono-debug-debugger.c.
7166 (mono_debugger_remove_breakpoint): Likewise.
7167 (mono_debugger_breakpoint_callback): Likewise.
7169 2007-06-15 Raja R Harinath <rharinath@novell.com>
7171 * jit-icalls.c (mono_helper_compile_generic_method): Update to
7172 changes in MonoGenericClass.
7174 2007-06-14 Zoltan Varga <vargaz@gmail.com>
7176 * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
7178 2007-06-14 Raja R Harinath <rharinath@novell.com>
7180 * jit-icalls.c (mono_helper_compile_generic_method): Update to
7181 removal of MonoGenericMethod.
7183 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
7185 * mini-exceptions.c: hooks for the exception events profiling API.
7187 2007-06-14 Randolph Chung <tausq@debian.org>
7189 * Makefile.ma: Add hppa target.
7190 * mini-arch.h: Include mini-hppa.h
7191 * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
7192 mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
7193 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
7195 2007-06-14 Randolph Chung <tausq@debian.org>
7197 * inssel.brg: Add rules for "chained" compare-branch operations so that
7198 a single compare op can affect multiple branches. Adjust cost for
7199 OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
7200 * inssel-long32.brg: Update rules to use compare-branch macros. Adjust
7201 cost for some rules so that they can more easily be overridden by
7202 per-arch rules (with fixes from lupus).
7203 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
7205 2007-06-13 Randolph Chung <tausq@debian.org>
7207 * mini-ops.h: Reorder branch ops so that they match the order of the
7208 corresponding CEE_* ops. The code expects them this way.
7209 Add new ops for HPPA target.
7210 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
7212 2007-06-13 Randolph Chung <tausq@debian.org>
7214 * mini-exceptions.c: Handle cases where the stack grows towards
7216 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
7218 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
7220 * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
7222 * driver.c: explain where a non-matching corlib is found.
7224 2007-06-13 Mark Probst <mark.probst@gmail.com>
7226 * mini.c (print_jit_stats): Output dynamic code allocation stats.
7228 2007-06-10 Sanghyeon Seo <sanxiyn@gmail.com>
7230 * mini-exceptions.c: Generate a method profile leave event during
7231 an exception to ensure that the profiler gets notified.
7233 2007-06-07 Zoltan Varga <vargaz@gmail.com>
7235 * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir
7238 * cpu-amd64.md: Add long_and/or/xor opcodes.
7240 2007-06-06 Wade Berrier <wberrier@novell.com>
7242 * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
7243 (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction
7244 length of instruction shr_imm (expected 8, got 10)
7246 2007-06-06 Zoltan Varga <vargaz@gmail.com>
7248 * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
7250 2007-06-06 Mark Probst <mark.probst@gmail.com>
7252 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
7253 MonoInternalHashTable again (fixed bug in the internal hash table
7256 2007-06-06 Mark Probst <mark.probst@gmail.com>
7258 * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
7259 Have to figure out what makes it crash the SWF regression.
7261 2007-06-05 Zoltan Varga <vargaz@gmail.com>
7263 * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
7265 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
7267 * mini.c: optimize out the type check when storing null in a
7270 2007-06-04 Mark Probst <mark.probst@gmail.com>
7272 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
7273 MonoInternalHashTable.
7275 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
7277 * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
7278 signed integer methods.
7280 2007-06-02 Zoltan Varga <vargaz@gmail.com>
7282 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case
7283 permanently since the current approach doesn't work.
7285 2007-06-02 Zoltan Varga <vargaz@gmail.com>
7287 * inssel.brg (stmt): Only call delegate->invoke_impl if
7288 MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
7290 2007-06-01 Zoltan Varga <vargaz@gmail.com>
7292 * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
7293 the sreg2==rdx case.
7295 * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
7296 account if it contains a rex prefix.
7297 (peephole_pass): Handle OP_FMOVE as well.
7299 2007-06-01 Zoltan Varga <vargaz@gmail.com>
7301 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
7302 as it causes regressions.
7304 2007-05-31 Zoltan Varga <vargaz@gmail.com>
7306 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
7307 static case as well.
7309 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
7311 * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
7312 (mono_arch_get_this_arg_from_call): Ditto.
7314 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
7316 * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
7319 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
7320 (mono_arch_get_this_arg_from_call): Ditto.
7322 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
7324 * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
7325 try to create optimized invoke code and use that for further invocations.
7326 Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
7328 * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
7330 2007-05-29 Rodrigo Kumpera <kumpera@gmail.com>
7332 * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
7333 sealed classes or methods.
7334 *devirtualization.cs: tests for the new optimization
7336 2007-05-29 Zoltan Varga <vargaz@gmail.com>
7338 * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
7339 by the update_volatile () function.
7341 2007-05-27 Zoltan Varga <vargaz@gmail.com>
7343 * driver.c (mono_main): Call g_thread_init () early since newer glib versions
7346 * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
7348 2007-05-24 Jonathan Chambers <joncham@gmail.com>
7350 * mini.c: Add configure checks for header files.
7351 * mini-x86.c: Add configure checks for header files.
7352 * trace.c: Add configure checks for header files.
7353 * aot-runtime.c: Add configure checks for header files.
7354 * aot-compiler.c: Add configure checks for header files.
7355 * driver.c: Add configure checks for header files.
7356 * mini-codegen.c: Add configure checks for header files.
7358 Code is contributed under MIT/X11 license.
7360 2007-05-22 Zoltan Varga <vargaz@gmail.com>
7362 * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
7363 icompare_imm -128 + op_iclt. Fixes #81703.
7365 2007-05-19 Zoltan Varga <vargaz@gmail.com>
7367 * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
7369 2007-05-15 Massimiliano Mantione <massi@ximian.com>
7371 * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
7372 inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
7373 so that all isinst checks now use "interface_bitmap".
7375 2007-05-15 Zoltan Varga <vargaz@gmail.com>
7377 * cpu-amd64.md (jmp): Fix a warning.
7379 * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
7381 * basic.cs: Add new regression test.
7383 * basic.cs: Remove test which is now in basic-long.cs.
7385 * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
7387 * basic-long.cs: Add new test.
7389 2007-05-13 Zoltan Varga <vargaz@gmail.com>
7391 * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
7393 2007-05-12 Zoltan Varga <vargaz@gmail.com>
7395 * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
7397 * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
7400 * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception
7401 throwing code a bit.
7403 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of
7404 the exception throwing code a bit.
7406 * mini-x86.c (get_call_info): Allocate result from a mempool.
7408 2007-05-11 Zoltan Varga <vargaz@gmail.com>
7410 * aot-compiler.c (find_typespec_for_class): Fix the assert.
7412 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
7414 * mini.h (MonoCompile): Add 'token_info_hash' field.
7416 * mini.c: Save token->method associations during compilation so the AOT
7417 compiler can use it.
7419 * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
7420 which reference generic classes and methods.
7422 2007-05-10 Zoltan Varga <vargaz@gmail.com>
7424 * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
7426 * aot-compiler.c (compile_method): Fix a typo in a comment.
7428 * aot-runtime.c (decode_cached_class_info): Skip generic types.
7430 * aot-compiler.c: Add minimal support for AOTing generic code by skipping
7433 * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
7435 2007-05-09 Zoltan Varga <vargaz@gmail.com>
7437 * mini.h (MonoCompile): Add 'args' field.
7439 * mini.c (mono_compile_create_vars): Store variables representing the arguments
7442 * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
7444 2007-05-08 Zoltan Varga <vargaz@gmail.com>
7446 * mini.c (mono_compile_get_interface_var): Remove this unused function.
7448 * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
7450 * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
7451 opcodes for some opcodes.
7453 * mini.h *.brg *.c: Use the new opcodes.
7455 2007-05-08 Massimiliano Mantione <massi@ximian.com>
7457 * mini.h: Bumped aot revision.
7459 * inssel.brg: modified code generation of type checks for interfaces
7460 to use the new "MonoClass.interface_bitmap" instead of the old
7461 "MonoClass.interface_offsets".
7463 2007-04-30 Zoltan Varga <vargaz@gmail.com>
7465 * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
7467 2007-04-29 Zoltan Varga <vargaz@gmail.com>
7469 * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
7472 2007-04-27 Neale Ferguson <neale@sinenomine.net>
7474 * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
7476 2007-04-27 Wade Berrier <wberrier@novell.com>
7478 * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in
7479 mini.h) to fix build.
7481 2007-04-26 Zoltan Varga <vargaz@gmail.com>
7483 * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
7485 * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
7486 causes the corlib unit tests to fail.
7488 2007-04-25 Zoltan Varga <vargaz@gmail.com>
7490 * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
7492 * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
7494 * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional
7495 opcodes to the comparison relations.
7497 * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional
7498 opcodes to their types.
7500 * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
7502 * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache
7503 it in cfg->arch.cinfo.
7505 * local-propagation.c (mono_local_cprop_bb): Fix a warning.
7507 * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in
7508 cfg->cil_offset_to_bb.
7510 2007-04-24 Zoltan Varga <vargaz@gmail.com>
7512 * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
7513 created becase of initlocals.
7515 2007-04-23 Zoltan Varga <vargaz@gmail.com>
7517 * mini-alpha.c cpu-alpha.md: More alpha port work from
7518 Sergey Tikhonov <tsv@solvo.ru>.
7520 2007-04-21 Andreas Faerber <andreas.faerber@web.de>
7522 * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
7524 2007-04-19 Zoltan Varga <vargaz@gmail.com>
7526 * cpu-s390.md (break): Correct the length of break instruction.
7528 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7530 * mini.c: fix a couple of soft-float issues and comments.
7532 2007-04-15 Miguel de Icaza <miguel@novell.com>
7534 * trace.c (is_filenamechar): - is also a filename char.
7536 2007-04-15 Neale Ferguson <neale@sinenomine.net>
7538 * mini-s390.c: Correct checking for enum type in return value processing.
7540 2007-04-14 Raja R Harinath <rharinath@novell.com>
7542 * Makefile.am (BUILT_SOURCES): Add 'version.h'.
7543 (version.h): Makefile is in the build directory.
7545 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
7547 * mini-amd64.h: fix for assertion failure on Solaris/amd64
7549 2007-04-11 Martin Baulig <martin@ximian.com>
7551 * mini.c (can_access_member): Fix handling of generic classes;
7554 2007-04-10 Zoltan Varga <vargaz@gmail.com>
7556 * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
7558 2007-04-05 Zoltan Varga <vargaz@gmail.com>
7560 * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
7562 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7564 * mini-codegen.c: make sure the right spill amount is
7565 used for fp or integer registers (fixes the float_sub_spill() on ppc).
7567 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
7569 * mini-ppc.c: fixes for the fp_branch_nan test.
7571 2007-03-23 Zoltan Varga <vargaz@gmail.com>
7573 * basic.cs: Comment out new test which still fails on ia64.
7575 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7577 * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
7579 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7581 * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
7583 2007-03-22 Zoltan Varga <vargaz@gmail.com>
7585 * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
7586 on 64 bit machines. Fixes part of #80738.
7588 * basic.cs: Add regression test.
7590 2007-03-17 Zoltan Varga <vargaz@gmail.com>
7592 * inssel.brg basic.cs: Revert previous change to fix build.
7594 * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
7597 * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
7599 * basic.cs: Add new regression test.
7601 2007-03-17 Zoltan Varga <vargaz@gmail.com>
7603 * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
7606 2007-03-16 Neale Ferguson <neale@sinenomine.net>
7608 * cpu-s390x.md: Correct length of break instruction.
7610 2007-03-16 Neale Ferguson <neale@sinenomine.net>
7612 * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
7613 * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
7615 2007-03-15 Jonathan Chambers <joncham@gmail.com>
7617 * *.c: Begin WIN64 port.
7618 * mini.c: Use correct register in profiler.
7619 * mini-amd64.c: No inline assembly on Win64.
7620 * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
7621 Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
7622 * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
7623 is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
7624 mono_arch_ip_from_context for Win64.
7626 Contributed under MIT/X11 license.
7628 2007-03-15 Zoltan Varga <vargaz@gmail.com>
7630 * exceptions-amd64.c (seh_handler): Ditto.
7632 * exceptions-x86.c (seh_handler): Fix a memory leak.
7634 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
7636 * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
7637 mini-s390x.c: fixed peephole optimizations to deal
7638 correctly with 1 and 2 byte reload avoidance.
7640 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
7642 * cpu-s390.md, cpu-s390x.md: update localloc length.
7644 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
7646 * cpu-g4.md: added missing descriptions.
7648 2007-03-14 Miguel de Icaza <miguel@novell.com>
7650 * Makefile.am: Add support so the tail tests are not executed on
7651 PowerPC as that is a known limitation of the PowerPC port.
7653 2007-03-13 Jonathan Chambers <joncham@gmail.com>
7655 * runmdesc.bat: Move to msvc directory.
7657 2007-03-13 Jonathan Chambers <joncham@gmail.com>
7659 * runmdesc.bat: Run executable that was produced by the current
7660 target and sent via an argument.
7662 2007-03-11 Zoltan Varga <vargaz@gmail.com>
7664 * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
7667 * generics.2.cs: Add regression test.
7669 2007-03-09 Wade berrier <wberrier@novell.com>
7671 * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
7673 2007-03-09 Zoltan Varga <vargaz@gmail.com>
7675 * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
7676 AOT code depends on this.
7678 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7680 * mini.c: more precise tracking of types in the eval stack
7681 (part of fix for bug #81044).
7683 2007-03-07 Zoltan Varga <vargaz@gmail.com>
7685 * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
7687 * aot-compiler.c (encode_patch): Remove an obsolete comment.
7689 2007-03-06 Zoltan Varga <vargaz@gmail.com>
7691 * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
7693 * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
7695 2007-02-22 Zoltan Varga <vargaz@gmail.com>
7697 * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
7698 a pointer on 64 bit systems. Fixes #80190.
7700 * iltests.il: Add new regression test.
7702 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7704 * mini.c: inline a constant for Environment.IsRunningOnWindows.
7706 2007-02-19 Geoff Norton <gnorton@customerdna.com>
7708 * trace.c: Remove an erroneous alignemnt check when tracing.
7709 Fixes --trace on OSX86.
7711 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7713 * mini-$(arch).h: initialize SP in context for all the archs.
7715 2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
7717 * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
7718 regressions in the thread tests.
7720 2007-02-14 Zoltan Varga <vargaz@gmail.com>
7722 * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
7723 - fixed implementation of LOCALLOC opcode
7724 - implemented non-un compare for floats
7726 - implementation of FDIV and CKFINITE opcodes
7727 - fixes for latest mono updates
7728 - additional arch opcodes
7730 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7732 * Makefile.am: simplify and merge rules for cross-compilation.
7734 2007-02-07 Massimiliano Mantione <massi@ximian.com>
7736 * local-propagation.c: Actually *apply* the fix for bug 80591...
7738 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
7740 * mini-exceptions.c: backuot part of the last change
7741 (fixes cas tests on amd64 related to GetExecutingAssembly ()).
7743 2007-02-06 Massimiliano Mantione <massi@ximian.com>
7744 * inssel.brg: Fix bug 59286.
7747 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
7749 * mini-exceptions.c: patch from Zoltan to correctly check for
7750 stack boundaries (using the stack register, not the frame register),
7751 fixes bugs #80724, #79717.
7753 2007-02-03 Zoltan Varga <vargaz@gmail.com>
7755 * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
7756 OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
7758 * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
7759 presence of frame pointer elimination.
7761 2007-02-01 Geoff Norton <gnorton@customerdna.com>
7763 * mini-x86.h: NetBSD UCONTEX_REG defines.
7765 2007-02-01 Zoltan Varga <vargaz@gmail.com>
7767 * inssel-amd64.brg: Fix amd64 build.
7769 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
7771 * mini.h: remove extern to workaround what looks likes gcc bug 26905
7774 2007-01-31 Zoltan Varga <vargaz@gmail.com>
7776 * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
7779 * mini-<ARCH>.c: Use mono_is_regsize_var ().
7781 2007-01-30 Mark Mason <mason@broadcom.com>
7783 * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
7784 * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
7785 * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
7786 beginning support for CEE_JMP [not quite working yet]
7787 * tramp-mips.c: LMF handling now works
7789 2007-01-30 Zoltan Varga <vargaz@gmail.com>
7791 * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
7793 * mini.h (NULLIFY_INS): New macro.
7795 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7797 * mini.c: statistical profiler fix for windows, patch
7798 from Tor Lillqvist (tml@novell.com).
7800 2007-01-30 Massimiliano Mantione <massi@ximian.com>
7801 * local-propagation.c: Fix bug 80591.
7803 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7805 * Makefile.am: put back the --export-dynamic option as with
7806 the previous gmodule flags (thanks to Robert Jordan).
7808 2007-01-28 Zoltan Varga <vargaz@gmail.com>
7810 * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
7812 mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
7813 simplify and speed up the local register allocator. Also rename some fields
7814 like iassign->vassign.
7816 * regalloc.c: Remove some functions which are no longer used since their
7817 inlined version is in mini-codegen.c.
7819 * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
7821 * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
7823 2007-01-27 Zoltan Varga <vargaz@gmail.com>
7825 * mini-amd64.c (peephole_pass): Remove optimizations which omit a
7826 narrowing. Fixes #80622.
7828 * iltests.il: Add new regresssion test.
7830 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7832 * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
7833 debug-debugger.c, debug-debugger.h: warning fixes.
7834 * driver.c: updated copyright year and made it fit in one line.
7836 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
7838 * aot-runtime.c: updated to use mono-dl instead of gmodule.
7840 2007-01-25 Zoltan Varga <vargaz@gmail.com>
7842 * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
7844 * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
7846 * iltests.il: Add new test for bug #80507.
7848 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7850 * mini-arm.h: use soft-float also on vfp for now.
7852 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7854 * mini.c: fix some more soft-float issues.
7856 2007-01-24 Zoltan Varga <vargaz@gmail.com>
7858 * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
7860 2007-01-24 Massimiliano Mantione <massi@ximian.com>
7861 * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
7862 mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
7863 MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
7865 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
7867 * mini-arm.c: typo fix.
7869 2007-01-23 Neale Ferguson <neale@sinenomine.net>
7871 * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
7873 2007-01-21 Zoltan Varga <vargaz@gmail.com>
7875 * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
7876 Share stack slots for scalar types. Avoid expensive g_list_free () calls.
7878 * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
7880 * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto.
7882 * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
7884 * inssel.brg: Fix a warning.
7886 * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
7888 * abcremoval.c ssa.c ssapre.c: Update after this change.
7890 * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
7892 * dominators.c (df_set): Use mono_bitset_union_fast.
7894 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7896 * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
7897 mini-codegen.c: reduce relocations and memory usage for the cpu
7900 2007-01-20 Zoltan Varga <vargaz@gmail.com>
7902 * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
7904 * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
7905 to reduce their size.
7907 2007-01-19 Mark Mason <mason@broadcom.com>
7909 * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
7910 * mini-mips.c: more configuration macros, support long conditional branches, additional
7911 asserts, fix epilog instrumentation.
7912 * mini-mips.h: use standard stack walk
7913 * cpu-mips.md: increase size of div, rem and conditional branches
7915 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
7917 * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
7920 2007-01-19 Zoltan Varga <vargaz@gmail.com>
7922 * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
7923 (compile_method): Ditto.
7925 * aot-runtime.c (decode_klass_info): Ditto.
7927 * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
7928 needed by the code generated by inssel.brg. Also fix a warning.
7930 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
7932 * mini.c: deal with enums that become genericinsts by
7933 being nested in a generic class (bug #79956).
7935 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7937 * mini.c: match the generic definition to check for
7938 private access with generic types (bug #78431).
7940 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7942 * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
7943 to make life easier for people cross-compiling that insist on not
7946 2007-01-17 Mark Mason <mason@broadcom.com>
7948 * inssel-long.brg: patch to deal with mips missing flags
7949 * inssel-long32-mips.brg: implement overflow checks
7950 * insset-mips.brg: implement overflow checks
7951 * mini-mips.h: implement conditional exception handling
7952 * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
7953 Remove unused code, minor cleanups.
7954 * exceptions-mips.c: minor cleanups
7955 * mini-ops.h: add mips conditional exception ops
7956 * cpu-mips.md: add mips conditional exception ops
7959 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7961 * inssel.brg: patch from Mark Mason <mason@broadcom.com>
7962 to deal with mips missing of flags.
7964 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7966 * exceptions-ppc.c: execute fault handlers.
7968 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
7970 * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
7972 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7974 * mini.c: handle also floating point values in initialize_array.
7976 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7978 * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
7979 array initialization and make it conditional on the intrins option.
7981 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7983 * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
7984 relocations and put the patch info names close to the enum definition.
7986 2007-01-15 Mark Mason <mason@broadcom.com>
7988 * basic.cs, exceptions.cs: break up large tests to increase debugability.
7990 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7992 * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
7994 2007-01-12 Raja R Harinath <rharinath@novell.com>
7996 * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
7998 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
8000 * Makefile.am: distribute the mips sources.
8002 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
8004 * mini-codegen.h: handle bug #80489 here, by excluding ecx
8007 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
8009 * cpu-x86.md: back out for now as this triggers other regressions.
8011 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
8013 * cpu-x86.md: force src1 and dest regpair for long shift instructions
8014 to eax:edx, so ecx can't get allocated to them (bug #80489).
8016 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
8018 * mini.c, mini-exceptions.c: enabled running fault handlers
8021 2007-01-03 Miguel de Icaza <miguel@novell.com>
8023 * driver.c: If nothing fail, do not use the string "failed",
8024 because it makes it very annoying to view test result logs on the
8027 2006-12-30 Miguel de Icaza <miguel@novell.com>
8029 * debug-debugger.c (mono_debugger_main): Rename "main" to
8030 "main_method" to prevent a warning.
8032 Remove a warning for unused field.
8034 2006-12-28 Martin Baulig <martin@ximian.com>
8037 (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
8039 2006-12-22 Martin Baulig <martin@ximian.com>
8041 * mdb-debug-info32.s, mdb-debug-info64.s: New files.
8042 Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
8043 seperate `.mdb_debug_info' section, so we can access it from the
8044 debugger even if the binary is stripped.
8046 * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
8047 from the `.mdb_debug_info' here to prevent the linker from
8048 removing that section.
8050 * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
8053 2006-12-19 Robert Jordan <robertj@gmx.net>
8055 * mini-x86: enable the code to return small structures in
8056 registers for FreeBSD as well. Fixes bug #80278.
8057 * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
8059 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8061 * mini-x86.c: align the stack when calling the profiler
8062 function instrumenting the prolog (on OSX).
8064 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
8066 * mini.c: emit a break opcode where Debugger.Break () is called.
8068 2006-12-13 Miguel de Icaza <miguel@novell.com>
8070 * mini.c (mono_method_to_ir): Provide useful information on this
8071 assert, to prevent others from debugging like I did.
8073 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
8075 * mini.c: enable code which was incorrectly commented
8078 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
8080 * mini-x86.c: enable on OSX, too, the code to return small
8081 structures in registers.
8083 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8085 * mini-x86.c: remove the use of the dynamic code manager here, too.
8087 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8089 * mini.h, debug-debugger.c, tramp-*.c: fixed
8090 mono_debugger_create_notification_function() to use
8091 mono_global_codeman_reserve () instead of a dynamic code manager.
8093 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
8095 * mini.c, jit-icalls.h, jit-icalls.c: remove the
8096 ves_array_element_address() jit icall and use a generated
8097 managed method instead (which is about 4 times faster for a rank 3
8100 2006-11-29 Mark Mason <mason@broadcom.com>
8102 * basic-calls.cs: additional tests for passing
8103 structures as function arguments.
8105 2006-11-29 Mark Mason <mason@broadcom.com>
8107 * mini-mips.h: disable custom exception handling
8108 * mini-mips.c: throw/rethrow should use jalr to call
8109 exception stubs. Fixed bug with passing structures
8110 by value. More support for tracing floating point
8113 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8115 * mini.c: fixed typo in the soft-float ldind.r4 handling
8118 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
8120 * mini.c, mini.h, driver.c: added --runtime command line
8121 option to select a different runtime than the autodetected one.
8122 * jit.h: added API for embedders to initialize with a specific
8125 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8127 * mini.c: handle also boxing of r4 values (bug #80024).
8129 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8131 * mini-ppc.c: force indirect calls until we reserve
8132 enough address space for all the generated code.
8134 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
8136 * exceptions-arm.c: workaround bugs in the libc definition
8139 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8141 * inssel.brg: fixes from me and Mark Mason.
8143 2006-11-23 Dick Porter <dick@ximian.com>
8145 * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
8146 semaphore display now we've fixed the initial value
8148 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
8150 * inssel.brg: partially revert the last change to fix the build.
8152 2006-11-21 Mark Mason <mason@broadcom.com>
8154 * inssel.brg: Add and use compare-and-branch macros to support
8155 architectures that do not have condition code registers (ie. MIPS).
8156 * *-mips.{c,brg,md}: Fix copyright statements
8158 2006-11-20 Mark Mason <mason@broadcom.com>
8160 * Makefile.am: remove mini-codegen.c from list of MIPS sources
8161 * mini.c: Allow GET_CONTEXT to be specified by the arch port
8162 * mini.h: Added declaration for mono_print_ins()
8163 * mini-codegen.c: added ins_spec initializer for MIPS
8164 * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
8165 vreg to be virtual and hreg to be non-virtual.
8166 * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
8167 is not yet working/implemented correctly.
8168 * mini-codegen.c (print_ins): rename to mono_print_ins(), make
8169 non-static, fixup calls to print_ins() from other parts in the file.
8171 2006-11-20 Mark Mason <mason@broadcom.com>
8173 * basic-calls.cs: added tests for passing structures as arguments
8176 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
8178 * inssel-long32.brg: optimize signed division by power of two.
8180 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
8182 * mini-arm.c: added support for interworking with thumb code
8183 (mono must be still be built using the ARM instruction encoding).
8185 2006-11-19 Miguel de Icaza <miguel@novell.com>
8187 * mini.c (type_from_op): Separate the conditions for OP_EQ as the
8188 verifier has different rules for it. Fixes a few verifier issues
8191 * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
8192 at the end, so people know what happened.
8194 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
8196 * brach-opts.c: in optimize_exception_target() make sure we
8197 are in a catch clause (fixes bug #79871).
8199 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
8201 * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
8202 more soft-float support fixes.
8204 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
8206 * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
8207 that are passed half on the stack and half in registers.
8209 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
8211 * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
8212 more mips integration work from Mark E Mason
8213 <mark.e.mason@broadcom.com>.
8215 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
8217 * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
8218 cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
8219 tramp-mips.c: added sources for the mips port, not
8220 integrated in the build yet. Contributed by
8221 Mark E Mason <mark.e.mason@broadcom.com>.
8223 2006-11-14 Neale Ferguson <neale@sinenomine.net>
8225 * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
8227 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
8229 * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
8230 put the soft-float rules in its own file since it seems to
8231 break s390 compilation.
8233 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
8235 * mini-arm.c: fixed wrnings.
8237 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
8239 * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
8240 inssel-arm.brg: ARM support for soft-float.
8242 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
8244 * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
8245 loads and stores of 32 bit fp values.
8247 2006-11-10 Zoltan Varga <vargaz@gmail.com>
8249 * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
8251 * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
8252 works. Fixes #79852 and #79463.
8254 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
8256 * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
8257 more soft-float support WIP and fixes.
8259 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
8261 * mini-arm.c: some VFP updates.
8263 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
8265 * mini-exceptions.c: 0 is a valid local var offset in some
8266 architectures, don't assert (bug #78508).
8268 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
8270 * exceptions-arm.c: fixed off by one error in stack walk code.
8272 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
8274 * mini.h, mini.c: more precise tracking of type load exceptions.
8276 2006-11-03 Robert Jordan <robertj@gmx.net>
8278 * Makefile.am: [WIN32] Add monow.exe target.
8279 * driver.c: [WIN32] Don't detach the console when debugging.
8282 2006-10-30 Miguel de Icaza <miguel@novell.com>
8284 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
8286 2006-10-23 Zoltan Varga <vargaz@gmail.com>
8288 * aot-compiler.c (emit_method_info): Add a case missed earlier.
8290 * driver.c (mini_regression): Fix --regression with AOT.
8292 * aot-compiler.c (emit_method_info): Fix AOT on amd64.
8294 2006-10-17 Zoltan Varga <vargaz@gmail.com>
8296 * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
8298 * mini-sparc.h: Don't use sigaction on sparc/linux.
8300 * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
8302 * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
8304 * mini-exceptions.c: Add proper include files for getpid ().
8306 2006-10-16 Zoltan Varga <vargaz@gmail.com>
8308 * aot-runtime.c (mono_aot_get_method): Change this to return the native code
8309 address instead of a MonoJitInfo* to avoid decoding the exception info for the
8312 * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
8313 name cache to reduce its size.
8315 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
8317 2006-10-15 Zoltan Varga <vargaz@gmail.com>
8319 * mini-x86.c: Save/restore the current LMF structure more efficiently using
8320 the mono_lmf TLS variable.
8322 * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in
8323 trampoline lmf frames.
8325 * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
8327 2006-10-14 Zoltan Varga <vargaz@gmail.com>
8329 * mini-amd64.c: Save/restore the current LMF structure more efficiently using
8330 the mono_lmf TLS variable.
8332 * mini-exceptions.c: Access the LMF structure through accessors.
8334 * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS
8335 variable instead of in jit_tls->lmf.
8337 * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
8339 * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in
8340 trampoline lmf frames.
8342 * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
8344 2006-10-12 Zoltan Varga <vargaz@gmail.com>
8346 * mini.c trace.c mini-x86.c: Revert these too.
8348 * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
8351 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
8353 * genmdesc.c: removed now dead code.
8355 2006-10-09 Robert Jordan <robertj@gmx.net>
8357 * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
8359 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
8361 * mini.h: do not leave gaps in the opcode values.
8363 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
8365 * jit-icalls.h: flag functions as internal here, too.
8367 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
8369 * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
8370 functions with the internal attribute.
8372 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
8374 * aot-compiler.c: fclose the file descriptor in the profile read loop.
8376 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
8378 * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
8381 2006-10-05 Zoltan Varga <vargaz@gmail.com>
8383 * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
8384 tail calls as on other platforms.
8386 * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
8388 * iltests.il: Add a few tailcall tests.
8390 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8392 * driver.c: fix loop for old compilers (bug #79521).
8394 2006-10-02 Zoltan Varga <vargaz@gmail.com>
8396 * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
8398 * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
8400 * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
8401 metadata without any code.
8403 * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
8404 more precise debugging information using gdb.
8406 2006-09-30 Zoltan Varga <vargaz@gmail.com>
8408 * inssel-ia64.brg: Make the helper methods static.
8410 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
8412 * inssel-x86.brg: make the helper methods static.
8414 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
8416 * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
8418 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
8420 * mini.c: updates for monoburg changes.
8421 * inssel.brg: make a few helper functions static as they should.
8423 2006-09-27 Zoltan Varga <vargaz@gmail.com>
8425 * Makefile.am: Move mini-codegen.c to common_sources.
8427 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8429 * mini.h: instroduce inst_call in MonoInst for use in OUTARG
8431 * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
8432 mini-ppc.h: port to use the common local register allocator.
8434 2006-09-26 Zoltan Varga <vargaz@gmail.com>
8436 * mini.h: Remove the comment too then.
8438 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
8440 * mini.h: put back backend.data which is to be used shortly and
8441 doesn't increase the size of MonoInst. If any 64 bit arch aligned
8442 pointers on 4 byte boundaries it'd have much bigger issues running
8443 and you can ifdef it out anyway.
8445 2006-09-26 Zoltan Varga <vargaz@gmail.com>
8447 * mini.h (MonoInst): Remove backend.data field since it is unused and increases
8448 MonoInst size by 4 bytes on 64 bit machines.
8450 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
8452 * *.{c,h,brg}: long due removal of the unused field in MonoInst and
8453 replacement with more meaningful field names. Arch maintainers, please
8454 check the assigned names are good enough for your arch.
8456 2006-09-26 Zoltan Varga <vargaz@gmail.com>
8458 * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the
8459 OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
8461 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
8463 * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
8464 relocations and memory requirements, put the optimization flags
8465 definitions in their own file.
8467 2006-09-24 Zoltan Varga <vargaz@gmail.com>
8469 * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
8471 * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
8473 2006-09-22 Zoltan Varga <vargaz@gmail.com>
8475 * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
8477 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
8479 * inssel.brg: use the correct function to get the size of an item
8480 in an array, given an element class.
8481 * aot-compiler.c: do not access class->class_size directly.
8483 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
8485 * mini.h, debug-mini.c: added a debugging function to print
8486 info about local variables and arguments in a jitted method.
8488 2006-09-20 Zoltan Varga <vargaz@gmail.com>
8490 * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8492 * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
8494 2006-09-19 Zoltan Varga <vargaz@gmail.com>
8496 * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
8497 inner and outer loops when passing vtypes.
8499 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
8501 * mini-ppc.c: take into account the cpu errata for cache flushing
8502 which caused some random errors (bug #79381).
8504 2006-09-19 Zoltan Varga <vargaz@gmail.com>
8506 * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to
8507 mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
8509 2006-09-17 Zoltan Varga <vargaz@gmail.com>
8511 * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
8514 * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
8517 * mini-amd64.c (emit_call): Avoid near calls on freebsd.
8518 (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
8520 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
8523 2006-09-13 Zoltan Varga <vargaz@gmail.com>
8525 * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
8527 2006-09-12 Zoltan Varga <vargaz@gmail.com>
8529 * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this
8530 macro does not have to be changed during debugging.
8532 * 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>.
8534 * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
8536 * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
8538 * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if
8539 MONO_ARCH_NO_EMULATE_MUL is defined.
8541 * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
8543 * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
8545 * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
8547 * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
8549 2006-09-11 Zoltan Varga <vargaz@gmail.com>
8551 * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
8552 stuff to mini-exceptions.c where it is used.
8554 * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
8555 setup code, the real one is in mini-exceptions.c.
8557 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
8558 layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
8559 some changes from the freebsd ports tree.
8561 * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
8564 * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
8566 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
8568 * mini.c: on Linux, check for /proc to be mounted
8569 (bug# 79351, novell bug#201204).
8571 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
8573 * mini.c: handle cases where pthread_attr_getstack() behaves
8574 incorrectly (bug #78096).
8576 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
8578 * mini-arm.c: support larger stack frames (bug #79272).
8580 2006-09-08 Zoltan Varga <vargaz@gmail.com>
8582 * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
8584 * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef
8587 * aot-runtime.c (mono_aot_get_class_from_name): New function used by
8588 mono_class_from_name () to find a class from its name.
8590 * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
8592 2006-09-07 Zoltan Varga <vargaz@gmail.com>
8594 * mini-amd64.c (emit_call): Avoid strstr () call if possible.
8596 2006-09-05 Kornél Pál <kornelpal@gmail.com>
8598 * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
8600 2006-09-04 Zoltan Varga <vargaz@gmail.com>
8602 * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
8603 callinfo->trampoline.
8605 * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
8607 (mono_arch_patch_code): Add some debug code to help track down similar failures in the
8610 2006-09-03 Zoltan Varga <vargaz@gmail.com>
8612 * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
8614 2006-09-02 Zoltan Varga <vargaz@gmail.com>
8616 * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
8617 stats.method_trampolines, it is already done by the generic trampoline code.
8619 * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
8621 2006-09-01 Zoltan Varga <vargaz@gmail.com>
8623 * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
8625 * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
8627 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
8629 * mini.c (print_jit_stats): Print mscorlib mempool size too.
8631 * mini.c (print_jit_stats): Print new stats.
8633 * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8635 2006-08-31 Zoltan Varga <vargaz@gmail.com>
8637 * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
8638 Address on two dimensional arrays. Fixes #78729.
8640 * mini.h (MonoCompile): Add a 'skip_visibility' field.
8642 * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
8645 * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
8647 * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
8650 * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
8652 (mini_get_ldelema_ins): Ditto.
8654 2006-08-30 Zoltan Varga <vargaz@gmail.com>
8656 * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
8657 (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation.
8660 2006-08-29 Neale Ferguson <neale@sinenomine.net>
8662 * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
8663 mono_arch_get_patch_offset as a dummy entry point to allow successful link.
8665 * exceptions-s390x.c: Cosmetic change.
8667 * tramp-s390.c: Fix warning.
8669 * cpu-s390.md: Correct length of mul_imm.
8671 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
8673 * aot-compiler.c: added binary writer with ELF backend
8674 implementation (only on Linux/x86 for now).
8676 2006-08-18 Zoltan Varga <vargaz@gmail.com>
8678 * Makefile.am: Don't run net 2.0 AOT tests.
8680 * aot-compiler.c (compile_method): Skip methods with tail calls as well.
8681 (mono_compile_assembly): Skip net 2.0 assemblies as well.
8683 * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
8685 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8687 * aot-compiler.c: simplified and refactored the asm-writing code
8688 to allow different backends.
8690 2006-08-18 Zoltan Varga <vargaz@gmail.com>
8692 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8694 * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a
8695 little. Share patches of type TYPE_FROM_HANDLE as well.
8697 * mini.c (mono_patch_info_equal): New helper function.
8698 (mono_patch_info_hash): Ditto.
8700 * aot-compiler.c (emit_method_code): Fix s390 build.
8702 * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
8703 is not handled because it is stored as a flag and not as a type ctor. Fixes
8706 2006-08-17 Zoltan Varga <vargaz@gmail.com>
8708 * aot-compiler.c: Fix computation of GOT slot statistics.
8710 * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
8711 Also remove support for not PIC AOT.
8713 * mini.h: Bump AOT file format version.
8715 * objects.cs: Add a test for #78990.
8717 * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
8718 (peter.dettman@iinet.net.au). Fixes #79087.
8720 * basic-long.cs: Add a test for the above.
8722 2006-08-16 Zoltan Varga <vargaz@gmail.com>
8724 * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
8726 * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
8729 2006-08-15 Zoltan Varga <vargaz@gmail.com>
8731 * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
8734 2006-08-10 Jonathan Chambers <joncham@gmail.com>
8736 * mini.c: Don't verify COM proxy invoke calls
8739 2006-08-10 Dick Porter <dick@ximian.com>
8741 * wapihandles.c (mini_wapi_seminfo): More info, to help track down
8742 which process is holding semaphores locked.
8744 2006-08-08 Zoltan Varga <vargaz@gmail.com>
8746 * mini-ia64.c mini-amd64.c: Fix #79027.
8748 * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
8750 * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
8752 * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
8753 implicit arguments in a vararg call. Fixes #79027.
8755 2006-08-07 Zoltan Varga <vargaz@freemail.hu>
8757 * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
8758 (mono_get_array_new_va_signature): Ditto.
8760 2006-08-05 Zoltan Varga <vargaz@gmail.com>
8762 * aot-runtime.c: Call init_plt lazily.
8764 * inssel-long.brg: Fix unsigned long->int conversion.
8766 * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
8768 * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
8769 that most data is now in the .rss/.data section.
8771 2006-08-04 Zoltan Varga <vargaz@gmail.com>
8773 * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.
8775 * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
8777 * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
8779 * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
8781 * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
8782 virtual call. Fixes #79010.
8784 * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method
8785 and use the result as the this argument in the real call.
8787 * generics.2.cs: Add a new test for #79010.
8789 2006-08-03 Zoltan Varga <vargaz@gmail.com>
8791 * mini-x86.c: Fix a warning.
8793 * aot-compiler.c: Add a bunch of statistics.
8795 * mini.c (inline_method): Disable inlining in out-of-line bblocks.
8797 2006-08-02 Zoltan Varga <vargaz@gmail.com>
8799 * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
8801 2006-08-01 Zoltan Varga <vargaz@gmail.com>
8803 * 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>.
8805 2006-07-13 Miguel de Icaza <miguel@novell.com>
8807 * mini.c (mono_method_to_ir): Obtain the original method in the
8808 CIL stream and use this to perform validation.
8812 2006-07-19 Zoltan Varga <vargaz@gmail.com>
8814 * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
8815 (mono_arch_call_opcode): Ditto.
8817 * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
8820 * mini.c (mono_patch_info_dup_mp): New helper function.
8822 * aot-compiler.c (compile_method): Fix some of the memory allocated during
8823 compilation. Fixes #78827.
8825 2006-07-18 Kornél Pál <kornelpal@gmail.com>
8827 * declsec.c: Use original security informations for
8828 MONO_WRAPPER_MANAGED_TO_MANAGED.
8830 2006-07-15 Jonathan Chambers <joncham@gmail.com>
8832 * mini.c: Allow Com Interop methods/classes and
8833 don't verify COM wrapper calls
8836 2006-07-13 Zoltan Varga <vargaz@gmail.com>
8838 * inssel-long32.brg: Fix long->i4 checked conversion.
8840 * exceptions.cs: Add a test for the above.
8842 2006-07-08 Zoltan Varga <vargaz@gmail.com>
8844 * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
8846 * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown
8849 * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
8852 2006-07-03 Zoltan Varga <vargaz@gmail.com>
8854 * mini.c: Fix solaris/x86 exception handling.
8856 * Makefile.am: Get rid of $(ICU_LIBS).
8858 2006-07-02 Zoltan Varga <vargaz@gmail.com>
8860 * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
8861 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
8862 (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
8864 * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
8866 * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
8867 this function causes a SIGSEGV.
8869 2006-06-22 Zoltan Varga <vargaz@gmail.com>
8871 * mini.c: Remove unused solaris/x86 includes.
8873 2006-06-21 Zoltan Varga <vargaz@gmail.com>
8875 * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
8877 2006-06-20 Jb Evain <jbevain@gmail.com>
8879 * cpu-g4.md: fix max length of start_handler instruction.
8881 2006-06-20 Massimiliano Mantione <massi@ximian.com>
8882 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
8884 2006-06-16 Massimiliano Mantione <massi@ximian.com>
8885 * ssa.c: Fixed bug 78653 for SSA based deadce.
8886 * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
8887 MonoInst.flags, used in SSA based deadce.
8888 * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
8889 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
8891 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
8893 * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
8894 it can end up using non executable memory on ppc64 systems
8895 running ppc32 userspace (fix from Johannes Berg).
8897 2006-06-14 Dick Porter <dick@ximian.com>
8899 * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
8902 2006-06-13 Massimiliano Mantione <massi@ximian.com>
8903 * mini.c: Made so that inline is locally disabled if it would
8904 trigger a .cctor, because too many apps depend on this behavior
8905 (which seems to be also the one of the MS CLR).
8907 2006-06-13 Zoltan Varga <vargaz@gmail.com>
8909 * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
8910 No idea why this worked before.
8912 * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
8913 which branch to outer exception clauses since they could skip the
8914 inner finally clauses. Fixes #78633.
8916 * exceptions.cs: Add a test for the above.
8918 * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
8921 * iltests.il: Add a test for the above.
8923 2006-06-12 Zoltan Varga <vargaz@gmail.com>
8925 * mini.c (remove_block_if_useless): Do not remove the bblock immediately
8926 after the end of a try bblock, to prevent asserts in mini_method_compile ().
8928 * iltests.il: Add a test for the above.
8930 2006-06-10 Zoltan Varga <vargaz@gmail.com>
8932 * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
8934 * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
8935 methods as instrinsics.
8937 2006-06-09 Wade Berrier <wberrier@novell.com>
8939 * Makefile.am: Fix sources list for svn rename so that make dist succeeds
8940 (simple-cee-ops.h ssapre-mini-ops.h)
8942 2006-06-09 Neale Ferguson <neale@sinenomine.net>
8944 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
8945 * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
8947 * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
8948 * cpu-s390x.md: Fix max. length values for a couple of instructions.
8950 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
8952 * mini-exceptions.c: Minor fix for building mono in Visual Studio.
8954 2006-06-08 Massimiliano Mantione <massi@ximian.com>
8956 * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
8957 * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
8958 * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
8959 * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
8960 * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
8961 of opcodes, so that bug 78549 should not happen again.
8962 * ssapre.c: Updated to use the renamed files.
8964 2006-06-08 Zoltan Varga <vargaz@gmail.com>
8966 * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move
8967 in OP_ATOMIC_EXCHANGE_I4.
8969 2006-06-07 Wade Berrier <wberrier@novell.com>
8971 * tramp-s390.c: Fix s390 build (add missing pointer declarations
8972 in mono_debugger_create_notification_function)
8974 2006-06-06 Zoltan Varga <vargaz@gmail.com>
8976 * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
8978 * mini.c (type_from_stack_type): Disable some changes which do not
8981 * driver.c: Reenable opts.
8983 * mini.h (MonoStackSlot): New structure to keep track of the verification state
8984 of the evaluation stack.
8986 * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
8987 evaluation stack trace at entry to the bblock.
8989 * mini.c (merge_stacks): New function to perform verification of stack merges.
8990 Turned off by default.
8992 * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
8995 2006-06-06 Massimiliano Mantione <massi@ximian.com>
8997 * local-propagation.c: Fixed bug 78549.
8999 2006-06-04 Zoltan Varga <vargaz@gmail.com>
9001 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
9003 2006-06-02 Miguel de Icaza <miguel@novell.com>
9005 * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
9006 tramp-arm.c, tramp-ia64.c
9007 (mono_debugger_create_notification_function): Update signature to
9008 new signature and use new protocol for creating the notification
9011 Should fix the build.
9013 2006-06-02 Geoff Norton <gnorton@customerdna.com>
9015 * exceptions-ppc.c (mono_jit_walk_stack)
9016 (ves_icall_get_frame_info): Fix the build
9018 2006-06-02 Zoltan Varga <vargaz@gmail.com>
9020 * mini.c (mono_set_defaults): Fix the handling of -O=-all.
9022 2006-05-31 Raja R Harinath <rharinath@novell.com>
9024 * il2tests.2.il: New file for generics CIL tests. Add test for
9026 * Makefile.am: Update.
9029 * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
9032 2006-05-30 Massimiliano Mantione <massi@ximian.com>
9034 * aliasing.c: Fixed bug 78311.
9036 2006-05-29 Martin Baulig <martin@ximian.com>
9038 * mini-exceptions.c (mono_find_jit_info): When computing the
9039 native offset, check whether we're actually inside the method's
9040 code; call mono_debug_print_stack_frame() to format the frame.
9041 (ves_icall_System_Exception_get_trace): Call
9042 mono_debug_print_stack_frame() to format the stack frame.
9043 (ves_icall_get_trace): Update to the new debugging API.
9044 (mono_jit_walk_stack_from_ctx): Likewise.
9045 (ves_icall_get_frame_info): Likewise.
9047 * mini.c (get_method_from_ip): Use the new debugging API.
9048 (mono_print_method_from_ip): Likewise.
9051 (mono_jit_walk_stack): Use the new debugging API.
9052 (ves_icall_get_frame_info): Likewise.
9054 2006-05-27 Zoltan Varga <vargaz@gmail.com>
9056 * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
9058 2006-05-25 Massimiliano Mantione <massi@ximian.com>
9060 * mini.c: Added "limitator" to inline for debugging.
9062 2006-05-24 Martin Baulig <martin@ximian.com>
9064 * debug-debugger.c (mono_debugger_init): Create a private,
9065 malloc()-based code manager for the notification function and
9066 intentionally leak it on exit. This fixes the crash-on-exit race
9070 (mono_debugger_create_notification_function): Added
9071 `MonoCodeManager *' argument.
9074 (mono_debugger_create_notification_function): Added
9075 `MonoCodeManager *' argument.
9077 2006-05-23 Massimiliano Mantione <massi@ximian.com>
9079 * aliasing.c: Fixed 64 bit issue.
9080 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
9081 default since all known bugs are fixed (one more time!).
9083 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
9085 * mini.c: write barrier support.
9087 2006-05-23 Martin Baulig <martin@ximian.com>
9089 * debug-debugger.c: Revert Paolo's change. Add comment and #error
9090 check at the top of the file.
9092 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
9094 * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
9095 reverting changes without reason and without changelog entries.
9097 2006-05-18 Zoltan Varga <vargaz@gmail.com>
9099 * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
9100 to a few opcodes. Fixes #78439.
9102 * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
9103 consistency with other archs.
9105 * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
9107 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
9109 * debug-debugger.c: fix the build.
9111 2006-05-17 Martin Baulig <martin@ximian.com>
9114 (debugger_thread_vtable): Moved here from ../metadata/threads.c.
9115 (debugger_init_threads): Formerly known as mono_debugger_init_threads().
9116 (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
9117 (debugger_attach): Call GC_mono_debugger_add_all_threads().
9119 2006-05-11 Zoltan Varga <vargaz@gmail.com>
9121 * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
9123 2006-05-10 Zoltan Varga <vargaz@gmail.com>
9125 * mini-x86.c (mono_arch_instrument_epilog): Fix handling of
9126 MONO_TYPE_GENERICINST.
9128 * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of
9129 MONO_TYPE_GENERICINST.
9131 2006-05-09 Zoltan Varga <vargaz@gmail.com>
9133 * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
9136 2006-05-08 Zoltan Varga <vargaz@gmail.com>
9138 * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
9140 (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
9142 2006-05-06 Zoltan Varga <vargaz@gmail.com>
9144 * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
9145 mono_trace_cleanup ().
9147 * iltests.il: Fix problem with the newly added test.
9149 * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
9150 due to register constraints, free up the previous hreg. Fixes #78314.
9152 * iltests.il: Add new test for #78314.
9154 * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
9155 Interlocked.Add. Fixes #78312.
9157 * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
9159 2006-05-05 Zoltan Varga <vargaz@gmail.com>
9161 * inssel.brg (mini_emit_virtual_call): Fix a warning.
9163 2006-05-05 Martin Baulig <martin@ximian.com>
9165 * debug-mini.c (mono_debug_open_block): New method.
9168 (mono_arch_output_basic_block): Call mono_debug_open_block() at
9169 the beginning of each basic block.
9172 (mono_arch_output_basic_block): Call mono_debug_open_block() at
9173 the beginning of each basic block.
9175 2006-05-04 Massimiliano Mantione <massi@ximian.com>
9177 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
9178 default until I understand why they break the build on amd64.
9180 2006-05-04 Zoltan Varga <vargaz@gmail.com>
9182 * mini.c (mini_cleanup): Call mono_cleanup ().
9184 * mini.c (UNVERIFIED): New macro to make it easier to track down verification
9187 2006-05-04 Massimiliano Mantione <massi@ximian.com>
9189 * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
9190 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
9191 default since all known bugs are fixed, and I cannot reproduce bug
9192 77944... I'm asking Matt Hargett to test again after this commit.
9194 2006-04-28 Massimiliano Mantione <massi@ximian.com>
9196 * mini-codegen.c: Fixed typo that thrashed inline.
9198 2006-04-28 Zoltan Varga <vargaz@gmail.com>
9200 * dominators.c (compute_dominators): Avoid using a worklist since
9201 it is not correct in some cases. Instead, iterate over all bblocks as
9202 in the original paper. Fixes --compile-all -O=all System.Xml.dll.
9204 2006-04-28 Miguel de Icaza <miguel@novell.com>
9206 * mini.c (mono_jit_compile_method_inner): Use
9207 mono_prepare_exception_from_error that resets the value
9210 2006-04-27 Miguel de Icaza <miguel@novell.com>
9212 * mini.c: Move the mini_loader_error_to_exception to metadata.
9214 2006-04-27 Massimiliano Mantione <massi@ximian.com>
9216 * aliasing.c: Fixed bug 78210.
9218 2006-04-27 Massimiliano Mantione <massi@ximian.com>
9220 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
9221 default until all their problems (or the ones they trigger) are fixed.
9223 2006-04-26 Zoltan Varga <vargaz@gmail.com>
9225 * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
9227 * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
9228 as loaded only after resolving patches since that could invoke the same method.
9230 * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
9232 * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
9235 * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
9238 * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
9241 * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
9242 made from AOT code through the PLT table.
9244 * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
9245 holding the plt offset when a call is made to the aot plt trampoline.
9247 2006-04-25 Zoltan Varga <vargaz@gmail.com>
9249 * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the
9252 * Makefile.am (common_sources): Fix build breakage.
9254 * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
9255 calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
9256 intra-assembly calls if possible.
9258 * tramp-*.c: Add new functions for patching/nullifying PLT entries.
9260 * mini-trampolines.c: Handle PLT entries.
9262 * mini.c: Avoid creating a GOT var for calls.
9264 * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
9267 * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
9270 * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
9273 * mini.h: Bump AOT file format version.
9275 * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
9278 2006-04-25 Martin Baulig <martin@ximian.com>
9280 * driver.c: Disable copyprop, consprop and inline when running
9281 inside the debugger.
9283 2006-04-25 Martin Baulig <martin@ximian.com>
9285 * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
9286 with `get_current_thread' and added `detach'.
9287 (MonoDebuggerMetadataInfo): Added `thread_size',
9288 `thread_tid_offset', `thread_stack_ptr_offset' and
9289 `thread_end_stack_offset'.
9291 2006-04-25 Zoltan Varga <vargaz@gmail.com>
9293 * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and
9296 * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
9297 ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
9299 * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
9301 * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
9303 * aot.c: Add support for ADJUSTED_IID.
9305 2006-04-24 Zoltan Varga <vargaz@gmail.com>
9307 * aot.c (emit_method_order): Don't align method_order_end.
9309 * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
9310 the interface ID changes.
9312 2006-04-21 Dick Porter <dick@ximian.com>
9314 * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
9315 cleaning up a thread. Fixes the new part of bug 77470.
9317 2006-04-20 Geoff Norton <gnorton@customerdna.com>
9319 * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
9322 2006-04-19 Zoltan Varga <vargaz@gmail.com>
9324 * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
9326 * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
9327 SIGSEGV. Fixes #78072.
9329 * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
9330 unregister our SIGABRT handler.
9332 2006-04-19 Massimiliano Mantione <massi@ximian.com>
9334 * mini.c: Disabled inline where it can alter the call stack in a
9335 way visible from managed code.
9336 * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
9339 2006-04-16 Zoltan Varga <vargaz@gmail.com>
9341 * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
9342 on other platforms. Fixes #78089.
9344 2006-04-13 Martin Baulig <martin@ximian.com>
9346 * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
9347 determine whether we're inside the debugger.
9350 (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
9352 2006-04-12 Zoltan Varga <vargaz@gmail.com>
9354 * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
9355 handler clauses. Fixes #78024.
9357 * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
9358 in the CALL_MEMBASE opcodes. Fixes #78088.
9359 (mono_arch_get_vcall_slot_addr): Ditto.
9361 2006-04-10 Martin Baulig <martin@ximian.com>
9363 * debug-debugger.c: The thread handling code has now been moved
9364 into ../metadata/threads.c.
9366 2006-04-10 Zoltan Varga <vargaz@gmail.com>
9368 * driver.c (mono_main): Fix --with-gc=none build.
9370 * mini-codegen.c (mono_spillvar_offset): Improve alignment.
9371 (mono_spillvar_offset_float): Ditto.
9372 (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
9373 hreg, not when its !global, since on ia64, there is a third category: stacked
9376 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
9378 * mini.c: set MonoInst->klass for load field address and a few other
9381 2006-04-10 Zoltan Varga <vargaz@gmail.com>
9383 * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
9385 2006-04-07 Zoltan Varga <vargaz@gmail.com>
9387 * dominators.c (compute_dominators): Fix yet another bug which surfaced after
9388 the branch opt changes.
9390 2006-04-06 Dick Porter <dick@ximian.com>
9392 * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
9394 * wapihandles.c (mini_wapi_seminfo):
9395 * driver.c (mono_main): Add semaphore info option
9397 2006-04-05 Zoltan Varga <vargaz@gmail.com>
9399 * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
9400 branch optimization changes. Fixes #78009.
9402 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
9404 * mini.c: ignore accessibility of methods in managed->native wrappers.
9406 2006-04-04 Zoltan Varga <vargaz@gmail.com>
9408 * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
9410 * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
9412 2006-04-03 Zoltan Varga <vargaz@gmail.com>
9414 * mini.c: Modify the branch optimizations to preserve the invariant that
9415 the entries inside the in_bb and out_bb arrays are unique.
9416 (mono_unlink_bblock): Avoid creation of new arrays.
9418 2006-04-02 Zoltan Varga <vargaz@gmail.com>
9420 * mini.c (mono_unlink_bblock): Fix regression caused by previous
9423 2006-04-01 Zoltan Varga <vargaz@gmail.com>
9425 * mini.c (optimize_branches): Remove the "optimizations" in
9426 the cbranch1/cbranch2 -> branch cases which were causing several
9427 problems in the past. Fixes #77986.
9429 2006-03-31 Chris Toshok <toshok@ximian.com>
9431 * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
9432 default optimizations :(
9434 2006-03-31 Zoltan Varga <vargaz@gmail.com>
9436 * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
9439 2006-03-31 Massimiliano Mantione <massi@ximian.com>
9441 * local-propagation.c: Added comments to structs and removed
9442 "Mono" prefixes from local tree mover types.
9444 2006-03-30 Zoltan Varga <vargaz@gmail.com>
9446 * Makefile.am (arch_sources): Define this for each architecture so
9447 libmono_la_SOURCES is defined in one place.
9449 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
9451 * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
9454 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
9456 * driver.c: print the GC name supplied by configure.
9458 2006-03-29 Massimiliano Mantione <massi@ximian.com>
9460 * local-propagation.c: Added tree mover, and moved here all the
9461 local propagation code from mini.c
9462 * mini.c: Added support for treeprop, and moved all the local
9463 propagation code to local-propagation.c
9464 * mini.h: Added support for treeprop
9465 * driver.c: Added support for treeprop, enabled consprop, copyprop,
9466 treeprop, inline and deadce by default
9467 * Makefile.am: Added local-propagation.c
9469 2006-03-25 Zoltan Varga <vargaz@gmail.com>
9471 * exceptions-sparc.c: Applied patch from David S. Miller <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
9473 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
9475 * debug-debugger.c: make it compile without the Boehm GC.
9477 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9479 * mini.c: fixed issue with mismatch when an icall is registered
9480 with multiple names but same address.
9482 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9484 * declsec.c, mini-exceptions.c: use write barrier to set reference
9485 fields of managed objects.
9487 2006-03-19 Zoltan Varga <vargaz@gmail.com>
9489 * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
9490 (can_access_internals): Fix a warning.
9492 * mini.c (print_method_from_ip): Rename this to
9493 mono_print_method_from_ip so it gets exported.
9495 * trace.c: Deal with strings inside StringBuilder's containing garbage
9496 and fix memory leaks. Fixes #77848.
9498 2006-03-19 Zoltan Varga <vargaz@gmail.com>
9500 * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
9503 2006-03-16 Neale Ferguson <neale@sinenomine.net>
9505 * mini-s390.c: Remove OP_X86_TEST_NULL.
9507 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9509 * mini.c: use the correct GetHashCode() for the moving collector.
9511 2006-03-16 Massimiliano Mantione <massi@ximian.com>
9513 * liveness.c: Regalloc spill cost tuning.
9515 2006-03-15 Neale Ferguson <neale@sinenomine.net>
9517 * mini-s390x.h: Correct S390_LONG macro.
9519 * mini-s390x.c: Cleanup unused code.
9521 2006-03-15 Zoltan Varga <vargaz@gmail.com>
9523 * jit-icalls.h: New file.
9525 * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
9526 icalls and include that instead of including jit-icalls.c.
9528 * mini-ppc.c (mono_arch_output_basic_block): Remove references to
9531 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
9533 * mini.c: when checking for member accessibility, also check for
9534 friend assemblies and for explicit interface implementations.
9536 2006-03-14 Zoltan Varga <vargaz@gmail.com>
9538 * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
9540 * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
9542 * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9543 common cases are done first.
9545 * mini-ops.h: Only define platform specific opcodes on the given platform.
9547 * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
9550 2006-03-14 Martin Baulig <martin@ximian.com>
9552 Revert Paolo's change from r57348:
9554 * mini.h: don't use gboolean for bitfields.
9555 * mini.c: verifier changes for fields and methods accessibility.
9557 2006-03-13 Neale Ferguson <neale@sinenomine.net>
9559 * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
9561 * mini-s390x.c: Fix conv_r_un.
9563 * cpu-s390, cpu-s390x.md: Fix lengths.
9565 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
9567 * mini.c: nested types have access to all the nesting
9568 levels, not just the enclosing types.
9570 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9572 * mini.c: added a few more verification checks.
9574 2006-03-12 Zoltan Varga <vargaz@gmail.com>
9576 * liveness.c: Merge optimizations from the linear-il branch.
9578 2006-03-11 Zoltan Varga <vargaz@gmail.com>
9580 * mini-ia64.c (emit_call): Add a comment.
9582 * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
9584 * tramp-ia64.c: Fix some warnings.
9586 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
9588 * mini.h: don't use gboolean for bitfields.
9589 * mini.c: verifier changes for fields and methods accessibility.
9591 2006-03-11 Zoltan Varga <vargaz@gmail.com>
9593 * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
9594 lazy icall wrapper changes.
9596 * dominators.c: Replace all the dominator algorithms with faster
9597 ones from the linear-il branch.
9599 * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
9602 * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9603 common cases are done first.
9605 * mini-amd64.c: Fix some warnings.
9607 * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
9610 * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
9613 * mini.h: Add a missing prototype.
9615 2006-03-10 Zoltan Varga <vargaz@gmail.com>
9617 * mini.c: Compile icall wrappers lazily.
9619 * mini-codegen.c: Use printf instead of g_print since its much faster.
9621 * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
9624 * mini.c (optimize_branches): Cache the negative result from
9625 remove_block_if_useless ().
9627 * mini.c (optimize_branches): Avoid restarting the iteration after each change.
9628 Also fix some bblock linking issues.
9630 * helpers.c (mono_disassemble_code): Reduce the size of the temporary
9633 * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
9635 * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
9636 accessed fields first, for better cache behavior.
9638 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
9640 * mini.c: speedup IList<T> array accesses.
9642 2006-03-09 Zoltan Varga <vargaz@gmail.com>
9644 * mini.c (mono_method_to_ir): Handle large methods overflowing the
9645 inline_costs counter. Fixes #77190.
9647 2006-03-06 Zoltan Varga <vargaz@gmail.com>
9649 * mini-exceptions.c: Call mono_trace_is_enabled () before printing
9650 trace messages. Fixes #77706.
9652 2006-03-04 Martin Baulig <martin@ximian.com>
9654 * tramp-amd64.c, tramp-x86.c
9655 (mono_debugger_create_notification_function): Use
9656 mono_global_codeman_reserve() to allocate a buffer at runtime and
9659 * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
9661 * debug-debugger.c (mono_debugger_init): Dynamically allocate the
9662 notification function at runtime and then call `initialize' in the
9663 `MONO_DEBUGGER__debugger_info' vtable.
9665 2006-03-04 Zoltan Varga <vargaz@gmail.com>
9667 * iltests.il: Fix a visibility problem.
9669 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
9671 * driver.c, mini.c: add hooks for the counters API.
9673 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9675 * driver.c: show disabled options.
9677 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9679 * linear-scan.c: always use cost-driven selection.
9681 2006-02-28 Raja R Harinath <rharinath@novell.com>
9683 * jit-icalls.c (helper_compile_generic_method): Revert change from
9686 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
9688 * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
9690 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
9692 * inssel.brg: style fixes, mostly to force the updated monoburg
9693 to run for people using svn.
9695 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
9697 * mini.c: match monoburg changes.
9699 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9701 * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
9702 ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
9703 declaration in the header file.
9705 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
9707 * helpers.c: reduce relocations and mem usage.
9709 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
9711 * mini.h, mini-codegen.c: disable logging features if
9712 requested by configure.
9714 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
9716 * mini.c: tiny verifier changes.
9718 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9720 * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
9721 cpu-pentium.md: stack alignment changes for osx/x86,
9722 partially from Geoff Norton <gnorton@customerdna.com>.
9724 2006-02-24 Raja R Harinath <harinath@gmail.com>
9726 * jit-icalls.c (helper_compile_generic_method): Update to changes
9727 in metadata/class.c.
9729 2006-02-24 Zoltan Varga <vargaz@gmail.com>
9731 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
9733 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
9734 interface calls with large offsets.
9736 2006-02-23 Raja R Harinath <rharinath@novell.com>
9738 * jit-icalls.c (helper_compile_generic_method): Document the
9739 special-case we depend on so that we can inflate the method twice
9740 with the same context with no bad side-effects.
9742 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
9744 * mini-x86.c, mini-amd64.c: fix for case when xen support
9747 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
9749 * mini-x86.c, mini-amd64.c: generate code to access tls items
9750 in a faster way for Xen systems.
9752 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
9754 * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
9755 updates and compilation fixes for the OSX/x86 port, mostly from
9756 Geoff Norton <gnorton@customerdna.com>.
9758 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
9760 * inssel.brg: faster interface call implementation
9761 to sync with the interface_offsets MonoVTable changes.
9763 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9765 * mini.c: more verification checks.
9767 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
9769 * mini.c: added a few more verification checks.
9771 2006-02-17 Neale Ferguson <neale@sinenomine.net>
9773 * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
9774 facility on the processor and use it if available.
9776 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9778 * driver.c, aot.c, mini.c: throw exception if the IL code is
9779 invalid or unverifiable.
9781 2006-02-17 Raja R Harinath <rharinath@novell.com>
9783 * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
9786 2006-02-16 Zoltan Varga <vargaz@gmail.com>
9788 * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
9790 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9792 * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
9793 mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
9794 handling of instantiated generic valuetypes.
9796 2006-02-11 Zoltan Varga <vargaz@gmail.com>
9798 * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of
9799 MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
9802 * generics.2.cs: Revert the nullable reftypes tests.
9804 2006-02-10 Zoltan Varga <vargaz@gmail.com>
9806 * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
9807 using __builtin_frame_address (1) as it doesn't work in the presence
9808 of optimizations. Hopefully fixes #77273.
9810 * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
9811 -> generics.cs change as it doesn't work with some automake versions.
9813 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9815 * mini.c: handle systems that sue a different way to
9816 retrieve the stack address of the current thread.
9818 2006-02-09 Zoltan Varga <vargaz@gmail.com>
9820 * Makefile.am generics.2.cs: Rename this to generics.cs and handle
9821 it specially in the makefile.
9823 * generics.2.cs: Add tests for nullable reference types.
9825 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9827 * mini.c: always handle the case when mono_jit_init()
9828 is called in a thread different from the main thread,
9829 confusing libgc (bug #77309).
9831 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
9833 * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
9835 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9837 * mini.c: change optimize_branches () to use a single loop
9838 and introduce a new optimization to simplify some range checks.
9840 2006-02-03 Martin Baulig <martin@ximian.com>
9842 * debug-debugger.c (debugger_thread_manager_thread_created): Removed
9843 and merged with debugger_thread_manager_add_thread().
9844 (mono_debugger_main): Call debugger_thread_manager_add_thread() to
9845 inform the debugger about the main thread.
9847 2006-02-03 Zoltan Varga <vargaz@gmail.com>
9849 * basic.cs: Add test for div.un/rem.un constant folding.
9851 2006-02-03 Neale Ferguson <neale@sinenomine.net>
9853 * cpu-s390x.md: correct int_xor_imm length
9855 2006-02-03 Zoltan Varga <vargaz@gmail.com>
9857 * generics.2.cs: New test for #77442.
9859 * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
9862 2006-02-02 Martin Baulig <martin@ximian.com>
9864 * tramp-x86.c, tramp-amd64.c: It's now safe to #include
9865 <mono/metadata/mono-debug-debugger.h>
9867 * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
9869 2006-02-02 Martin Baulig <martin@ximian.com>
9871 * debug-debugger.h: New header file for debug-debugger.c.
9873 * debug-debugger.c: Big API cleanup; don't run the managed Main()
9874 function is a separate thread anymore; add support for attaching.
9876 2006-02-01 Zoltan Varga <vargaz@gmail.com>
9878 * tramp-x86.c: Fix a warning.
9880 2006-01-31 Zoltan Varga <vargaz@gmail.com>
9882 * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
9883 on very large methods.
9885 * aot.c (load_patch_info): Fix a warning.
9887 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
9889 * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
9890 mini-ops.h: alu membase optimizations.
9892 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
9894 * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
9895 to speedup StringBuilder.
9897 2006-01-27 Zoltan Varga <vargaz@gmail.com>
9899 * dominators.c (mono_compute_natural_loops): Fix detection of
9900 loop body start blocks.
9902 * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
9904 2006-01-26 Zoltan Varga <vargaz@gmail.com>
9906 * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
9909 2006-01-25 Massimiliano Mantione <massi@ximian.com>
9911 * aliasing.c: Fixed aliasing issue on 64 bit archs.
9913 2006-01-25 Martin Baulig <martin@ximian.com>
9915 * debug-debugger.c: Moved the `MonoDebuggerManager' and
9916 `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
9917 started to cleanup this file a little bit.
9919 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
9921 * mini.c: optimize a codepath frequently happening in generics code.
9923 2006-01-23 Martin Baulig <martin@ximian.com>
9925 * Makefile.am: Only compile debug-debugger.c on supported platforms.
9927 * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
9930 * driver.c: debug-debugger.c is only available if
9931 `MONO_DEBUGGER_SUPPORTED' is defined.
9933 2006-01-23 Martin Baulig <martin@ximian.com>
9935 * debug-debugger.c: Only enable this on platforms where the Mono
9936 Debugger is working (x86 and x86_64).
9938 2006-01-21 Martin Baulig <martin@ximian.com>
9940 The Mono Debugger is now using the normal `mono' instead of the
9941 `mono-debugger-mini-wrapper' when executing managed code.
9943 * debug-debugger.c: New file; previously known as
9944 debugger/wrapper/wrapper.c.
9946 * debug-mini.c (mono_init_debugger): Removed.
9948 * driver.c (mono_main): Added new `--inside-mdb' command line
9949 argument which is used when running inside the debugger.
9951 2006-01-20 Zoltan Varga <vargaz@gmail.com>
9953 * liveness.c (mono_analyze_liveness): Remove some unused data
9956 2006-01-17 Zoltan Varga <vargaz@gmail.com>
9958 * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
9960 2006-01-16 Zoltan Varga <vargaz@gmail.com>
9962 * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
9963 depends on implementation details of monobitset.
9965 * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
9968 2006-01-15 Zoltan Varga <vargaz@gmail.com>
9970 * liveness.c: Update after monobitset changes.
9972 2006-01-14 Zoltan Varga <vargaz@gmail.com>
9974 * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
9976 2006-01-11 Neale Ferguson <neale@sinenomine.net>
9978 * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
9980 * mini-s390x.c: Remove warning messages.
9982 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
9984 * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
9986 2006-01-10 Zoltan Varga <vargaz@gmail.com>
9988 * generics.2.cs: Add ldelem/stelem_any test.
9990 2006-01-10 Neale Ferguson <neale@sinenomine.net>
9992 * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
9994 2006-01-07 Zoltan Varga <vargaz@gmail.com>
9996 * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
9998 2006-01-06 Zoltan Varga <vargaz@gmail.com>
10000 * generics.2.cs: Reenable vtype tests.
10002 * inssel-x86.brg: Remove an icorrect valuetype rule.
10004 2006-01-06 Neale Ferguson <neale@sinenomine.net>
10006 * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
10007 initial support for OP_ABS.
10009 2006-01-05 Neale Ferguson <neale@sinenomine.net>
10011 * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
10013 2006-01-05 Neale Ferguson <neale@sinenomine.net>
10015 * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int
10016 conversion and implement LADD/LSUB.
10018 * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
10021 2006-01-05 Neale Ferguson <neale@sinenomine.net>
10023 * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
10025 * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
10028 2006-01-05 Neale Ferguson <neale@sinenomine.net>
10030 * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when
10031 localloc is encountered. Fixes crash in test-183.cs when using gmcs
10032 (stack walk problem).
10034 2006-01-04 Zoltan Varga <vargaz@gmail.com>
10036 * aot.c (mono_aot_load_method): Fix a warning.
10038 2006-01-03 Neale Ferguson <neale@sinenomine.net>
10040 * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
10042 2006-01-03 Zoltan Varga <vargaz@gmail.com>
10044 * iltests.il: Add test for #77148.
10046 * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
10049 2006-01-03 Neale Ferguson <neale@sinenomine.net>
10051 * mini-s390x.c, inssel-s390x.brg: Remove debug statements
10053 2006-01-03 Neale Ferguson <neale@sinenomine.net>
10055 * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
10056 cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
10058 * basic-long.cs: Add lconv-to-r4/r8 tests.
10060 2006-01-03 Zoltan Varga <vargaz@gmail.com>
10062 * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
10064 * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
10065 here as on other archs.
10067 2005-12-29 Neale Ferguson <neale@sinenomine.net>
10069 * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
10071 2005-12-29 Neale Ferguson <neale@sinenomine.net>
10073 * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
10075 * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
10077 * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
10078 instrument_prolog; Add memory_barrier instruction.
10080 2005-12-26 Zoltan Varga <vargaz@gmail.com>
10082 * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
10084 2005-12-23 Zoltan Varga <vargaz@gmail.com>
10086 * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
10088 * aliasing.c inssel.brg: Fix warnings.
10090 * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
10091 could skip initialization of some parts of memory.
10093 * mini.c mini-ia64.c: Fix warnings.
10095 * inssel-sparc.brg: Add an implementation of lneg which actually works.
10097 2005-12-22 Zoltan Varga <vargaz@gmail.com>
10099 * aliasing.c (mono_build_aliasing_information): Add a workaround for
10100 a crash seen on sparc.
10102 * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
10104 * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
10106 2005-12-21 Neale Ferguson <neale@sinenomine.net>
10108 * mini-ops.h: Add s390_backchain instruction
10110 * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
10112 * cpu-s390.md: Add s390_backchain instruction
10114 * mini-s390.c: Significant ABI changes
10116 * mini-s390.h: Cater for zero length structures
10118 2005-12-20 Neale Ferguson <neale@sinenomine.net>
10120 * mini-s390.c: ABI fixes
10122 * inssel-s390.brg: Remove debug statements
10124 * cpu-s390.md: Fix length of ATOMIC_xx operations
10126 2005-12-19 Zoltan Varga <vargaz@gmail.com>
10128 * basic-float.cs: Add float<->long conversion tests.
10130 2005-12-16 Neale Ferguson <neale@sinenomine.net>
10132 * mini-s390.c: Fix LOCALLOC processing.
10134 * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
10136 2005-12-15 Zoltan Varga <vargaz@gmail.com>
10138 * iltests.il: Add tests for some opcodes not covered by the other
10141 2005-12-15 Neale Ferguson <neale@sinenomine.net>
10143 * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct
10144 register loading for Tail processing; Correct trace output.
10146 * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
10148 * cpu-s390.md: Correct size of jmp instruction.
10150 2005-12-13 Neale Ferguson <neale@sinenomine.net>
10152 * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
10154 2005-12-13 Neale Ferguson <neale@sinenomine.net>
10156 * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
10157 Bring s390 up to current level.
10159 2005-12-12 Zltan Varga <vargaz@gmail.com>
10161 * generics.2.cs: Disable the newly added tests as they do not work yet.
10163 * generics.2.cs: Add valuetype tests.
10165 2005-12-09 Zoltan Varga <vargaz@gmail.com>
10167 * basic-long.cs: Add i4->u8 test.
10169 * objects.cs: Add tests for JIT intrinsic.
10171 * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
10172 optimizations lost by a mistake.
10174 2005-12-07 Zoltan Varga <vargaz@gmail.com>
10176 * basic-long.cs: Remove a test moved to objects.cs.
10178 * arrays.cs: Add more array tests.
10180 2005-12-06 Zoltan Varga <vargaz@gmail.com>
10182 * arrays.cs: Add new tests for multi-dimensional arrays.
10184 2005-12-06 Raja R Harinath <rharinath@novell.com>
10186 * Makefile.am (test_sources2): Add generics.2.cs.
10187 (EXTRA_DIST): Add test_sources2.
10189 2005-12-05 Ben Maurer <bmaurer@ximian.com>
10191 Support for boxing and unboxing nullable types as well as the
10192 isinst operation on nullables, per the CLI ammendment.
10194 * inssel.brg (CEE_ISINST): Special case for nullable
10196 * mini.c (handle_unbox_nullable): new method
10197 (handle_box): Special case for nullable types
10198 (mono_method_to_ir): Call handle_unbox_nullable in correct
10201 * generics.2.cs: New test suite
10203 * Makefile.am: Support for regression tests with generics.
10205 2005-12-03 Zoltan Varga <vargaz@gmail.com>
10207 * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
10208 allocated to registers. Fixes #76800.
10210 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
10212 * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
10214 2005-11-30 Zoltan Varga <vargaz@gmail.com>
10216 * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot
10219 2005-11-29 Zoltan Varga <vargaz@gmail.com>
10221 * objects.cs basic-calls.cs: Move a test depending on valuetypes to
10224 * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
10226 * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
10227 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
10229 * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
10230 single precision before storing to a single precision location.
10232 2005-11-28 Raja R Harinath <rharinath@novell.com>
10234 * Makefile.am (ILASM): Use profile-dependent location of ilasm.
10236 2005-11-27 Zoltan Varga <vargaz@gmail.com>
10238 * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
10241 * basic.cs: Remove test_0_byte_compares test which was moved to
10242 objects.cs a long time ago.
10244 2005-11-22 Massimiliano Mantione <massi@ximian.com>
10246 * aliasing.c: Fixed aliasing issue on 64 bit archs.
10248 2005-11-20 Zoltan Varga <vargaz@gmail.com>
10250 * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
10251 handlers are called.
10253 * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
10256 * mini-ia64.c: Add support for the throw->branch exception
10259 * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
10261 2005-11-18 Massimiliano Mantione <massi@ximian.com>
10263 * mini.c: Enabled "fastpath" deadce :-)
10265 2005-11-18 Massimiliano Mantione <massi@ximian.com>
10267 * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
10268 alias analysis pass to support it.
10269 * mini.h: Likewise.
10271 * liveness.c: Likewise (liveness computation can use aliasing
10272 information to be more accurate).
10273 * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
10274 moreover made so that "--compile-all" uses the given optimization
10275 flags and not the default ones.
10276 * aliasing.c: Alias analysis (new file).
10277 * aliasing.h: Likewise.
10278 * Makefile.am: added "aliasing.c" and "aliasing.h".
10280 2005-11-17 Zoltan Varga <vargaz@gmail.com>
10282 * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
10285 2005-11-13 Zoltan Varga <vargaz@gmail.com>
10287 * mini-exceptions.c (mono_handle_exception_internal): Remove the
10288 fp >= end_of_stack exit condition, as it is not needed, and it might
10289 become true for fp eliminated frames.
10291 2005-11-11 Zoltan Varga <vargaz@gmail.com>
10293 * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
10296 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
10298 * mini-arm.c: fixed alignment of doubles/longs to match
10299 the C ABI (bug #76635).
10301 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
10303 * aot.c: fix compilation with --enable-minimal=aot.
10305 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
10307 * mini-arm.c: fixed compatibility with the new
10308 floating point emulator package for compares.
10310 2005-11-03 Atsushi Enomoto <atsushi@ximian.com?
10312 * mini.c : reverted sig->pinvoke changes (r51396-51397).
10314 2005-11-01 Zoltan Varga <vargaz@freemail.hu>
10316 * mini-exceptions.c (print_stack_frame): Output to stderr.
10317 (mono_handle_native_sigsegv): Ditto.
10319 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
10321 * mini-amd64.c (mono_arch_output_basic_block): Remove unused
10322 OP_LCONV_TO_OVF_I implementation.
10324 * mini-amd64.c: Add support for the throw->branch exception
10327 * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
10328 when the catch clause catches a more general exception, i.e. Object.
10330 2005-10-30 Zoltan Varga <vargaz@gmail.com>
10332 * cpu-ia64.md: Remove unused opcodes.
10334 * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
10335 specific defines for architectures defining USE_SIGACTION.
10337 * mini-ia64.c: Fix some warnings.
10339 * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
10340 version seemed to skip a frame.
10342 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
10344 * mini.c: Clean up the usage of sig->pinvoke flag. Now
10345 only calls which are made to native code use this flag.
10347 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
10349 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
10350 varargs methods as well.
10352 * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
10353 which have save_lmf set. Reorganize methods prologs a bit.
10355 * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
10356 debugger to the proper place.
10358 2005-10-29 Martin Baulig <martin@ximian.com>
10360 * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
10361 when running inside the debugger until the debugger has support
10364 2005-10-26 Zoltan Varga <vargaz@gmail.com>
10366 * mini.h: Fix a warning.
10368 2005-10-24 Miguel de Icaza <miguel@novell.com>
10370 * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
10371 we expose publicly, this returns the string.
10373 2005-10-22 Zoltan Varga <vargaz@freemail.hu>
10375 * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
10376 with fp elimination.
10378 2005-10-21 Zoltan Varga <vargaz@gmail.com>
10380 * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
10381 native stacktrace using the glibc 'backtrace' function if available.
10383 2005-10-20 Zoltan Varga <vargaz@gmail.com>
10385 * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
10387 * mini-exceptions.c (mono_handle_native_sigsegv): New function to
10388 handle SIGSEGVs received while in native code.
10390 * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
10391 code, call mono_handle_native_sigsegv which will abort the runtime
10392 after printing some diagnostics, instead of converting it into a
10393 confusing NullReferenceException.
10395 2005-10-18 Zoltan Varga <vargaz@gmail.com>
10397 * cpu-pentium.md: Remove unused opcodes.
10399 2005-10-18 Zoltan Varga <vargaz@freemail.hu>
10401 * mini-amd64.h (MonoLMF): Add rsp field.
10403 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
10406 2005-10-17 Zoltan Varga <vargaz@gmail.com>
10408 * mini-codegen.c (get_register_spilling): Fix some warnings.
10410 2005-10-16 Zoltan Varga <vargaz@freemail.hu>
10412 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
10413 elimination during exception handling. Enable fp elimination by
10416 * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
10419 2005-10-16 Martin Baulig <martin@ximian.com>
10421 * mini-exceptions.c
10422 (mono_debugger_run_finally): New public method for the debugger.
10424 2005-10-10 Zoltan Varga <vargaz@gmail.com>
10426 * debug-mini.c (mono_debug_init_method): Fix warning.
10428 * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
10429 the 'exname' parameter const to fix some warnings.
10431 2005-10-09 Zoltan Varga <vargaz@freemail.hu>
10433 * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
10434 introduced by the previous patch.
10436 2005-10-08 Zoltan Varga <vargaz@gmail.com>
10438 * basic-float.cs: Add test for precision of float arithmetic.
10440 * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
10441 when loading/storing single values from/to memory.
10443 * mini.c (mono_jit_compile_method_with_opt): Create the function
10444 pointers in the correct domain.
10446 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
10448 * mini-exceptions.c (mono_handle_exception_internal): Fix bug
10449 introduced by previous patch.
10451 * mini-exceptions.c (mono_handle_exception_internal): Handle the case
10452 when out_filter_idx is NULL.
10454 * mini-exceptions.c: Don't run filter clauses twice during exception
10455 handling. Fixes #75755.
10457 2005-10-07 Zoltan Varga <vargaz@gmail.com>
10459 * aot.c: Add support for ldflda wrappers.
10461 * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
10464 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
10466 * mini.c, mini.h: do not consider exception handlers blocks when
10467 setting up interface variables.
10469 2005-10-04 Zoltan Varga <vargaz@freemail.hu>
10471 * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
10473 2005-10-03 Zoltan Varga <vargaz@gmail.com>
10475 * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
10476 causes a regression.
10478 * mini.c (mini_thread_cleanup): Fix reading of freed memory.
10480 2005-10-02 Zoltan Varga <vargaz@freemail.hu>
10482 * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
10483 of the OP_P definitions.
10485 * TODO: Add a proposal for dealing with the CEE/OP mess.
10487 * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm
10488 optimizations from the x86 port.
10490 * cpu-amd64.md: Ditto.
10492 * basic.cs basic-long.cs: Add tests.
10494 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
10496 * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
10497 Patrik Torstensson's implementation of my exception-handling
10498 optimization idea, when the exception object is not used
10501 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
10503 * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
10504 of the mul_imm optimizations from the old jit.
10506 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
10508 * mini.c, liveness.c: patch by Patrik Torstensson and
10509 Zoltan Varga to improve performance in methods with
10512 2005-09-30 Zoltan Varga <vargaz@gmail.com>
10514 * driver.c: Remove 'Globalization' entry from --version.
10516 2005-09-28 Zoltan Varga <vargaz@gmail.com>
10518 * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
10519 there is a profiler interested in JIT events.
10521 * aot.c: Load profile files produced by the AOT profiling module, and
10522 reorder methods based on the profiling info. Add a 'method_order' table
10523 to the AOT file to make mono_aot_find_jit_info work with the reordered
10526 * mini.h: Bump AOT file version info.
10528 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
10530 * mini-arm.h: work around what looks like a gcc bug when optimizations
10533 2005-09-28 Raja R Harinath <rharinath@novell.com>
10535 * Makefile.am (AM_CFLAGS): Don't use += to append inside
10536 conditionals. Use ...
10537 (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
10539 2005-09-27 Zoltan Varga <vargaz@freemail.hu>
10541 * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
10542 to determine the amount of memory to copy when passing valuetypes.
10544 * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
10545 4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
10547 2005-09-27 Zoltan Varga <vargaz@gmail.com>
10549 * mini.h mini.c aot.c: Add infrastructure to collect pagefault
10550 information about aot.
10552 2005-09-27 Ben Maurer <bmaurer@ximian.com>
10554 * *.c: Replace the use of {Enter,Leave}CriticalSection with
10555 macros. This will allow a deadlock debugger to easily be plugged
10558 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
10560 * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
10562 2005-09-27 Raja R Harinath <rharinath@novell.com>
10564 * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
10565 (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
10566 (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
10567 ($(arch_built)) [CROSS_COMPILING]: Error out.
10569 2005-09-26 Zoltan Varga <vargaz@gmail.com>
10571 * aot.c: Add support for the no_special_static flag for classes.
10573 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
10575 * Reapply reverted patches.
10577 * *: Revert r50174 as well.
10579 * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
10581 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
10583 * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
10585 2005-09-23 Miguel de Icaza <miguel@novell.com>
10587 * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
10588 part of the SIG_HANDLER_SIGNATURE.
10590 2005-09-23 Zoltan Varga <vargaz@gmail.com>
10592 * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
10595 * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention
10596 introduced by previous patch.
10598 2005-09-21 Zoltan Varga <vargaz@gmail.com>
10600 * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
10601 saved registers too.
10603 * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based
10604 upon the information returned by get_call_info ().
10606 * mini-x86.c (add_float): Fix stack size calculation.
10607 (mono_arch_call_opcode): Rewrite this so it works based up the
10608 information returned by get_call_info ().
10609 (mono_arch_get_this_vret_args): Ditto.
10611 2005-09-21 Zoltan Varga <vargaz@freemail.hu>
10613 * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
10614 in cinfo to determine the registers which need to be used.
10616 2005-09-20 Miguel de Icaza <miguel@novell.com>
10618 * driver.c (mono_main): Add --server and --desktop flags.
10620 2005-09-16 Zoltan Varga <vargaz@gmail.com>
10622 * mini-ia64.h: Make register masks 64 bit. Don't treat argument
10623 registers as global registers.
10625 * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no
10626 longer needed with the new register allocator.
10628 * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
10630 * cpu-ia64.md: Remove unused opcodes.
10632 * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
10634 2005-09-16 Zoltan Varga <vargaz@freemail.hu>
10636 * cpu-amd64.md: Remove unused opcodes.
10638 * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
10639 needed with the new register allocator.
10641 * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
10644 2005-09-16 Raja R Harinath <rharinath@novell.com>
10646 * Makefile.am (check-local): Don't invoke semdel-wrapper.
10648 2005-09-16 Martin Baulig <martin@ximian.com>
10650 * exceptions-amd64.c
10651 (throw_exception): Don't call mono_debugger_throw_exception() if
10652 we're a rethrow - see the FIXME in the code.
10654 2005-09-15 Geoff Norton <gnorton@customerdna.com>
10656 * mini.c (mono_init_exceptions): This only works on some architectures.
10658 2005-09-15 Zoltan Varga <vargaz@gmail.com>
10660 * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
10663 * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
10665 * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
10666 now in mini-exceptions.c.
10668 2005-09-15 Zoltan Varga <vargaz@freemail.hu>
10670 * mini-amd64.h mini-am64.c: Remove the altstack support code which is
10671 now in mini-exceptions.c.
10673 2005-09-15 Zoltan Varga <vargaz@gmail.com>
10675 * exceptions-x86.c: Applied patch from Patrik Torstensson
10676 <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
10678 * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
10679 code into mini-exceptions.c. Add some assertions to it.
10681 2005-09-12 Zoltan Varga <vargaz@gmail.com>
10683 * aot.c (emit_section_change): Applied patch from "The Software Team"
10684 (<software@solmersa.com>). Fix as errors on windows.
10686 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
10688 * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
10689 method info into the LMF.
10691 2005-09-11 Zoltan Varga <vargaz@gmail.com>
10693 * mini-ia64.c: Add proper unwind info for method epilogs.
10695 * exceptions-ia64.c: Add some code to help debugging.
10697 * mini-ia64.c mini-ia64.h: Add sigaltstack support.
10699 * mini-exceptions.c: Fix warning.
10701 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
10703 * mini.c: Really fix build.
10705 * mini-x86.c mini-amd64.c: Fix build.
10707 2005-09-11 Zoltan Varga <vargaz@gmail.com>
10709 * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
10711 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
10712 some Interlocked methods as intrinsics.
10714 * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
10715 for Thread methods as well.
10717 * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
10719 * inssel.brg: Add rule for OP_MEMORY_BARRIER.
10721 * mini-ia64.c mini-x86.c mini-amd64.c
10722 cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of
10725 * mini.c (mono_init_exceptions): Fix build breakage.
10727 2005-09-10 Zoltan Varga <vargaz@gmail.com>
10729 * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
10730 of instructions. Use the new ia64_unw_op macros for emitting unwind
10733 * mini.c (mono_init_exceptions): Initialize exception handling
10734 related trampolines at startup.
10736 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
10738 * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
10740 2005-09-09 Zoltan Varga <vargaz@gmail.com>
10742 * mini.c: Handle type loading errors gracefully during compilation and
10743 throw the appropriate exception.
10745 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
10747 * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
10748 for the mono binary.
10750 2005-09-09 Martin Baulig <martin@ximian.com>
10752 * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
10755 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
10757 * mini-arm.h: use emulation for conv.r.un for the release.
10759 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
10761 * mini-arm.c, objects.cs: more fixes and tests for them.
10763 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
10765 * mini-arm.c: align structures to at least 4 bytes to be able
10766 to keep our current optimized memcpy.
10768 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
10770 * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
10772 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10774 * mini.c: ignore SIGPIPE.
10776 2005-09-04 Zoltan Varga <vargaz@gmail.com>
10778 * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
10780 * mini-ia64.h mini-ia64.c: Add some minor optimizations.
10782 2005-09-02 Zoltan Varga <vargaz@gmail.com>
10784 * mini.h: Add prototype for mono_allocate_stack_slots_full.
10786 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
10788 * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
10789 exception handling support.
10790 * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
10791 patch by Brian Koropoff <briank@marakicorp.com>).
10793 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
10795 * mini.c: revert another 'optimization' which breaks when
10796 items on the eval stack need to be saved at a basic block end
10799 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10801 * jit-icalls.c: for arrays, ensure we always provide
10804 2005-08-30 Zoltan Varga <vargaz@gmail.com>
10806 * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
10808 * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
10810 2005-08-29 Zoltan Varga <vargaz@gmail.com>
10812 * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
10813 arguments in their original register.
10815 2005-08-28 Zoltan Varga <vargaz@gmail.com>
10817 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
10820 * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
10821 when ssapre is enabled.
10823 * inssel-long.brg: Fix bug in previous patch.
10825 * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize
10826 multiplication by a constant.
10828 2005-08-27 Zoltan Varga <vargaz@gmail.com>
10830 * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
10833 * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
10836 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
10838 * inssel-arm.brg: apply changes tested by Brian Koropoff
10839 <briank@marakicorp.com>.
10841 2005-08-25 Zoltan Varga <vargaz@gmail.com>
10843 * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
10845 2005-08-24 Zoltan Varga <vargaz@gmail.com>
10847 * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
10848 to the same register if dreg is just a base register.
10849 (print_ins): Improve printing of membase opcodes.
10851 * inssel-x86.brg: Add optimized ldind(reg) rules.
10853 * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
10855 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
10857 * mini.c: when running under valgrind, set the stack bottom for
10858 the GC at the actual approximate stack for the app (fixes running
10859 mono with valgrind).
10861 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
10863 * mini.c: do no break at the first valuetype to init found
10864 (fixes bug #75791).
10866 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
10868 * cpu-arm.md, mini-arm.c: more fixes and LMF support.
10870 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
10872 * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
10874 2005-08-23 Zoltan Varga <vargaz@freemail.hu>
10876 * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
10878 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
10880 * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
10882 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
10885 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
10888 * mini.c (optimize_branches): Don't quit after 1000 iterations on large
10891 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
10893 * tramp-arm.c: allocate less memory for the trampoline and fix typo.
10895 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
10897 * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
10898 in the tail recursion optimization.
10900 * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as
10901 debug info into the assembly file.
10903 * iltests.il: Add test for filter regions.
10905 * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
10906 initial stack of filter regions. Fixes #75755.
10908 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
10910 * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
10911 stack requirements.
10913 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
10915 * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
10916 the check for an already compiled method on non-ia64 platforms.
10917 (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
10920 * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
10922 * inssel-x86.brg: Add some optimized call rules.
10924 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
10926 * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
10929 * mini.h mini-trampolines.c: Pass the trampoline argument to
10930 mono_arch_patch_delegate_trampoline.
10932 * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
10934 * mini-trampolines.c: Fix build.
10936 * mini-amd64.h: Add delegate trampolines.
10938 * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
10940 * inssel-amd64.brg: Add optimized call rules.
10942 * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
10944 * inssel-ia64.brg: Add optimized ldind(reg) rules.
10946 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
10948 * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
10951 * mini-ia64.c: Remove LMF fixmes.
10953 * mini-ia64.h: Remove most fields from LMF.
10955 * inssel-ia64.brg (stmt): Fix unaligned access errors.
10957 * mini-trampolines.c: Add support for IA64 function descriptors.
10959 * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
10960 for IA64 function descriptors.
10962 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
10964 * tramp-arm.c: patch the vtable for virtual calls. Added
10965 support code to register/unregister the LMF.
10966 * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
10969 2005-08-19 Dick Porter <dick@ximian.com>
10971 * mini.c: Use a gsize to store the thread ID, so it can hold a 64
10972 bit value if needed.
10974 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
10976 * mini.c (mini_get_method): Move handling of wrapper data here.
10978 * mini.c (mono_method_to_ir): Add support for dynamic methods.
10980 * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
10983 * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so
10984 bblock->code does not remain empty.
10986 2005-08-17 Zoltan Varga <vargaz@freemail.hu>
10988 * arrays.cs: Add regression test for #75832.
10990 * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
10991 rules. Fixes #75832.
10993 * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
10994 instruction scheduling.
10996 2005-08-12 Zoltan Varga <vargaz@freemail.hu>
10998 * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
11000 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
11002 * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
11004 * mini-codegen.c: Fix VC build.
11006 * cpu-pentium.md: Increase length of atomic_exhange_i4.
11008 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11010 * mini.h: fix signature for mono_register_opcode_emulation.
11012 2005-08-09 Zoltan Varga <vargaz@freemail.hu>
11014 * mini.c: Get rid of most of the helper_sig_... constants using
11015 mono_create_icall_signature ().
11017 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
11019 * jit-icalls.c (helper_ldstr): New helper function.
11021 * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
11023 * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
11024 throw, load the string using a helper call instead of creating a string object.
11026 * aot.c: Update after LDSTR changes.
11028 * mini.h: Bump AOT file version.
11030 * aot.c: Save class size info into the AOT file. Print more statistics during
11033 * mini.h: Bump AOT file version.
11035 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
11036 ordering of disasm cases. Fixes #74957.
11038 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
11040 * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
11041 jit-icalls.c, mini-codegen.c, Makefile.am: changes in
11042 the generic code needed for the ARM port.
11044 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
11046 * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
11047 inssel-arm.brg: more ARM features and fixes.
11049 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
11051 * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
11052 ARM port work in progress.
11054 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
11056 * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
11058 * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
11060 * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
11062 * inssel.brg (mini_emit_memset): Add support for unaligned access.
11064 * *-ia64.*: Ongoing IA64 work.
11066 * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
11068 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
11070 * TODO: Remove out-of-data todo stuff.
11072 * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
11075 * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
11077 * mini.h: Bump corlib version.
11079 2005-07-27 Martin Baulig <martin@ximian.com>
11082 (create_copy_ins): Added `const unsigned char *ip' argument; set
11083 `copy->cil_code' from it.
11085 2005-07-27 Martin Baulig <martin@ximian.com>
11087 * mini-exceptions.c (mono_handle_exception): Don't call
11088 mono_debugger_handle_exception() for filters.
11090 2005-07-27 Zoltan Varga <vargaz@freemail.hu>
11092 * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
11095 2005-07-26 Martin Baulig <martin@ximian.com>
11097 Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
11099 * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
11100 helper_compile_generic_method() if the method is actually virtual
11103 2005-07-26 Martin Baulig <martin@ximian.com>
11106 (trampoline_code): Renamed to `mono_trampoline_code' and made it
11107 public; this is now accessed directly by the debugger.
11108 (mono_generic_trampoline_code): Removed.
11111 (mono_debug_init_method): Also add interncalls and wrappers.
11113 2005-07-23 Zoltan Varga <vargaz@freemail.hu>
11115 * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
11117 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
11119 * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
11121 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
11123 * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
11125 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
11127 * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
11128 getting TLS offsets on AMD64 too.
11130 2005-07-20 Kornél Pál <kornelpal@hotmail.com>
11132 * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
11134 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
11136 * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
11137 inssel-arm.brg, mini-arm.h: ARM port work in progress.
11139 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
11141 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
11143 * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
11146 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call
11147 mono_sparc_is_virtual_call ().
11149 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
11151 * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
11152 trampoline parameters.
11154 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
11156 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
11157 to mono_arch_get_vcall_slot_addr.
11159 * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
11162 * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
11164 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
11166 * mini-ia64.h mini-ia64.c: Finish pinvoke support.
11168 2005-07-19 Martin Baulig <martin@ximian.com>
11170 * exceptions-amd64.c (throw_exception): Call
11171 mono_debugger_throw_exception() here like we're doing it on i386.
11173 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
11175 * mini-ia64.c: Add optimized TLS access support.
11177 2005-07-18 Zoltan Varga <vargaz@freemail.hu>
11179 * mini-exceptions.c: Ongoing IA64 work.
11181 * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
11183 * mini.c: Use the default optimization set when embedding. Fixes
11186 2005-07-11 Zoltan Varga <vargaz@freemail.hu>
11188 * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts
11189 of trampolines to a separate file.
11191 * mini-trampolines.c: New file.
11193 * mini.h tramp-x86.c: Move arch independent parts of trampolines to a
11196 * tramp-x86.c: Reorganize the trampoline code to be similar to the
11199 * mini-codegen.c: Fix cygwin build.
11201 2005-07-10 Zoltan Varga <vargaz@freemail.hu>
11203 * mini.c: Add some minor changes needed by the IA64 port.
11205 * *-ia64.*: Ongoing IA64 work.
11207 2005-07-09 Zoltan Varga <vargaz@freemail.hu>
11209 * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split
11210 trampolines into arch-independent and arch-dependent parts.
11212 * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
11214 2005-07-08 Zoltan Varga <vargaz@freemail.hu>
11216 * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
11218 * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
11219 the xp-regalloc-branch for amd64.
11221 * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
11222 xp-regalloc-branch for x86.
11224 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
11226 * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
11228 2005-07-06 Martin Baulig <martin@ximian.com>
11231 (mono_jit_compile_method_inner): Call mono_get_inflated_method().
11232 (mono_jit_runtime_invoke): Likewise.
11234 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
11236 * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
11239 * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
11240 without loading their metadata. Reorganize the file format so exception handling+
11241 debug info is kept separate from normal method info. Create MonoJitInfo
11242 structures for methods lazily.
11244 * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
11246 (x86_class_init_trampoline): Patch AOT class init trampolines too.
11248 * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
11250 * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
11253 * mini.h: Bump AOT file version.
11255 2005-07-04 Zoltan Varga <vargaz@freemail.hu>
11257 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
11259 2005-07-01 Raja R Harinath <rharinath@novell.com>
11261 * Makefile.am (check-local): Call semdel-wrapper.
11263 2005-06-29 Zoltan Varga <vargaz@freemail.hu>
11265 * mini-x86.c: Revert the last change as it seems to break the build..
11267 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
11269 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
11271 * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
11273 2005-06-27 Ben Maurer <bmaurer@ximian.com>
11275 * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
11276 outside of the macro, so strange stuff doesn't happen with gcc4
11277 (NEW_AOTCONST_TOKEN): Likewise.
11279 2005-06-28 Martin Baulig <martin@ximian.com>
11281 * mini.c (mini_class_is_system_array): New static method; use this
11282 instead of `klass->parent == mono_defaults.array_class' everywhere
11283 since this also works for the new generic array class.
11285 2005-06-26 Ben Maurer <bmaurer@ximian.com>
11287 * inssel.brg: Remove warnings.
11289 2005-06-24 Zoltan Varga <vargaz@freemail.hu>
11291 * mini-ia64.c: Ongoing IA64 work.
11293 * basic-float.cs: Add float->i1 conversion test.
11295 * iltests.il: Add conv.u4 test.
11297 2005-06-23 Zoltan Varga <vargaz@freemail.hu>
11299 * inssel-long.brg: Fix bug caused by last change.
11301 2005-06-23 Geoff Norton <gnorton@customerdna.com>
11303 * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other
11304 BSDs. Allows the x86 JIT to work on OSX86
11306 2005-06-22 Zoltan Varga <vargaz@freemail.hu>
11308 * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
11311 * mini-ia64.c: Ongoing IA64 work.
11313 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
11315 * mini-ia64.c: Ongoing IA64 work.
11317 * driver.c: Clean up jit_code_hash as well when using --regression.
11319 * inssel-long.brg: Fix long->i4/u4 conversion rules.
11321 * basic-long.cs: Add tests for long->u4 conversion.
11323 2005-06-18 Ben Maurer <bmaurer@ximian.com>
11325 * mini.c: Take mono_get_domainvar out of macros. This makes sure
11326 that we do not depend on undefined C behavior: the order stuff
11327 gets evaluated within an expression. Fixes mono when compiled on
11330 2005-06-18 Zoltan Varga <vargaz@freemail.hu>
11332 * *-ia64.*: Ongoing IA64 work.
11334 * aot.c: Lower memory usage while loading AOT methods.
11336 * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
11338 * mini.h: Bump AOT file format version.
11340 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
11342 * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
11344 2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
11346 * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
11347 not on callee assembly). Fixed some comments.
11349 2005-06-16 Zoltan Varga <vargaz@freemail.hu>
11351 * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
11352 it gets proper disassembly.
11353 (emit_method_info): Remove some dead code.
11355 * mini.c (mini_method_compile): Allways allocate the GOT var in
11356 mono_method_to_ir for emulating opcodes.
11358 2005-06-13 Zoltan Varga <vargaz@freemail.hu>
11360 * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
11361 before freeing the code memory. Fixes #74990.
11363 * objects.cs: Add regression test for #74992.
11365 * liveness.c: Extend live ranges of arguments to the beginning of the
11366 method. Fixes #74992.
11368 * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
11369 so it points into the faulting instruction.
11371 2005-06-12 Zoltan Varga <vargaz@freemail.hu>
11373 * jit-icalls.c (mono_imul_ovf): Add exception handling.
11375 * *-ia64.*: Ongoing IA64 work.
11377 * mini.c (mini_init): Fix signature of mono_delegate_ctor.
11379 2005-06-11 Zoltan Varga <vargaz@freemail.hu>
11381 * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
11383 * *-ia64.*: Ongoing IA64 work.
11385 2005-06-10 Zoltan Varga <vargaz@freemail.hu>
11387 * basic-long.cs: Add tests for add/sub.ovf.
11389 * basic.cs: Add tests for sub.ovf.
11391 * *-ia64.*: Ongoing IA64 work.
11393 2005-06-09 Zoltan Varga <vargaz@freemail.hu>
11395 * *-ia64.*: Ongoing IA64 work.
11397 * basic.cs: Add conv.ovf.i4.un test.
11399 2005-06-09 Massimiliano Mantione <massi@ximian.com>
11401 * mini.c: (remove_block_if_useless) Fixed bug 75061.
11403 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11405 * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
11407 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
11409 * *-ia64.*: Ongoing IA64 work.
11411 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11414 * mini.c: added the ability to toggle trace on/off using SIGUSR2.
11416 2005-06-04 Zoltan Varga <vargaz@freemail.hu>
11418 * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
11420 2005-06-03 Zoltan Varga <vargaz@freemail.hu>
11422 * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
11424 * mini-amd64.c (amd64_patch): Add an assert to check that the destination
11425 of a call is callable by a near call.
11427 2005-05-31 Zoltan Varga <vargaz@freemail.hu>
11429 * mini-ia64.c: Ongoing IA64 work.
11431 2005-05-29 Zoltan Varga <vargaz@freemail.hu>
11433 * genmdesc.c: Make the generated array non-static.
11435 * inssel-long.brg: Fix LSHR_IMM rule.
11437 * *-ia64.*: Ongoing IA64 work.
11439 * *-ia64.*: Ongoing IA64 work.
11441 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
11443 * *-ia64.*: Ongoing IA64 work.
11445 * *-ia64.*: Ongoing IA64 work.
11447 * mini-ia64.c: Ongoing IA64 work.
11449 * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
11451 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
11453 * objects.cs basic-calls.cs: Move some tests to objects.cs.
11455 * objects.cs basic-long.cs: Move some tests to objects.cs.
11457 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
11459 * *-ia64.*: Ongoing IA64 work.
11461 * iltests.il: Add a new test.
11463 * mini.c (mono_method_to_ir): Initialize valuetypes when created using
11464 newobj. Fixes #75042.
11466 2005-05-22 Zoltan Varga <vargaz@freemail.hu>
11468 * *-ia64.*: Ongoing IA64 work.
11470 * *-ia64.*: Ongoing IA64 work.
11472 * *-ia64.*: Ongoing IA64 work.
11474 * basic.cs objects.cs: Move tests accessing static variables as well.
11476 * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
11478 2005-05-21 Zoltan Varga <vargaz@freemail.hu>
11480 * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
11482 * driver.c: Always print failed tests.
11484 * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
11487 * *ia64*: Ongoing IA64 work.
11489 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
11491 * basic.cs: Add tests for add.ovf. Fix warnings.
11493 2005-05-18 Miguel de Icaza <miguel@novell.com>
11495 * driver.c (mono_main): Avoid crash if no argument is passed to
11496 --break; Do not use g_error, but f_printf. And fix all other
11497 ocurrences of the same crash.
11499 2005-05-17 Zoltan Varga <vargaz@freemail.hu>
11501 * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
11502 and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
11505 2005-05-14 Zoltan Varga <vargaz@freemail.hu>
11507 * *-ia64.*: Add beginnings of IA64 backend.
11509 * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.
11511 2005-05-13 Zoltan Varga <vargaz@freemail.hu>
11513 * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
11516 * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
11518 * mini-amd64.c: Fix a warning.
11520 2005-05-10 Zoltan Varga <vargaz@freemail.hu>
11522 * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
11523 in float_neg. Fixes #74897.
11525 * mini-amd64.c (emit_call): Fix another near call bug.
11527 2005-05-06 Sebastien Pouliot <sebastien@ximian.com>
11529 * declsec.c: Keep the appdomain information in the structure. Added a
11530 missing "return FALSE" for Unmanaged if FullTrust is set (or else the
11531 value gets overwritten).
11532 * declsec.h: Set the default MonoArray for the the stack to 6. Added
11533 an MonoAppDomain member to MonoSecurityFrame.
11534 * mini-exceptions.c: Do not use a glist to keep GC allocated objects
11535 used in the stack walk. Now use a MonoArray which grow (double) when
11538 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
11540 * mini.c: Re-enabled runtime cleanup, since running threads should
11541 now properly stop when exiting.
11543 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
11545 * mini-codegen.c: New file contaning the arch-independent local
11546 register allocator. Not used by any architectures yet.
11548 * mini.h linear-scan.c: Merge some changes from the
11549 mini-xp-local-regalloc branch.
11551 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
11553 * mini-amd64.c (emit_call): Fix calls to native functions when the
11554 runtime is compiled as a shared library. Fixes #74756.
11556 * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
11557 on a literal field. Fixes #74751.
11559 2005-04-25 Raja R Harinath <rharinath@novell.com>
11561 * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
11563 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
11565 * objects.cs: Add missing null casting test.
11567 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
11569 * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
11570 in wrapper methods. Also rename 'address' variable to 'offset'.
11572 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
11574 * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
11577 * Makefile.am (MCS): Use -unsafe instead of --unsafe.
11579 * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
11582 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
11584 * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
11586 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
11588 * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
11589 just the last bytes.
11591 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
11593 * aot.c (mono_compile_assembly): Fix warning.
11595 * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
11596 by the _MSC_VER stuff.
11598 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
11600 * inssel-long.brg: Fix #74588.
11602 * cpu-amd64.md: Fix #74591.
11604 * iltests.il: Add new regression tests.
11606 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
11608 * trace.c (mono_trace_enter_method): Print enums as an int, not as a
11611 2005-04-11 Zoltan Varga <vargaz@freemail.hu>
11613 * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
11615 * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches
11616 from Bill Middleton <flashdict@gmail.com>.
11618 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
11620 * arrays.cs: Add new regression test. Fix warnings.
11622 2005-04-09 Zoltan Varga <vargaz@freemail.hu>
11624 * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
11625 and leakage in CKFINITE.
11627 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
11628 this to a null op since it is called on amd64 too.
11630 * exceptions-amd64.c (get_throw_trampoline): Align stack.
11632 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
11633 body since this is not used on amd64.
11635 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
11637 * mini-amd64.c: Remove obsolete fixmes.
11639 * mini.c (print_method_from_ip): Fix debugging support.
11641 2005-2-1 Massimiliano Mantione <massi@ximian.com>
11643 * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
11644 so that expressions that don't give much gain are not reduced.
11645 * ssapre.h: Likewise.
11647 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
11649 * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
11651 * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
11653 * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
11655 2005-04-01 Zoltan Varga <vargaz@freemail.hu>
11657 * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
11659 * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
11661 2005-03-31 Zoltan Varga <vargaz@freemail.hu>
11663 * mini-x86.c: If sigaltstack support is enabled, perform win32 style
11666 * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
11668 * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
11670 * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
11672 * mini-x86.h mini-x86.c exceptions-x86.c: Add support for
11673 MONO_ARCH_USE_SIGACTION. Fixes #74252.
11675 * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
11677 * mini-x86.c: Fix up stack overflow handling.
11679 * exceptions.cs: Add new regression test.
11681 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
11683 * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
11684 mono_jit_thread_attach.
11686 * mini.c (mono_method_to_ir): Verify called method is not abstract.
11688 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
11690 * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
11691 avoid calling constructors using callvirt.
11693 * inssel.brg: Fix #74073.
11695 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
11697 * aot.c, mini.h: Added mono-compiler.h header to allow/ease
11698 compilation with non-GCC compilers.
11699 * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
11700 possible using VS.NET. Adapted from the work of J Lothian (for VC6).
11702 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
11704 * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
11705 klass->interface_offsets (will likely fix bug#74073).
11707 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
11709 * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
11711 2005-03-28 Zoltan Varga <vargaz@freemail.hu>
11713 * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
11714 to amd64_div_reg_size ().
11716 * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
11718 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
11720 * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
11722 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
11724 * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
11726 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
11728 * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
11730 * mini.c (mono_precompile_assembly): Load and precompile referenced
11731 assemblies as well. Fixes #74015.
11733 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
11735 * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
11737 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
11739 * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
11740 a lot of checks and (anyway) permissions cannot work until corlib is
11743 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
11745 * mini-ppc.c: fixed ABI issue on sysv/ppc.
11747 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
11749 * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
11750 calls (fixes bug#72824).
11752 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
11754 * mini.c: fix tail recursion elimination (see test in bug#73936).
11756 2005-03-21 Zoltan Varga <vargaz@freemail.hu>
11758 * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
11759 some fp functions in sse2 mode.
11761 2005-03-20 Zoltan Varga <vargaz@freemail.hu>
11763 * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
11765 2005-03-19 Zoltan Varga <vargaz@freemail.hu>
11767 * mini.h mini.c: Add mono_get_jit_tls_key ().
11769 * mini-x86.c: Enable fast TLS support on windows.
11771 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
11773 * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
11774 * mini.c: Check for p/invoke method when generating code. If a
11775 p/invoke method, or it's class, isn't decorated with [Suppress
11776 UnmanagedCodeSecurity] then generate code to call System.Security.
11777 UnmanagedDemand (only if the security manager is active).
11779 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
11781 * tramp-amd64.c (create_specific_trampoline): Revert parts of the
11782 last change as it seems to cause strange crashes.
11784 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11786 * *.c: handle unsafe function pointers where needed.
11788 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
11790 * mini.c (mono_jit_free_method): Remove the fixme too.
11792 2005-03-15 Miguel de Icaza <miguel@novell.com>
11794 * mini.c: As discussed, make the code actually free the delegate
11795 thunk now, to enable the debugging of delegate problems, use
11796 MONO_DEBUG=1 when running Mono.
11798 This takes also care of parts of the leaks as seen by Joe.
11800 2005-03-15 Zoltan Varga <vargaz@freemail.hu>
11802 * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable
11803 thread_tls_offset calculation.
11805 2005-03-14 Sebastien Pouliot <sebastien@ximian.com>
11807 * declsec.c: Reworked linkdemand checks for icall. The previous code
11808 was using the declaration code (untrusted) and didn't work as expected
11809 with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
11812 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
11814 * iltests.il: Add new localloc test.
11816 * mini-amd64.c: Handle large stack allocations the same way as on
11817 windows if stack overflow handling is working.
11819 * mini-amd64.c: Allocate the signal stack using mmap.
11821 * mini.c (sigsegv_signal_handler): Fix reading of context.
11823 * mini-exceptions.c: Fix up stack overflow handling.
11825 * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
11827 * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
11829 * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
11831 * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
11833 * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
11834 tramp_init functions as they are no longer needed.
11836 2005-03-12 Zoltan Varga <vargaz@freemail.hu>
11838 * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
11840 * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
11842 * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
11844 * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
11847 * mini-ops.h: Add OP_LMUL_IMM.
11849 * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
11850 long mul/div opcodes as intrinsic.
11852 * mini-amd64.c (emit_call): Handle the case when the callee might be
11855 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
11857 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
11860 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
11862 * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
11864 2005-03-09 Ben Maurer <bmaurer@ximian.com>
11866 * mini.c (mono_codegen): Don't leak here, to help people running
11869 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
11871 * mini-amd64.c (mono_arch_output_basic_block): Fix int->float
11872 conversions in sse2 mode.
11874 * basic-float.cs: Add regression test.
11876 * mini-amd64.c: Reenable sse2.
11878 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
11880 * mini-amd64.c: Disable sse2 until some regressions are fixed.
11882 2005-03-07 Joerg Rosenkranz <joergr@voelcker.com>
11884 * driver.c: Copyright text should include 2005.
11886 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
11888 * cpu-amd64.md (load_membase): Fix more max lengths.
11890 2005-03-06 Zoltan Varga <vargaz@freemail.hu>
11892 * cpu-amd64.md (load_membase): Fix max length.
11894 * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
11896 * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
11898 * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
11899 support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
11901 * basic-float.cs: Add rounding regression test.
11903 * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
11905 2005-03-04 Neale Ferguson <NealeFerguson@earthlink.net>
11907 * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
11908 structures in registers for pinvoke wrappers.
11910 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
11912 * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
11914 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
11916 * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
11917 wrapper to mono_jit_thread_attach.
11919 * mini.c (mini_jit_thread_attach): New jit icall.
11921 * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in
11922 native->managed wrappers.
11924 * exceptions.cs: Add new regression test.
11926 * mini.c (optimize_branches): Check regions in the cbranch to throw
11927 block case as well. Fixes #73242.
11929 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
11931 * mini.c: thread safety fixes.
11933 2005-02-27 Zoltan Varga <vargaz@freemail.hu>
11935 * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
11936 patching stuff, since delegates use jump trampolines so there is
11939 * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in
11942 * tramp-amd64.c: Fix build.
11944 * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
11945 it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
11947 * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
11948 Rename this to mono_arch....
11949 (mono_amd64_get_delegate_method_ptr_addr): Ditto.
11951 * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
11953 * mini-amd64.c (emit_call): If both the caller and the callee is
11954 guaranteed to have 32 bit addresses, emit a normal call.
11956 * tramp-amd64.c: Adapt to changes in mini-amd64.c.
11958 * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines.
11959 * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
11960 method_ptr inside delegates.
11962 2005-02-26 Zoltan Varga <vargaz@freemail.hu>
11964 * mini.c (mono_jit_free_method): Free the method info even if the native code is
11965 invalidated. Fixes #73001.
11967 * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
11969 * mini-x86.c: Only use stdcall for pinvokes on windows.
11971 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
11973 * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
11974 * mini-x86.c: remove unreliable __thread var offset detection,
11975 use the correct accessors and enable by default.
11977 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
11979 * mini.c (mono_jit_free_method): Fix memory leak.
11981 2005-02-22 Zoltan Varga <vargaz@freemail.hu>
11983 * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW.
11985 2005-02-21 Zoltan Varga <vargaz@freemail.hu>
11987 * cpu-amd64.md: Fix lengths of atomic opcodes.
11989 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
11991 * driver.c: try to not imply using ICU is any good.
11993 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
11995 * mini-amd64.c (mono_arch_get_inst_for_method): Implement more
11996 functions as inline ops.
11998 * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
11999 some Interlocked functions as inline ops.
12001 * mini.c (move_basic_block_to_end): Fix bug in last patch.
12003 * mini.h (MonoBasicBlock): Reorganize fields a bit.
12005 * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
12007 * mini.c: Add support for OP_NOT_TAKEN.
12009 * mini-amd64.h mini-amd64.c: Add support for passing/returning small
12010 structures in registers for pinvoke wrappers.
12012 * mini-amd64.c: Fix warnings.
12014 2005-02-19 Zoltan Varga <vargaz@freemail.hu>
12016 * mini.h (MonoCompile): Add 'ret_var_is_local' field.
12018 * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
12020 * mini.c (NEW_RETLOADA): If the ret variable is a local, use its
12021 address instead of loading the address from it.
12023 * mini-x86.c: Add support for returning small structs in registers
12024 on Win32. Fixes part of #70864.
12026 2005-02-18 Zoltan Varga <vargaz@freemail.hu>
12028 * trace.c (get_token): Improve error checking.
12030 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
12032 * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
12034 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
12036 * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
12037 it can be reused for MonoClass.
12038 * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
12041 2005-02-15 Sebastien Pouliot <sebastien@ximian.com>
12043 * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code
12044 instead of a MonoReflectionMethod. The method information wasn't used
12045 when displaying SecurityException details (but will be now).
12047 2005-02-15 Atsushi Enomoto <atsushi@ximian.com>
12049 * Makefile.am : windows build fix.
12051 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
12053 * iltests.il: Add new regression test.
12055 * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
12058 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
12060 * mini.c: Moved linkdemand check into helper function check_linkdemand
12061 to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP,
12064 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
12066 * declsec.c: Added statistics counter for different kinds of
12068 * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
12069 (and commented) declaration.
12070 * mini.c: Added statistics counter for security Demand code
12071 generation. Added display of security statistics.
12073 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
12075 * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
12076 Fix compilation errors under gcc-2.95.
12078 2005-02-12 Ben Maurer <bmaurer@ximian.com>
12080 * mini.c, driver.c: Use the new jit trampoline hashtable
12082 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
12084 * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
12086 2005-02-11 Martin Baulig <martin@ximian.com>
12088 * debug-mini.c (mono_debug_close_method): Free the line number array.
12090 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
12092 * aot.c: Break up large methods into smaller ones. Share GOT slots for
12095 * mini.h: Bump AOT file format version.
12097 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
12099 * declsec.c: Added LinkDemand support and it's special cases for ECMA,
12101 * declsec.h: Added macros to get/set lazyly initialized security
12102 informations about assemblies. Added new enum for different type of
12103 possible LinkDemand violation. Added function to check LinkDemands.
12104 * mini.h: Added a field to MonoCompile to hold any security violation
12105 detected when JITting a method (so it can be thrown later).
12106 * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL
12107 and CEE_CALLVIRT. Added code to throw exception at the end of
12108 mini_method_compile (note: the exception is unhandled right now).
12110 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
12112 * mini.c, jit-icalls.c: use the managed implementation of
12113 memset for initobj and memset, to avoid managed <-> unmanaged
12116 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
12118 * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
12119 optimization if it would need a GOT var.
12121 * basic.cs: Add tests for constant propagation and switch statements.
12123 * ssa.c: Fix out-of-range constant propagation and switch statements.
12125 2005-02-09 <vargaz@freemail.hu>
12127 * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
12129 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
12131 * cpu-amd64.md (load_membase): Fix max length of load_membase.
12133 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
12135 * mini.c: update to new signature of mono_class_get_allocation_ftn().
12137 2005-02-06 Neale Ferguson <NealeFerguson@earthlink.net>
12139 * cpu-s390.md, mini-s390.c: Correct bug with register usage on certain
12140 arithmetic operations.
12142 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
12144 * mini-ppc.c: add a workaround for broken user code that
12145 DllImports vararg functions with non-vararg signatures.
12147 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
12149 * mini.c (mono_jit_compile_method_inner): Add detection and a
12150 meaningfull error message for assemblies written in Managed C++.
12152 * tramp-amd64.c mini-amd64.h: Add support for
12153 create_trampoline_from_token ().
12155 * aot.c mini-x86.c abcremoval.c: Applied patch from
12156 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
12158 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
12160 * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline
12161 which takes a MonoImage/token as parameter instead of a MonoMethod.
12163 * aot.c: Use the new trampoline for initializing vtables.
12165 * aot.c: Add support for ldfld/stfld_remote wrappers.
12167 * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
12168 rules for compare <MEM>, IMM.
12170 * mini.h (MONO_AOT_FILE_VERSION): Bump it.
12172 * aot.c: Handle inherited finalizers correctly.
12174 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
12176 * inssel.brg (stmt): Add a missing _setup_... ().
12178 * aot.c: Save some parts of the class state to the AOT file and use it
12179 to recompute that state when a class is initialized.
12181 * mini.c: Install AOT hooks into the runtime.
12183 * mini.h: Bump AOT file format version.
12185 * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
12188 * iltests.il: Add new test.
12190 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
12192 * mini.c: fix typo.
12194 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
12196 * mini.c: setup the statistical profiler in the thread attach
12197 callback to cope with the new single thread code.
12199 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
12201 * mini-ppc.c: ensure we have enough room for the profiler
12202 calls (fixed bug#72084).
12204 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
12206 * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding
12209 2005-2-1 Massimiliano Mantione <massi@ximian.com>
12211 * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
12213 2005-2-1 Massimiliano Mantione <massi@ximian.com>
12215 * ssapre.c: Fixed an issue with down safety (this allows IronPython
12216 to succesfully execute parrotbench).
12217 * ssapre.h: Likewise.
12219 2005-2-1 Massimiliano Mantione <massi@ximian.com>
12221 * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
12222 variable for stores to method arguments (fixes a SSAPRE issue).
12224 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
12226 * mini.c: handle value types in dup, fixes gen-112.cs.
12228 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
12230 * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
12231 sequence for calls in dynamic methods to avoid thunks.
12233 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
12235 * mini.c: correctly remove dynamic methods from the hashtable.
12237 2005-1-20 Massimiliano Mantione <massi@ximian.com>
12239 * driver.c: Disabled SSAPRE until fix the bug that appears
12240 in IronPython's parrotbench.
12242 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
12244 * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
12246 * mini.c (mono_method_to_ir): Revert the previous change.
12248 * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
12249 when AOT compiling.
12251 * tramp-x86.c (x86_magic_trampoline): Avoid calls to
12252 mono_jit_info_table_find () etc. when running under valgrind.
12254 * inssel.brg: Fix warnings.
12256 * mini-exceptions.c: Fix warnings.
12258 2005-01-31 Martin Baulig <martin@ximian.com>
12260 * driver.c (compile_all_methods_thread_main): Don't try to compile
12261 generic methods or anything which has type parameters.
12263 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
12265 * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
12267 * TestDriver.cs: Add --verbose flags.
12269 * graph.c ssa.c: Fix 64 bit warnings.
12271 * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c
12272 trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
12273 Fix 64 bit warnings.
12275 * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
12276 variable not spotted by gcc.
12278 * mini-amd64.c inssel-amd64.brg: Applied patch from
12279 Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of
12280 X86_COMPARE_MEMBASE opcodes.
12282 * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
12284 2005-01-29 Ben Maurer <bmaurer@ximian.com>
12286 * *: MonoMethod->signature might be NULL now. You *MUST* use
12287 mono_method_signature.
12289 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
12291 * driver.c (compile_all_methods_thread_main): Compile the methods
12292 without invoking cctors.
12294 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
12296 * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
12297 * basic-calls.cs: test for the above.
12299 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
12301 * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after
12302 MonoJitInfo changes.
12304 2005-01-27 Zoltan Varga <vargaz@freemail.hu>
12306 * mini-exceptions.c (mono_handle_exception): Compute the stack trace
12307 eagerly if it contains dynamic methods.
12309 * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
12311 * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
12312 trace, it is now computed by an icall from trace_ips.
12314 * mini-exceptions.c: Fix a warning.
12316 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
12318 * mini-exceptions.c: don't bother getting stack trace info if
12319 it's not going to be used.
12321 2005-01-27 Raja R Harinath <rharinath@novell.com>
12323 * Makefile.am (common_sources): Add ssapre-cee-ops.h and
12326 2005-01-26 Zoltan Varga <vargaz@freemail.hu>
12328 * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
12330 * aot.c: Avoid calling mono_method_get_header () if not needed.
12332 * mini.h: Bump AOT file format version.
12334 * mini.c (mono_emit_native_call): Allocate a GOT var here.
12336 * mini.c (mono_print_tree): Print more info for calls.
12338 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
12340 * declsec.h: Remove warning by adding missing include for marshal.h
12342 2005-01-26 Martin Baulig <martin@ximian.com>
12344 * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
12347 2005-01-25 Zoltan Varga <vargaz@freemail.hu>
12349 * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
12352 * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
12354 * aot.c (mono_compile_assembly): Fix a warning.
12356 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
12358 * declsec.c: Look for security attributes on the original MonoMethod
12359 (and not the wrapped one). This fix permissions on icalls.
12361 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
12363 * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
12365 * mini.c (mono_allocate_stack_slots): Add a fixme.
12367 * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
12369 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
12371 * inssel.brg: optimize casts of sealed types (more
12372 optimizations waiting for fixes in remoting).
12374 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
12376 * inssel.brg (stmt): Add another dummy rule.
12378 * driver.c: Fix warnings.
12380 * driver.c (mono_main): If running under valgrind, instruct glib to use
12381 the system allocation functions so valgrind can track the memory
12382 allocated by the g_... functions.
12384 * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
12386 * mini-ops.h: Add OP_DUMMY_STORE opcode.
12388 * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
12390 * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
12391 variables in try regions.
12393 * mini.c (mini_method_compile): Don't disable optimizations on large
12394 methods when AOT compiling.
12396 * mini.c (mono_allocate_stack_slots): New arch independent method to
12397 allocate stack slots. Not yet used.
12399 2005-01-22 Ben Maurer <bmaurer@ximian.com>
12401 * debug-mini.c (mono_debug_close_method): Plug some leaks.
12403 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
12405 * mini-ppc.c: make the branch info relative as the code
12406 buffer can be reallocated.
12408 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
12410 * aot.c: Allow decoding of the new MONO_PATCH_INFO_DECLSEC.
12411 * driver.c: Removed the AOT/security restriction. Now initialize the
12412 security manager (in metadata) if --security is used.
12413 * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
12414 rather than the pointer to declarative security, when AOT is used.
12416 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
12418 * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
12419 basic blocks, reduced intrinsic exception throwing code size.
12421 2005-01-22 Miguel de Icaza <miguel@ximian.com>
12423 * driver.c (mini_usage): Reorder the usage screen.
12425 2005-01-21 Zoltan Varga <vargaz@freemail.hu>
12427 * mini.c (mono_resolve_patch_target): Fix warning.
12429 2005-01-20 Zoltan Varga <vargaz@freemail.hu>
12431 * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
12434 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
12436 * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
12437 breaks the amd64 build.
12439 * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem
12440 register allocation. Fixes #71454.
12442 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
12444 * arrays.cs: Add new regression test.
12446 2005-1-20 Massimiliano Mantione <massi@ximian.com>
12448 * ssapre.c: Turned usage of snprintf to GString.
12449 * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
12450 (I left it on by mistake in my previous commit).
12452 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
12454 * mini.c, cfold.c, basic-calls.cs: preserve side effects
12455 on cond branch optimization (fixes bug# 71515).
12457 2005-1-20 Massimiliano Mantione <massi@ximian.com>
12459 * abcremoval.c: Fixed bug 71062.
12460 * abcremoval.h: Likewise.
12462 2005-1-20 Massimiliano Mantione <massi@ximian.com>
12464 * mini.c: Added a new functionality to optimize_branches, the removal
12465 of useless basic blocks, and fixed some problem in the removal of
12466 critical edges; some utility functions added for both purposes.
12467 * ssapre.c: Added complex expression support, and fixed bug 70637.
12468 * ssapre.h: Likewise.
12469 * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
12471 * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
12472 * driver.c: Re-enabled SSAPRE.
12474 2005-01-19 Martin Baulig <martin@ximian.com>
12476 * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
12477 the result of mono_get_method_constrained().
12479 2005-01-18 Neale Ferguson <NealeFerguson@earthlink.net>
12481 * exceptions-s390.c tramp-s390.c: Allocate code using the global code
12484 2005-01-18 Geoff Norton <gnorton@customerdna.com>
12486 * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
12487 be detected. Fixes #59296.
12489 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
12491 * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
12492 which can happen. Fixes #71361.
12494 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
12496 * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
12499 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
12501 * mini.c (mono_create_jump_trampoline): Revert last change as it causes
12502 appdomain-unload.exe to fail.
12504 * mini.c: Fix some memory leaks.
12506 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
12508 * inssel.brg: handle the new size of rank, idepth, max_interface_id.
12509 Fixed bug and sped up some codepaths.
12511 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
12513 * mini.c: Fix some memory leaks.
12515 * exceptions.cs basic-long.cs: Add test for checked ulong->int
12518 * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
12520 * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
12523 * iltests.il: Add regression test for #71320.
12525 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
12527 * mini.c (mono_codegen): Fix installation of profiler hooks.
12529 * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
12531 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
12533 * mini.h, mini.c, cfold.c: optimize access to enum
12534 readonly fields, too. Eval conditional branches if possible
12535 to perform unreachable code removal in more cases.
12537 2005-01-15 Zoltan Varga <vargaz@freemail.hu>
12539 * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
12541 * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
12544 * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
12545 WinXP DEP. Fixes #71244.
12547 2005-01-14 Zoltan Varga <vargaz@freemail.hu>
12549 * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
12551 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
12553 * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
12555 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
12557 * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo
12560 * mini.h: Bump AOT version.
12562 * mini.h (MonoCompile): Change exvar to a hash table.
12564 * mini.c: Allocate a separate exvar for each handler block.
12566 * mini.c: Get rid of the computation of filter_lengths, its not needed.
12568 * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
12569 ex var with the pending exception and only throw if the two are equal.
12572 * exceptions.cs: Add tests for rethrow and nested catch clauses.
12574 * mini-x86.c: Fix warnings.
12576 * Makefile.am (common_sources): Move mini-exceptions.c here as it is
12577 used by all the ports now.
12579 * aot.c: Add write-symbols and save-temps options.
12581 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
12583 * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
12585 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
12587 * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx
12590 * tramp-s390.c: Check vtable slot belongs to the domain.
12592 * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
12593 as per other platforms.
12595 * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
12597 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
12599 * driver.c: we don't run the Main() code in a subthread anymore.
12601 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
12603 * mini.c: added experimental rtc support in the statistical
12604 profiler: if the user has the permission, more accurate statistics
12605 are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
12606 The MONO_RTC value must be restricted to what the linux rtc allows:
12607 power of two from 64 to 8192 Hz.
12609 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
12611 * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
12613 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
12615 * mini-ppc.c: better icache flush for smp.
12617 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
12619 * mini-amd64.c (emit_move_return_value): Fix memory leak.
12621 * mini-x86.c (get_call_info): Add the get_call_info () code from the
12622 amd64 port, not yet used.
12624 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
12626 * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
12629 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
12631 * driver.c: Added --security option to activate the security manager.
12632 Right now this will allow code generation for declarative demands and
12633 is disabled when AOT is specified.
12634 * mini.c: Add code generation for declarative security demands.
12635 * mini.h: Add mono_use_security_manager as an extern gboolean.
12637 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
12639 * aot.c (mono_compile_assembly): Speed up compilation a bit by
12640 emitting more dense assembly code.
12642 * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
12643 exception throwing stuff.
12645 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
12647 * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
12650 * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
12651 left in by mistake.
12653 * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is
12656 * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
12658 * tramp-*.c: Only patch vtable slots if the object is in the current
12659 domain. Fixes appdomain-unload.exe.
12661 * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
12663 * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
12666 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
12668 * mini.c (reverse_branch_op): New helper function.
12670 * mini.c (optimize_branches): Run the new optimization only on
12671 platforms which support it. Also reverse all kinds of branches.
12673 * mini.h (MonoBasicBlock): Add 'out_of_line' field.
12675 * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
12678 * mini.c (optimize_branches): Reverse not-equals branches if the false
12679 bblock is a throw. This happens a lot of time with argument checking in
12682 * mini.c (mono_codegen): Add support for placing basic blocks after
12683 the function epilogue.
12685 * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
12688 2005-01-05 Miguel de Icaza <miguel@ximian.com>
12690 * mini.c (setup_stat_profiler): Only set this up if the platform
12691 supports ITIMER_PROF.
12693 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
12695 * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
12698 * inssel.brg: Fix a warning.
12700 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
12702 * mini.c: added support for statistical profiler
12703 (run with: --profile=default:stat).
12705 2005-01-04 Zoltan Varga <vargaz@freemail.hu>
12707 * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
12709 * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
12711 * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes
12712 related to global registers from the amd64 port.
12714 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
12716 * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
12718 * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
12719 with global registers.
12720 (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
12722 * aot.c (emit_method_code): Fix the 'method emitted as' messages.
12724 2004-12-31 Zoltan Varga <vargaz@freemail.hu>
12726 * debug-mini.c (encode_value): Fix off-by-one.
12728 * aot.c (encode_value): Likewise.
12730 * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
12732 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
12734 * mini.c linear-scan.c: Add a workaround for the mcs crash when using
12737 * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
12739 * aot.c (emit_method_info): Increase size of temp buffer.
12741 * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in
12744 2004-12-28 Zoltan Varga <vargaz@freemail.hu>
12746 * aot.c (emit_method_info): Fix build.
12748 * aot.c: Further rework of the AOT file format to reduce the size of
12749 the method info data.
12751 * mini.h: Bump AOT file format version.
12753 2004-12-27 Martin Baulig <martin@ximian.com>
12755 * mini.c (mini_get_method): New static method; call
12756 mono_get_method_full() and mono_get_inflated_method().
12757 (mono_method_to_ir): Use mini_get_method() instead of
12758 mono_get_method_full().
12760 2004-12-26 Patrik Torstensson <patrik.torstensson@gmail.com>
12762 * mini-x86.c (atomic ops): fixed bug interlocked bug #70784.
12764 2004-12-25 Zoltan Varga <vargaz@freemail.hu>
12766 * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
12768 * inssel-amd64.brg: Add some optimization rules.
12770 2004-12-24 Ben Maurer <bmaurer@ximian.com>
12772 * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
12773 standard not GC'd stuff is fine.
12775 2004-12-24 Zoltan Varga <vargaz@freemail.hu>
12777 * aot.c: Rework the AOT file format to get rid of most of the global
12778 symbols. This reduces the size of the mscorlib.dll.so by 1MB.
12780 * mini.h: Bump AOT file format version.
12782 2004-12-23 Zoltan Varga <vargaz@freemail.hu>
12784 * mini.h: Bump AOT file format version.
12786 * aot.c (mono_aot_is_got_entry): New function to determine if an
12787 address is inside a GOT.
12789 * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
12791 * cpu-pentium.md: Increase the maximum size of some instructions which
12792 might involve a got access.
12794 * mini.c (get_method_from_ip): Another debug helper function.
12796 * mini.c: Call mono_get_got_var () in a couple places. Handle the case
12797 when got var accesses are created during the decompose phase.
12799 * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
12801 * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
12802 argument mini_compile_method and to MonoCompile, and use this to
12803 determine whenever a given method is compiled for AOT. This allows the
12804 other methods compiled during AOT compilation to be free of AOT stuff,
12805 so the backends does not need to add special support for them by
12806 creating a fake GOT etc.
12808 * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
12811 2004-12-21 Ben Maurer <bmaurer@ximian.com>
12813 * mini.c (mono_method_to_ir): It turns out that some of the
12814 x-appdomain wrappers are lax with types, so just ignore this for
12817 * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
12818 at the vtable->klass. If it is non-shared code we can just use the
12821 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
12823 * mini-ppc.c: access MonoDomain from tls, too.
12825 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
12827 * declsec.c: Removed unused variable (and related warning ;-)
12829 2004-12-21 Ben Maurer <bmaurer@ximian.com>
12831 * iltests.il: New test for LDELEMA on an array of ref types.
12833 * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
12834 all ldelema's on reftypes.
12835 (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
12836 it was the wrong place to put it.
12838 * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
12839 register to pop to make this cleaner, at the request of Paolo.
12841 2004-12-20 Ben Maurer <bmaurer@ximian.com>
12843 * mini-ops.h (OP_GETHASHCODE): New op.
12845 * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
12847 * mini.c (mini_get_inst_for_method): Create the intrinsic hash
12850 For a microbenchmark, this reduces the cost of Hashtable.get_Item
12853 * mini-x86.c (mono_arch_output_basic_block): Rather than
12861 The first is 3 bytes while the second is 1. This saves 36 kb on
12862 mscorlib, quite a big saving. When bootstraping mcs, I was able to
12863 see a small boost because of icache locality.
12865 * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
12867 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
12869 * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
12870 started code sharing with the generic code.
12872 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
12874 * mini-ppc.c, cpu-g4.md: added code for direct access to
12877 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
12879 * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
12880 mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
12883 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
12885 * declsec.c|h: Added functions to cache the declarative stack modifiers
12886 in MonoJitInfo and to create a security frame from a MonoJitInfo
12888 * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
12889 created. Register internal calls for System.Security.SecurityFrame::
12890 _GetSecurityFrame and _GetSecurityStack.
12891 * mini.h: Added definition for new icalls (in mini-exceptions.c) and
12892 the definitions for the new stack walk/callback mechanism.
12893 * mini-exceptions.c: Added internal call GetSecurityFrame (to get the
12894 first security frame for LinkDemands and InheritanceDemands) and
12895 GetSecurityStack for Demands. Both use the new mono_walk_stack code
12897 * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
12898 walk initialization (lupus).
12900 2004-12-20 Ben Maurer <bmaurer@ximian.com>
12902 * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
12904 (handle_loaded_temps): Do not create a temporary variable for
12905 things that we know are temps. They will never be modified.
12906 (mono_spill_call): Set MONO_INST_IS_TEMP
12907 (mono_emulate_opcode): ditto
12909 (mono_method_to_ir.CEE_DUP): ditto
12911 2004-12-19 Ben Maurer <bmaurer@ximian.com>
12913 * mini.c (type_to_eval_stack_type): Make this handle the void type
12914 (mono_emit_call_args): set the call->type with type_to_eval_stack_type
12915 (emit_tree): use ip_in_bb to special case some common idioms
12916 Update all callers to pass in the IP.
12917 (mono_method_to_ir): Make CEE_CALL* do the above as well.
12919 This gives us a nice 2% speedup in mcs bootstrap.
12921 * mini-x86.c (peephole_pass): Peephole pass to make
12930 * mini.c (ip_in_bb): new method.
12931 (mono_method_to_ir): use this method rather than doing the hash
12934 * linear-scan.c (mono_linear_scan): When expiring actives, you
12935 don't need to keep around variables that expire on this
12936 instruction. This makes it so that:
12939 store (ebx add (ebx, 1))
12943 2004-12-19 Zoltan Varga <vargaz@freemail.hu>
12945 * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc
12946 combination to avoid doing two copies. Fix up problems with previous
12949 * mini.c: Fix 64 bit warnings.
12951 * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
12953 2004-12-17 Zoltan Varga <vargaz@freemail.hu>
12955 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
12956 changes from the x86 code.
12958 * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
12960 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
12962 * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
12963 throwing code to reduce its size, unify the AOT and non-aot code and
12964 get rid of relocations in the AOT case.
12966 * mini-x86.h mini.c exceptions-x86.c
12967 (mono_arch_get_throw_corlib_exception): New arch specific function to
12968 raise corlib exceptions which doesn't require relocations in the
12971 * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
12973 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
12975 * mini.c (mono_emit_method_call): Only allocate the got var when it is
12978 * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
12981 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
12983 * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
12984 with add function when used from Inc/dec atomic
12985 functions. Re-enabled optimization on x86.
12986 * mini-ops.h: renamed atomic_add functions to
12987 allow _add to match the Interlocked::Add and
12988 _add_next to match Interlocked::Inc/Dec.
12990 2004-12-15 Massimiliano Mantione <massi@ximian.com>
12992 * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
12993 linking of BBs to the end BB, and enabled SSAPRE also with
12994 consprop and copyprop (which was prevented by that bug).
12996 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
12998 * mini-x86.c: disabling the Interlocked optimizing code.
13000 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
13002 * aot.c (load_aot_module): Move reading of got_addr after the AOT
13003 file version check.
13005 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
13007 * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm
13008 interlocked optimization due lack of support on x86, rewrote
13009 exchange to take into account that base may be in eax.
13011 xsp works again; activated Interlocked optimizing code.
13013 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
13015 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
13017 2004-12-13 Zoltan Varga <vargaz@freemail.hu>
13019 * mini-ops.h: Add new opcodes.
13021 * mini.h: Add new patch types. Add got_var to MonoCompile.
13023 * mini.h mini-x86.c mini-amd64.c aot.c: Rename
13024 mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
13025 make it work with all kinds of patchable code.
13027 * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
13028 address of the GOT, and referencing entries in the GOT.
13030 * mini.c: Add code to load the GOT address if needed by an opcode.
13032 * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position
13033 independent AOT code on the x86 using an elf-style Global Offset Table.
13035 2004-12-14 Raja R Harinath <rharinath@novell.com>
13037 * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
13039 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13041 * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
13044 2004-12-13 Patrik Torstensson <patrik.torstensson@gmail.com>
13046 * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
13047 of Interlocked:Increment/Decrement/Add as inline ops.
13048 (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
13050 2004-12-12 Geoff Norton <gnorton@customerdna.com>
13052 * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
13053 * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
13055 2004-12-12 Duncan Mak <duncan@ximian.com>
13057 * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
13058 again. `patch_info->table_size' is no longer valid after Zoltan's
13061 2004-12-12 Martin Baulig <martin@ximian.com>
13063 * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
13064 if we are the "real" method, ie. not an inlined method inside it.
13066 2004-12-11 Ben Maurer <bmaurer@ximian.com>
13068 * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
13069 before we look in the special fields table. This fixes
13070 ../tests/thread-static-init.cs.
13072 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13074 * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
13075 for Array get_Rank and get_Length. Fixes bug #70465.
13077 2004-12-11 Zoltan Varga <vargaz@freemail.hu>
13079 * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
13080 separate structure to reduce the size of MonoJumpInfo.
13082 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
13084 * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
13086 2004-12-10 Patrik Torstensson <patrik.torstensson@gmail.com>
13088 * mini.c (mini_get_inst_for_method): Changed to allow ports
13089 to return a MonoInst instead of opcode
13090 (renamed mini_get_opcode_for_method to better reflect the new functionality)
13092 * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method):
13093 Allow ports to return a created MonoInst instead of op-code, will enable
13095 (renamed mini_get_opcode_for_method to better reflected the functionality)
13097 2004-12-09 Zoltan Varga <vargaz@freemail.hu>
13099 * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
13101 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
13103 * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
13106 2004-12-08 Martin Baulig <martin@ximian.com>
13108 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
13109 if we're a CEE_CONSTRAINED call. Fixes gen-118.cs.
13111 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
13113 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
13116 * exceptions.cs: Disable some tests which depend on properties of x86 fp
13119 2004-12-08 Raja R Harinath <rharinath@novell.com>
13121 * Makefile.am (CLEANFILES): Add *.exe, *.dll.
13123 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
13125 * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
13126 bug introduced by the previous patch.
13128 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
13130 * mini-ppc.c, objectc.cs: handle large structs passed by value
13131 (fixes bug #69972).
13133 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
13135 * mini-ppc.c: OP_ARGLIST implementation from
13136 Geoff Norton <gnorton@customerdna.com>.
13138 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
13140 * inssel-x86.brg, inssel-ppc.brg: fix reference to register
13141 in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
13143 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
13145 * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
13147 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13149 * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
13152 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
13154 * mini-sparc.c: Zero out localled-ed memory.
13156 * iltests.il: Add tests for zeroing out localloc-ed memory.
13158 2004-12-04 Martin Baulig <martin@ximian.com>
13160 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
13161 mono_method_get_signature_full().
13163 2004-12-03 Massimiliano Mantione <massi@ximian.com>
13165 * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
13166 and some utility functions (always for SSAPRE), integrated SSAPRE.
13167 * mini.h: Likewise.
13168 * driver.c: Added ssapre option.
13169 * ssa.c: Small fix on OP_ARG handling.
13170 * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
13171 * Makefile.am: Likewise.
13173 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
13175 * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
13176 now in the xp code.
13178 * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
13181 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13183 * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
13185 * cpu-s390.md : Increase instruction length of oparglist.
13187 * mini-s390.c : Implement vararg and TYPEDEBYREF support.
13189 2004-11-30 Martin Baulig <martin@ximian.com>
13191 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
13192 virtual generic methods. We call a special helper_compile_generic_method()
13193 icall to retrieve the method from the vtable, inflate and compile
13194 it and then do a CEE_CALLI. Thanks a lot to Paolo for this idea.
13196 * jit-icalls.c (helper_compile_generic_method): New JIT icall.
13198 2004-11-30 Zoltan Varga <vargaz@freemail.hu>
13200 * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
13202 2004-11-29 Zoltan Varga <vargaz@freemail.hu>
13204 * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
13207 2004-11-27 Ben Maurer <bmaurer@ximian.com>
13209 * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
13210 platforms with PIC aot.
13212 2004-11-28 Martin Baulig <martin@ximian.com>
13214 * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
13217 2004-11-28 Martin Baulig <martin@ximian.com>
13219 * mini-x86.c (mono_arch_call_opcode): Use the original type, not
13220 the result of mono_type_get_underlying_type() to check whether
13223 2004-11-26 Martin Baulig <martin@ximian.com>
13226 (mono_method_to_ir): Use `!method->signature->has_type_parameters'
13229 2004-11-26 Zoltan Varga <vargaz@freemail.hu>
13231 * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
13232 the same way as the other arguments so they won't get clobbered.
13234 * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual
13235 calls through R11 since it is clobbered by the trampoline code.
13237 2004-11-26 Raja R Harinath <rharinath@novell.com>
13239 * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
13240 pick up in-tree mscorlib.dll.
13242 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
13244 * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
13246 * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to
13247 runtime data/code are now stored in a table similar to the GOT in ELF.
13248 This allows the code itself to be position independent.
13250 * aot.c: Fix loading of referenced assemblies after the lazy assembly
13253 * aot.c: Attach ELF type (object/function) directives to all global
13256 * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
13258 * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
13260 * mini-amd64.h: Turn on PIC AOT code.
13262 * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
13263 returning the offset within an OP_AOTCONST instruction where the GOT
13264 offset needs to be added.
13266 * mini.h: Bump AOT file format version.
13268 2004-11-25 Martin Baulig <martin@ximian.com>
13270 * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
13271 uninflated generic methods.
13273 2004-11-25 Martin Baulig <martin@ximian.com>
13275 * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
13277 2004-11-24 Martin Baulig <martin@ximian.com>
13279 * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
13280 original klass (this only applies for generic instances).
13282 2004-11-24 Martin Baulig <martin@ximian.com>
13284 * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
13285 `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
13288 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
13290 * mini.c (mono_method_to_ir): Disable inlining for methods containing
13291 localloc. Fixes #69678.
13293 * iltests.il (test_0_localloc_inline): Add regression test for #69678.
13295 2004-11-23 Zoltan Varga <vargaz@freemail.hu>
13297 * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
13298 used SSE registers on pinvoke calls. Fixes #69774.
13300 2004-11-23 Geoff Norton <gnorton@customerdna.com>
13302 * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
13303 vt->inst_vtype->data.klass. This fixes generic structs and bug #69766
13305 2004-11-23 Raja R Harinath <rharinath@novell.com>
13307 * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
13308 Refer directly to the mcs/ tree.
13310 2004-11-19 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13312 * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
13313 Check if a trampoline for a synchronized method is required.
13315 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
13317 * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
13318 with localloc if needed. Throe arithmetric exception in
13319 div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
13320 Adapted from a patch by Geoff Norton <gnorton@customerdna.com>.
13322 2004-11-19 Geoff Norton <gnorton@customerdna.com>
13324 * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
13325 types before switching on type. Fixes #69622.
13327 2004-11-19 Raja R Harinath <rharinath@novell.com>
13329 * Makefile.am (check-local): New. Integrate into 'make check'.
13330 (MCS,RUNTIME): Define using in-tree mono and mcs.
13332 (%.exe): Use $(ILASM).
13334 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
13336 * mini-ppc.c: adjust initial prolog size (bug #69691).
13338 2004-11-18 Zoltan Varga <vargaz@freemail.hu>
13340 * cpu-pentium.md (localloc): Increase max instruction len. Fixes
13343 2004-11-17 Raja R Harinath <rharinath@novell.com>
13345 * Makefile.am (clean-local): Rename from 'clean'.
13347 2004-11-15 Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13349 * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
13350 to mono_arch_is_int_overflow.
13351 * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
13354 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
13356 * declsec.c|h: New files to support declarative security attributes.
13357 Added function to check if a method has (applicable) security.
13358 * mini.c|h: Add check for declarative security attributes in
13359 mono_method_check_inlining.
13360 * Makefile.am: Added declsec.c and declsec.h to the build.
13362 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
13364 * mini.c, mini.h: update to keep dynamic code info per-domain.
13366 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
13368 * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
13369 (mini_init): Get rid of it from here too.
13371 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
13373 * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
13374 implemented OP_RETHROW (patch by Geoff Norton
13375 <gnorton@customerdna.com>).
13377 2004-11-10 Geoff Norton <gnorton@customerdna.com>
13379 * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
13380 between appdomains. Fixes appdomain-unload on PPC.
13382 2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
13384 * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13385 mini-exceptions.c: handle the new wrapper types.
13386 * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
13387 token value as a MonoClass* when compiling a wrapper.
13388 mono_jit_create_remoting_trampoline now takes an additional
13389 MonoRemotingTarget parameter.
13391 2004-11-10 Martin Baulig <martin@localhost>
13393 * mini.c (mono_method_to_ir): Use `generic_container->context'
13394 rather than creating a new one.
13396 2004-11-09 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13398 * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
13400 * inssel-390.md, mini-s390.c: Correct register allocation for globals.
13402 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
13404 * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
13405 the experimental aot cache stuff.
13407 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
13409 * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13410 mini-exceptions.c: update to exception clause structure changes.
13412 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
13414 * exceptions-x86.c (throw_exception): Fix warnings.
13416 * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support
13419 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
13421 * exceptions-sparc.c (get_throw_exception): Really fix this.
13423 2004-11-07 Ben Maurer <bmaurer@ximian.com>
13425 * tramp-*.c: we no longer support icalls without wrappers, so
13426 a bit of code can be removed here
13428 2004-11-07 Zoltan Varga <vargaz@freemail.hu>
13430 * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
13433 * cpu-sparc.md: Add op_rethrow.
13435 * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
13437 * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
13439 * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
13440 * mini-ops.h: Add OP_RETHROW.
13442 * mini.c inssel.brg: Distinguish between THROW and RETHROW.
13444 * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
13446 2004-11-05 Geoff Norton <gnorton@customerdna.com>
13448 * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
13449 Makes the output much easier to read
13451 2004-11-05 Ben Maurer <bmaurer@ximian.com>
13453 * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
13454 prevents another huge leak when compiling with ssa. Secondly, the
13455 performance of doing this rather than freeing the lists is much
13456 better. GList does a lock every time you allocate a list link,
13457 so that it can use a memory pool. So, it is better to just use
13458 a memory pool of our own.
13460 * ssa.c, linear-scan.c: replace g_list_remove_link with
13461 g_list_delete. The remove one does not free the GList, so we were
13462 leaking memory. On -O=all --compile-all with corlib, this cut down
13463 3 MB of allocations.
13465 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
13467 * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
13469 * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
13471 * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
13472 into a new function mono_create_jit_trampoline ().
13474 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
13476 * trace.c (get_spec): Allow tracing of classes without a namespace.
13478 2004-11-02 Sebastien Pouliot <sebastien@ximian.com>
13480 * mini.c: Fix pointer overwrite in mini_method_compile.
13482 2004-11-2 Geoff Norton <gnorton@customerdna.com>
13484 * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
13485 The darwin ABI needs some special handling for 1 and 2 byte structs
13486 Lets use lbz/lhz instead of lwz everywhere.
13487 * mini-ppc.c (calculate_sizes): The Darwin ABI needs from special handling
13488 for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
13489 Use stb/sth for the former, and put the latter always on stack instead of in
13490 argument registers.
13492 2004-10-30 Zoltan Varga <vargaz@freemail.hu>
13494 * trace.c (is_filenamechar): Add '_'.
13496 2004-10-29 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13498 * mini-s390.c: Fix prolog length to allow for large trace requirements.
13500 * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
13502 2004-10-29 Zoltan Varga <vargaz@freemail.hu>
13504 * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
13505 depends on libmonogc. Fixes #68805.
13507 2004-10-26 Miguel de Icaza <miguel@ximian.com>
13509 * mini.c (mono_jit_free_method): Provide extra information for
13510 this error. Currently this leaks, but will be turned into a
13511 developer option in the future.
13513 2004-10-26 Zoltan Varga <vargaz@freemail.hu>
13515 * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
13517 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
13519 * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte
13520 boundary. Fixes reading of PATCH_INFO_R4 and R8.
13521 (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
13523 2004-10-24 Zoltan Varga <vargaz@freemail.hu>
13525 * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
13526 trampolines for AOT code.
13528 2004-10-22 <vargaz@freemail.hu>
13530 * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
13531 constructed types. Fixes #68136.
13533 2004-10-21 Martin Baulig <martin@ximian.com>
13535 * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
13536 if it returns true, unwind the stack to the call instruction.
13538 2004-10-21 <vargaz@freemail.hu>
13540 * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
13542 * mini.h: Bump AOT version number.
13544 * objects.cs: Add another test for unbox trampolines.
13546 * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for
13549 2004-10-20 <vargaz@freemail.hu>
13551 * driver.c: Add SHARED to the set of optimizations tested.
13553 * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
13555 * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
13556 used by CEE_NEWARR.
13558 * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
13560 2004-10-20 Martin Baulig <martin@ximian.com>
13562 * mini-exceptions.c (mono_handle_exception): Call
13563 mono_debugger_handle_exception() to tell the debugger about
13564 catch/finally clauses.
13566 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
13568 * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
13570 * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
13573 2004-10-15 Geoff Norton <gnorton@customerdna.com>
13575 * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
13576 methods as their native size, fixed bug #57543, #57545.
13577 * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
13578 This saves a temporary register and mullw call down into 1 (minor perf
13579 increase for cases like sum = sum * 5; This use to translate into:
13582 It now translates to
13585 2004-10-15 Zoltan Varga <vargaz@freemail.hu>
13587 * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
13590 2004-10-11 Martin Baulig <martin@ximian.com>
13592 * mini.c (mono_method_to_ir): If we're a generic method, get the
13593 MonoGenericContainer from our MonoMethodNormal and create a
13594 MonoGenericContext from it.
13596 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
13598 * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
13600 * basic-long.cs: Add test for checked i8->i2 cast.
13602 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13604 * inssel-ppc.brg: added a couple of speedup rules.
13606 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
13608 * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
13609 to speed up rebuilds.
13611 2004-10-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13613 * mini-s390.c: Minor fix to OP_OR_IMM.
13615 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
13617 * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
13618 better. Fixes appdomain-unload.exe on sparc.
13620 2004-10-02 Massimiliano Mantione <massi@ximian.com>
13622 * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
13623 simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
13626 2004-10-02 Zoltan Varga <vargaz@freemail.hu>
13628 * jit-icalls.c: Handle a nonexisting trunc function more correctly.
13630 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
13632 * mini.c: Always generate a field read/write wrapper for members
13633 of the class MarshalByRefObject since the actual instance could
13636 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
13638 * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
13640 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
13642 * driver.c mini.h trace.c: Move the setting of the main assembly into
13643 a separate function called mono_trace_set_assembly () and call it after
13644 actually loading the main assembly. Fixes #66872.
13646 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
13648 * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
13649 using the code manager.
13651 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
13653 * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
13655 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
13657 * cpu-amd64.md: Fix bug in previous patch.
13659 * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
13662 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
13664 * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13665 mini-exceptions.c: updates for changed stack walk interface.
13667 2004-09-21 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13669 * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
13671 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
13673 * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
13675 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
13677 * driver.c (mini_regression_list): Do not call mono_assembly_close
13678 since assemblies can't be unloaded.
13680 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
13682 * cpu-amd64.md: Fix more instruction lengths.
13684 * cpu-amd64.md: Fix lengths of some instructions.
13686 2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
13688 * inssel.brg: Make the array ldelema check aot friendly.
13690 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
13692 * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
13694 * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
13696 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
13698 * mini-x86.c: Fix build.
13700 * mini-sparc.c mini-x86.c mini-amd64.c: Use the new
13701 mono_type_get_underlying_type () helper function to simplify code.
13703 2004-09-09 Martin Baulig <martin@ximian.com>
13705 * mini-amd64.c: Don't access `type->data.klass' directly, call
13706 mono_class_from_mono_type() instead since the type may be a
13709 2004-09-09 Martin Baulig <martin@ximian.com>
13711 * mini-amd64.c (get_call_info): Fix support for generic instances.
13712 (add_valuetype): Use mono_class_from_mono_type() to get the class
13713 since we can be a generic instance.
13715 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
13717 * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
13719 2004-09-07 Ben Maurer <bmaurer@users.sourceforge.net>
13721 * liveness.c: reset spill costs on each scan: bug 62107
13723 2004-09-07 Bernie Solomon <bernard@ugsolutions.com>
13725 * exceptions-sparc.c (mono_arch_find_jit_info): remove
13726 unnecessary line that doesn't compile
13728 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
13730 * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
13731 trampolines, make them call an error function so people can fix their
13734 2004-09-06 Martin Baulig <martin@ximian.com>
13736 * mini.c (mono_method_to_ir): When initializing locals, handle a
13737 generic instances like a valuetype if it's a valuetype and like a
13738 class if it's a class.
13740 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
13742 * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
13743 stack. Fixes #64674.
13745 * exceptions.cs: Add test for unwinding of call arguments.
13747 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
13749 * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
13750 OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
13751 set the carry/borrow flag). The sparc and s390 implementations
13752 can now use optimized versions (and simplify the code). ppc bugfixes.
13754 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
13756 * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
13758 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
13760 * inssel-amd64.brg: Remove leftover 32 bit rule.
13762 * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
13764 2004-09-04 Zoltan Varga <vargaz@freemail.hu>
13766 * mini-exceptions.c (mono_find_jit_info): Refactor common code from
13767 mono_arch_find_jit_info functions into a new function. Fix a memory
13770 * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
13773 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
13775 * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
13778 * exceptions.cs: Add array size tests.
13780 * mini.c: Allocate a separate icall wrapper for each arity of
13781 mono_array_new_va. Fixes #59509.
13783 * exceptions.cs: Add testcase for 64578.
13785 * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
13787 * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
13789 2004-09-02 Martin Baulig <martin@ximian.com>
13791 * mini.c (mono_method_to_ir): When initializing the locals, call
13792 handle_initobj() on the generic instance itself, not its
13795 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
13797 * mini.h (MonoJitDynamicMethodInfo): New structure, extension of
13798 MonoJitInfo for dynamic methods.
13800 * mini.c: Rename trampoline_hash_mutex to jit_mutex.
13802 * mini.c: Add support for freeing JIT data for dynamic methods.
13804 2004-09-01 Martin Baulig <martin@ximian.com>
13806 * mini-x86.c (is_regsize_var): Added support for generic
13808 (mono_arch_emit_prolog): Make this compile again, use
13809 `x86_push_imm_template (code)'.
13811 2004-08-30 Ben Maurer <bmaurer@users.sourceforge.net>
13813 * mini-x86.c: make all push_imm instructions that get
13814 patched always emit the long form
13816 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
13818 * mini.c (mono_create_jump_trampoline): Store the jump trampolines
13819 in a per-domain hash.
13821 * mini-amd64.c (merge_argument_class_from_type): Handle generic
13824 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
13826 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
13829 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
13832 * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
13833 Beginnings of SSE2 support.
13835 * exceptions.cs: Add more tests for checked int<->uint casts.
13837 2004-08-28 Martin Baulig <martin@ximian.com>
13839 * mini-x86.c (mono_arch_instrument_epilog): Added support for
13843 (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
13844 Handle generic instances recursively.
13846 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
13848 * iltests.il: test for conv.u8 on a constant
13850 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
13852 * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
13853 LCONV_x4 (shrun_32 (membase)).
13855 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
13857 * inssel-x86.brg: c&p rules for push/setret of long
13859 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
13861 * inssel-x86.brg: c&p rules for compare (base, regvar) and
13862 compare (regvar, base)
13864 * inssel-x86.brg: more burg love
13866 * inssel.brg: more cleanup
13868 * inssel-x86.brg, inssel-long32.brg: burg cleanup.
13870 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
13872 * basic-long.cs, basic-calls.cs: new tests for optimization.
13874 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
13876 * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
13879 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
13881 * mini-amd64.c (read_tls_offset_from_method): Add another case.
13883 2004-08-25 Bernie Solomon <bernard@ugsolutions.com>
13885 * inssel.brg (mini_emit_memcpy): use
13886 NO_UNALIGNED_ACCESS to disable memcpy optimization
13888 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
13890 * mini-amd64.c: Handle generic types in various places.
13892 * mini.c (mono_method_to_ir): Handle generic types in init locals.
13894 2004-08-24 Zoltan Varga <vargaz@freemail.hu>
13896 * mini.c (handle_box): Fix warning.
13898 * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
13900 * mini-amd64.h: Enable the emit_state optimization.
13902 * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
13904 * mini-amd64.c: Add some new 64 bit peephole opts.
13906 * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
13908 * cpu-amd64.md: sreg1 of div instructions must be %rax.
13910 * mini-amd64.c: Register allocator fixes.
13912 * mini.c: Add an optimization to emit_state to avoid allocation of new
13913 registers on some platforms.
13915 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
13917 * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
13919 * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
13920 allocation. Fixes #63085.
13922 * basic-long.cs: Add new regression test.
13924 * mini-amd64.c: Register allocator improvements.
13926 2004-08-21 Zoltan Varga <vargaz@freemail.hu>
13928 * mini-amd64.c (read_tls_offset_from_method): Add another code
13931 * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
13932 instruction sequence for nullifying class init trampolines.
13934 * objects.cs: Add new regalloc test.
13936 * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
13938 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
13940 * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
13942 * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
13945 * driver.c: Fix profiling after TLS changes.
13947 * driver.c (mono_main): Set mono_stats.enabled if needed.
13949 * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
13952 2004-08-20 Ben Maurer <bmaurer@users.sourceforge.net>
13954 * mini-x86.c: use a 1 op rather than a 2 op tls access
13955 instruction -> faster.
13957 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
13959 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
13962 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
13964 * exceptions-sparc.c (throw_exception): fix typo
13966 2004-08-19 Ben Maurer <bmaurer@users.sourceforge.net>
13968 * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
13969 set tree->dreg correctly with tls. Allow any
13970 register to be used.
13972 * mini-x86.c (read_tls_offset_from_method): add new code
13973 generation pattern seen with GCC.
13976 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13978 * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
13979 exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13980 exceptions-sparc.c: fix some performance issues in exception
13981 handling and setting of the stack trace for exceptions that were
13984 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
13986 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
13989 * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible
13992 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
13994 This patch inlines tls access, when possible.
13996 * mini.h: new arch functions for TLS intrinsics.
13997 All platforms updated with a stub.
13999 * mini.c: use the new intrinsics
14001 * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
14002 arch specific intrinsic for tls variables
14004 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
14006 * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
14009 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
14011 * mini.c: thread local allocation
14013 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
14015 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
14017 * Makefile.am: Link against the static version of libmonogc.
14019 * Makefile.am: Link the static versions of the convenience libraries
14020 into the mono executable.
14022 * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
14024 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
14026 * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
14027 on integer overflow.
14029 * mini-amd64.c: Reorganize function call code.
14031 * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
14033 2004-08-14 Ben Maurer <bmaurer@ximian.com>
14035 * inssel-x86.brg: use xor eax,eax.
14037 * basic.cs: new tests
14039 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
14041 * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
14042 in exception throwing code.
14044 2004-08-14 Ben Maurer <bmaurer@ximian.com>
14046 * inssel-x86.brg: use xor esi,esi.
14048 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
14050 * driver.c (mono_main): Call mono_trace_parse_options earlier so it
14051 can trace methods compiled during mini_init () too.
14053 * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle
14056 2004-08-14 Ben Maurer <bmaurer@ximian.com>
14058 * Makefile.am: static link on x86 (r=zoltan)
14060 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
14062 * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
14063 code since it causes some programs to fail.
14065 2004-08-12 Zoltan Varga <vargaz@freemail.hu>
14067 * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
14069 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
14071 * mini.c: ovfops_op_map - add STACK_OBJ case for
14073 * basic.cs: add test_0_pin_string as test
14076 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
14078 * Makefile.am: build C# if srcdir != builddir
14080 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
14082 * dominators.c, mini.h, mini-x86.c: fix loop alignment with
14083 fall-through blocks.
14085 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14087 * driver.c: enable loop by default again and include abcrem in -O=all.
14089 2004-08-08 Zoltan Varga <vargaz@freemail.hu>
14091 * iltests.il: Add some localloc tests.
14093 * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
14095 * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly.
14098 * inssel-amd64.brg: Add some optimizations.
14100 * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
14103 * Makefile.am: Statically link mono against libmono on AMD64.
14105 * mini-amd64.c inssel-amd64.brg: Optimizations.
14107 2004-08-07 Zoltan Varga <vargaz@freemail.hu>
14109 * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
14111 * tramp-amd64.c: Patch calling code in trampolines.
14113 2004-08-06 Zoltan Varga <vargaz@freemail.hu>
14115 * mini-amd64.c: pinvoke struct passing fixes.
14117 2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
14119 * mini-sparc.c: redo change, make mono_arch_cpu_init call
14120 mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
14122 2004-08-05 Duncan Mak <duncan@ximian.com>
14124 * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
14127 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
14129 * mini-amd64.c (emit_move_return_value): Move return value for normal
14132 2004-08-05 Martin Baulig <martin@ximian.com>
14134 * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
14135 `type->type'; just modify `type' itself when dealing with enums
14136 and generic instances.
14137 (check_call_signature): Make `simple_type' a `MonoType *'.
14139 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
14141 * mini.c: Use OP_PADD to add offsets to addresses.
14143 * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
14145 2004-08-04 Bernie Solomon <bernard@ugsolutions.com>
14147 * mini-sparc.c (mono_arch_emit_epilog): fix check
14148 for folding last op into restore instruction
14150 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
14152 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
14153 helper methods using the code manager.
14155 * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
14157 * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
14159 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14161 * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
14162 cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
14164 * mini-s390.c: fix tail processing
14166 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
14168 * mini-ppc.c: mul.ovf.un exception name fix.
14170 2004-08-03 Martin Baulig <martin@ximian.com>
14172 * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
14173 instances; before jumping to `handle_enum', also modify `ptype'.
14175 2004-08-02 Bernie Solomon <bernard@ugsolutions.com>
14177 * cpu-sparc.md: fcall maximal length too small.
14179 2004-08-02 Zoltan Varga <vargaz@freemail.hu>
14181 * mini-amd64.c mini.h: Add initial support for passing/returning
14182 structures to/from pinvoked methods.
14184 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
14186 * mini-ppc.c: reg allocator fix.
14188 2004-07-31 Zoltan Varga <vargaz@freemail.hu>
14190 * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
14192 * inssel.brg: Optimize memset on 64 bit machines.
14194 * mini-amd64.c: Fix some vararg cases.
14196 2004-07-30 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14198 * mini-s390.c: Corrected macro in emit_float_to_int
14200 * s390-abi.cs: Tests to exercise the s390 ABI
14202 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
14204 * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
14207 * basic.cs: Add a test for add.ovf.un.
14209 2004-07-30 Bernie Solomon <bernard@ugsolutions.com>
14211 * mini-sparc.c: add case for OP_IDIV_UN
14213 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
14215 * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
14217 * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
14219 2004-07-30 Ben Maurer <bmaurer@ximian.com>
14221 * basic.cs: regression tests.
14223 * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
14226 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
14228 * basic.cs: Add a new test.
14230 * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling
14231 and AOT. Various fixes and optimizations.
14233 * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
14235 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
14237 * mini-ppc.c: make sure temp regs are not used for global reg
14240 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
14242 * cpu-sparc.md: conv_i8 fix for 64bits
14244 * mini-sparc.c: add cases for OP_IXXX codes for 64bits
14246 2004-07-29 Ben Maurer <bmaurer@ximian.com>
14248 * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
14249 add opcode for cmp BYTE PTR [eax], imm.
14251 * inssel.brg: Make memcpy and memset takes bases.
14253 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
14255 * *-amd64.*: More AMD64 work.
14257 2004-07-28 Ben Maurer <bmaurer@ximian.com>
14259 * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
14260 add a compare-not-equal opcode.
14262 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
14264 * mini.c: Use mono_init_from_assembly instead of mono_init.
14266 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
14268 * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
14270 * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
14272 * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
14274 * inssel.brg: 64 bit fixes.
14276 * mini.h (MonoCallInst): Add some AMD64 specific data.
14278 * mini.h: Add some OP_P opcodes.
14280 2004-07-28 Ben Maurer <bmaurer@ximian.com>
14282 * basic.cs: tests for 61797 and 61740
14284 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
14286 * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
14287 numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
14289 2004-07-24 Zoltan Varga <vargaz@freemail.hu>
14291 * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
14293 * *-amd64*.*: Ongoing AMD64 work.
14295 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
14297 * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
14299 * *-amd64*: Ongoing AMD64 work.
14301 * mini-arch.h: Add AMD64 support.
14303 * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
14305 * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
14307 * mini-ops.h: Add new opcodes.
14309 * Makefile.am: Add AMD64 support.
14311 * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
14312 rules into the inssel-long*.brg files.
14314 * *-amd64.*: Add beginnings of AMD64 backend.
14316 2004-07-22 Ben Maurer <bmaurer@ximian.com>
14318 * mini.c (print_dfn): commenting out the code that prints
14319 the cil. With -O=deadce, this makes -v -v crash.
14321 * cpu-pentium.md: make checkthis have a length of 2
14323 2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
14325 * mini-sparc.h: fix implementations of __builtin
14326 functions for Sun compiler for V9.
14328 2004-07-16 Ben Maurer <bmaurer@ximain.com>
14330 * mini.c: use the new stelem.ref wrapper
14331 * exceptions.cs, arrays.cs: new stelem.ref tests
14333 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14335 * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
14336 new XSP should work with these changes).
14338 2004-07-14 Ben Maurer <bmaurer@ximain.com>
14340 * inssel-{long32,x86,}.brg: trivial optimizations.
14342 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
14344 * mini.c: load value when emitting box operation in
14347 2004-07-12 Ben Maurer <bmaurer@ximian.com>
14349 * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
14350 is one byte shorter than cmp DWORD PTR [eax], 0.
14352 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14354 * inssel-ppc.brg: arguments on the stack are always
14355 relative to the stack pointer (spotted by Neale Ferguson).
14357 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14359 * exceptions-x86.c: delay appending the method name to the trace until
14360 after mono_jit_info_table_find is called, as this gets the real
14363 2004-07-09 Ben Maurer <bmaurer@ximian.com>
14365 * aot.c: register roots
14367 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
14369 * aot.c : I could just use PLATFORM_WIN32 flag.
14371 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
14373 * aot.c : Reverting the previous fix. This time it broke linux build.
14375 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
14377 * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
14379 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
14381 * mini.c (handle_stack_args): Remove some more debugging code.
14383 * mini.c (handle_stack_args): Remove debug output left in by mistake.
14385 * driver.c mini.h aot.c: Allow additional options to be specified with
14386 --aot and pass them to mono_compile_assembly.
14388 * aot.c: Add experimental code to AOT compile all loaded assemblies
14389 on demand and save the code into a cache in the filesystem.
14391 * aot.c: Add support for more wrapper methods.
14393 * mini.c (handle_stack_args): Handle some corner cases. Fixes
14396 * cpu-*.md: Remove removed opcodes.
14398 * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
14399 CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
14400 related icalls to marshal.c.
14402 2004-07-06 Zoltan Varga <vargaz@freemail.hu>
14404 * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
14406 * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
14408 * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
14410 2004-07-06 Ben Maurer <bmaurer@ximian.com>
14411 * liveness.c: If liveness is recomputated we need to reset the information
14412 for each variable. This way, if the liveness range has been narrowed
14413 by optimizations that happened after the last computation, we can return
14416 For example, if you have
14421 // Tons of code that does not affect i
14427 i = 0 is dead code and will be removed by SSA. However, when
14428 linear scan gets to the code, i will still appear to be live
14429 throughout the entire block. This prevents good register allocation.
14431 2004-07-06 Martin Baulig <martin@ximian.com>
14433 * debug-mini.c (mono_debug_init_method): Allow
14434 MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
14435 (mono_debug_add_icall_wrapper): New method.
14437 * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
14439 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
14441 * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
14444 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
14446 * aot.c (mono_aot_load_method): Fix loading of debug info.
14448 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
14450 * aot.c: Add logging support.
14452 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
14454 * mini.h: Add prototype for mono_print_method_from_ip.
14456 * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
14458 * inssel.brg: 64 bit fixes.
14460 * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to
14463 * Makefile.am: Add SPARC64 support.
14465 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
14467 * aot.c: Fix alignment problems on 32 bit platforms.
14469 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
14471 * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
14474 * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
14477 * mini.h: Bump AOT file version. Some 64 bit fixes.
14479 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
14481 * inssel-sparc.brg: Add new rule to avoid register moves.
14483 * inssel.brg: Add ldind_to_load_membase helper function.
14485 2004-06-30 Ben Maurer <bmaurer@ximian.com>
14487 * mini.c: OffsetToStringData intrinsic.
14489 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
14491 * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
14493 * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
14496 * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
14497 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14499 * mini.c: reinstated mono_compile_get_interface_var()
14500 on x86, too, since the change breaks the Gtk# build there as well.
14502 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14504 * driver.c: remove loop from the default optimizations: it seems to
14505 interact badly with some of the other options (see bug #60613).
14507 2004-06-25 Zoltan Varga <vargaz@freemail.hu>
14509 * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
14510 (fld@informatik.uni-bremen.de): Add Solaris x86 support.
14512 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
14514 * mini-ppc.c, cpu-g4.md: small updates to be able to compile
14515 vararg-using methods.
14517 2004-06-21 Martin Baulig <martin@ximian.com>
14519 * mini/mini-exceptions.c
14520 (mono_handle_exception): Added `gpointer original_ip' argument.
14521 After calling mono_unhandled_exception(), call
14522 mono_debugger_unhandled_exception() and if that returns true,
14523 restore the context and return.
14525 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
14527 * mini-ppc.c: prefer the use of relative branches so
14528 they won't need to be patched in aot code (patch from Patrick Beard).
14530 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14532 * aot.c: patch from Patrick Beard to make the output assembly
14533 more correct for the MacOSX assembler. Small tweak to
14534 generate sane images on Linux/PPC, too.
14536 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14538 * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
14539 case until bug #59509 is fixed (shows up in #60332).
14541 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14543 * mini.c: make sure the needed wrappers are compiled, too, with
14546 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
14548 * driver.c: remove NPTL reference in --version output.
14550 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14552 * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
14553 generate valid assembly for the Mach-O assembler.
14555 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14557 * driver.c: don't include abcrem in the all optimization specifier
14558 since it slows down jit compilation too much for now.
14560 2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
14562 * mini.c: use BIGMUL only if both operands have the same signage.
14563 * iltests.il: Test for bug 60056. (errors related to signage in
14568 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
14570 * mini.c, aot.c: memory leak fixes.
14572 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14574 * inssel-long32.brg: implemented a few missing ulong cast opcodes.
14576 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
14578 * Makefile.am: remove the -static hack completely, it links in
14579 statically glib as well.
14581 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
14583 * iltests.il, mini.c: fixed bug#59580 in branch optimization.
14584 * exceptions.cs: make it compile with new mcs/csc.
14586 2004-06-03 Massimiliano Mantione <massi@ximian.com>
14587 * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
14588 and added relevant test case.
14590 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
14592 * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
14593 regressions in gtk-sharp.
14595 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
14597 * exceptions.cs: New regression tests.
14599 * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
14601 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
14603 * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
14605 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
14607 * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
14609 * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
14611 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
14613 * mini.c (mono_jit_runtime_invoke): Init class in this
14614 method instead of trusting mono_jit_compile_method to
14615 do the work (because wrappers can be in object class)
14617 2004-05-27 Zoltan Varga <vargaz@freemail.hu>
14619 * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
14621 * basic-long.cs: New regression test.
14623 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
14625 * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
14626 and div/rem checks.
14628 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
14630 * Makefile.am: fix miguel's change to build mono statically against
14631 libmono (track build dependencies).
14633 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
14635 * cfold.c: Some glib versions do not have G_MININT32.
14637 2004-05-26 Massimiliano Mantione <massi@ximian.com>
14639 * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
14640 with precision of tan, atan, sin and cos, and implemented related
14641 regressions tests (fixes bug 54467, but one new problem appeared and
14644 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
14646 * cfold.c (FOLD_BINOPZ): Avoid division by zero.
14648 * exceptions.cs: Add test for constant folding && division by zero.
14650 * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
14651 since driver.c is in libmono too, so the optimization was useless.
14653 * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
14654 variable to driver.c so the compiler can emit more efficient code to
14657 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14659 * Makefile.am: don't distribute generated inssel.[ch] files.
14661 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
14663 * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
14664 into the default appdomain. Fixes #58707.
14666 * jit-icalls.c: Remove the broken approximation for truncl, doing
14667 no conversion is better.
14669 * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
14672 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14674 * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
14675 of the mcrxr instruction which is not available on some processors
14676 even if it's documented to be. Implement add and sub overflow correctly
14677 (still not complete for long unsigned). Speed up icalls a bit.
14679 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
14681 * mini.c (mono_jit_compile_method_with_opt): Make sure that
14682 we run .cctor in the current domain instead of target_domain.
14684 Fixes bug #58558, .cctor not being called in -O=shared.
14686 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14688 * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
14690 2004-05-24 Ben Maurer <bmaurer@users.sourceforge.net>
14692 * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
14693 which can be done with an imm8, do it that way.
14694 (mono_arch_output_basic_block): ditto for a jmp
14695 (mono_arch_emit_prolog): Computate maximum offset of a label.
14697 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
14699 * mini-x86.c (mono_arch_local_regalloc): the reg allocator
14700 now tries to allocate prefered physical reg's for virtual
14701 regs. This reduces the number of emited spills/loads with
14702 20-30% on our core assemblies.
14704 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14706 * jit-icalls.c: truncl() is not needed and trunc() is
14707 the correct thing to do anyway (bug #58287).
14709 2004-05-24 Zoltan Varga <vargaz@freemail.hu>
14711 * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
14714 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
14716 * driver.c: enable loop optimizations by default.
14718 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
14720 * mini-x86.c: fix calc of max loop size when aligning loops start.
14722 2004-05-23 Zoltan Varga <vargaz@freemail.hu>
14724 * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
14727 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
14729 * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
14732 * basic-long.cs: Add tests for add/subtract of immediates with carry.
14734 * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
14736 * mini.c (inline_method): Allways inline some wrappers even if the cost
14737 is too large. Fixes #58785.
14739 * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
14741 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
14743 * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
14744 (crichton@gimp.org). Beginning of support for sparc/linux.
14746 * mini-sparc.c: Optimize retrieval of LMF address.
14748 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
14750 * exceptions-ppc.c: handle alloca in methods with clauses.
14752 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
14754 * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
14756 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
14758 * mini.c: Delegate most of the abort signal work to
14759 mono_thread_request_interruption, which also handles Stop and Suspend
14762 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
14764 * mini.c mini.h: Allow inlining of icall wrappers if the backend
14765 supports the save/restore lmf opcodes.
14767 2004-05-19 Zoltan Varga <vargaz@freemail.hu>
14769 * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
14770 by gcc-3.4 as well.
14772 * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
14774 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
14776 * mini.h mini.c (mini_method_compile): Only run abc removal pass on
14777 methods which contain array accesses.
14779 * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
14780 boundaries. Fixes #58537.
14782 * iltests.il: Add regression test for #58537.
14784 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
14786 * mini-x86.c (mono_arch_local_regalloc): Last part of
14787 fix for bug #58633 (releasing register to early).
14789 2004-05-18 Miguel de Icaza <miguel@ximian.com>
14791 * basic-long.cs: Add new regression test.
14793 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
14795 * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
14796 register too early on the chain.
14798 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
14800 * mini.c (create_helper_signature): Use a helper function to reduce
14801 the code which needs to be written. Also set the calling convention of
14802 icalls on windows. Fixes #57840.
14804 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14806 * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
14807 exceptions-ppc.c: added helper function to get the instruction address
14808 from a signal handler context.
14810 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
14812 * helpers.c: use g_get_tmp_dir. Invokes happyness
14815 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
14817 * helpers.c: Add new env variable to pass args to objdump.
14818 Specifically for those of us who love -Mintel. r=miguel, gonzalo.
14820 2004-05-17 Radek Doulik <rodo@ximian.com>
14822 * Makefile.am (common_sources): added abcremoval.h so it get
14823 disted and daily mono packages on go-mono.com will build again
14825 2004-05-17 Massimiliano Mantione <massi@ximian.com>
14827 * abcremoval.c: Fixed coding style, added copyright header.
14829 * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
14831 * mini.h: Added prototype for abc removal main function.
14833 * build_relations_propagation_table.pl: Added copyright header.
14835 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
14837 * basic-long.cs: reg test for complex ceq_long bug.
14839 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
14841 * mini-x86.c (mono_arch_local_regalloc): Correctly free
14842 reg in long and clob case (bug #58343). Fixed/added comments.
14844 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
14846 * mini.c (mono_jit_runtime_invoke): Follow new convention
14847 of calling the invoke method with an function pointer.
14849 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
14851 * ChangeLog: Fix author of memory leak patch.
14853 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
14855 * Makefile.am: fix make dist as well...
14858 2004-05-14 Massimiliano Mantione <massi@ximian.com>
14860 * cfold.c: Made so that conversions from pointer to int4 are no-ops
14861 on archs where pointers are 4 bytes long.
14863 * Makefile.am: Added abcremoval.c source file.
14865 * abcremoval.c: Added abcremoval.c.
14867 * abcremoval.h: Added abcremoval.h.
14869 * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
14871 * inssel.brg: Enabled bounds check removal.
14873 * mini.c: Added support for abcrem optimization.
14875 * mini.h: Added abcrem optimization label.
14877 * driver.c: Added support for abcrem optimization.
14879 * propagated_relations_table.def: Added propagated_relations_table.def.
14881 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
14883 * mini.c, cfold.c: fix style.
14885 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14887 * mini.c: handle issue with the low-level implementation of
14888 some long opcodes (bug #54209).
14890 2004-05-13 Ben Maurer <bmaurer@users.sourceforge.net>
14892 * basic.cs: test for my new cmov stuff.
14894 2004-05-13 Patrik Torstensson
14896 * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
14897 opt and added peephole documentation.
14899 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
14901 * tramp-ppc.c: rewrote the generic trampoline code.
14903 2004-05-11 Patrik Torstensson
14905 * mini-x86.c: optimize long shl/shr asm code (one less branch)
14907 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
14909 * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
14911 * mini.h mini.c dominators.c: Applied patch from Derek Woo
14912 (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
14914 * mini.c: Add new icalls for AsAny marshalling.
14916 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14918 * tramp-ppc.c, mini-ppc.c: more cleanups.
14920 2004-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14922 * mini.c: no warnings.
14924 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14926 * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
14928 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
14930 * mini.c: In the thread abort signal handler, if the thread is in the
14931 process of being stoped, don't throw the Abort exception, just stop the
14934 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
14936 * tramp-ppc.c: removed old code.
14938 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14940 * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
14941 do some simple speed optimizations on ppc.
14943 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14945 * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
14946 and large offsets in load/store.
14948 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
14950 * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
14951 it causes regressions.
14953 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
14955 * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
14958 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14960 * jit-icalls.c: remove warnings.
14961 * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
14962 speedups for unsafe code.
14964 2004-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
14966 * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
14968 2004-05-06 Zoltan Varga <vargaz@freemail.hu>
14970 * basic-calls.cs: Add new regression test.
14972 * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
14975 * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
14977 * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
14980 2004-05-06 Patrik Torstensson
14982 * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
14983 long reg allocation in any reg (not only eax:edx) and implemented
14984 long shl/shr ops in asm instead of helpers.
14986 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
14988 * mini-sparc.h: Fix warnings.
14990 * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
14993 * mini-exceptions.c (mono_handle_exception): Call the filter in a
14994 separate statement for clarity.
14996 * mini-sparc.c: Update status.
14998 2004-05-04 Zoltan Varga <vargaz@freemail.hu>
15000 * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
15003 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15005 * inssel-ppc.brg: another small pre-release workaround:
15006 we don't do overflow detection for long_sub_un.
15008 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15010 * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
15011 (also works around a weird ppc bug: 57957).
15013 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
15015 * tramp-ppc.c: trampoline fixes.
15017 Fri Apr 30 15:54:26 EDT 2004 Paolo Molaro <lupus@ximian.com>
15019 * mini-ppc.c: fixed typos.
15021 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
15023 * mini-ppc.c, exceptions-ppc.c: more code saves registers
15024 at the top of the stack. Fixed typos. Use a frame registers
15025 for all the methods with exception clauses.
15027 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
15029 * exceptions-ppc.c: restore fp registers.
15031 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
15033 * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
15034 order from the stack top (moved the stack room to save the
15035 return value for trace after the param area). Fixed corruption
15036 in restoring registers on unwind.
15038 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
15040 * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
15042 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15044 * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
15045 and prolog/epilog for methods that use it. Allow
15046 enough param area room for varargs methods. Fix miguel's
15047 breakage in exception handling.
15049 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15051 * Makefile.am: run genmdesc only on current arch.
15053 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15055 * exceptions-x86.c:
15056 * mini-x86.h: fix the build on windows.
15058 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
15060 * 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.
15062 * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
15064 * mini-exceptions.c: New file.
15066 * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
15067 Move some parts of the x86 exception handling code to an
15068 arch-independent file so it can be shared with other ports.
15070 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
15072 * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
15074 2004-04-26 David Waite <mass@akuma.org>
15076 * driver.c: remove comma from end of enumeration declaration
15078 2004-04-26 Jackson Harper <jackson@ximian.com>
15080 * driver.c: parse config file before loading first assembly. This
15081 allows the user gac to be enabled/disabled.
15083 2004-04-23 Miguel de Icaza <miguel@ximian.com>
15085 * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
15086 simpler mechanism: we do not care what is encoded initially
15087 (branch absolute or relative), we care about the code and its
15088 target. I kept the old code for reference for now.
15090 The new code tries first to determine if the jump is anywhere in
15091 the -/+32 absolute meg range, if it succeeds, it encodes using the
15092 absolute branch; If not, it tried to find something in the
15093 relative range, if not, it uses the handle_thunk code.
15095 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
15097 * exceptions-ppc.c: use the correct ip register on macosx.
15099 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
15101 * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
15103 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
15105 * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
15106 Raise exception on integer divide by zero by hand since the hw
15107 doesn't support it. Handle NaNs in FP compares.
15109 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
15111 * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
15112 code reducing duplication between the platforms and enabled
15113 signal exception handling (on linux for now).
15115 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
15117 * exceptions-ppc.c: more macosx support.
15119 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15121 * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
15123 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
15125 * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
15127 2004-04-19 Ben Maurer <bmaurer@users.sourceforge.net>
15129 * iltests.il: more tests.
15131 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
15133 * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
15136 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
15138 * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
15140 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
15142 * liveness.c: Mark variables as volatile in all basic blocks reachable
15143 from exception clauses.
15145 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
15147 * exceptions.cs (test_0_rethow_stacktrace): Make this work with
15150 2004-04-18 Ben Maurer <bmaurer@users.sourceforge.net>
15152 * iltests.il, basic.cs: more tests for regalloc.
15154 2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
15156 * iltests.il: Some tests for register allocation modifications
15159 2004-04-16 Zoltan Varga <vargaz@freemail.hu>
15161 * exceptions.cs: Add regression test for bug #56782.
15163 * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
15164 original stack trace if an exception is rethrown. Fixes #56782. Oh,
15165 the beauty of fixing the same thing in 5 different files...
15167 2004-04-15 Zoltan Varga <vargaz@freemail.hu>
15169 * mini.c (mono_method_to_ir): Do not compute coverage for inlined
15172 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
15174 * mini.c: Add support for STRWLPARRAY marshalling convention.
15176 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
15178 * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
15179 to init the context to setup the regs pointer).
15181 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
15183 * exceptions-ppc.c: more exceptions work.
15185 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15187 * mini.c: avoid reusing the same MonoInst on multiple trees: this is
15190 2004-04-13 Miguel de Icaza <miguel@ximian.com>
15192 * inssel-x86.brg (reg): Add new rules for add, sub and mul that
15193 can use the memory directly.
15195 * cpu-pentium.md: Update documentation from a post from Zoltan.
15197 add x86_add_membase, x86_sub_membase, x86_mul_membase
15199 2004-04-13 Miguel de Icaza <miguel@ximian.com>
15201 * mini-ppc.c: Remove unused definitions FLOAT_REGS and
15202 GENERAL_REGS they were also hardcoded for all PPC ports.
15204 (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
15206 Remove hard-coded limit for floating point registers, use
15207 PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
15209 Notice that in MacOS X calling conventions you can fit a lot more
15210 floating point values in registers, so I should update the PInvoke
15211 test to excercise the passing of floating point values on the
15212 stack (currently broken).
15214 2004-04-06 Miguel de Icaza <miguel@ximian.com>
15216 * tramp-ppc.c (create_trampoline_code): Added
15217 JUMP_TRAMPOLINE_SIZE.
15218 (ppc_magic_trampoline): Follow the pattern from
15219 x86_magic_trampoline: if code is set to zero, return.
15220 (create_trampoline_code): Always pass MonoMethod to the jump
15221 trampoline, before it was passing a null.
15222 (mono_arch_create_jump_trampoline): Implement the jump stub, could
15223 share the code with mono_arch_create_jit_trampoline.
15225 * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
15227 (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
15230 * cpu-g4.md: Added length for jmp instruction, the worst case
15231 scenario is 92 bytes (4 mandatory bytes, potential 19 registers
15234 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
15236 * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
15238 2004-04-07 Zoltan Varga <vargaz@freemail.hu>
15240 * mini.c: Only set bblock->real_offset when adding a new bblock, and
15241 before each IL instruction.
15243 * mini.c (CEE_BOX): Fix warnings.
15245 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15247 * mini.c: removed a few unused vars and extra whitespace.
15249 2004-04-05 Ben Maurer <bmaurer@users.sourceforge.net>
15251 * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
15253 (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
15255 (OP_GETCHR): use the above
15256 (CEE_LDELEMA): use the above.
15258 * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
15259 version of the generic impl.
15260 (MONO_EMIT_BOUNDS_CHECK_IMM): the same
15261 (CEE_LDELEMA): use the above.
15263 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
15265 * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
15268 * iltests.il: Added new regression test for #56317.
15270 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
15272 * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
15273 under NetBSD. Fixes #56450.
15275 * liveness.c (update_gen_kill_set): Fix previous patch.
15277 2004-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15279 * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
15281 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
15283 * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
15284 ldsfld and ldsflda.
15286 * inssel-sparc.brg: Add more optimizations.
15288 * mini-sparc.c: Replace multiply/divide with shifts if possible.
15290 2004-04-01 Martin Baulig <martin@ximian.com>
15292 * mini.c (handle_box): New static function; moved the
15293 implementation of CEE_BOX here.
15294 (mono_method_to_ir): Added `constrained_call' variable.
15295 (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
15296 (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
15297 mono_method_get_constrained() to get the method.
15299 2004-04-01 Martin Baulig <martin@ximian.com>
15301 * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
15302 (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
15303 (mono_method_to_ir): We don't need these macros anymore since
15304 mono_class_get_full() already takes care of it.
15306 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15308 * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
15309 use @function (as doesn't accept #function here) and check the return
15310 value of system and stop if fails.
15312 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15314 * mini.c: set the timeout to 2s when calling mono_domain_finalize.
15316 2004-03-31 Zoltan Varga <vargaz@freemail.hu>
15318 * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
15320 * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
15322 * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
15325 * basic-long.cs: Add test for negation of Int64.MinValue.
15327 2004-03-30 Zoltan Varga <vargaz@freemail.hu>
15329 * mini-sparc.c: Update status.
15331 * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
15333 * exceptions-sparc.c: Fix return value in filters.
15335 * inssel-sparc.brg: Fix register allocation in some rules.
15337 2004-03-28 Martin Baulig <martin@ximian.com>
15339 * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
15342 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
15344 * mini-x86.c (mono_arch_patch_code): Fix warnings.
15346 * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if
15347 dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
15348 remove unused conv_u4 opcode.
15350 * mini-x86.c: Remove valgrind workaround since it slows down things
15351 even when mono is not run under valgrind.
15353 2004-03-26 Zoltan Varga <vargaz@freemail.hu>
15355 * mini-sparc.c: Update status.
15357 * inssel-sparc.brg: Add some optimizations.
15359 * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
15360 future delay slot filling. Add support for varargs, tail calls and JMP.
15362 * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of
15363 CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
15365 * inssel.brg: Fix register allocation in OP_ARGLIST.
15367 * inssel.brg: Fix warnings.
15369 2004-03-25 Martin Baulig <martin@ximian.com>
15371 * mini.c (inflate_generic_field): Removed.
15372 (mini_get_method): Removed, use mono_get_method_full(),
15373 (mini_get_class): Removed, use mono_class_get_full().
15374 (mono_method_to_ir): Pass our generic context to
15375 mono_field_from_token().
15377 2004-03-25 Martin Baulig <martin@ximian.com>
15379 * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
15380 of a `MonoMethod *'.
15381 (mini_get_method): Take a `MonoGenericContext *' instead
15382 of a `MonoMethod *'.
15383 (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
15384 a new local variable called `generic_context' which holds the
15385 current `MonoGenericContext *'; use it to lookup things.
15387 2004-03-24 Martin Baulig <martin@ximian.com>
15389 * mini.c (mini_get_class): New static method; if we're inside a
15390 generic instance, inflate the class if neccessary.
15391 (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
15393 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
15395 * iltests.il: New regression test for #55976.
15397 * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
15400 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
15402 * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
15405 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
15407 * liveness.c: Consider SSA stores as well as loads when making vars
15410 * exceptions.cs: New regression tests for register allocation.
15412 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
15414 * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
15415 * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
15416 domain lock only to protect puntual access to data structures.
15417 Added access lock for sighash, jit_icall_hash_name,
15418 jit_icall_hash_addr and domain->code_mp.
15420 2004-03-20 Zoltan Varga <vargaz@freemail.hu>
15422 * driver.c: Print SIGSEGV handling method.
15424 * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
15426 * mini.c (setup_jit_tls_data): Handle case when this is called
15427 multiple times for a thread.
15429 * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx
15430 is different from fbxx_un. Fixes #54303. Also use constants instead of
15431 magic numbers in a lot of places.
15433 2004-03-19 Zoltan Varga <vargaz@freemail.hu>
15435 * exceptions.cs: Fix cctor test when --regression is used.
15437 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
15439 * mini-ppc.c, exceptions-ppc.c: basic exceptions support
15442 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
15444 * inssel-ppc.brg: fixed register assignments for some rules.
15446 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
15448 * exceptions.cs: Add test for exceptions in static constructors.
15450 * mini.c (mono_jit_compile_method_with_out): Move the calling of
15451 static constructors outside the domain lock. Fixes #55720.
15453 2004-03-17 Martin Baulig <martin@ximian.com>
15455 * mini.c (get_generic_field_inst): Removed, this'll never happen.
15456 (inflate_generic_field): Take the `MonoMethod *' instead of the
15457 `MonoClass *' and added support for generic method.
15458 (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
15459 have a `field->parent->gen_params', only inflate the field if it's
15460 an open constructed type.
15462 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
15464 * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
15465 exception object instead of the preconstructed ones.
15467 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15469 * mini.c: reverted changed to sigsegv_signal_handler commited
15470 accidentally in the previous patch.
15472 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15475 (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
15476 running --aot with an old assembly.
15478 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
15480 * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
15483 * mini-sparc.c: Add support for v9 branches with prediction.
15485 2004-03-15 Bernie Solomon <bernard@ugsolutions.com>
15487 * mini.c (mini_init): #warning is GNUC only
15489 * mini-sparc.h: implement __builtin_frame_address
15490 and __builtin_return_address for Sun C compiler
15492 2004-03-15 Zoltan Varga <vargaz@freemail.hu>
15494 * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
15496 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
15498 * basic-calls.cs: Add test for unaligned byref long argument passing.
15500 * mini-ops.h: Add sparcv9 compare and branch instructions.
15502 * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
15503 v9 instructions if we have a v9 cpu.
15505 * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
15506 registers for global allocation.
15508 * exceptions-sparc.c: Fixes.
15510 2004-03-11 Zoltan Varga <vargaz@freemail.hu>
15512 * liveness.c (mono_analyze_liveness): Optimized version.
15514 * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
15516 * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
15519 * basic-float.cs basic-calls.cs: New regression tests.
15521 2004-03-10 Zoltan Varga <vargaz@freemail.hu>
15523 * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
15524 sigaltstack implementation.
15526 * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
15528 * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
15529 stuff if SIGSEGV_ON_ALTSTACK is not defined.
15531 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
15533 * mini.c: Fix warnings.
15535 * mini.c (mono_resolve_patch_target): New function which contains the
15536 arch independent part of the patching process.
15538 * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
15539 patching code to a separate function.
15541 2004-03-09 Bernie Solomon <bernard@ugsolutions.com>
15543 * mini.c (add_signal_handler): ifdef out on Windows
15545 2004-03-08 Zoltan Varga <vargaz@freemail.hu>
15547 * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c
15548 cpu-sparc.md: Add exception handling support + other fixes.
15550 * driver.c: Print --help output to stdout. Fixes #55261. Also fix
15551 typed GC detection in --version.
15553 * basic.cs exceptions.cs: New regression tests.
15555 * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
15556 the arch specific code can store data during a compilation.
15558 * mini-ops.h: Add OP_SETFRET.
15560 * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
15561 function, register a separate icall for each arity, so the icalls can
15564 * mini.c (mono_print_tree): Print negative offsets in a more readable
15567 * mini.c: Make signal handling work on sparc.
15569 * mini.c (mini_init): Add emulation for lconv_to_r8_un.
15571 * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
15573 * jit-icalls.c: Emulate truncl by aintl on solaris.
15575 * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
15577 2004-03-05 Zoltan Varga <vargaz@freemail.hu>
15579 * mini.c (mini_init): fconv_to_ovf can raise exceptions.
15581 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
15583 * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
15584 a MarshalByRef type, inline a method that performs the check, taking into
15585 account that the object can be a proxy. Also implemented tow new opcodes:
15586 CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
15587 * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and
15588 OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
15590 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
15592 * mini-ppc.c: if a relative branch displacement is too big
15593 but it points to and area reachable with an absolute branch,
15596 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
15598 * mini.c: optimize small copies in cpblk.
15600 2004-03-01 Zoltan Varga <vargaz@freemail.hu>
15602 * basic-calls.cs basic-float.cs: New regression tests.
15604 * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at
15605 negative offsets from %fp. Implement localloc. Fix local register
15606 allocation. Fix the case when the this argument needs to be saved to
15607 the stack. Implement some missing opcodes.
15609 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
15611 * mini.c (mini_method_compile): Reenable global regalloc in methods
15612 with exception handlers.
15614 * linear-scan.c (mono_varlist_sort): Fix warning.
15616 * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
15618 * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
15621 * liveness.c: Make all variables uses in exception clauses volatile, to
15622 prevent them from being allocated to registers. Fixes #42136.
15624 2004-02-25 Zoltan Varga <vargaz@freemail.hu>
15626 * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
15627 causes regressions.
15629 * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
15630 argument to mono_arch_regalloc_cost.
15632 * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs
15635 2004-02-24 Zoltan Varga <vargaz@freemail.hu>
15637 * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c:
15638 Make the cost of allocating a variable to a register arch dependent.
15640 * basic-calls.cs: Fix compilation of tests.
15642 * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
15643 helper function to cut back on the number of #ifdefs needed.
15645 * mini-ppc.c: Fix compilation.
15647 * basic-calls.cs: New regression tests.
15649 * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
15651 * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
15652 of l0 since that is callee saved.
15654 * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
15657 * mini-sparc.c: Ongoing work + flag virtual calls with a special kind
15658 of delay instruction.
15660 * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
15662 * mini.h (MonoCallInst): Add 'virtual' flag.
15664 * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
15666 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
15668 * *.cs: New regression tests.
15670 * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc
15673 * mini.c (mono_runtime_install_handlers): Fix build.
15675 * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
15676 'signal_stack_size' members.
15678 * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an
15679 alternate signal stack.
15681 * exceptions-x86.c: Add stack overflow handling.
15683 * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing
15684 functions to arch independent code.
15686 * mini.c (mono_print_tree): Print more detailed info for load_membase
15689 2004-02-23 Martin Baulig <martin@ximian.com>
15691 * mini.c (mini_get_method): Set `gmethod->generic_inst'.
15693 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
15695 * mini-x86.c: fixed reg allocation for div/rem.
15697 2004-02-22 Miguel de Icaza <miguel@ximian.com>
15699 * driver.c (mono_main): Report some configuratio options on --version.
15701 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
15703 * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
15704 low in the address space. Correctly flush memory in thunks where we
15705 output native code.
15707 2004-02-20 Martin Baulig <martin@ximian.com>
15709 * mini.c (mini_get_method): New static method; inflate all generic
15710 methods and methods in open generic instances.
15711 (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
15712 (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
15714 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
15716 * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
15718 * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
15720 2004-02-19 Bernie Solomon <bernard@ugsolutions.com>
15722 * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
15724 * mini-sparc.c (flushi mono_arch_output_basic_block): make
15725 it compile using Sun's compiler.
15727 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
15729 * 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.
15731 * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
15733 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
15735 * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
15737 * mini-ppc.c: handle calls outside of the allowed range with thunks
15738 allocated using the code manager.
15739 * tramp-ppc.c: use the code manager to hold generated native code.
15740 Fixed the magic trampoline to just patch vtable entries.
15742 2004-02-17 Zoltan Varga <vargaz@freemail.hu>
15744 * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
15747 2004-02-16 Zoltan Varga <vargaz@freemail.hu>
15749 * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
15752 * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
15753 if we have a working __thread implementation.
15755 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove
15756 OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
15758 2004-02-15 Zoltan Varga <vargaz@freemail.hu>
15760 * mini-x86.c: Fix compilation under gcc 2.
15762 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
15764 * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
15765 contains a call to the wrapped function.
15767 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add
15768 OP_<CALL>_IMM opcodes, and use them under X86.
15770 * mini.c (mono_jit_find_compiled_method): Fix warning.
15772 * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
15774 * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
15776 * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
15777 functionality to mini.c.
15779 * mini.c (mono_create_jump_trampoline): New function to create a jump
15780 trampoline. Return a compiled method instead of a trampoline if it
15781 exists. Add a cache for jump trampolines.
15783 * mini.c (mono_jit_find_compiled_method): New function to return a
15784 compiled method if it exists.
15786 * mini-x86.c: Call mono_create_jump_trampoline instead of
15787 mono_arch_create_jit_trampoline.
15789 * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
15790 a jump trampoline. Fixes #52092.
15792 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
15794 * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
15795 which is not up-to-date. Add check_corlib_version () instead.
15797 * mini.c (mini_init): Call mono_thread_attach () so embedders do not
15800 * mini.c (mono_runtime_install_handlers): Remove check for valgrind
15801 since newer valgrind versions do not need it.
15803 * mini.c (mono_jit_compile_method_with_opt): New helper function to
15804 compile a method with a given set of optimizations.
15806 * mini.c: Compile icall wrappers on-demand instead of at startup.
15808 * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
15809 wrapper for an icall.
15811 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
15813 * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
15816 * iltests.il: Add test for non-empty stack before switch instruction.
15818 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
15820 * mini.c: Add support for new stringbuilder marshalling conventions.
15822 * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
15824 2004-02-01 Martin Baulig <martin@ximian.com>
15826 * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
15827 in `ginst->mtype_argv'.
15829 2004-01-31 Miguel de Icaza <miguel@ximian.com>
15831 * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
15832 facilitate grepping.
15834 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
15836 * mini.c: fixed buglet in initobj generic implementation for references.
15838 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
15840 * Makefile.am: make the version script conditional.
15841 * jit-icalls.c: handle missing truncl().
15843 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
15845 * exceptions.cs: Add more tests for double->int conversion.
15847 * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
15848 we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
15850 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
15852 * driver.c: make --verbose --version emit an error
15853 if the loaded corlib doesn't match the runtime version.
15855 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
15857 * mini-ppc.h: export ppc_patch().
15858 * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
15859 * tramp-ppc.c: call convention fixes: Linux/PPC support should be
15860 on par or better than on MacOSX.
15862 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
15864 * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
15865 mono_lookup_pinvoke_call.
15867 * mini-x86.c: Under windows, the default pinvoke calling convention is
15868 stdcall. Fixes #52834.
15870 * mini.c (optimize_branches): Add an upper bound to the number of
15871 iterations to prevent infinite loops on strange loops. Fixes #53003.
15873 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
15875 * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
15876 and ISINST. Fixes #52093.
15878 * objects.cs (test_0_vector_array_cast): New tests.
15880 2004-01-15 Zoltan Varga <vargaz@freemail.hu>
15882 * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
15883 checking in Array.Set ().
15885 * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
15888 * object.cs (test_0_multi_array_cast): New regression test.
15890 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
15892 * exceptions-ppc.c: fix build on Linux/PPC.
15894 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
15896 * tramp-x86.c (x86_magic_trampoline): Disable code patching when
15897 running under valgrind.
15898 (x86_magic_trampoline): Fix build bustage.
15900 * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
15901 negative values as well. This is needed for the encoding of the line number
15902 info, since sometimes the line numbers are not in increasing order.
15904 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
15906 * cpu-pentium.md (localloc): Increase the size of the localloc
15907 instruction since it is a loop under Win32.
15909 * debug-mini.c (record_line_number): Get rid of unneccesary memory
15912 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
15914 * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c
15915 tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from
15916 Max Horn (max@quendi.de). Fix file names in comments.
15918 2004-01-03 Zoltan Varga <vargaz@freemail.hu>
15920 * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
15921 avoid stack overflow.
15922 (replace_usage): Avoid uninitialized variable warnings.
15924 * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
15925 and taking the address of valuetype variables.
15927 2004-01-03 Patrik Torstensson
15929 * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
15930 for other purposes than FP later on.
15932 2004-01-02 Zoltan Varga <vargaz@freemail.hu>
15934 * mini.c (mono_method_to_ir): Prevent register allocation for arguments
15937 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
15939 * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
15941 2003-12-30 Patrik Torstensson <p@rxc.se>
15943 * mini-x86.h: Decreased number of availiable fp regs.
15944 Solves corner cases with FP spilling.
15946 2003-12-23 Patrik Torstensson <p@rxc.se>
15948 * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
15949 for floating point stack tracking / spilling on x86.
15952 * basic-float.cs: added float mul overflow test.
15954 2003-12-23 Zoltan Varga <vargaz@freemail.hu>
15956 * mini.c (mono_method_to_ir): Add workaround for bug #51126.
15958 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15960 * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
15961 supports for cond branches that overflow the immediate
15962 overflow offset. mcs can compile simple programs.
15964 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15966 * exceptions-ppc.c: exception handling support wip:
15967 finally handlers get run on exception.
15969 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
15971 * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while
15974 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15976 * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
15977 initial support for stack walking and unwinding.
15979 2003-12-18 Zoltan Varga <vargaz@freemail.hu>
15981 * driver.c (mono_main): Make corlib-out-of-sync message more
15982 descriptive. Also remove verify_corlib call.
15984 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15986 * mini.c: make CEE_NEWARR calls and other emulated opcodes
15987 not overlap with other call's arguments, too.
15989 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
15991 * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c:
15992 move to arch-specific code the choice of arch-specific
15993 intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
15994 * mini.c: ensure emulation calls will not interleave
15997 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
15999 * tramp-ppc.c, basic-calls.cs: rework trampolines so that
16000 the magic trampoline stack frame is dropped before executing
16003 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
16005 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
16006 and integer to fp conversions. Added support for overflowing
16007 arguments on the stack. Reserve a couple more registers as temps.
16008 Added support for aot compilation (as output still needs to be
16011 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
16013 * mini-ppc.c, basic-long.cs: fix jumps to known labels.
16014 Don't overwrite return register in some corner cases.
16016 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
16018 * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
16019 static constructors when AOT compiling.
16021 * driver.c (mono_main): Call mono_check_corlib_version.
16023 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
16025 * cpu-g4.md, basic.cs: fixed div target register.
16027 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
16029 * mini-ppc.c, basic.cs: shl_imm fix with test.
16031 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
16033 * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing
16034 structures by value. Misc fixes.
16035 * objects.cs: more tests.
16037 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
16039 * mini-ppc.c: lconv.ovf.i implemented.
16041 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16044 (mini_init): don't error out if someone already called g_thread_init.
16046 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
16048 * exceptions-x86.c, exceptions-ppc.c: allow the exception object
16049 to be any type per the spec. Fix abnormal memory usage when
16050 the same object is repeatedly thrown.
16052 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
16054 * mini.c: check for overruns in IL code.
16056 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
16058 * TODO: Add/remove some todo entries.
16060 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
16062 * driver.c (mono_main): Call mono_verify_corlib.
16064 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
16066 * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy.
16067 This has been moved to mini.c
16068 * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
16069 type being casted is marshalbyref it could be a proxy, so instead of
16070 emitting the type check code, emit a call to a runtime method that will
16071 perform the check by calling CanCastTo if needed.
16073 2003-12-06 Zoltan Varga <vargaz@freemail.hu>
16075 * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
16076 methods with large stack frames under Win32.
16078 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
16080 * Makefile.am: Distribute regression tests.
16082 * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
16083 at the end instead of inserting each variable into the sorted list.
16085 * linear-scan.c (mono_varlist_sort): New helper function.
16087 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
16089 * mini.c: ensure arguments and locals are within bounds.
16091 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
16093 * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and
16096 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
16098 * mini.c (mono_cprop_copy_values): Fix crash.
16100 * aot.c: Set verbosity back to 0.
16102 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
16104 * regalloc.c: complete memory leak fix by Laurent Morichetti
16107 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
16109 * driver.c (main_thread_handler): Revert the previous patch.
16111 * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
16114 * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
16115 memory from the memory pool.
16117 * driver.c (main_thread_handler): Turn on all optimizations when
16120 * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
16121 an array for better performance.
16123 * regalloc.c (mono_regstate_assign): Fix memory leak.
16125 * debug-mini.c (mono_debug_serialize_debug_info): New function to
16126 serialize the debug info.
16128 * debug-mini.c (mono_debug_add_aot_method): New function to load the
16129 debug info from the serialized representation.
16131 * aot.c: Save debug info into the generated file and load it when
16134 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
16136 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
16138 * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
16139 More FP-related fixes.
16141 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
16143 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
16144 and register allocation buglet. Hello world now runs.
16146 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
16148 * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
16149 * tramp-ppc.c: fixed class init trampoline.
16150 * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
16152 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
16154 * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
16155 mini.c: more ppc changes/fixes.
16157 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
16159 * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
16160 Also optimize the case when the arguments are the same in the caller
16163 * iltests.il: Add tests for tail calls with valuetype arguments.
16165 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
16167 * mini-ppc.c: fixes for struct return type.
16169 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
16171 * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move
16172 mono_spillvar_offset() to arch-specific code.
16174 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
16176 * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
16178 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
16180 * exceptions-x86.c: Fix stack space leaks.
16182 * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
16183 registers from the lmf if the method has save_lmf set.
16185 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
16187 * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
16188 of icall wrappers into InvokeInDomain, since these are now per-domain.
16190 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
16192 * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
16193 make some opcode emulation and intrinsic ops enabled/disabled
16194 according to the architecture. More fixes.
16196 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
16198 * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
16200 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
16202 * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
16203 arch-specific handling for 'this' and struct return type to
16204 arch-specific code.
16206 2003-11-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16208 * aot.c: prevent divide by zero error when reporting (it happened with
16209 Accessibility.dll).
16211 2003-11-25 Zoltan Varga <vargaz@freemail.hu>
16213 * mini.h (inst_switch): Remove unused macro.
16215 2003-11-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16218 (load_aot_module): free 'info->methods' and 'info' properly. No more
16219 "free(): invalid pointer blah" messages when you have an old aot
16222 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
16224 * jit-icalls.c, mini.c: Added support for context static fields.
16226 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
16228 * mini.c (mono_method_blittable): Methods which set LastError are not
16229 blittable either. Fixes #51108.
16231 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
16233 * mini.c: flush icache.
16234 * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
16236 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
16238 * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
16240 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
16242 * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
16245 * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with
16248 * inssel.brg (CEE_MKREFANY): Fix AOT case.
16250 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
16252 * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div
16253 instruction when the result is discarded.
16255 * iltests.il (test_0_div_regalloc): New regression test.
16257 * arrays.cs: Fix compilation error.
16259 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
16261 * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
16262 float rules to inssel-x86.brg: sane architectures with FP registers
16263 don't need to implement these rules.
16265 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
16267 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
16269 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
16271 * mini.h, inssel-long32.brg: fixed endianess issues in int64
16272 implementation of 32 bit systems.
16274 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
16276 * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
16277 (Jeroen Zwartepoorte).
16279 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
16281 * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
16282 the caller and the callee matches.
16284 * mini.c (mono_method_to_ir): Add comment.
16286 * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
16287 signbit is missing on some platforms.
16289 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
16291 * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
16293 * mini.c (setup_jit_tls_data): Call the new function.
16295 * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
16297 * mini-x86.c: Add experimental support for fast access to the lmf
16298 structure under NPTL/Linux 2.6.x.
16300 2003-11-06 Martin Baulig <martin@ximian.com>
16302 * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
16303 `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
16306 2003-11-02 Martin Baulig <martin@ximian.com>
16308 * mini.c (inflate_generic_field): New static method.
16309 (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
16310 generic instance and the field is declared in a generic type, call
16311 inflate_generic_field() to inflate it. Fixes gen-28.cs.
16313 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
16315 * mini.h mini.c (mono_method_same_domain): New function to return
16316 whenever the caller and the callee are in the same domain.
16318 * tramp-x86.c (x86_magic_trampoline): Use the new function.
16320 2003-10-30 Martin Baulig <martin@ximian.com>
16322 * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
16323 similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
16325 (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
16326 MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS().
16328 2003-10-29 Zoltan Varga <vargaz@freemail.hu>
16330 * mini.c mini-ops.h inssel.brg: Implement undeniable exception
16333 * mini.c (sigusr1_signal_handler): Move creation of the thread abort
16334 object here, so it is in the correct appdomain etc.
16336 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
16338 * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
16340 (mono_method_to_ir): Avoid freeing the type created returned from
16341 mono_type_create_from_typespec, since it is put into an internal cache
16342 by the function. Fixes pointer.exe.
16344 * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal
16345 trampolines for icalls and pinvokes as well. Fixes #33569.
16347 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
16349 * mini.c: Update after appdomain changes.
16351 * mini.c (mono_jit_compile_method_inner): Allways compile native
16352 method wrappers in the root domain, since there can only be one
16353 instance of them, whose address is stored in method->info.
16355 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
16357 * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
16358 environment variable. Instead detect automatically whenever running
16359 under valgrind using the magic macro RUNNING_ON_VALGRIND from
16362 2003-10-16 Miguel de Icaza <miguel@ximian.com>
16364 * trace.c, trace.h: New files that implement the new trace option
16367 * driver.c: Document new --trace options.
16369 * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
16372 - if (mono_jit_trace_calls)
16373 + if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
16375 * mini.h: prototypes.
16377 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
16379 * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
16381 * mini.c inssel.brg: Implement typedefbyref opcodes.
16383 * mini.c (mono_jit_compile_method): Remove unused local variable.
16385 * mini.c (mono_jit_compile_method_inner): Ditto.
16387 2003-10-12 Zoltan Varga <vargaz@freemail.hu>
16389 * tramp-x86.c (x86_class_init_trampoline): Fix build.
16391 * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
16393 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
16395 * mini.c (mono_no_aot): Remove unused global variable.
16397 * mini.c: Thread safety fixes.
16399 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
16401 * mini.c (mono_create_class_init_trampoline): Add a lock around
16402 class_init_hash_addr.
16404 * arrays.cs (test_0_newarr_emulation): Add new regression test for
16407 * mini.c: Decompose the NEWARR instruction before decomposing its
16408 arguments. Fixes #30073.
16410 2003-10-08 Zoltan Varga <vargaz@freemail.hu>
16412 * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
16415 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
16417 * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
16419 * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
16421 * driver.c: Add support for compiling icall wrappers to --compile.
16423 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
16425 * inssel.brg: The empty value in class->interface_offsets is -1, not
16428 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
16430 * objects.cs: New test for 'is' operator on an array of interfaces.
16432 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16434 * tramp-ppc.c: update trampoline code to support jumps
16435 and class initialization.
16437 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
16439 * mini.c (mono_jit_compile_method): Fix reading of freed memory.
16441 * inssel.brg (OP_UNBOXCAST): Fix #46027.
16443 * inssel.brg (OP_UNBOX): Remove unused rule.
16445 * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
16446 region instead of one for each method. Fixes #47813.
16448 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
16450 * exceptions.cs (test_0_nested_finally): New regression test for
16451 nested exception handlers.
16453 * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
16455 * mini.c (mono_method_to_ir): Avoid inlining tail calls.
16457 * mini.c (mono_method_to_ir): Fix tail recursion in the presence of
16460 * mini.c (mono_method_check_inlining): Make the inlining limit
16461 configurable by an environment variable.
16463 * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
16465 * mini.h: Bump AOT file version.
16467 * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a
16468 token, store the image along with the token, since the token might not
16469 refer to the same image as the method containing the relocation,
16470 because of inlining.
16472 2003-09-27 Zoltan Varga <vargaz@freemail.hu>
16474 * mini.c (mono_precompile_assemblies): New function to compile
16475 all methods in all loaded assemblies.
16477 * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
16479 * regalloc.h regalloc.c (MonoRegState): Change the type of
16480 iassign and fassign to int*, since they can contain large negative
16481 values if the register is spilled. Also added some comments. Fixes
16484 * exceptions-x86.c (seh_handler): Fix handling of system exceptions
16485 under Win32. Fixes #42964.
16487 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
16489 * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
16491 * aot.c: Added support for AOT compiling methods which contain calls
16492 to wrappers. Currently, only remoting-invoke-with-check wrappers are
16495 * driver.c (compile_all_methods): Run the compilation in a thread
16496 managed by mono. Fixes #44023.
16498 * mini.c (mono_codegen): Print full method name in verbose output.
16500 * mini-x86.c (mono_arch_patch_code): Fix warning.
16502 * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
16503 jumps, since the method we are jumping to might be domain-specific.
16505 * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
16507 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16509 * inssel.brg: string chars are unsigned.
16511 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
16513 * TODO: New todo item.
16515 * tramp-x86.c (x86_class_init_trampoline): New trampoline function
16516 which calls mono_runtime_class_init and patches the call site to
16517 avoid further calls.
16518 (mono_arch_create_class_init_trampoline): New arch specific function
16519 to create a class init trampoline.
16520 (create_trampoline_code): Generalized so it can create
16521 class init trampolines as well.
16523 * mini.c (helper_sig_class_init_trampoline): New helper variable.
16524 (mono_create_class_init_trampoline): New function to create and cache
16525 class init trampolines.
16526 (mono_find_class_init_trampoline_by_addr): New function to lookup the
16527 vtable given the address of a class init trampoline. Used by the
16529 (mono_codegen): Generate a call to a trampoline instead of
16530 mono_runtime_class_init in LDSFLD[A].
16531 (mono_codegen): Add relocations for the new trampoline.
16533 * mini.h mini-x86.c aot.c: Added a new relocation type:
16534 MONO_PATCH_INFO_CLASS_INIT.
16536 * mini.h: Bump AOT version number.
16538 * aot.c: Create a copy of the loaded code instead of using the original
16539 so methods which call each other will be close in memory, improving
16542 * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
16543 patch since it breaks the regression tests.
16545 * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
16546 for the register saving instruction sequence since the
16547 frame_state_for function in glibc 2.3.2 don't seem to detect it.
16549 2003-09-14 Zoltan Varga <vargaz@freemail.hu>
16551 * TODO: Fix todo item && remove another.
16553 2003-09-12 Zoltan Varga <vargaz@freemail.hu>
16555 * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
16558 * aot.c: Moved the check for MONO_LASTAOT into the initialization
16559 function of the module.
16561 * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
16562 turning on/off the usage of AOT code. Got rid of mono_no_aot and the
16563 --no-aot command line option.
16565 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
16567 * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
16568 by Bernie Solomon (bernard@ugsolutions.com).
16570 * inssel.brg: Refactor the interface offset table related code into
16571 its separate functions and add support for the AOT case.
16573 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
16575 * aot.c (mono_aot_get_method_inner): Fix memory leak.
16577 * aot.c: Added mono_aot_verbose variable and made all debugging
16578 output depend on the value of this variable.
16580 * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
16581 method_label and info_label.
16583 * mini.h mini-x86.c aot.c: Added a new relocation type
16584 MONO_PATCH_INFO_IID for klass->interface_id.
16586 * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
16587 the MonoJitInfo structure.
16589 * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
16590 a non-root appdomain in shared mode.
16592 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
16594 * aot.c: make aot loader less verbose. Remove free of unused variable.
16596 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
16598 * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
16600 * .cvsignore: Added *.dll.
16602 * mini.c (mono_print_tree_nl): New function callable while debugging.
16604 * mini.c (mono_print_code): Export this.
16606 * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
16609 2003-09-05 Zoltan Varga <vargaz@freemail.hu>
16611 * mini.h (MonoCompile): Added 'jit_info' field.
16613 * mini.c (mini_method_compile): Save the generated MonoJitInfo into
16614 the cfg structure, since it is needed by the AOT compiler.
16616 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
16618 * aot.c: A major rewrite. Changes include:
16619 - save exception tables for methods which have them.
16620 - cache failed lookups in aot_get_method () to avoid the (slow) calls
16621 to g_module_symbol.
16622 - reworked the file format so it is now much smaller and needs
16623 fewer relocation entries.
16625 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
16627 * aot.c (load_aot_module): Fix build bustage on platforms without
16630 2003-09-04 Martin Baulig <martin@ximian.com>
16632 * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
16634 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
16636 * TODO: Some new optimization ideas.
16638 * aot.c: Move AOT module loading logic here from mono_assembly_open.
16640 * aot.c: Save the optimization flags used to compile the code into
16643 * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
16644 support emitting domain specific code.
16646 * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is
16647 no longer domain neutral. It can be made domain neutral by compiling
16648 with --optimize=shared.
16650 * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
16651 between appdomains.
16653 * driver.c mini.h mini.c: New --no-aot debugging option which disables
16654 loading of AOT code.
16656 * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
16658 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
16659 if there is no domain neutrality information.
16661 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
16663 * aot.c (mono_compile_assembly): Emit a symbol containing the file
16664 format version into the generated library.
16666 * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
16667 callee method into the caller since one of them could be shared.
16669 * mini.h mini-x86.c aot.c: Added two new relocations so throwing
16670 system exceptions from AOT code now works.
16672 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling
16673 method if it is domain neutral and the callee is not.
16675 * graph.c (cfg_emit_one_loop_level): Fix warning.
16677 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
16679 * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
16682 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
16684 * mini.c (mini_init): Call mono_marshal_init () explicitly since it
16685 is needed by code which is executed before mono_runtime_init ().
16686 Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
16688 * mini.c (mono_thread_abort): Fix warning.
16689 (mono_jit_compile_method): Call static constructor in the AOT case too.
16691 * aot.c (mono_compile_assembly): Fix warning.
16693 2003-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16695 * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
16697 2003-08-28 Zoltan Varga <vargaz@freemail.hu>
16699 * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
16701 * cpu-pentium.md: Fix the length of call opcodes so they include the
16702 ESP restoring instruction. Fixes #47968.
16704 2003-08-28 Martin Baulig <martin@ximian.com>
16706 * mini-x86.c (mono_arch_call_opcode): Added support for
16707 MONO_TYPE_GENERICINST.
16709 * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.
16711 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
16713 * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
16714 a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
16716 * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
16719 2003-08-26 Martin Baulig <martin@ximian.com>
16721 * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
16722 when reporting an error, set this to the actual error location.
16723 (mono_method_to_ir): Report the correct error location if
16724 get_basic_blocks() returned an error.
16726 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
16728 * mini.c (mono_type_blittable): OBJECT is not blittable.
16729 (mono_method_blittable): Methods which have marshalling descriptors
16730 are not blittable either. Fixes #47842.
16732 2003-08-22 Zoltan Varga <vargaz@freemail.hu>
16734 * driver.c mini.c: Use an environment variable instead of a global
16735 variable. Also fix the build.
16737 * mini.c (mini_init): Call g_thread_init () to make glib thread-safe.
16738 Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
16741 * driver.c mini.c: Added --with-valgrind option to turn off some
16742 code which prevents mono from running under valgrind.
16744 * mini.c (mono_emit_call_args): Fixed warning.
16746 * mini.c (mono_emulate_opcode): Fixed warning.
16748 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16750 * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
16751 * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
16752 regalloc.c, regalloc.h: specify available registers in arch-specific
16753 code and support floats in the regallocator (patch by Laurent Morichetti
16756 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16758 * mini.c: mono_thread_current() can be called only after
16759 mono_runtime_init(): rearrange code to not call it early on.
16761 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16763 * mini.c: allocate jump tables in the code mempools.
16765 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16767 * mini.c, mini.h: make sure per-thread data allocated by the jit is
16770 2003-08-10 Miguel de Icaza <miguel@ximian.com>
16772 * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
16773 12 to 16. This fixes bug #47453.
16776 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
16778 * mini-ppc.c: fixed indexed load and unsigned compares.
16780 2003-08-06 Lluis Sanchez Gual <lluis@ximian.com>
16782 * mini.c: reenabled installation of handler for
16783 thread abort signal.
16785 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16787 * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
16788 by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
16789 until it's fixed and actually useful.
16791 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16793 * inssel-long32.brg: couple more opcodes implemented.
16795 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
16797 * mini-sparc.c: Even more opcodes implemeted.
16799 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
16801 * mini-sparc.c: More opcodes implemented.
16803 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
16805 * mini-sparc.c: More opcodes implemented.
16807 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
16809 * inssel-sparc.brg: Add some needed rules. Direct
16811 * Makefile.am: Use inssel-sparc.brg
16812 * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
16813 an assert happy for now.
16815 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
16817 * mini-sparc.c: Fixed compile errors.
16818 * exceptions-sparc.c: Same. We now produce a mono binary
16819 on sparc-linux. Yea.
16821 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
16823 * mini-sparc.c: Renamed registers. Also some macro cleanups.
16824 * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
16825 They compile, but do not work.
16827 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16829 * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
16830 mini-sparc.h, tramp-sparc.c: Beginning of sparc support
16831 from Mark Crichton <crichton@gimp.org> and Christopher Taylor
16834 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16836 * mini.c: more opcodes implemented and better support for generics.
16838 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16840 * cpu-g4.md, cpu-pentium.md: updates for new instructions.
16841 * mini.c, mini.h: first cut at generics support: some new instructions
16842 added and changed the behaviour of some of the existing ones.
16844 2003-07-21 Miguel de Icaza <miguel@ximian.com>
16846 * mini.c: Removed definition of metadata_shared mutex here.
16848 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16850 * mini-x86.c: make vararg calls work for instance methods.
16852 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
16854 * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
16855 returns the arguments in a separte list, now.
16857 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16859 * aot.c, mini.c: updates for array type representation changes.
16861 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
16863 * mini.c: register function to perform jit shutdown.
16865 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16867 * mini.c: use a faster allocator if possible.
16869 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16871 * aot.c: some cleanups and portability changes.
16873 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16875 * mini.c: use faster allocation for CEE_BOX if possible.
16877 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16879 * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
16880 Moved inlined mempcy code to its own function so that is can be
16881 reused. Added an inline memset function as well (optimized initobj).
16882 * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
16884 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16886 * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
16888 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
16890 * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
16891 arch code can setup the cpu for CLR execution, if needed.
16892 We use it on x86 to set the precision of FP operations.
16894 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
16896 * mini.c: disable some optimizations if we can guess they'll cost too
16897 much for a given method.
16899 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
16901 * mini.h mini.c: Rework last patch based on suggestions by Paolo.
16903 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
16904 * mini.h mini.c mini-x86.c: Added instruction level coverage
16905 info collection support.
16907 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16909 * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
16910 is now implemented in the profiling API. Get rid of a couple of
16911 unnecessary global variables.
16913 2003-06-15 Nick Drochak <ndrochak@gol.com>
16915 * basic-long.cs: tests for negative values for bigmul, and unsigned.
16916 * cpu-g4.md: add op_bigmul and op_bigmul_un
16917 * cpu_pentium.md: add op_bigmul_un
16918 * inssel-long32.brg: add rule for unsigned bigmul
16919 * mini-ops.h: define OP_BIGMUL_UN
16920 * mini-x86.c: THE BUG: handle (un)signed properly
16921 * mini.c: choose unsigned opcode if needed.
16922 This set of patches fixes bug #44291
16924 2003-06-13 Dietmar Maurer <dietmar@ximian.com>
16926 * mini.c (optimize_branches): improved to handle all kinds of
16927 conditional branches.
16929 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16931 * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
16932 don't raise exceptions.
16934 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16936 * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
16937 to arch-specific files.
16939 2003-06-09 Martin Baulig <martin@ximian.com>
16941 * Makefile.am (libs): Added $(LIBGC_LIBS).
16943 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
16945 * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
16946 and OP_ATAN (fixes bug#44293).
16948 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
16950 * Makefile.am, mini-x86.c: rename cpu description array to
16951 pentium_desc, since some compilers define the 'pentium' preprocessor
16954 2003-05-28 Dietmar Maurer <dietmar@ximian.com>
16956 * mini.c (mini_select_instructions): add explicit branch if the
16957 following block is not the false target of a conditional branch -
16958 we need this with any optimization that reorder or remove bblocks
16960 * mini.c (optimize_branches): bug fixes
16962 2003-06-06 Dietmar Maurer <dietmar@ximian.com>
16964 * mini.c (mono_method_to_ir): inline static readonly fields
16966 * ssa.c (fold_tree): start cfold support for long (very simple
16969 * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
16971 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16973 * inssel.brg: fixed memcpy (bug #44219).
16975 2003-06-05 Dick Porter <dick@ximian.com>
16977 * driver.c: Set the glib log levels to not abort if g_message
16980 g_set_prgname() has to happen before mini_init() so that the
16981 process handle gets the info.
16983 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16985 * driver.c: add intrins to the default optimizations to get wider
16988 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16990 * mini.h: some large basic blocks will overflow a 16-bit
16991 integers for symbolic registers.
16993 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
16995 * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
16996 (mono_arch_output_basic_block): fix bug 43499
16998 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
17000 * mini.c: kill duplicated definition of mono_debug_format.
17002 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
17004 * mini-x86.c, arrays.cs: fixed register allocation bug.
17006 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
17008 * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
17010 * mini.c (mini_get_opcode_for_method): inline IEEERemainder
17012 2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17015 (print_method_from_ip): also print source location information if
17018 2003-06-02 Dietmar Maurer <dietmar@ximian.com>
17020 * mini.c (mono_find_block_region): bug fix in region code
17021 (mini_method_compile): enable removing unreachable code again, but
17022 only in methods without exception clauses.
17024 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
17026 * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
17027 Implemented arglist opcode and handling of TypedReference type.
17028 Fixed x86 call convention when a structure is returned.
17029 Minimal support for calling static vararg methods.
17031 2003-05-30 Dietmar Maurer <dietmar@ximian.com>
17033 * mini.c (mini_method_compile): always remove unreachable code,
17034 because the code in them may be inconsistent (access to dead
17035 variables for example).
17037 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
17039 * driver.c, debug-mini.c: warning fixes.
17041 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
17043 * Makefile.am, jit.h, mini.h: install header for embedding mono.
17045 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
17047 * mini.c: thread-static fields are registered in mono_class_vtable(),
17048 so ensure the function is called before checking for them.
17050 2003-05-27 Dietmar Maurer <dietmar@ximian.com>
17052 * mini.c (optimize_branches): fix for bug 43586
17054 * jit-icalls.c (mono_llmult_ovf): added an additional check for
17055 overflow (fixes Bug #43639)
17057 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17059 * mini.c, objects.cs: allow the use of stobj for primitive types.
17061 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17063 * mini.c: be less strict about argument checking until we support
17064 running the verifier.
17066 2003-05-27 Nick Drochak <ndrochak@gol.com>
17068 * basic-long.cs: tests for (ulong)int * (ulong)int also
17069 * mini.c: use the same trick for (ulong)int * (ulong)int
17071 2003-05-27 Nick Drochak <ndrochak@gol.com>
17073 * basic-long.cs: add regression test for (long)int * (long)int
17074 * cpu-pentium.md: add op_bigmul specification
17075 * inssel-long32.brg: add OP_BIGMUL rule
17076 * mini-ops.h: add OP_BIGMUL
17077 * mini-x86.c: register allocator: handle case where src1 needs to be
17079 * mini.c: substitute special BIGMUL opcode in the tree for
17080 (long)int * (long)int
17082 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
17084 * jit-icalls.c: call the type ctor on field access if needed.
17086 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
17088 * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
17089 to a method (including results of ldelema, bug#43207).
17091 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
17093 * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
17094 colors to show exception handler blocks.
17096 * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
17097 (fix for pinvoke7.cs).
17099 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17101 * mini.h, mini.c: ensure correct initialization order for types that
17102 require it. Prepare for lazy compilation of jit icall wrappers.
17103 Provide a name for opcode emulation to reduce unneeded mallocing.
17105 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
17107 * mini-x86.c: better register restoring code and profiling
17108 support for tail calls.
17110 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17112 * mini.h, driver.c: prepare for leaf methods optimization.
17114 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
17116 * mini.c: get targets of branches before converting a method.
17118 2003-05-23 Dietmar Maurer <dietmar@ximian.com>
17120 * mini.c (optimize_branches): added some experimental code (disbaled)
17122 2003-05-22 Dietmar Maurer <dietmar@ximian.com>
17124 * mini.c (optimize_branches): fix branch to branch optimization
17126 * exceptions-x86.c (mono_arch_handle_exception): bug fix.
17128 * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
17130 * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
17132 * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
17135 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
17137 * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
17138 enable use of interface variables again.
17140 * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
17141 I1 to registers because there is no simply way to sign extend 8bit
17142 quantities in caller saved registers on x86.
17144 * inssel-float.brg: set costs of some rules to 2 so
17145 that monobure always select the arch. specific ones if supplied,
17146 regardless of the order we pass the files to monoburg.
17148 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
17150 * mini.c, mini-x86.c: since the magic trampoline for jumps
17151 can't patch the code directly, we do it as soon as the
17152 method gets compiled.
17154 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
17156 * mini-x86.c, mini.h: introduce a new patching method
17157 to support CEE_JMP and tail calls.
17158 * mini.c: obey tail.call. Don't precompile methods target
17160 * tramp-x86.c: new trampoline code to handle methods
17161 reached through a jump.
17163 2003-05-20 Dietmar Maurer <dietmar@ximian.com>
17165 * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
17166 bit values to registers
17168 2003-05-19 Dietmar Maurer <dietmar@ximian.com>
17170 * mini.c (mono_compile_get_interface_var): share interface
17171 variables if possible.
17173 2003-05-16 Martin Baulig <martin@ximian.com>
17175 * debug-mini.c (mono_init_debugger): New function to initialize
17176 the debugger. This is not in the debugger since it needs to
17177 access some of mini's internals.
17179 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
17181 * mini.c (mono_method_to_ir): inlining fixes/cleanups
17183 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
17185 * mini.c, mini-opts.h, inssel.brg: inline small memcpy
17186 for value type handling.
17188 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
17190 * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
17191 (mono_method_check_inlining): enable inlining of all kinds of wrappers
17193 2003-05-15 Lluis Sanchez Gual <lluis@ideary.com>
17195 * mini.c: fixed little bug in CEE_NEWOBJ case when calling
17196 the constructor through a proxy.
17198 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
17200 * jit-icalls.c, inssel.brg: fixes to array element address
17203 2003-05-15 Dietmar Maurer <dietmar@ximian.com>
17205 * mini-x86.c (is_regsize_var): allocate pointer to registers
17207 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17209 * driver.c: fixed typo, added intrins to the set of optimizations
17210 tested with regressions.
17212 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
17214 * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
17215 * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
17218 2003-05-14 Dietmar Maurer <dietmar@ximian.com>
17220 * inssel.brg: remove some common pop instructions without side effects
17222 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
17224 * inssel-x86.brg: fixed thinko in int to double conversions.
17226 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
17228 * mini.c, jit-icalls.c: added runtime thread-static variable support.
17230 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
17232 * inssel-long32.brg: two more missing instructions.
17234 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
17236 * mini.c (mono_emit_call_args): set the cil_code for all arguments
17237 if not already set.
17239 2003-05-12 Zoltan Varga <vargaz@freemail.hu>
17241 * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
17244 * basic-float.cs: Added tests for negative zero.
17246 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
17248 * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
17249 a couple of missing operations for long casts, with test cases.
17251 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17253 * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
17255 2003-05-09 Dietmar Maurer <dietmar@ximian.com>
17257 * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
17258 code size estimation.
17260 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
17262 * mini.c (mono_jit_create_remoting_trampoline): make it work with
17263 abstract methods (fix bug 42542)
17265 * aot.c: add ability to handle array types
17267 2003-05-08 Zoltan Varga <vargaz@freemail.hu>
17269 * mini.c: Call the _specific versions of the object allocation
17270 functions if possible.
17272 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
17274 * driver.c: call setlocale ().
17276 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
17278 * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
17281 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
17283 * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
17285 * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
17286 wrappers (fix bug 42122)
17288 2003-05-04 Martin Baulig <martin@ximian.com>
17290 * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
17292 * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
17293 s/mini_set_defaults/mono_set_defaults/g.
17295 2003-05-04 Martin Baulig <martin@ximian.com>
17297 * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
17299 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
17301 * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
17302 (reported by Don Roberts).
17304 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
17306 * mini.c: temporarily work around two bugs for this release.
17308 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
17310 * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
17311 that contains -export-dynamic and it makes using the ld script
17313 * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
17315 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
17317 * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
17320 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
17322 * mini.c: make sure leave calls all the needed finally blocks,
17323 even when the target jumps out of multiple exception clauses.
17325 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17327 * ldscript, Makefile.am: add linker script to reduce the number of
17328 exported symbols (should also fix the issues with libwine defining
17329 some of the same symbols in io-layer).
17331 2003-05-01 Zoltan Varga <vargaz@freemail.hu>
17333 * driver.c (mini_main): Avoid assertion when no file name is given on
17336 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
17338 * driver.c: added --version/-V command line option.
17339 Added the inline optimization in the regression tests.
17341 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17343 * mini.c, basic-calls.cs: when inlining, save arguments to locals according
17344 to the type in the method signature (fixes bug#42134).
17346 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
17348 * mini.c: when inlining, check this is not null only when needed (bug #42135).
17350 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
17352 * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
17354 2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17356 * driver.c: fixed bug #42100.
17358 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
17360 * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
17362 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
17364 * mini.c: moved most of the code required to do inlining to its own
17365 function so it can be reused. Inline also ctors if appropriate.
17367 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
17369 * Makefile.am: Link with -export-dynamic so shared libs loaded by
17370 the runtime can call mono API functions.
17372 2003-04-27 Martin Baulig <martin@ximian.com>
17374 * debug-mini.c (mono_debug_init_method): Added
17375 `guint32 breakpoint_id' argument; if the method has a breakpoint,
17376 send a notification to the debugger.
17378 * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
17379 running in the Mono Debugger, just pass the breakpoint number to
17380 mono_debug_init_method().
17382 * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
17384 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
17386 * mini.c: allow some more unsafe compares.
17388 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17390 * mini-x86.c, Makefile.am: make distcheck works (partially from
17391 a patch by Richard Lee <r.h.lee@attbi.com>).
17392 * regset.c, regset.h: removed, they are unused.
17394 2003-04-25 Dick Porter <dick@ximian.com>
17396 * driver.c: Usage reports the name as 'mono' not 'mini'
17397 * exceptions-x86.c: Build and run on freebsd
17399 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
17401 * Makefile.am: install the program with the 'mono' name and
17402 the library as libmono instead of mini and libmini.
17404 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17406 * driver.c: provide the APIs for the embedding interface of the old jit.
17408 2003-04-23 Dietmar Maurer <dietmar@ximian.com>
17410 * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
17412 2003-04-23 Martin Baulig <martin@ximian.com>
17414 * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
17416 * driver.c: Added `--debug' command line argument to enable
17419 2003-04-23 Martin Baulig <martin@ximian.com>
17421 * debug.[ch]: Removed. The code is now in
17422 ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
17424 * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
17427 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
17429 * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
17431 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17434 (mini_cleanup): moved mono_runtime_cleanup call after the call to
17435 mono_domain_finalize.
17436 (mini_method_compile): use mono_method_profile* if the the option is
17439 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
17441 * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
17442 methods with their wrapper.
17444 * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
17445 methods with their wrapper.
17447 * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
17450 * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
17453 * mini.c (mono_method_check_inlining): Avoid inlining synchronized
17456 2003-04-17 Dietmar Maurer <dietmar@ximian.com>
17458 * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
17460 2003-04-16 Dietmar Maurer <dietmar@ximian.com>
17462 * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
17463 of the mempool. This is slightly faster and uses less memory
17465 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
17467 * mini.c: avoid O(n) allocation for variables.
17469 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17471 * mini.c: handle items on the stack after inlining methods.
17473 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
17475 * mini.c: make the method->opcode optimization dependent
17476 on MONO_OPT_INSTRINS and do it lazily.
17478 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
17480 * driver.c: print overall results at the end of regression run.
17482 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
17484 * inssel.brg: don't overwrite symbolic registers.
17486 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17488 * inssel-x86.brg: fix conversion from long to float.
17490 2003-04-11 Dietmar Maurer <dietmar@ximian.com>
17492 * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
17494 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
17496 * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
17498 * driver.c: Added --print-vtable option as in the old JIT.
17500 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
17502 * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
17504 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
17506 * inssel.brg, basic.cs: fixed checked conversions to byte and short.
17508 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
17510 * mini.c regalloc.c regalloc.h: Fix memory leak.
17512 2003-04-09 Dietmar Maurer <dietmar@ximian.com>
17514 * aot.c (mono_aot_get_method): register all used strings
17516 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
17518 * mini.c: always intern strings references with ldstr at compile time.
17520 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17522 * Makefile.am: add BUILT_SOURCES.
17524 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17526 * driver.c: give a better error message when the assembly to execute
17527 doesn't have an entry point.
17529 2003-04-07 Dietmar Maurer <dietmar@ximian.com>
17531 * Makefile.am: added hack for automake
17533 * mono/mini/mini.c (mono_save_args): always copy arguments to keep
17536 * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
17538 22003-04-07 Martin Baulig <martin@ximian.com>
17540 * Makefile.am: Added Makefile.am.
17542 * debugger-main.c: Removed, this is now in the debugger where it
17545 * mini.pc.in: Call this package `mini' for the moment.